Class WebSocketMockRequest
A mock response object for the WebSocket protocol.
Inheritance
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class WebSocketMockRequest : WebRequest, ISerializable
Properties
ContentType
When overridden in a descendant class, gets or sets the content type of the request data being sent.
Declaration
public override string ContentType { get; set; }
Property Value
Type | Description |
---|---|
System.String | The content type of the request data. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | Any attempt is made to get or set the property, when the property is not overridden in a descendant class. |
Headers
When overridden in a descendant class, gets or sets the collection of header name/value pairs associated with the request.
Declaration
public override WebHeaderCollection Headers { get; set; }
Property Value
Type | Description |
---|---|
System.Net.WebHeaderCollection | A System.Net.WebHeaderCollection containing the header name/value pairs associated with this request. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | Any attempt is made to get or set the property, when the property is not overridden in a descendant class. |
Method
When overridden in a descendant class, gets or sets the protocol method to use in this request.
Declaration
public override string Method { get; set; }
Property Value
Type | Description |
---|---|
System.String | The protocol method to use in this request. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | If the property is not overridden in a descendant class, any attempt is made to get or set the property. |
RequestUri
When overridden in a descendant class, gets the URI of the Internet resource associated with the request.
Declaration
public override Uri RequestUri { get; }
Property Value
Type | Description |
---|---|
System.Uri | A System.Uri representing the resource associated with the request |
Overrides
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | Any attempt is made to get or set the property, when the property is not overridden in a descendant class. |
Methods
Abort()
Aborts the Request.
Declaration
public override void Abort()
Overrides
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | Any attempt is made to access the method, when the method is not overridden in a descendant class. |
BeginGetRequestStream(AsyncCallback, Object)
When overridden in a descendant class, provides an asynchronous method to request a stream.
Declaration
public override IAsyncResult BeginGetRequestStream(AsyncCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
System.AsyncCallback | callback | The System.AsyncCallback delegate. |
System.Object | state | An object containing state information for this asynchronous request. |
Returns
Type | Description |
---|---|
System.IAsyncResult | An System.IAsyncResult that references the asynchronous request. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | Any attempt is made to access the method, when the method is not overridden in a descendant class. |
BeginGetResponse(AsyncCallback, Object)
When overridden in a descendant class, begins an asynchronous request for an Internet resource.
Declaration
public override IAsyncResult BeginGetResponse(AsyncCallback callback, object state)
Parameters
Type | Name | Description |
---|---|---|
System.AsyncCallback | callback | The System.AsyncCallback delegate. |
System.Object | state | An object containing state information for this asynchronous request. |
Returns
Type | Description |
---|---|
System.IAsyncResult | An System.IAsyncResult that references the asynchronous request. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | Any attempt is made to access the method, when the method is not overridden in a descendant class. |
EndGetRequestStream(IAsyncResult)
When overridden in a descendant class, returns a System.IO.Stream for writing data to the Internet resource.
Declaration
public override Stream EndGetRequestStream(IAsyncResult asyncResult)
Parameters
Type | Name | Description |
---|---|---|
System.IAsyncResult | asyncResult | An System.IAsyncResult that references a pending request for a stream. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream to write data to. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | Any attempt is made to access the method, when the method is not overridden in a descendant class. |
EndGetResponse(IAsyncResult)
When overridden in a descendant class, returns a System.Net.WebResponse.
Declaration
public override WebResponse EndGetResponse(IAsyncResult asyncResult)
Parameters
Type | Name | Description |
---|---|---|
System.IAsyncResult | asyncResult | An System.IAsyncResult that references a pending request for a response. |
Returns
Type | Description |
---|---|
System.Net.WebResponse | A System.Net.WebResponse that contains a response to the Internet request. |
Overrides
Exceptions
Type | Condition |
---|---|
System.NotImplementedException | Any attempt is made to access the method, when the method is not overridden in a descendant class. |