API Reference
MapiPropertyBag
Typed access to an ordered, duplicate-preserving MAPI property collection.
Inheritance
- Object
- MapiPropertyBag
Remarks
Reads use the last property with a matching canonical identity. Raw properties remain untouched until UInt32>) or MapiPropertyKey) is called.
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 EmailAttachment.Mapi
- Property EmailDocument.Mapi
- Property EmailRecipient.Mapi
- Property EmailStoreFolder.Mapi
- Property EmailStoreFolderInfo.Mapi
Accepted by parameters
- Method MapiPropertyPatch.Apply
Constructors
public MapiPropertyBag(IList<MapiProperty> properties) #Creates a typed view over an existing property collection.
Parameters
- properties System.Collections.Generic.IList{OfficeIMO.Email.MapiProperty}
Methods
public Boolean Contains(MapiPropertyKey key) #BooleanReturns whether at least one raw property has the specified canonical identity.
Parameters
- key OfficeIMO.Email.MapiPropertyKey
public MapiProperty Find(MapiPropertyKey key) #MapiPropertyFinds the winning property with the key's canonical identity and an accepted wire type.
Parameters
- key OfficeIMO.Email.MapiPropertyKey
public IReadOnlyList<MapiProperty> FindAll(MapiPropertyKey key) #IReadOnlyList<MapiProperty>Returns every property with the specified canonical identity and an accepted wire type.
Parameters
- key OfficeIMO.Email.MapiPropertyKey
public IReadOnlyList<MapiProperty> FindAllRaw(MapiPropertyKey key) #IReadOnlyList<MapiProperty>Returns every raw property with the specified canonical identity, in source order.
Parameters
- key OfficeIMO.Email.MapiPropertyKey
public MapiProperty FindRaw(MapiPropertyKey key) #MapiPropertyFinds the winning raw property by canonical identity without requiring an accepted wire type.
Parameters
- key OfficeIMO.Email.MapiPropertyKey
public Nullable<T> GetNullableValue<T>(MapiPropertyKey<T> key) #Nullable<T>Reads the winning value-type property, or null when it is absent or incompatible.
Type Parameters
- T
Parameters
- key OfficeIMO.Email.MapiPropertyKey{``0}
public T GetValueOrDefault<T>(MapiPropertyKey<T> key) #TReads the winning typed value, or the managed default when it is absent or incompatible.
Type Parameters
- T
Parameters
- key OfficeIMO.Email.MapiPropertyKey{``0}
public Int32 Remove(MapiPropertyKey key) #Int32Removes all properties with the specified canonical identity.
Parameters
- key OfficeIMO.Email.MapiPropertyKey
Returns
The number of removed raw properties.
public MapiProperty SetNull(MapiPropertyKey key, MapiPropertyType wireType, Nullable<UInt32> flags = null) #MapiPropertyWrites a null placeholder for an object or null-typed MAPI property.
Parameters
- key OfficeIMO.Email.MapiPropertyKey
- wireType OfficeIMO.Email.MapiPropertyType
- flags System.Nullable{System.UInt32} = null
public MapiProperty Set<T>(MapiPropertyKey<T> key, T value, Nullable<UInt32> flags = null) #MapiPropertyReplaces every property with the same canonical identity and appends one property using the key's preferred wire type. Existing mapped property ID and flags are retained unless flags are supplied explicitly.
Type Parameters
- T
Parameters
- key OfficeIMO.Email.MapiPropertyKey{``0}
- value ``0
- flags System.Nullable{System.UInt32} = null
public MapiProperty Set<T>(MapiPropertyKey<T> key, T value, MapiPropertyType wireType, Nullable<UInt32> flags = null) #MapiPropertyWrites a value using one of the key's accepted wire types.
Type Parameters
- T
Parameters
- key OfficeIMO.Email.MapiPropertyKey{``0}
- value ``0
- wireType OfficeIMO.Email.MapiPropertyType
- flags System.Nullable{System.UInt32} = null
public Boolean TryGetValue<T>(MapiPropertyKey<T> key, out T value) #BooleanAttempts to read the winning property using the key's wire and managed type contract.
Type Parameters
- T
Parameters
- key OfficeIMO.Email.MapiPropertyKey{``0}
- value ``0@
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public IList<MapiProperty> Properties { get; } #The exact mutable raw collection backing this bag.