Class VCardPropertyParser
Parses a single unfolded vCard property line (RFC 6350 §3.3, RFC 2425 §4) into a
VCardProperty. A property line has the form
NAME;PARAM=VALUE;PARAM=VALUE:VALUE.
Inherited Members
Namespace: DRIT.Mail.Rfc.VCard.Parsing
Assembly: DRIT.Mail.dll
Syntax
public static class VCardPropertyParser
Methods
View SourceGetParameterValues(IReadOnlyList<VCardParameter>, string)
Gets the values of all parameters with the specified name (case-insensitive). Also matches vCard 2.1 bare-type parameters (a parameter with an empty value whose name matches the requested type).
Declaration
public static IReadOnlyList<string> GetParameterValues(IReadOnlyList<VCardParameter> parameters, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<VCardParameter> | parameters | Specifies the parameters value. |
| string | name | Specifies the name value. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetTypeValues(IReadOnlyList<VCardParameter>)
Gets the values of all TYPE parameters, including vCard 2.1 bare-type parameters (parameters with an empty value, whose name is treated as a type).
Declaration
public static IReadOnlyList<string> GetTypeValues(IReadOnlyList<VCardParameter> parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| IReadOnlyList<VCardParameter> | parameters | Specifies the parameters value. |
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
Parse(string)
Parses a single unfolded vCard property line into a VCardProperty. The returned value is raw (escapes preserved); use Unescape(string) or SplitStructured(string, char) to decode it.
Declaration
public static VCardProperty Parse(string line)
Parameters
| Type | Name | Description |
|---|---|---|
| string | line | Specifies the line value. |
Returns
| Type | Description |
|---|---|
| VCardProperty |
SplitStructured(string, char)
Splits a raw (escaped) structured value on an unescaped delimiter. Escaped delimiters (preceded by a backslash) are preserved in the current component. Each returned part retains its escape sequences; call Unescape(string) on each part to decode it.
Declaration
public static string[] SplitStructured(string value, char delimiter)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | The value to process. |
| char | delimiter | Specifies the delimiter value. |
Returns
| Type | Description |
|---|---|
| string[] |