# MapiPropertyPatch

Ordered typed changes applied after normal semantic projection when an EmailDocument is written.

Class 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[MapiPropertyPatch.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyPatch.cs#L38)

**Modifiers**

sealed

Ordered typed changes applied after normal semantic projection when an [EmailDocument](/api/email/officeimo-email-emaildocument/) is written. This lets advanced callers override or remove exact MAPI properties without replacing unrelated raw state.

## Inheritance

- object
- MapiPropertyPatch

## Usage

Explore 8 API references to this type

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

### Returned or exposed by 5

- Property [EmailDocument.MapiWritePatch](/api/email/officeimo-email-emaildocument/#property-mapiwritepatch)
- Method [MapiPropertyPatch.Append](/api/email/officeimo-email-mapipropertypatch/#method-append-officeimo-email-mapipropertypatch)
- Method [MapiPropertyPatch.Remove](/api/email/officeimo-email-mapipropertypatch/#method-remove-officeimo-email-mapipropertykey)
- Method [MapiPropertyPatch.Set``1](/api/email/officeimo-email-mapipropertypatch/#method-set-officeimo-email-mapipropertykey-nullable-system-uint32)
- Property [EmailStoreItemPatch.Properties](/api/email/officeimo-email-store-emailstoreitempatch/#property-properties)

### Accepted by parameters 3

- Method [MapiPropertyPatch.Append](/api/email/officeimo-email-mapipropertypatch/#method-append-officeimo-email-mapipropertypatch) parameter `patch`
- Method [EmailStoreItemPatch.PatchProperties](/api/email/officeimo-email-store-emailstoreitempatch/#method-patchproperties-officeimo-email-mapipropertypatch) parameter `patch`
- Method [EmailStorePstMutationTransaction.PatchItemProperties](/api/email/officeimo-email-store-emailstorepstmutationtransaction/#method-patchitemproperties-string-officeimo-email-mapipropertypatch-threading-cancellationtoken) parameter `patch`

Filter members 

Show inherited

## Constructors

`public MapiPropertyPatch()` [#](#constructor-ctor)

[MapiPropertyPatch.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyPatch.cs#L38)

## Methods

`public MapiPropertyPatch Append(MapiPropertyPatch patch)` [#](#method-append-officeimo-email-mapipropertypatch)

[MapiPropertyPatch.cs:73](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyPatch.cs#L73)

Appends a snapshot of another patch's ordered changes.

Parameters

**patch OfficeIMO.Email.MapiPropertyPatch required**

Returns

`MapiPropertyPatch`

`public void Apply(MapiPropertyBag bag)` [#](#method-apply-officeimo-email-mapipropertybag)

[MapiPropertyPatch.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyPatch.cs#L80)

Applies the patch directly to a mutable raw property bag.

Parameters

**bag OfficeIMO.Email.MapiPropertyBag required**

`public MapiPropertyPatch Remove(MapiPropertyKey key)` [#](#method-remove-officeimo-email-mapipropertykey)

[MapiPropertyPatch.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyPatch.cs#L65)

Stages removal of every raw value with one canonical identity.

Parameters

**key OfficeIMO.Email.MapiPropertyKey required**

Returns

`MapiPropertyPatch`

Set``1 2 overloads

`public MapiPropertyPatch Set<T>(MapiPropertyKey<T?> key, T? value, uint? flags = null)` [#](#method-set-officeimo-email-mapipropertykey-nullable-system-uint32)

[MapiPropertyPatch.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyPatch.cs#L47)

Stages a typed set using the key's preferred wire type.

Type Parameters

**T**

Parameters

**key OfficeIMO.Email.MapiPropertyKey<T?> required**

**value T? required**

**flags uint? = null optional**

Returns

`MapiPropertyPatch`

`public MapiPropertyPatch Set<T>(MapiPropertyKey<T?> key, T? value, MapiPropertyType wireType, uint? flags = null)` [#](#method-set-officeimo-email-mapipropertykey-officeimo-email-mapipropertytype-nullable-system-uint32)

[MapiPropertyPatch.cs:54](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyPatch.cs#L54)

Stages a typed set using an explicitly accepted wire type.

Type Parameters

**T**

Parameters

**key OfficeIMO.Email.MapiPropertyKey<T?> required**

**value T? required**

**wireType OfficeIMO.Email.MapiPropertyType required**

**flags uint? = null optional**

Returns

`MapiPropertyPatch`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IReadOnlyList<MapiPropertyPatchChange> Changes { get; }` [#](#property-changes)

[MapiPropertyPatch.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyPatch.cs#L41)

Ordered immutable view of the staged changes.

`public bool IsEmpty { get; }` [#](#property-isempty)

[MapiPropertyPatch.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyPatch.cs#L43)

Whether the patch has no changes.

<!-- PowerForge markdown artifact sha256:0FC3BE3618DD3169905BDA7E0E0C52FCDC890824F4AFB2141D2E39532DE28A84 -->
