# MapiPropertyKey

Describes the canonical identity and supported wire types of a standard or named MAPI property.

Class 

`OfficeIMO.Email`

**Namespace**

`OfficeIMO.Email`

**Assembly**

`OfficeIMO.Email`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[MapiPropertyKey.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L59)

Describes the canonical identity and supported wire types of a standard or named MAPI property.

## Inheritance

- object
- MapiPropertyKey

## Derived Types

- [MapiPropertyKey<T>](/api/email/officeimo-email-mapipropertykey-1/)

Filter members 

Show inherited

## Methods

`public bool Accepts(MapiPropertyType propertyType)` [#](#method-accepts-officeimo-email-mapipropertytype)

[MapiPropertyKey.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L77)

Returns whether a wire type is accepted by this key.

Parameters

**propertyType OfficeIMO.Email.MapiPropertyType required**

Returns

`bool`

`public ushort GetStandardPropertyId()` [#](#method-getstandardpropertyid)

[MapiPropertyKey.cs:69](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L69)

Returns the standard property identifier, or throws when this key identifies a named property.

Returns

`ushort`

`public bool Matches(MapiProperty property)` [#](#method-matches-officeimo-email-mapiproperty)

[MapiPropertyKey.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L74)

Returns whether a property has this key's canonical identity and an accepted wire type.

Parameters

**property OfficeIMO.Email.MapiProperty required**

Returns

`bool`

MatchesIdentity 2 overloads

`public bool MatchesIdentity(MapiProperty property)` [#](#method-matchesidentity-officeimo-email-mapiproperty)

[MapiPropertyKey.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L59)

Returns whether a property has this key's canonical identity, without checking its wire type.

Parameters

**property OfficeIMO.Email.MapiProperty required**

Returns

`bool`

`public bool MatchesIdentity(ushort propertyId)` [#](#method-matchesidentity-uint16)

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

Returns whether a standard property identifier has this key's canonical identity.

Parameters

**propertyId ushort required**

Returns

`bool`

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

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

Returns a string that represents the current object.

Returns

`string` A string that represents the current object.

## 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`

## Properties

`public string CanonicalName { get; }` [#](#property-canonicalname)

[MapiPropertyKey.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L37)

Microsoft canonical name or a stable application-defined name.

`public ushort? PropertyId { get; }` [#](#property-propertyid)

[MapiPropertyKey.cs:40](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L40)

Standard property identifier, or null for a named property.

`public MapiNamedProperty? Name { get; }` [#](#property-name)

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

Named-property identity, or null for a standard property.

`public MapiPropertyType PreferredType { get; }` [#](#property-preferredtype)

[MapiPropertyKey.cs:46](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L46)

Preferred wire type used when a new value is written.

`public IReadOnlyList<MapiPropertyType> AcceptedTypes { get; }` [#](#property-acceptedtypes)

[MapiPropertyKey.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L49)

Wire types accepted when reading the property.

`public bool IsNamed { get; }` [#](#property-isnamed)

[MapiPropertyKey.cs:52](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L52)

True when this key identifies a named property.

`public virtual Type ValueType { get; }` [#](#property-valuetype)

[MapiPropertyKey.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Email/Mapi/MapiPropertyKey.cs#L55)

Managed value type exposed by a typed key.

<!-- PowerForge markdown artifact sha256:EA62E444D1742681A128DCFE9C4D5924245E2CE6598E9EDE82083703BEDBF327 -->
