VcardPropertyList Class

Definition

Namespace: DataStandardizer.File.vCard

The instances of one property of a card whose values are valid, in order. It is a live view of VcardCard.Properties: adding or removing an instance changes the card, and changing the card changes what this gives.

Syntax

public sealed class VcardPropertyList<TValue> : IReadOnlyList<VcardProperty<TValue>>

Members

Member Notes
Count, indexer, GetEnumerator() The instances there are when it is called. Each reads the properties of the card.
Add(TValue value) Adds an instance after the last property of the card, and gives it.
Add(TValue value, VcardPropertyParameters parameters) With a group and parameters.
Remove(VcardProperty<TValue> property) Gives whether it was in the card.
Clear() Removes every instance, including any whose value isn’t valid.
GetPreferred() The first instance with the lowest PREF (RFC 6350 §5.3), or null if there are none.
GetAlternatives() The instances grouped by ALTID (RFC 6350 §5.4).
GetOrderedByIndex() The instances in the order of their INDEX (RFC 6715 §3.1). One without a valid INDEX comes after those that have it, as erratum 3342 of the RFC says, and instances that can’t be told apart stay in the order they appear.

Add throws ArgumentNullException for a null value, and ArgumentException for a value of a type the property doesn’t allow, one that isn’t initialised, one that can’t be written, or a VALUE in AdditionalParameters. An XML value must be one element in a namespace of its own (RFC 6350 §6.1.5). Remove gives false for an instance of another property.

Applies to

Targets netstandard1.1, netstandard2.0, netstandard2.1, and net10.0.

See also


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