Aspose::Email::Mapi::Msg::MessageObjectProperty Class Referencefinal

Represents a property on a MessageObject. More...

Inherits Object.

Public Member Functions

MapiType get_PropertyType () const
 Gets the type of the property. More...
 
MapiPropertyFlags get_Flags () const
 Gets the flags set on a property. More...
 
int32_t get_Id () const
 Gets the id of the property. More...
 
int64_t get_PropertyTag ()
 Gets the property tag, a combined value which contains Id and PropertyType More...
 
System::Guid get_Guid () const
 Gets the GUID for the named property. More...
 
void set_Guid (System::Guid value)
 Sets the GUID for the named property. More...
 
NamedPropertyKind get_PropertyKind () const
 Gets the kind of the property if it's named. More...
 
void set_PropertyKind (NamedPropertyKind value)
 Sets the kind of the property if it's named. More...
 
System::String get_Name () const
 Gets the name of the property if it's named. More...
 
void set_Name (System::String value)
 Sets the name of the property if it's named. More...
 
uint32_t get_NameId () const
 Gets the name id of the property if it's named. More...
 
void set_NameId (uint32_t value)
 Sets the name id of the property if it's named. More...
 
bool get_Named ()
 Gets a value indicating whether this MessageObjectProperty is a named property. More...
 
bool get_Atomic ()
 Gets a value indicating whether this MessageObjectProperty is atomic. More...
 
System::SharedPtr< System::Object > get_Value () const
 Gets the value of the property. More...
 
void set_Value (System::SharedPtr< System::Object > value)
 Sets the value of the property. More...
 
 MessageObjectProperty (int64_t propertyTag, MapiPropertyFlags flags, System::SharedPtr< System::Object > value)
 Initializes a new instance of the MessageObjectProperty class. More...
 
 MessageObjectProperty (int32_t id, MapiType type, MapiPropertyFlags flags, System::SharedPtr< System::Object > value)
 Initializes a new instance of the MessageObjectProperty class. More...
 
int32_t ToInt ()
 Converts the value of the property to integer. More...
 
System::DateTime ToDateTime ()
 Converts the value of the property to DateTime. More...
 
System::String ToStringRepresentation ()
 Converts the value of the property to string. More...
 
template<typename T >
System::SharedPtr< System::Collections::Generic::IList< T > > ToList ()
 Converts the value of the property to a list of values. More...
 
System::Guid ToGuid ()
 Converts the value of the property to Guid. More...
 
System::ArrayPtr< uint8_t > ToByteArray ()
 Converts the value of the property to byte array. More...
 

Friends

class Aspose::Email::Mapi::Msg::CFB::AtomicWriters::MapiPropertyWriter_BINARY
 
class Aspose::Email::Mapi::Msg::CFB::MapiPropertyWriter
 

Detailed Description

Represents a property on a MessageObject.

Constructor & Destructor Documentation

◆ MessageObjectProperty() [1/2]

Aspose::Email::Mapi::Msg::MessageObjectProperty::MessageObjectProperty ( int64_t  propertyTag,
MapiPropertyFlags  flags,
System::SharedPtr< System::Object >  value 
)

Initializes a new instance of the MessageObjectProperty class.

Parameters
propertyTagThe property tag.
flagsThe flags to be set on.
valueThe value of the property.
Exceptions
ArgumentNullExceptionIf value is null.
InvalidEnumArgumentExceptionIf propertyTag contains invalid type definition."

◆ MessageObjectProperty() [2/2]

Aspose::Email::Mapi::Msg::MessageObjectProperty::MessageObjectProperty ( int32_t  id,
MapiType  type,
MapiPropertyFlags  flags,
System::SharedPtr< System::Object >  value 
)

Initializes a new instance of the MessageObjectProperty class.

Parameters
idThe id.
typeThe type of the property.
flagsThe flags to be set on.
valueThe value of the property.
Exceptions
ArgumentNullExceptionIf value is null.
InvalidEnumArgumentExceptionIf type is invalid."

Member Function Documentation

◆ get_Atomic()

bool Aspose::Email::Mapi::Msg::MessageObjectProperty::get_Atomic ( )

Gets a value indicating whether this MessageObjectProperty is atomic.

true if atomic; otherwise, false.

◆ get_Flags()

MapiPropertyFlags Aspose::Email::Mapi::Msg::MessageObjectProperty::get_Flags ( ) const

Gets the flags set on a property.

The flags.

◆ get_Guid()

System::Guid Aspose::Email::Mapi::Msg::MessageObjectProperty::get_Guid ( ) const

Gets the GUID for the named property.

The GUID.

◆ get_Id()

int32_t Aspose::Email::Mapi::Msg::MessageObjectProperty::get_Id ( ) const

Gets the id of the property.

The id if the property.

◆ get_Name()

System::String Aspose::Email::Mapi::Msg::MessageObjectProperty::get_Name ( ) const

Gets the name of the property if it's named.

The name.

◆ get_Named()

bool Aspose::Email::Mapi::Msg::MessageObjectProperty::get_Named ( )

Gets a value indicating whether this MessageObjectProperty is a named property.

true if named; otherwise, false.

A named property is determined by its ID, the range for such ids is [0x8000,0xfffe].

◆ get_NameId()

uint32_t Aspose::Email::Mapi::Msg::MessageObjectProperty::get_NameId ( ) const

Gets the name id of the property if it's named.

The name id.

◆ get_PropertyKind()

NamedPropertyKind Aspose::Email::Mapi::Msg::MessageObjectProperty::get_PropertyKind ( ) const

Gets the kind of the property if it's named.

The kind of the property.

◆ get_PropertyTag()

int64_t Aspose::Email::Mapi::Msg::MessageObjectProperty::get_PropertyTag ( )

Gets the property tag, a combined value which contains Id and PropertyType

The property tag.

◆ get_PropertyType()

MapiType Aspose::Email::Mapi::Msg::MessageObjectProperty::get_PropertyType ( ) const

Gets the type of the property.

The type of the property.

◆ get_Value()

System::SharedPtr<System::Object> Aspose::Email::Mapi::Msg::MessageObjectProperty::get_Value ( ) const

Gets the value of the property.

The value.

Exceptions
ArgumentNullExceptionIf passed value is null.

◆ set_Guid()

void Aspose::Email::Mapi::Msg::MessageObjectProperty::set_Guid ( System::Guid  value)

Sets the GUID for the named property.

The GUID.

◆ set_Name()

void Aspose::Email::Mapi::Msg::MessageObjectProperty::set_Name ( System::String  value)

Sets the name of the property if it's named.

The name.

◆ set_NameId()

void Aspose::Email::Mapi::Msg::MessageObjectProperty::set_NameId ( uint32_t  value)

Sets the name id of the property if it's named.

The name id.

◆ set_PropertyKind()

void Aspose::Email::Mapi::Msg::MessageObjectProperty::set_PropertyKind ( NamedPropertyKind  value)

Sets the kind of the property if it's named.

The kind of the property.

◆ set_Value()

void Aspose::Email::Mapi::Msg::MessageObjectProperty::set_Value ( System::SharedPtr< System::Object >  value)

Sets the value of the property.

The value.

Exceptions
ArgumentNullExceptionIf passed value is null.

◆ ToByteArray()

System::ArrayPtr<uint8_t> Aspose::Email::Mapi::Msg::MessageObjectProperty::ToByteArray ( )

Converts the value of the property to byte array.

Returns
Byte array object, if type can't be converted to byte array returns empty array.

This method doesn't provide automatic conversion of the data types, e.g. if MessageObjectProperty::Value property is of type default value will be returned.

◆ ToDateTime()

System::DateTime Aspose::Email::Mapi::Msg::MessageObjectProperty::ToDateTime ( )

Converts the value of the property to DateTime.

Returns
DateTime value, if type can't be converted to DateTime returns DateTime::MinValue.

This method doesn't provide automatic conversion of the data types, e.g. if MessageObjectProperty::Value property is of type default value will be returned.

◆ ToGuid()

System::Guid Aspose::Email::Mapi::Msg::MessageObjectProperty::ToGuid ( )

Converts the value of the property to Guid.

Returns
Guid object, if type can't be converted to Guid returns empty GUID.

This method doesn't provide automatic conversion of the data types, e.g. if MessageObjectProperty::Value property is of type default value will be returned.

◆ ToInt()

int32_t Aspose::Email::Mapi::Msg::MessageObjectProperty::ToInt ( )

Converts the value of the property to integer.

Returns
Integer value, if type can't be converted to integer returns 0.

◆ ToList()

template<typename T >
System::SharedPtr<System::Collections::Generic::IList<T> > Aspose::Email::Mapi::Msg::MessageObjectProperty::ToList ( )
inline

Converts the value of the property to a list of values.

Returns
IList implementation, if type can't be converted to IList returns empty list implementation.

This method doesn't provide automatic conversion of the data types, e.g. if MessageObjectProperty::Value property is of type default value will be returned.

◆ ToStringRepresentation()

System::String Aspose::Email::Mapi::Msg::MessageObjectProperty::ToStringRepresentation ( )

Converts the value of the property to string.

Returns
String value, if type can't be converted to string returns empty string.

This method doesn't provide automatic conversion of the data types, e.g. if MessageObjectProperty::Value property is of type default value will be returned.

Friends And Related Function Documentation

◆ Aspose::Email::Mapi::Msg::CFB::AtomicWriters::MapiPropertyWriter_BINARY

friend class Aspose::Email::Mapi::Msg::CFB::AtomicWriters::MapiPropertyWriter_BINARY
friend

◆ Aspose::Email::Mapi::Msg::CFB::MapiPropertyWriter

friend class Aspose::Email::Mapi::Msg::CFB::MapiPropertyWriter
friend