MapiPropertyExtensions
OfficeIMO.Email
Convenience lookup APIs for retained standard and named MAPI properties.
Inheritance
- object
- MapiPropertyExtensions
Methods
public static MapiProperty? GetMapiProperty(IEnumerable<MapiProperty> properties, MapiPropertyKey key) #Finds the last property matching a typed key's identity and accepted wire types.
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- key OfficeIMO.Email.MapiPropertyKey
Returns
MapiProperty?public static MapiProperty? GetMapiProperty(IEnumerable<MapiProperty> properties, ushort propertyId) #Finds the last standard property with the specified property identifier.
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- propertyId ushort
Returns
MapiProperty?public static MapiProperty? GetMapiProperty(IEnumerable<MapiProperty> properties, Guid propertySet, uint localId) #Finds the last numeric named property with the specified canonical identity.
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- propertySet System.Guid
- localId uint
Returns
MapiProperty?public static MapiProperty? GetMapiProperty(IEnumerable<MapiProperty> properties, Guid propertySet, string name) #Finds the last string named property with the specified canonical identity.
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- propertySet System.Guid
- name string
Returns
MapiProperty?public static T? GetMapiValueOrDefault<T>(IEnumerable<MapiProperty> properties, MapiPropertyKey<T?> key) #Reads a typed property, or the managed default when it is absent or incompatible.
Type Parameters
- T
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- key OfficeIMO.Email.MapiPropertyKey<T?>
Returns
T?public static T? GetMapiValue<T>(IEnumerable<MapiProperty> properties, ushort propertyId) #Gets a typed standard property value, or the default value when it is absent or has another type.
Type Parameters
- T
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- propertyId ushort
Returns
T?public static T? GetMapiValue<T>(IEnumerable<MapiProperty> properties, Guid propertySet, uint localId) #Gets a typed numeric named property value, or the default value when it is absent or has another type.
Type Parameters
- T
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- propertySet System.Guid
- localId uint
Returns
T?public static T? GetMapiValue<T>(IEnumerable<MapiProperty> properties, Guid propertySet, string name) #Gets a typed string named property value, or the default value when it is absent or has another type.
Type Parameters
- T
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- propertySet System.Guid
- name string
Returns
T?public static T? GetNullableMapiValue<T>(IEnumerable<MapiProperty> properties, MapiPropertyKey<T> key) #Reads a value-type property, or null when it is absent or incompatible.
Type Parameters
- T
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- key OfficeIMO.Email.MapiPropertyKey<T>
Returns
T?public static MapiProperty? GetRawMapiProperty(IEnumerable<MapiProperty> properties, MapiPropertyKey key) #Finds the last property matching a typed key's identity without checking its wire type.
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- key OfficeIMO.Email.MapiPropertyKey
Returns
MapiProperty?public static bool TryGetMapiValue<T>(IEnumerable<MapiProperty> properties, MapiPropertyKey<T?> key, out T? value) #Attempts to read a property using a typed key.
Type Parameters
- T
Parameters
- properties System.Collections.Generic.IEnumerable<OfficeIMO.Email.MapiProperty>
- key OfficeIMO.Email.MapiPropertyKey<T?>
- value T?
Returns
bool