SkyWay Unity SDK
公式APIリファレンス
読み取り中…
検索中…
一致する文字列を見つけられません
WebSocketSharp.Net.WebHeaderCollection クラス

Provides a collection of the HTTP headers associated with a request or response. [詳解]

公開メンバ関数

 WebHeaderCollection ()
 Initializes a new instance of the WebHeaderCollection class.
 
void Add (string header)
 Adds the specified header to the collection.
 
void Add (HttpRequestHeader header, string value)
 Adds the specified request header with the specified value to the collection.
 
void Add (HttpResponseHeader header, string value)
 Adds the specified response header with the specified value to the collection.
 
override void Add (string name, string value)
 Adds a header with the specified name and value to the collection.
 
override void Clear ()
 Removes all headers from the collection.
 
override string Get (int index)
 Get the value of the header at the specified index in the collection.
 
override string Get (string name)
 Get the value of the header with the specified name in the collection.
 
override IEnumerator GetEnumerator ()
 Gets the enumerator used to iterate through the collection.
 
override string GetKey (int index)
 Get the name of the header at the specified index in the collection.
 
override string[] GetValues (int index)
 Get the values of the header at the specified index in the collection.
 
override string[] GetValues (string name)
 Get the values of the header with the specified name in the collection.
 
override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
 Populates the specified SerializationInfo instance with the data needed to serialize the current instance.
 
override void OnDeserialization (object sender)
 Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.
 
void Remove (HttpRequestHeader header)
 Removes the specified request header from the collection.
 
void Remove (HttpResponseHeader header)
 Removes the specified response header from the collection.
 
override void Remove (string name)
 Removes the specified header from the collection.
 
void Set (HttpRequestHeader header, string value)
 Sets the specified request header to the specified value.
 
void Set (HttpResponseHeader header, string value)
 Sets the specified response header to the specified value.
 
override void Set (string name, string value)
 Sets the specified header to the specified value.
 
byte[] ToByteArray ()
 Converts the current instance to an array of byte.
 
override string ToString ()
 Returns a string that represents the current instance.
 

静的公開メンバ関数

static bool IsRestricted (string headerName)
 Determines whether the specified header can be set for the request.
 
static bool IsRestricted (string headerName, bool response)
 Determines whether the specified header can be set for the request or the response.
 

限定公開メンバ関数

 WebHeaderCollection (SerializationInfo serializationInfo, StreamingContext streamingContext)
 Initializes a new instance of the WebHeaderCollection class with the specified serialized data.
 
void AddWithoutValidate (string headerName, string headerValue)
 Adds a header to the collection without checking if the header is on the restricted header list.
 

プロパティ

override string[] AllKeys [get]
 Gets all header names in the collection.
 
override int Count [get]
 Gets the number of headers in the collection.
 
string this[HttpRequestHeader header] [get, set]
 Gets or sets the specified request header.
 
string this[HttpResponseHeader header] [get, set]
 Gets or sets the specified response header.
 
override NameObjectCollectionBase.KeysCollection Keys [get]
 Gets a collection of header names in the collection.
 

詳解

Provides a collection of the HTTP headers associated with a request or response.

構築子と解体子

◆ WebHeaderCollection()

WebSocketSharp.Net.WebHeaderCollection.WebHeaderCollection ( SerializationInfo serializationInfo,
StreamingContext streamingContext )
inlineprotected

Initializes a new instance of the WebHeaderCollection class with the specified serialized data.

引数
serializationInfoA SerializationInfo that contains the serialized object data.
streamingContextA StreamingContext that specifies the source for the deserialization.
例外
ArgumentExceptionAn element with the specified name is not found in serializationInfo .
ArgumentNullExceptionserializationInfo is null.

関数詳解

◆ Add() [1/4]

void WebSocketSharp.Net.WebHeaderCollection.Add ( HttpRequestHeader header,
string value )
inline

Adds the specified request header with the specified value to the collection.

引数
headerOne of the HttpRequestHeader enum values. It specifies the request header to add.
valueA string that specifies the value of the header to add.
例外
ArgumentExceptionvalue contains an invalid character. -or- header is a restricted header.
ArgumentOutOfRangeExceptionThe length of value is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the request header.

◆ Add() [2/4]

void WebSocketSharp.Net.WebHeaderCollection.Add ( HttpResponseHeader header,
string value )
inline

Adds the specified response header with the specified value to the collection.

引数
headerOne of the HttpResponseHeader enum values. It specifies the response header to add.
valueA string that specifies the value of the header to add.
例外
ArgumentExceptionvalue contains an invalid character. -or- header is a restricted header.
ArgumentOutOfRangeExceptionThe length of value is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the response header.

◆ Add() [3/4]

void WebSocketSharp.Net.WebHeaderCollection.Add ( string header)
inline

Adds the specified header to the collection.

引数
headerA string that specifies the header to add, with the name and value separated by a colon character (':').
例外
ArgumentExceptionheader is an empty string. -or- header does not contain a colon character. -or- The name part of header is an empty string. -or- The name part of header is a string of spaces. -or- The name part of header contains an invalid character. -or- The value part of header contains an invalid character. -or- header is a restricted header.
ArgumentNullExceptionheader is null.
ArgumentOutOfRangeExceptionThe length of the value part of header is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the header.

◆ Add() [4/4]

override void WebSocketSharp.Net.WebHeaderCollection.Add ( string name,
string value )
inline

Adds a header with the specified name and value to the collection.

引数
nameA string that specifies the name of the header to add.
valueA string that specifies the value of the header to add.
例外
ArgumentExceptionname is an empty string. -or- name is a string of spaces. -or- name contains an invalid character. -or- value contains an invalid character. -or- name is a restricted header name.
ArgumentNullExceptionname is null.
ArgumentOutOfRangeExceptionThe length of value is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the header.

◆ AddWithoutValidate()

void WebSocketSharp.Net.WebHeaderCollection.AddWithoutValidate ( string headerName,
string headerValue )
inlineprotected

Adds a header to the collection without checking if the header is on the restricted header list.

引数
headerNameA string that specifies the name of the header to add.
headerValueA string that specifies the value of the header to add.
例外
ArgumentExceptionheaderName is an empty string. -or- headerName is a string of spaces. -or- headerName contains an invalid character. -or- headerValue contains an invalid character.
ArgumentNullExceptionheaderName is null.
ArgumentOutOfRangeExceptionThe length of headerValue is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the header.

◆ Get() [1/2]

override string WebSocketSharp.Net.WebHeaderCollection.Get ( int index)
inline

Get the value of the header at the specified index in the collection.

戻り値
A string that receives the value of the header.
引数
indexAn int that specifies the zero-based index of the header to get.
例外
ArgumentOutOfRangeExceptionindex is out of allowable range of indexes for the collection.

◆ Get() [2/2]

override string WebSocketSharp.Net.WebHeaderCollection.Get ( string name)
inline

Get the value of the header with the specified name in the collection.

戻り値
A string that receives the value of the header.

null if not found.

引数
nameA string that specifies the name of the header to get.

◆ GetEnumerator()

override IEnumerator WebSocketSharp.Net.WebHeaderCollection.GetEnumerator ( )
inline

Gets the enumerator used to iterate through the collection.

戻り値
An IEnumerator instance used to iterate through the collection.

◆ GetKey()

override string WebSocketSharp.Net.WebHeaderCollection.GetKey ( int index)
inline

Get the name of the header at the specified index in the collection.

戻り値
A string that receives the name of the header.
引数
indexAn int that specifies the zero-based index of the header to get.
例外
ArgumentOutOfRangeExceptionindex is out of allowable range of indexes for the collection.

◆ GetObjectData()

override void WebSocketSharp.Net.WebHeaderCollection.GetObjectData ( SerializationInfo serializationInfo,
StreamingContext streamingContext )
inline

Populates the specified SerializationInfo instance with the data needed to serialize the current instance.

引数
serializationInfoA SerializationInfo that holds the serialized object data.
streamingContextA StreamingContext that specifies the destination for the serialization.
例外
ArgumentNullExceptionserializationInfo is null.

◆ GetValues() [1/2]

override string[] WebSocketSharp.Net.WebHeaderCollection.GetValues ( int index)
inline

Get the values of the header at the specified index in the collection.

戻り値
An array of string that receives the values of the header.

null if not present.

引数
indexAn int that specifies the zero-based index of the header to get.
例外
ArgumentOutOfRangeExceptionindex is out of allowable range of indexes for the collection.

◆ GetValues() [2/2]

override string[] WebSocketSharp.Net.WebHeaderCollection.GetValues ( string name)
inline

Get the values of the header with the specified name in the collection.

戻り値
An array of string that receives the values of the header.

null if not present.

引数
nameA string that specifies the name of the header to get.

◆ IsRestricted() [1/2]

static bool WebSocketSharp.Net.WebHeaderCollection.IsRestricted ( string headerName)
inlinestatic

Determines whether the specified header can be set for the request.

戻り値
true if the header cannot be set; otherwise, false.
引数
headerNameA string that specifies the name of the header to test.
例外
ArgumentExceptionheaderName is an empty string. -or- headerName is a string of spaces. -or- headerName contains an invalid character.
ArgumentNullExceptionheaderName is null.

◆ IsRestricted() [2/2]

static bool WebSocketSharp.Net.WebHeaderCollection.IsRestricted ( string headerName,
bool response )
inlinestatic

Determines whether the specified header can be set for the request or the response.

戻り値
true if the header cannot be set; otherwise, false.
引数
headerNameA string that specifies the name of the header to test.
responseA bool: true if the test is for the response; otherwise, false.
例外
ArgumentExceptionheaderName is an empty string. -or- headerName is a string of spaces. -or- headerName contains an invalid character.
ArgumentNullExceptionheaderName is null.

◆ OnDeserialization()

override void WebSocketSharp.Net.WebHeaderCollection.OnDeserialization ( object sender)
inline

Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.

引数
senderAn object instance that represents the source of the deserialization event.

◆ Remove() [1/3]

void WebSocketSharp.Net.WebHeaderCollection.Remove ( HttpRequestHeader header)
inline

Removes the specified request header from the collection.

引数
headerOne of the HttpRequestHeader enum values. It specifies the request header to remove.
例外
ArgumentExceptionheader is a restricted header.
InvalidOperationExceptionThis instance does not allow the request header.

◆ Remove() [2/3]

void WebSocketSharp.Net.WebHeaderCollection.Remove ( HttpResponseHeader header)
inline

Removes the specified response header from the collection.

引数
headerOne of the HttpResponseHeader enum values. It specifies the response header to remove.
例外
ArgumentExceptionheader is a restricted header.
InvalidOperationExceptionThis instance does not allow the response header.

◆ Remove() [3/3]

override void WebSocketSharp.Net.WebHeaderCollection.Remove ( string name)
inline

Removes the specified header from the collection.

引数
nameA string that specifies the name of the header to remove.
例外
ArgumentExceptionname is an empty string. -or- name is a string of spaces. -or- name contains an invalid character. -or- name is a restricted header name.
ArgumentNullExceptionname is null.
InvalidOperationExceptionThis instance does not allow the header.

◆ Set() [1/3]

void WebSocketSharp.Net.WebHeaderCollection.Set ( HttpRequestHeader header,
string value )
inline

Sets the specified request header to the specified value.

引数
headerOne of the HttpRequestHeader enum values. It specifies the request header to set.
valueA string that specifies the value of the request header to set.
例外
ArgumentExceptionvalue contains an invalid character. -or- header is a restricted header.
ArgumentOutOfRangeExceptionThe length of value is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the request header.

◆ Set() [2/3]

void WebSocketSharp.Net.WebHeaderCollection.Set ( HttpResponseHeader header,
string value )
inline

Sets the specified response header to the specified value.

引数
headerOne of the HttpResponseHeader enum values. It specifies the response header to set.
valueA string that specifies the value of the response header to set.
例外
ArgumentExceptionvalue contains an invalid character. -or- header is a restricted header.
ArgumentOutOfRangeExceptionThe length of value is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the response header.

◆ Set() [3/3]

override void WebSocketSharp.Net.WebHeaderCollection.Set ( string name,
string value )
inline

Sets the specified header to the specified value.

引数
nameA string that specifies the name of the header to set.
valueA string that specifies the value of the header to set.
例外
ArgumentExceptionname is an empty string. -or- name is a string of spaces. -or- name contains an invalid character. -or- value contains an invalid character. -or- name is a restricted header name.
ArgumentNullExceptionname is null.
ArgumentOutOfRangeExceptionThe length of value is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the header.

◆ ToByteArray()

byte[] WebSocketSharp.Net.WebHeaderCollection.ToByteArray ( )
inline

Converts the current instance to an array of byte.

戻り値
An array of byte converted from a string that represents the current instance.

◆ ToString()

override string WebSocketSharp.Net.WebHeaderCollection.ToString ( )
inline

Returns a string that represents the current instance.

戻り値
A string that represents all headers in the collection.

プロパティ詳解

◆ AllKeys

override string [] WebSocketSharp.Net.WebHeaderCollection.AllKeys
get

Gets all header names in the collection.

An array of string that contains all header names in the collection.

◆ Count

override int WebSocketSharp.Net.WebHeaderCollection.Count
get

Gets the number of headers in the collection.

An int that represents the number of headers in the collection.

◆ Keys

override NameObjectCollectionBase.KeysCollection WebSocketSharp.Net.WebHeaderCollection.Keys
get

Gets a collection of header names in the collection.

A NameObjectCollectionBase.KeysCollection that contains all header names in the collection.

◆ this[HttpRequestHeader header]

string WebSocketSharp.Net.WebHeaderCollection.this[HttpRequestHeader header]
getset

Gets or sets the specified request header.

A string that represents the value of the request header.

引数
headerOne of the HttpRequestHeader enum values. It specifies the request header to get or set.
例外
ArgumentExceptionheader is a restricted header. -or- value contains an invalid character.
ArgumentOutOfRangeExceptionThe length of value is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the request header.

◆ this[HttpResponseHeader header]

string WebSocketSharp.Net.WebHeaderCollection.this[HttpResponseHeader header]
getset

Gets or sets the specified response header.

A string that represents the value of the response header.

引数
headerOne of the HttpResponseHeader enum values. It specifies the response header to get or set.
例外
ArgumentExceptionheader is a restricted header. -or- value contains an invalid character.
ArgumentOutOfRangeExceptionThe length of value is greater than 65,535 characters.
InvalidOperationExceptionThis instance does not allow the response header.

このクラス詳解は次のファイルから抽出されました: