Aspose::Email::Mime::ContentType Class Reference

Represents a Content-Type header. More...

Inherits Object.

Public Member Functions

System::String get_Boundary ()
 Gets the value of the boundary parameter included in the Content-Type header. More...
 
void set_Boundary (System::String value)
 Sets the value of the boundary parameter included in the Content-Type header. More...
 
System::String get_CharSet ()
 Gets the value of the charset parameter. More...
 
void set_CharSet (System::String value)
 Sets the value of the charset parameter. More...
 
System::String get_MediaType ()
 Gets the internet media type. More...
 
void set_MediaType (System::String value)
 Sets the internet media type. More...
 
System::String get_Name ()
 Gets the value of the name parameter. More...
 
void set_Name (System::String value)
 Sets the value of the name parameter. More...
 
System::SharedPtr< TrackingStringDictionaryget_Parameters ()
 Gets the dictionary that contains the parameters. More...
 
bool get_IsChanged ()
 Gets a value indicating whether content type is changed. More...
 
bool get_CreatedManually () const
 
 ContentType ()
 Initializes a new instance of the ContentType class. More...
 
 ContentType (System::String contentType)
 Initializes a new instance of the ContentType class. More...
 
 ContentType (System::String contentType, bool createdManually)
 
bool Equals (System::SharedPtr< System::Object > obj) override
 Determines whether the specified System::Object is equal to this instance. More...
 
int32_t GetHashCode () const override
 Returns a hash code for this instance. More...
 
void Set (System::String contentType, System::SharedPtr< HeaderCollection > headers)
 
void PersistIfNeeded (System::SharedPtr< HeaderCollection > headers, bool forcePersist)
 
System::SharedPtr< ContentTypeClone ()
 
System::String ToString () const override
 Returns a System::String that represents this instance. More...
 

Public Attributes

System::SharedPtr< TrackingStringDictionaryparameters
 

Friends

class Aspose::Email::MailMessage
 
class Aspose::Email::Mime::HeaderCollection
 
class Aspose::Email::Mime::MimePart
 

Detailed Description

Represents a Content-Type header.

Constructor & Destructor Documentation

◆ ContentType() [1/3]

Aspose::Email::Mime::ContentType::ContentType ( )

Initializes a new instance of the ContentType class.

◆ ContentType() [2/3]

Aspose::Email::Mime::ContentType::ContentType ( System::String  contentType)

Initializes a new instance of the ContentType class.

Parameters
contentTypeType of the content.

◆ ContentType() [3/3]

Aspose::Email::Mime::ContentType::ContentType ( System::String  contentType,
bool  createdManually 
)

Member Function Documentation

◆ Clone()

System::SharedPtr<ContentType> Aspose::Email::Mime::ContentType::Clone ( )

◆ Equals()

bool Aspose::Email::Mime::ContentType::Equals ( System::SharedPtr< System::Object >  obj)
override

Determines whether the specified System::Object is equal to this instance.

Parameters
objThe System::Object to compare with this instance.
Returns
true if the specified System::Object is equal to this instance; otherwise, false.

◆ get_Boundary()

System::String Aspose::Email::Mime::ContentType::get_Boundary ( )

Gets the value of the boundary parameter included in the Content-Type header.

A string that contains the value of boundary parameter.

◆ get_CharSet()

System::String Aspose::Email::Mime::ContentType::get_CharSet ( )

Gets the value of the charset parameter.

A string that contains the value of charset parameter.

◆ get_CreatedManually()

bool Aspose::Email::Mime::ContentType::get_CreatedManually ( ) const

◆ get_IsChanged()

bool Aspose::Email::Mime::ContentType::get_IsChanged ( )

Gets a value indicating whether content type is changed.

true if content type is changed; otherwise, false.

◆ get_MediaType()

System::String Aspose::Email::Mime::ContentType::get_MediaType ( )

Gets the internet media type.

A String that contains the media type.

◆ get_Name()

System::String Aspose::Email::Mime::ContentType::get_Name ( )

Gets the value of the name parameter.

A String that contains the name.

◆ get_Parameters()

System::SharedPtr<TrackingStringDictionary> Aspose::Email::Mime::ContentType::get_Parameters ( )

Gets the dictionary that contains the parameters.

A StringDictionary that contains name and value pairs.

◆ GetHashCode()

int32_t Aspose::Email::Mime::ContentType::GetHashCode ( ) const
override

Returns a hash code for this instance.

Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

◆ PersistIfNeeded()

void Aspose::Email::Mime::ContentType::PersistIfNeeded ( System::SharedPtr< HeaderCollection headers,
bool  forcePersist 
)

◆ Set()

void Aspose::Email::Mime::ContentType::Set ( System::String  contentType,
System::SharedPtr< HeaderCollection headers 
)

◆ set_Boundary()

void Aspose::Email::Mime::ContentType::set_Boundary ( System::String  value)

Sets the value of the boundary parameter included in the Content-Type header.

A string that contains the value of boundary parameter.

◆ set_CharSet()

void Aspose::Email::Mime::ContentType::set_CharSet ( System::String  value)

Sets the value of the charset parameter.

A string that contains the value of charset parameter.

◆ set_MediaType()

void Aspose::Email::Mime::ContentType::set_MediaType ( System::String  value)

Sets the internet media type.

A String that contains the media type.

◆ set_Name()

void Aspose::Email::Mime::ContentType::set_Name ( System::String  value)

Sets the value of the name parameter.

A String that contains the name.

◆ ToString()

System::String Aspose::Email::Mime::ContentType::ToString ( ) const
override

Returns a System::String that represents this instance.

Returns
A System::String that represents this instance.

Friends And Related Function Documentation

◆ Aspose::Email::MailMessage

friend class Aspose::Email::MailMessage
friend

◆ Aspose::Email::Mime::HeaderCollection

◆ Aspose::Email::Mime::MimePart

friend class Aspose::Email::Mime::MimePart
friend

Member Data Documentation

◆ parameters

System::SharedPtr<TrackingStringDictionary> Aspose::Email::Mime::ContentType::parameters