API Reference
OutlookUserPropertyCollection
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
- Property EmailDocument.UserProperties
Methods
public OutlookUserProperty Find(String name) #OutlookUserPropertyFinds a user property case-insensitively.
Parameters
- name System.String
public virtual IEnumerator<OutlookUserProperty> GetEnumerator() #IEnumerator<OutlookUserProperty>public T GetValueOrDefault<T>(String name) #TReads a typed value or returns the managed default when it is absent or incompatible.
Type Parameters
- T
Parameters
- name System.String
public Boolean Remove(String name) #BooleanRemoves the named value and its custom field definition.
Parameters
- name System.String
Returns
True when either a value or definition was removed.
public OutlookUserProperty Set(String name, Object value) #OutlookUserPropertyCreates or replaces a user property, inferring its Outlook field type.
Parameters
- name System.String
- value System.Object
public OutlookUserProperty Set(String name, Object value, OutlookUserPropertyType fieldType, Boolean allowTypeChange = false) #OutlookUserPropertyCreates 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
- value System.Object
- fieldType OfficeIMO.Email.OutlookUserPropertyType
- allowTypeChange System.Boolean = false
public OutlookUserProperty SetDuration(String name, TimeSpan value, Boolean allowTypeChange = false) #OutlookUserPropertyCreates or replaces a duration field using its natural managed representation.
Parameters
- name System.String
- value System.TimeSpan
- allowTypeChange System.Boolean = false
public OutlookUserProperty SetKeywords(String name, IEnumerable<String> values, Boolean allowTypeChange = false) #OutlookUserPropertyCreates or replaces a multiple-string keyword field.
Parameters
- name System.String
- values System.Collections.Generic.IEnumerable{System.String}
- allowTypeChange System.Boolean = false
public Boolean TryGetValue<T>(String name, out T value) #BooleanAttempts to read and convert a user property's value.
Type Parameters
- T
Parameters
- name System.String
- value ``0@
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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.
public virtual Int32 Count { get; } #