Sdp<TGlobalDescription, TMediaDescription>.TryParse Method (String)

Parses the supplied string. This function will convert the string to an array of UTF8 encoded bytes and then call the TryParse() function with an array of bytes.

Namespace:  Microsoft.Rtc.Signaling
Assembly:  Microsoft.Rtc.Collaboration (in Microsoft.Rtc.Collaboration.dll)

Syntax

'Declaration
Public Function TryParse ( _
    sdpText As String _
) As Boolean
'Usage
Dim instance As Sdp
Dim sdpText As String
Dim returnValue As Boolean

returnValue = instance.TryParse(sdpText)
public bool TryParse(
    string sdpText
)

Parameters

  • sdpText
    Type: System.String
    The string containing the SDP to parse.

Return Value

Type: System.Boolean
Returns true if the string contained 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 null is passed as an argument.

ArgumentException

Thrown when empty string is passed as an argument.

InvalidOperationException

An attempt to parse more than one text was made.

See Also

Reference

Sdp<TGlobalDescription, TMediaDescription> Class

Sdp<TGlobalDescription, TMediaDescription> Members

TryParse Overload

Microsoft.Rtc.Signaling Namespace