Decline the offer with a specific reason. The
operation will complete when the ACK message is received.
Namespace:
Microsoft.Rtc.Signaling
Assembly:
Microsoft.Rtc.Collaboration(in
Microsoft.Rtc.Collaboration.dll)
Syntax
Visual Basic (Declaration) |
Public
MustOverride
Function
BeginDecline ( _
responseCode
As
Integer, _
reasonPhrase
As
String, _
signalingHeaders
As
IEnumerable(
Of
SignalingHeader), _
contentType
As
ContentType, _
body
As
Byte(), _
userCallback
As
AsyncCallback, _
state
As
Object _
)
As
IAsyncResult
|
C# |
public
abstract
IAsyncResult
BeginDecline(
int
responseCode,
string
reasonPhrase,
IEnumerable<
SignalingHeader>
signalingHeaders,
ContentType
contentType,
byte[]
body,
AsyncCallback
userCallback,
Object
state
)
|
Visual C++ |
public:
virtual
IAsyncResult^
BeginDecline(
int
responseCode,
String^
reasonPhrase,
IEnumerable<
SignalingHeader^>^
signalingHeaders,
ContentType^
contentType,
array<
unsigned char>^
body,
AsyncCallback^
userCallback,
Object^
state
)
abstract
|
JavaScript |
function
beginDecline(
responseCode,
reasonPhrase,
signalingHeaders,
contentType,
body,
userCallback,
state);
|
Parameters
-
responseCode
- Type:
Int32
The response code to decline with.
-
reasonPhrase
- Type:
String
The reason phrase to use. Can be null.
-
signalingHeaders
- Type:
IEnumerable
<
(Of
<
(
SignalingHeader
>
)
>
)
The signaling headers to use in the response. Can be
null.
-
contentType
- Type:
ContentType
The content type of the body. Can be null if body is
null.
-
body
- Type:
array<
Byte
>
[]
()
[]
The body to send.
-
userCallback
- Type:
AsyncCallback
The method to be called when the asynchronous operation is
completed.
-
state
- Type:
Object
A user-provided object that distinguishes this particular
asynchronous operation from other asynchronous operations.
Return Value
An IAsyncResult that
references the asynchronous operation.
Exceptions
Exception |
Condition |
InvalidOperationException
|
Thrown when called in an invalid state or a final response has
already been sent. |
ArgumentOutOfRangeException
|
The response code is not in the range expected. |
ArgumentException
|
Thrown when there are problems with arguments supplied. |
Microsoft.Rtc.Signaling
.
.
::
.
RealTimeException
|
Thrown when the response cannot be sent for other reasons. |
See Also