System::Net::Http::Headers::HttpHeaderValueCollection class

HttpHeaderValueCollection class

Represents the collection of the headers values. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

template<typename T>class HttpHeaderValueCollection : public System::Collections::Generic::ICollection<T>
ParameterDescription
Thetype of the headers values represented in the collection.

Methods

MethodDescription
Add(const T&) overrideAdds element into collection.
Clear() overrideDeletes all elements from collection.
Contains(const T&) const overrideChecks if element is present in collection.
CopyTo(System::ArrayPtr<T>, int32_t) overrideCopies all collection elements to existing array elements.
get_Count() const overrideRTTI information.
get_IsReadOnly()Gets a value that indicates if the current collection is read-only.
get_IsSpecialValueSet()Gets a value that indicates if the current collection contains a “special value”.
GetEnumerator() overrideGets enumerator.
GetHeaderStringWithoutSpecial()Returns a string representation of the current collection without a “special value”.
HttpHeaderValueCollection(String, System::SharedPtr<HttpHeaders>)Constructs a new instance.
HttpHeaderValueCollection(String, System::SharedPtr<HttpHeaders>, Action<System::SharedPtr<HttpHeaderValueCollection<T>>, T>)Constructs a new instance.
HttpHeaderValueCollection(String, System::SharedPtr<HttpHeaders>, T)Constructs a new instance.
HttpHeaderValueCollection(String, System::SharedPtr<HttpHeaders>, T, Action<System::SharedPtr<HttpHeaderValueCollection<T>>, T>)Constructs a new instance.
ParseAdd(String)Parses a header string representation and adds it to the current collection.
Remove(const T&) overrideDeletes element from collection.
RemoveSpecialValue()Removes a “special value”.
SetSpecialValue()Sets a “special value”.
SetTemplateWeakPtr(uint32_t) overrideSet n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode.
ToString() const overrideAnalog of C# Object.ToString() method. Enables converting custom objects to string.
TryParseAdd(String)Tries to parse a header string representation and add it to the current collection.

See Also