Defines the collection of header fields More...
Inherits System::Collections::Generic::ICollection< System::String >.
Public Member Functions | |
virtual System::ArrayPtr< System::String > | get_AllKeys () |
Gets an array of strings containing all header keys in collections More... | |
virtual System::SharedPtr< System::Collections::ObjectModel::ReadOnlyCollection< System::String > > | get_Keys () |
Gets a T:System::Collections::ObjectModel::ReadOnlyCollection<string> containing all header keys in collections More... | |
int32_t | get_Count () const override |
Gets a count of headers More... | |
bool | get_IsReadOnly () const override |
Is collection readonly More... | |
HeaderCollection (System::SharedPtr< HeaderCollection > col) | |
Initializes a new instance of the HeaderCollection class. More... | |
HeaderCollection () | |
Initializes a new instance of the HeaderCollection class. More... | |
HeaderCollection (System::SharedPtr< System::Collections::Generic::IEqualityComparer< System::String >> equalityComparer) | |
HeaderCollection (int32_t capacity, System::SharedPtr< System::Collections::Generic::IEqualityComparer< System::String >> equalityComparer) | |
System::String | idx_get (System::String name) |
Gets a value from collection by the name. More... | |
void | idx_set (System::String name, System::String value) |
Gets a value from collection by the name. More... | |
System::String | idx_get (int32_t index) |
Gets a value from collection by the index. More... | |
virtual System::String | GetKey (int32_t index) |
Gets the key at the specified index of the collection. More... | |
virtual System::String | Get (int32_t index) |
Gets the value at the specified index. More... | |
System::String | Get (System::String name) |
Gets the header value by a given header name. More... | |
System::String | GetString () |
Returns a System::String that represents this instance. More... | |
System::String | GetDecodedValue (System::String name) |
Gets the header value. More... | |
System::ArrayPtr< System::String > | GetValues (System::String name) |
Gets the header values. More... | |
virtual void | Add_ (System::String name, System::String value) |
Adds the header. More... | |
void | Add (const System::SharedPtr< HeaderCollection > &c) |
Adds a header to collection. More... | |
void | Add (System::String name, System::String value) |
Adds the header. More... | |
void | Insert (System::String name, System::String value) |
Inserts the header in collection. If collection contains headers with the same name this header will be inserted before other headers with the same name. More... | |
void | Set (System::String name, System::String value) |
Sets the header. More... | |
bool | HasKeys () |
Gets a value indicating whether the collection contains keys. More... | |
void | Add (System::SharedPtr< RawMimeHeader > header, System::SharedPtr< System::Text::Encoding > preferredEncoding) |
Adds a header to collection More... | |
void | InternalRemove (System::String name) |
void | InternalSet (System::String name, System::String value) |
System::SharedPtr< System::Object > | GetHeaderObject (System::String headerName) |
Gets the object representing the specified header value Note: it gets the first value for multi-valued headers More... | |
System::SharedPtr< System::Collections::Generic::ListExt< System::SharedPtr< System::Object > > > | GetHeaderObjects (System::String headerName) |
Gets the objects array representing the specified header value Note: it gets the first value for multi-valued headers More... | |
void | SetHeaderObject (System::String headerName, System::SharedPtr< System::Object > headerValue) |
Sets the specified header value More... | |
void | AddHeaderObject (System::String headerName, System::SharedPtr< System::Object > headerValue) |
Adds the specified header value More... | |
void | Add (const System::String &item) override |
Adds the header without value More... | |
void | Clear () override |
Clears all headers. More... | |
bool | Contains (const System::String &item) const override |
Gets a value indicating whether the specified header is contained in the collection More... | |
void | CopyTo (System::ArrayPtr< System::String > array, int32_t arrayIndex) override |
Copies all the elements of the current collection to the specified string array starting at the specified destination index. More... | |
bool | Remove (const System::String &item) override |
Removes the header from collection by a given header name. More... | |
System::SharedPtr< System::Collections::Generic::IEnumerator< System::String > > | GetEnumerator () override |
Returns an enumerator that iterates through a collection. More... | |
Protected Member Functions | |
virtual | ~HeaderCollection () |
Defines the collection of header fields
Aspose::Email::Mime::HeaderCollection::HeaderCollection | ( | System::SharedPtr< HeaderCollection > | col | ) |
Initializes a new instance of the HeaderCollection class.
col | The collection. |
Aspose::Email::Mime::HeaderCollection::HeaderCollection | ( | ) |
Initializes a new instance of the HeaderCollection class.
Aspose::Email::Mime::HeaderCollection::HeaderCollection | ( | System::SharedPtr< System::Collections::Generic::IEqualityComparer< System::String >> | equalityComparer | ) |
Aspose::Email::Mime::HeaderCollection::HeaderCollection | ( | int32_t | capacity, |
System::SharedPtr< System::Collections::Generic::IEqualityComparer< System::String >> | equalityComparer | ||
) |
|
protectedvirtual |
void Aspose::Email::Mime::HeaderCollection::Add | ( | const System::SharedPtr< HeaderCollection > & | c | ) |
Adds a header to collection.
c | HeaderCollection for adding. |
|
override |
Adds the header without value
void Aspose::Email::Mime::HeaderCollection::Add | ( | System::SharedPtr< RawMimeHeader > | header, |
System::SharedPtr< System::Text::Encoding > | preferredEncoding | ||
) |
Adds a header to collection
header | A RawMimeHeader containing a header key and a raw header value |
preferredEncoding | A preferred text encoding |
ArgumentException | A HeaderKey of header is null or empty |
ArgumentNullException | header is null |
void Aspose::Email::Mime::HeaderCollection::Add | ( | System::String | name, |
System::String | value | ||
) |
Adds the header.
name | The header name. |
value | The header value. |
|
virtual |
Adds the header.
name | The header name. |
value | The header value. |
void Aspose::Email::Mime::HeaderCollection::AddHeaderObject | ( | System::String | headerName, |
System::SharedPtr< System::Object > | headerValue | ||
) |
Adds the specified header value
headerName | A header name |
headerValue | A header value |
ArgumentException | headerName is null or empty |
|
override |
Clears all headers.
|
override |
Gets a value indicating whether the specified header is contained in the collection
item | A header to search |
True
if collection contains specified item ; otherwise, false
|
override |
Copies all the elements of the current collection to the specified string array starting at the specified destination index.
array | The destination of the elements copied from the current collection. |
arrayIndex | An integer that represents the index in array at which copying begins. |
|
virtual |
Gets the value at the specified index.
index | An integer that represents the position of the element to get. |
System::String Aspose::Email::Mime::HeaderCollection::Get | ( | System::String | name | ) |
Gets the header value by a given header name.
name | The haeader name. |
|
virtual |
Gets an array of strings containing all header keys in collections
|
override |
Gets a count of headers
|
override |
Is collection readonly
|
virtual |
Gets a T:System::Collections::ObjectModel::ReadOnlyCollection<string> containing all header keys in collections
System::String Aspose::Email::Mime::HeaderCollection::GetDecodedValue | ( | System::String | name | ) |
Gets the header value.
name | The text header name. |
|
override |
Returns an enumerator that iterates through a collection.
System::SharedPtr<System::Object> Aspose::Email::Mime::HeaderCollection::GetHeaderObject | ( | System::String | headerName | ) |
Gets the object representing the specified header value Note: it gets the first value for multi-valued headers
headerName | A header name |
ArgumentException | headerName is null or empty |
System::SharedPtr<System::Collections::Generic::ListExt<System::SharedPtr<System::Object> > > Aspose::Email::Mime::HeaderCollection::GetHeaderObjects | ( | System::String | headerName | ) |
Gets the objects array representing the specified header value Note: it gets the first value for multi-valued headers
headerName | A header name |
ArgumentException | headerName is null or empty |
|
virtual |
Gets the key at the specified index of the collection.
index | The index of the key. |
System::String Aspose::Email::Mime::HeaderCollection::GetString | ( | ) |
Returns a System::String that represents this instance.
System::ArrayPtr<System::String> Aspose::Email::Mime::HeaderCollection::GetValues | ( | System::String | name | ) |
Gets the header values.
name | The header name. |
bool Aspose::Email::Mime::HeaderCollection::HasKeys | ( | ) |
Gets a value indicating whether the collection contains keys.
System::String Aspose::Email::Mime::HeaderCollection::idx_get | ( | int32_t | index | ) |
Gets a value from collection by the index.
index | The index in collection for an item. |
System::String Aspose::Email::Mime::HeaderCollection::idx_get | ( | System::String | name | ) |
Gets a value from collection by the name.
name | The name (key) in collection for an item. |
void Aspose::Email::Mime::HeaderCollection::idx_set | ( | System::String | name, |
System::String | value | ||
) |
Gets a value from collection by the name.
name | The name (key) in collection for an item. |
value | Returns specified item |
void Aspose::Email::Mime::HeaderCollection::Insert | ( | System::String | name, |
System::String | value | ||
) |
Inserts the header in collection. If collection contains headers with the same name this header will be inserted before other headers with the same name.
name | The header name. |
value | The header value. |
void Aspose::Email::Mime::HeaderCollection::InternalRemove | ( | System::String | name | ) |
void Aspose::Email::Mime::HeaderCollection::InternalSet | ( | System::String | name, |
System::String | value | ||
) |
|
override |
Removes the header from collection by a given header name.
item | The header name. |
void Aspose::Email::Mime::HeaderCollection::Set | ( | System::String | name, |
System::String | value | ||
) |
Sets the header.
name | The header name. |
value | The header value. |
void Aspose::Email::Mime::HeaderCollection::SetHeaderObject | ( | System::String | headerName, |
System::SharedPtr< System::Object > | headerValue | ||
) |
Sets the specified header value
headerName | A header name |
headerValue | A header value |
ArgumentException | headerName is null or empty |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |