Table of Contents

MapiNamedProperty Struct

Definition

Namespace
Bodu.Formats.Outlook
Assembly
Bodu.Formats.Outlook.dll
Package
Bodu.Formats.Outlook 0.7.1
Source
MapiNamedProperty.cs

Represents the identity of a MAPI named property: a property-set GUID combined with either a numeric identifier or a string name.

public readonly struct MapiNamedProperty : IEquatable<MapiNamedProperty>
Implements
Inherited Members
Extension Methods

Remarks

Named properties occupy the tag identifier range at or above 0x8000; the identifier a given name maps to is file-specific, so the durable identity is the (PropertySetId, Id or Name) pair this type carries. Exactly one of Id and Name is set, mirroring the two kinds defined by MS-OXCDATA §2.6.1.

Constructors

MapiNamedProperty(Guid, string)

Initializes a new instance of the MapiNamedProperty struct for a string named property.

public MapiNamedProperty(Guid propertySetId, string name)

Parameters

propertySetId Guid

The property-set GUID that scopes the name.

name string

The property name. Must not be null.

Exceptions

ArgumentNullException

Thrown if name is null.

ArgumentException

name is empty or whitespace.

MapiNamedProperty(Guid, uint)

Initializes a new instance of the MapiNamedProperty struct for a numeric named property.

public MapiNamedProperty(Guid propertySetId, uint id)

Parameters

propertySetId Guid

The property-set GUID that scopes the identifier.

id uint

The numeric name identifier.

Properties

Id

Gets the numeric name identifier.

public uint? Id { get; }

Property Value

uint?

The identifier, or null for a string named property.

Name

Gets the string name.

public string? Name { get; }

Property Value

string

The name, or null for a numeric named property.

PropertySetId

Gets the property-set GUID that scopes the name or identifier.

public Guid PropertySetId { get; }

Property Value

Guid

The property-set GUID.

Methods

Equals(MapiNamedProperty)

Determines whether this identity equals another.

public bool Equals(MapiNamedProperty other)

Parameters

other MapiNamedProperty

The identity to compare with.

Returns

bool

true when the property-set GUIDs match and the identities carry the same identifier or the same name (ordinal comparison).

Equals(object?)

Determines whether this identity equals another object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with.

Returns

bool

true when obj is an equal MapiNamedProperty.

GetHashCode()

Returns a hash code consistent with Equals(MapiNamedProperty).

public override int GetHashCode()

Returns

int

A hash code computed over the property-set GUID and the identifier or name.

ToString()

Returns a textual form of the identity for diagnostics.

public override string ToString()

Returns

string

The property-set GUID followed by the numeric identifier or the name.

Operators

operator ==(MapiNamedProperty, MapiNamedProperty)

Determines whether two named-property identities are equal.

public static bool operator ==(MapiNamedProperty left, MapiNamedProperty right)

Parameters

left MapiNamedProperty

The first identity.

right MapiNamedProperty

The second identity.

Returns

bool

true when the identities are equal.

operator !=(MapiNamedProperty, MapiNamedProperty)

Determines whether two named-property identities differ.

public static bool operator !=(MapiNamedProperty left, MapiNamedProperty right)

Parameters

left MapiNamedProperty

The first identity.

right MapiNamedProperty

The second identity.

Returns

bool

true when the identities differ.

Applies to

ProductVersions
.NET8, 10