VcardValueTypeRegistry Class

Definition

Namespace: DataStandardizer.File.vCard

Gives the value type of each property defined by RFC 6350 §6, and honours a VALUE parameter that overrides it.

Syntax

public static class VcardValueTypeRegistry

Remarks

Unknown and experimental (X-) properties are Unknown whatever their VALUE parameter says. Names are compared case-insensitively. A known type is returned even if the property doesn’t allow it, which IsAllowedValueType checks. N, ADR, ORG, GENDER and CLIENTPIDMAP are Text here; their structure has a type of its own, such as VcardName.

This covers the properties of RFC 6350 and the extensions RFC 6474, RFC 6715, RFC 8605 and RFC 9554. Those of older versions are added with the issues that implement them.

Methods

Method Notes
IsKnownProperty(propertyName) Whether the property’s value type is known.
GetDefaultValueType(propertyName) The type with no VALUE parameter.
GetValueType(propertyName, valueParameter), GetValueType(VcardContentLine), GetValueType(VcardContentLineView) The type, taking any VALUE parameter into account. The view overload doesn’t allocate.
IsAllowedValueType(propertyName, valueType) Whether the property allows the type.
TryParseValueTypeName(name, out valueType), GetValueTypeName(valueType) Between a type and its name, such as date-and-or-time.

See the API reference.


This site uses Just the Docs, a documentation theme for Jekyll.