API Reference

Class

OutlookUserPropertyCollection

Namespace OfficeIMO.Email
Assembly OfficeIMO.Email
Implements
IReadOnlyCollection<OutlookUserProperty> IEnumerable<OutlookUserProperty> IEnumerable
Modifiers sealed

Outlook-compatible user-defined fields backed by PidLidPropertyDefinitionStream and string-named PS_PUBLIC_STRINGS values.

Inheritance

  • Object
  • OutlookUserPropertyCollection

Usage

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

Returned or exposed by

Methods

public OutlookUserProperty Find(String name) #
Returns: OutlookUserProperty

Finds a user property case-insensitively.

Parameters

name System.String requiredposition: 0
public virtual IEnumerator<OutlookUserProperty> GetEnumerator() #
Returns: IEnumerator<OutlookUserProperty>
public T GetValueOrDefault<T>(String name) #
Returns: T

Reads a typed value or returns the managed default when it is absent or incompatible.

Type Parameters

T

Parameters

name System.String requiredposition: 0
public Boolean Remove(String name) #
Returns: Boolean

Removes the named value and its custom field definition.

Parameters

name System.String requiredposition: 0

Returns

True when either a value or definition was removed.

Set 2 overloads
public OutlookUserProperty Set(String name, Object value) #
Returns: OutlookUserProperty

Creates or replaces a user property, inferring its Outlook field type.

Parameters

name System.String requiredposition: 0
value System.Object requiredposition: 1
public OutlookUserProperty Set(String name, Object value, OutlookUserPropertyType fieldType, Boolean allowTypeChange = false) #
Returns: OutlookUserProperty

Creates or replaces a user property and its Outlook field definition. Existing definitions cannot be changed to a different known type unless allowTypeChange is true.

Parameters

name System.String requiredposition: 0
value System.Object requiredposition: 1
fieldType OfficeIMO.Email.OutlookUserPropertyType requiredposition: 2
allowTypeChange System.Boolean = false optionalposition: 3
public OutlookUserProperty SetDuration(String name, TimeSpan value, Boolean allowTypeChange = false) #
Returns: OutlookUserProperty

Creates or replaces a duration field using its natural managed representation.

Parameters

name System.String requiredposition: 0
value System.TimeSpan requiredposition: 1
allowTypeChange System.Boolean = false optionalposition: 2
public OutlookUserProperty SetKeywords(String name, IEnumerable<String> values, Boolean allowTypeChange = false) #
Returns: OutlookUserProperty

Creates or replaces a multiple-string keyword field.

Parameters

name System.String requiredposition: 0
values System.Collections.Generic.IEnumerable{System.String} requiredposition: 1
allowTypeChange System.Boolean = false optionalposition: 2
public Boolean TryGetValue<T>(String name, out T value) #
Returns: Boolean

Attempts to read and convert a user property's value.

Type Parameters

T

Parameters

name System.String requiredposition: 0
value ``0@ requiredposition: 1

Properties

public OutlookUserPropertyDefinitionState DefinitionState { get; } #

State of the item's complete field-definition stream.

public String DefinitionError { get; } #

Parse error for a corrupt or unsupported definition stream.

public IReadOnlyList<OutlookUserPropertyDefinition> Definitions { get; } #

Every decoded field definition, including preserved built-in bindings.