Sdp<TGlobalDescription, TMediaDescription>.TryParse Method (Byte , Int32, Int32, Boolean)
Parses the supplied array of bytes as an SDP. Returns true if the SDP is valid.
Namespace: Microsoft.Rtc.Signaling
Assembly: Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)
Syntax
'Declaration
Public Function TryParse ( _
rawSdp As Byte(), _
offset As Integer, _
count As Integer, _
strict As Boolean _
) As Boolean
'Usage
Dim instance As Sdp
Dim rawSdp As Byte()
Dim offset As Integer
Dim count As Integer
Dim strict As Boolean
Dim returnValue As Boolean
returnValue = instance.TryParse(rawSdp, _
offset, count, strict)
public bool TryParse(
byte[] rawSdp,
int offset,
int count,
bool strict
)
Parameters
- rawSdp
Type: []
The array of bytes containing the SDP to parse.
- offset
Type: System.Int32
The offset into the byte array where parsing should begin.
- count
Type: System.Int32
The number of bytes in the array to parse.
- strict
Type: System.Boolean
A value of true indicates the SDP parser should strictly enforce the SDP encoding rules. It is recommended that strict parsing is always used, however being more lenient may be useful there is a need to communicate with a noncompliant device.
Return Value
Type: System.Boolean
Returns true if the array contains a valid SDP. If false is returned, then LastParseErrorMessage and LastParseErrorLineNumber provide information about why the SDP could not be parsed.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when rawSdp is null. |
ArgumentOutOfRangeException | Thrown when offset and count are not within range of the supplied array. |
InvalidOperationException | An attempt to parse more than one text was made. |
See Also
Reference
Sdp<TGlobalDescription, TMediaDescription> Class