Class WebSocketMockRequest
A mock response object for the WebSocket protocol.
Inheritance
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class WebSocketMockRequest : WebRequest
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. |
The content type of the request data. |
Exceptions
Type | Condition |
---|---|
System. |
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 |
---|---|
Web |
A System. |
Exceptions
Type | Condition |
---|---|
System. |
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. |
The protocol method to use in this request. |
Exceptions
Type | Condition |
---|---|
System. |
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 |
---|---|
Uri | A System. |
Exceptions
Type | Condition |
---|---|
System. |
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()
Exceptions
Type | Condition |
---|---|
System. |
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 |
---|---|---|
Async |
callback | The System. |
System. |
state | An object containing state information for this asynchronous request. |
Returns
Type | Description |
---|---|
IAsync |
An System. |
Exceptions
Type | Condition |
---|---|
System. |
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 |
---|---|---|
Async |
callback | The System. |
System. |
state | An object containing state information for this asynchronous request. |
Returns
Type | Description |
---|---|
IAsync |
An System. |
Exceptions
Type | Condition |
---|---|
System. |
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.
Declaration
public override System.IO.Stream EndGetRequestStream(IAsyncResult asyncResult)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
asyncResult | An System. |
Returns
Type | Description |
---|---|
System. |
A System. |
Exceptions
Type | Condition |
---|---|
System. |
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.
Declaration
public override WebResponse EndGetResponse(IAsyncResult asyncResult)
Parameters
Type | Name | Description |
---|---|---|
IAsync |
asyncResult | An System. |
Returns
Type | Description |
---|---|
Web |
A System. |
Exceptions
Type | Condition |
---|---|
System. |
Any attempt is made to access the method, when the method is not overridden in a descendant class. |