Class SIPUserField
Class for parsing and building the user field of a SIP URI.
Inherited Members
Namespace: SipLib.Core
Assembly: SipLib.dll
Syntax
public class SIPUserField
Constructors
| Edit this page View SourceSIPUserField()
Default constructor
Declaration
public SIPUserField()
SIPUserField(string?, SIPURI, string?)
Constructs a new SIPUserField from the user name, a SIPURI and the parameters and headers.
Declaration
public SIPUserField(string? name, SIPURI uri, string? paramsAndHeaders)
Parameters
Type | Name | Description |
---|---|---|
string | name | The User name. Optional. |
SIPURI | uri | A valid SIPURI. |
string | paramsAndHeaders | A string containing the parameters and embedded headers. Optional. |
Fields
| Edit this page View SourceName
Name portion of the user field for a header
Declaration
public string? Name
Field Value
Type | Description |
---|---|
string |
Parameters
Header parameters
Declaration
public SIPParameters Parameters
Field Value
Type | Description |
---|---|
SIPParameters |
URI
SIPURI portion of the header user field
Declaration
public SIPURI? URI
Field Value
Type | Description |
---|---|
SIPURI |
Methods
| Edit this page View SourceCopyOf()
Creates a deep copy of this object.
Declaration
public SIPUserField CopyOf()
Returns
Type | Description |
---|---|
SIPUserField |
ParseSIPUserField(string)
Parses a string into a SIPUriField. Throws exceptions if parsing errors are detected.
Declaration
public static SIPUserField ParseSIPUserField(string userFieldStr)
Parameters
Type | Name | Description |
---|---|---|
string | userFieldStr | Input string to parse. |
Returns
Type | Description |
---|---|
SIPUserField | Returns a valid SIPUserField. |
ToCpimFormatString()
Formats the string for use in the header value of a CPIM message. The difference is that if the name portion is present, it is not quoted.
Declaration
public string ToCpimFormatString()
Returns
Type | Description |
---|---|
string | Returns the string formatted for usin in a CPIM message. |
Exceptions
Type | Condition |
---|---|
NullReferenceException | Thrown if the URI field is null. |
ToParameterlessString()
Converts this object into a string containing a SIPURI that contains no parameters.
Declaration
public string ToParameterlessString()
Returns
Type | Description |
---|---|
string | The SIPURI portion only with no parameters. |
ToString()
Converts this object into a string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The string version of this object. |
Overrides
| Edit this page View SourceTryParseSIPUserField(string)
Tests a string to determine if it contains a valid SIPUserField.
Declaration
public static SIPUserField? TryParseSIPUserField(string userFieldStr)
Parameters
Type | Name | Description |
---|---|---|
string | userFieldStr | Input string |
Returns
Type | Description |
---|---|
SIPUserField | Returns a new SIPUserField object if successful or null if a parsing error occurred. |