# ContentLineComponent

Ordered content-line component with properties and nested components.

Class 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[ContentLineComponent.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L6)

**Modifiers**

sealed

Ordered content-line component with properties and nested components.

## Inheritance

- object
- ContentLineComponent

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Read and Edit Calendars, Contacts, and Outlook Items](/docs/email/calendars-and-contacts/) Guide
  
  Read and update iCalendar (ICS), vCalendar, and vCard files, and expand Outlook appointment recurrence with OfficeIMO.Email.

## Usage

Explore 25 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 9

- Method [ContentLineComponent.AddComponent](/api/email/officeimo-email-contentlinecomponent/#method-addcomponent-string)
- Method [ContentLineComponent.GetComponents](/api/email/officeimo-email-contentlinecomponent/#method-getcomponents-string-boolean)
- Property [ContentLineComponent.Components](/api/email/officeimo-email-contentlinecomponent/#property-components)
- Method [IcsDocument.AddCalendar](/api/email/officeimo-email-icsdocument/#method-addcalendar)
- Method [IcsDocument.GetComponents](/api/email/officeimo-email-icsdocument/#method-getcomponents-string-boolean)
- Property [IcsDocument.Calendars](/api/email/officeimo-email-icsdocument/#property-calendars)
- Method [VCardDocument.AddCard](/api/email/officeimo-email-vcarddocument/#method-addcard-officeimo-email-vcardversion)
- Method [VCardDocument.AddGroup](/api/email/officeimo-email-vcarddocument/#method-addgroup-string-collections-generic-ienumerable-system-string)
- Property [VCardDocument.Cards](/api/email/officeimo-email-vcarddocument/#property-cards)

### Accepted by parameters 16

- Extension method [ContentLineComponent.AddRecurrenceRule](/api/email/officeimo-email-contentlinecomponent/#extension-addrecurrencerule-officeimo-email-contentlinecomponent-officeimo-email-icsrecurrencerule) parameter `component`
- Extension method [ContentLineComponent.AddVCardText](/api/email/officeimo-email-contentlinecomponent/#extension-addvcardtext-officeimo-email-contentlinecomponent-string-string) parameter `card`
- Extension method [ContentLineComponent.GetRecurrenceRules](/api/email/officeimo-email-contentlinecomponent/#extension-getrecurrencerules-officeimo-email-contentlinecomponent) parameter `component`
- Extension method [ContentLineComponent.GetTemporalValue](/api/email/officeimo-email-contentlinecomponent/#extension-gettemporalvalue-officeimo-email-contentlinecomponent-string) parameter `component`
- Extension method [ContentLineComponent.GetVCardText](/api/email/officeimo-email-contentlinecomponent/#extension-getvcardtext-officeimo-email-contentlinecomponent-string) parameter `card`
- Extension method [ContentLineComponent.SetTemporalValue](/api/email/officeimo-email-contentlinecomponent/#extension-settemporalvalue-officeimo-email-contentlinecomponent-string-officeimo-email-icstemporalvalue) parameter `component`
- Extension method [ContentLineComponent.SetVCardText](/api/email/officeimo-email-contentlinecomponent/#extension-setvcardtext-officeimo-email-contentlinecomponent-string-string) parameter `card`
- Method [IcsComponentExtensions.AddRecurrenceRule](/api/email/officeimo-email-icscomponentextensions/#method-addrecurrencerule-officeimo-email-contentlinecomponent-officeimo-email-icsrecurrencerule) parameter `component`
- Method [IcsComponentExtensions.GetRecurrenceRules](/api/email/officeimo-email-icscomponentextensions/#method-getrecurrencerules-officeimo-email-contentlinecomponent) parameter `component`
- Method [IcsComponentExtensions.GetTemporalValue](/api/email/officeimo-email-icscomponentextensions/#method-gettemporalvalue-officeimo-email-contentlinecomponent-string) parameter `component`
- Method [IcsComponentExtensions.SetTemporalValue](/api/email/officeimo-email-icscomponentextensions/#method-settemporalvalue-officeimo-email-contentlinecomponent-string-officeimo-email-icstemporalvalue) parameter `component`
- Method [VCardComponentExtensions.AddVCardText](/api/email/officeimo-email-vcardcomponentextensions/#method-addvcardtext-officeimo-email-contentlinecomponent-string-string) parameter `card`
- Method [VCardComponentExtensions.GetVCardText](/api/email/officeimo-email-vcardcomponentextensions/#method-getvcardtext-officeimo-email-contentlinecomponent-string) parameter `card`
- Method [VCardComponentExtensions.SetVCardText](/api/email/officeimo-email-vcardcomponentextensions/#method-setvcardtext-officeimo-email-contentlinecomponent-string-string) parameter `card`
- Method [VCardDocument.GetVersion](/api/email/officeimo-email-vcarddocument/#method-getversion-officeimo-email-contentlinecomponent) parameter `card`
- Method [VCardDocument.SetVersion](/api/email/officeimo-email-vcarddocument/#method-setversion-officeimo-email-contentlinecomponent-officeimo-email-vcardversion) parameter `card`

Filter members 

Show inherited

## Constructors

`public ContentLineComponent(string name)` [#](#constructor-ctor-string)

[ContentLineComponent.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L6)

Creates a component such as VCALENDAR, VEVENT, VALARM, or VCARD.

Parameters

**name string required**

## Methods

`public ContentLineComponent AddComponent(string name)` [#](#method-addcomponent-string)

[ContentLineComponent.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L49)

Adds a nested component and returns it.

Parameters

**name string required**

Returns

`ContentLineComponent`

`public ContentLineProperty AddProperty(string name, string value = "")` [#](#method-addproperty-string-string)

[ContentLineComponent.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L33)

Adds a property and returns it for further configuration.

Parameters

**name string required**

**value string = "" optional**

Returns

`ContentLineProperty`

`public IEnumerable<ContentLineComponent> GetComponents(string name, bool recursive = false)` [#](#method-getcomponents-string-boolean)

Enumerates matching nested components in document order.

Parameters

**name string required**

**recursive bool = false optional**

Returns

`IEnumerable<ContentLineComponent>`

`public ContentLineProperty? GetFirstProperty(string name)` [#](#method-getfirstproperty-string)

[ContentLineComponent.cs:28](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L28)

Returns the first direct property matching name.

Parameters

**name string required**

Returns

`ContentLineProperty?`

`public IEnumerable<ContentLineProperty> GetProperties(string name)` [#](#method-getproperties-string)

[ContentLineComponent.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L24)

Returns all direct properties matching name.

Parameters

**name string required**

Returns

`IEnumerable<ContentLineProperty>`

`public ContentLineProperty SetProperty(string name, string value)` [#](#method-setproperty-string-string)

[ContentLineComponent.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L40)

Replaces all matching direct properties with one value.

Parameters

**name string required**

**value string required**

Returns

`ContentLineProperty`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Name { get; set; }` [#](#property-name)

[ContentLineComponent.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L15)

Component name.

`public IList<ContentLineProperty> Properties { get; }` [#](#property-properties)

[ContentLineComponent.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L18)

Ordered component properties.

`public IList<ContentLineComponent> Components { get; }` [#](#property-components)

[ContentLineComponent.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/ContentLines/ContentLineComponent.cs#L21)

Ordered nested components.

## Extension Methods

`public static ContentLineProperty AddRecurrenceRule(ContentLineComponent component, IcsRecurrenceRule rule)` [#](#extension-addrecurrencerule-officeimo-email-contentlinecomponent-officeimo-email-icsrecurrencerule)

[IcsComponentExtensions.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Calendar/IcsComponentExtensions.cs#L32)

Adds an RRULE property.

Parameters

**component OfficeIMO.Email.ContentLineComponent required**

**rule OfficeIMO.Email.IcsRecurrenceRule required**

Returns

`ContentLineProperty`

`public static ContentLineProperty AddVCardText(ContentLineComponent card, string propertyName, string value)` [#](#extension-addvcardtext-officeimo-email-contentlinecomponent-string-string)

[VCardComponentExtensions.cs:22](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Contact/VCardComponentExtensions.cs#L22)

Adds a repeated escaped text property.

Parameters

**card OfficeIMO.Email.ContentLineComponent required**

**propertyName string required**

**value string required**

Returns

`ContentLineProperty`

`public static IEnumerable<IcsRecurrenceRule> GetRecurrenceRules(ContentLineComponent component)` [#](#extension-getrecurrencerules-officeimo-email-contentlinecomponent)

Parses every direct RRULE property.

Parameters

**component OfficeIMO.Email.ContentLineComponent required**

Returns

`IEnumerable<IcsRecurrenceRule>`

`public static IcsTemporalValue? GetTemporalValue(ContentLineComponent component, string propertyName)` [#](#extension-gettemporalvalue-officeimo-email-contentlinecomponent-string)

[IcsComponentExtensions.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Calendar/IcsComponentExtensions.cs#L7)

Gets the first temporal property with the supplied name.

Parameters

**component OfficeIMO.Email.ContentLineComponent required**

**propertyName string required**

Returns

`IcsTemporalValue?`

`public static string? GetVCardText(ContentLineComponent card, string propertyName)` [#](#extension-getvcardtext-officeimo-email-contentlinecomponent-string)

[VCardComponentExtensions.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Contact/VCardComponentExtensions.cs#L7)

Returns the first property value with vCard text escaping decoded.

Parameters

**card OfficeIMO.Email.ContentLineComponent required**

**propertyName string required**

Returns

`string?`

`public static ContentLineProperty SetTemporalValue(ContentLineComponent component, string propertyName, IcsTemporalValue value)` [#](#extension-settemporalvalue-officeimo-email-contentlinecomponent-string-officeimo-email-icstemporalvalue)

[IcsComponentExtensions.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Calendar/IcsComponentExtensions.cs#L16)

Creates or replaces one temporal property without resolving TZID through the host OS.

Parameters

**component OfficeIMO.Email.ContentLineComponent required**

**propertyName string required**

**value OfficeIMO.Email.IcsTemporalValue required**

Returns

`ContentLineProperty`

`public static ContentLineProperty SetVCardText(ContentLineComponent card, string propertyName, string value)` [#](#extension-setvcardtext-officeimo-email-contentlinecomponent-string-string)

[VCardComponentExtensions.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Contact/VCardComponentExtensions.cs#L15)

Creates or replaces one escaped text property.

Parameters

**card OfficeIMO.Email.ContentLineComponent required**

**propertyName string required**

**value string required**

Returns

`ContentLineProperty`

<!-- PowerForge markdown artifact sha256:EEB9478B8775A69250CEC21B682FAE645444DFFA745CF0583AA15DACF276A60E -->
