TryParse Method (Byte[], Int32, Int32, Boolean)

Parses the supplied array of bytes as an SDP.

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: array<System..::..Byte>[]()[][]
    The array of bytes containing the SDP to parse.
  • offset
    Type: System..::..Int32
    The offset into the byte array where parsing should begin.
  • 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 can be useful if 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, [LastParseErrorMessage] and [LastParseErrorLineNumber] provide information about why the SDP cannot be parsed.

Exceptions

Exception Condition
ArgumentNullException

Thrown when rawSdp is nullNothingnullptrunita null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

Thrown when start and length are not within range of the supplied array.

InvalidOperationException

Thrown when an attempt to parse more than one text was made.

Remarks

Returns true if the SDP is valid.

See Also

Reference

Sdp<(Of <(<'TGlobalDescription, TMediaDescription>)>)> Class

Sdp<(Of <(<'TGlobalDescription, TMediaDescription>)>)> Members

TryParse Overload

Microsoft.Rtc.Signaling Namespace