MapiNamedProperty Struct
Definition
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
propertySetIdGuidThe property-set GUID that scopes the name.
namestringThe property name. Must not be null.
Exceptions
- ArgumentNullException
Thrown if
nameis null.- ArgumentException
nameis 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
Properties
Id
Gets the numeric name identifier.
public uint? Id { get; }
Property Value
Name
Gets the string name.
public string? Name { get; }
Property Value
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
otherMapiNamedPropertyThe identity to compare with.
Returns
Equals(object?)
Determines whether this identity equals another object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with.
Returns
- bool
true when
objis 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
leftMapiNamedPropertyThe first identity.
rightMapiNamedPropertyThe second identity.
Returns
operator !=(MapiNamedProperty, MapiNamedProperty)
Determines whether two named-property identities differ.
public static bool operator !=(MapiNamedProperty left, MapiNamedProperty right)
Parameters
leftMapiNamedPropertyThe first identity.
rightMapiNamedPropertyThe second identity.
Returns
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |