Sdp<TGlobalDescription,TMediaDescription>.TryParse Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TryParse(Byte[], Int32, Int32, Boolean) |
Parses the supplied array of bytes as an SDP. Returns true if the SDP is valid. |
TryParse(ArraySegment<Byte>) |
Parses the supplied array segment of bytes as an SDP. Returns true if the SDP is valid. |
TryParse(Byte[]) |
Parses the supplied array of bytes as an SDP. Returns true if the SDP is valid. |
TryParse(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. |
TryParse(Byte[], Int32, Int32, Boolean)
Parses the supplied array of bytes as an SDP. Returns true if the SDP is valid.
public:
bool TryParse(cli::array <System::Byte> ^ rawSdp, int offset, int count, bool strict);
public bool TryParse (byte[] rawSdp, int offset, int count, bool strict);
member this.TryParse : byte[] * int * int * bool -> bool
Public Function TryParse (rawSdp As Byte(), offset As Integer, count As Integer, strict As Boolean) As Boolean
Parameters
- rawSdp
- Byte[]
The array of bytes containing the SDP to parse.
- offset
- Int32
The offset into the byte array where parsing should begin.
- count
- Int32
The number of bytes in the array to parse.
- strict
- 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.
Returns
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
Thrown when rawSdp is null.
Thrown when offset and count are not within range of the supplied array.
An attempt to parse more than one text was made.
Applies to
TryParse(ArraySegment<Byte>)
Parses the supplied array segment of bytes as an SDP. Returns true if the SDP is valid.
public:
bool TryParse(ArraySegment<System::Byte> segment);
public bool TryParse (ArraySegment<byte> segment);
member this.TryParse : ArraySegment<byte> -> bool
Public Function TryParse (segment As ArraySegment(Of Byte)) As Boolean
Parameters
- segment
- ArraySegment<Byte>
The array segment of bytes containing the SDP to parse.
Returns
Returns true if the array contained a valid SDP. If false is returned, then LastParseErrorMessage and LastParseErrorLineNumber provide information about why the SDP could not be parsed.
Exceptions
An attempt to parse more than one text was made.
Applies to
TryParse(Byte[])
Parses the supplied array of bytes as an SDP. Returns true if the SDP is valid.
public:
bool TryParse(cli::array <System::Byte> ^ bytes);
public bool TryParse (byte[] bytes);
member this.TryParse : byte[] -> bool
Public Function TryParse (bytes As Byte()) As Boolean
Parameters
- bytes
- Byte[]
The array of bytes containing the SDP to parse.
Returns
Returns true if the array contained a valid SDP. If false is returned, then LastParseErrorMessage and LastParseErrorLineNumber provide information about why the SDP could not be parsed.
Exceptions
Thrown when null is passed as an argument.
An attempt to parse more than one text was made.
Applies to
TryParse(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.
public:
bool TryParse(System::String ^ sdpText);
public bool TryParse (string sdpText);
member this.TryParse : string -> bool
Public Function TryParse (sdpText As String) As Boolean
Parameters
- sdpText
- String
The string containing the SDP to parse.
Returns
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
Thrown when null is passed as an argument.
Thrown when empty string is passed as an argument.
An attempt to parse more than one text was made.