API Reference

Class

MapiPropertyBag

Namespace OfficeIMO.Email
Assembly OfficeIMO.Email
Modifiers sealed

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.

Accepted by parameters

Constructors

public MapiPropertyBag(IList<MapiProperty> properties) #

Creates a typed view over an existing property collection.

Parameters

properties System.Collections.Generic.IList{OfficeIMO.Email.MapiProperty} requiredposition: 0

Methods

public Boolean Contains(MapiPropertyKey key) #
Returns: Boolean

Returns whether at least one raw property has the specified canonical identity.

Parameters

key OfficeIMO.Email.MapiPropertyKey requiredposition: 0
public MapiProperty Find(MapiPropertyKey key) #
Returns: MapiProperty

Finds the winning property with the key's canonical identity and an accepted wire type.

Parameters

key OfficeIMO.Email.MapiPropertyKey requiredposition: 0
public IReadOnlyList<MapiProperty> FindAll(MapiPropertyKey key) #
Returns: IReadOnlyList<MapiProperty>

Returns every property with the specified canonical identity and an accepted wire type.

Parameters

key OfficeIMO.Email.MapiPropertyKey requiredposition: 0
public IReadOnlyList<MapiProperty> FindAllRaw(MapiPropertyKey key) #
Returns: IReadOnlyList<MapiProperty>

Returns every raw property with the specified canonical identity, in source order.

Parameters

key OfficeIMO.Email.MapiPropertyKey requiredposition: 0
public MapiProperty FindRaw(MapiPropertyKey key) #
Returns: MapiProperty

Finds the winning raw property by canonical identity without requiring an accepted wire type.

Parameters

key OfficeIMO.Email.MapiPropertyKey requiredposition: 0
public Nullable<T> GetNullableValue<T>(MapiPropertyKey<T> key) #
Returns: 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} requiredposition: 0
public T GetValueOrDefault<T>(MapiPropertyKey<T> key) #
Returns: T

Reads the winning typed value, or the managed default when it is absent or incompatible.

Type Parameters

T

Parameters

key OfficeIMO.Email.MapiPropertyKey{``0} requiredposition: 0
public Int32 Remove(MapiPropertyKey key) #
Returns: Int32

Removes all properties with the specified canonical identity.

Parameters

key OfficeIMO.Email.MapiPropertyKey requiredposition: 0

Returns

The number of removed raw properties.

public MapiProperty SetNull(MapiPropertyKey key, MapiPropertyType wireType, Nullable<UInt32> flags = null) #
Returns: MapiProperty

Writes a null placeholder for an object or null-typed MAPI property.

Parameters

key OfficeIMO.Email.MapiPropertyKey requiredposition: 0
wireType OfficeIMO.Email.MapiPropertyType requiredposition: 1
flags System.Nullable{System.UInt32} = null optionalposition: 2
Set``1 2 overloads
public MapiProperty Set<T>(MapiPropertyKey<T> key, T value, Nullable<UInt32> flags = null) #
Returns: MapiProperty

Replaces 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} requiredposition: 0
value ``0 requiredposition: 1
flags System.Nullable{System.UInt32} = null optionalposition: 2
public MapiProperty Set<T>(MapiPropertyKey<T> key, T value, MapiPropertyType wireType, Nullable<UInt32> flags = null) #
Returns: MapiProperty

Writes a value using one of the key's accepted wire types.

Type Parameters

T

Parameters

key OfficeIMO.Email.MapiPropertyKey{``0} requiredposition: 0
value ``0 requiredposition: 1
wireType OfficeIMO.Email.MapiPropertyType requiredposition: 2
flags System.Nullable{System.UInt32} = null optionalposition: 3
public Boolean TryGetValue<T>(MapiPropertyKey<T> key, out T value) #
Returns: Boolean

Attempts to read the winning property using the key's wire and managed type contract.

Type Parameters

T

Parameters

key OfficeIMO.Email.MapiPropertyKey{``0} requiredposition: 0
value ``0@ requiredposition: 1

Properties

public IList<MapiProperty> Properties { get; } #

The exact mutable raw collection backing this bag.