API Reference
VCardDocument
A standalone vCard stream containing one or more ordered VCARD objects.
Inheritance
- Object
- VCardDocument
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property EmailDataOpenResult.Contact
- Method VCardDocument.Load
- Method VCardDocument.Load
- Method VCardDocument.Load
- Method VCardDocument.LoadAsync
- Method VCardDocument.LoadAsync
- Method VCardDocument.Parse
Constructors
public VCardDocument() #Creates a document with one vCard 4.0 card.
Methods
public ContentLineComponent AddCard(VCardVersion version = V4_0) #ContentLineComponentAdds an empty card with an explicit VERSION property.
Parameters
- version OfficeIMO.Email.VCardVersion = V4_0
public ContentLineComponent AddGroup(String formattedName, IEnumerable<String> memberUris) #ContentLineComponentAdds an RFC 6350 group card with ordered MEMBER URI properties.
Parameters
- formattedName System.String
- memberUris System.Collections.Generic.IEnumerable{System.String}
public static VCardVersion GetVersion(ContentLineComponent card) #VCardVersionGets a card's declared syntax version.
Parameters
- card OfficeIMO.Email.ContentLineComponent
public static VCardDocument Load(Byte[] bytes, ContentLineReaderOptions options = null) #VCardDocumentLoads a vCard stream from memory.
Parameters
- bytes System.Byte[]
- options OfficeIMO.Email.ContentLineReaderOptions = null
public static VCardDocument Load(String filePath, ContentLineReaderOptions options = null, CancellationToken cancellationToken = null) #VCardDocumentLoads a vCard file.
Parameters
- filePath System.String
- options OfficeIMO.Email.ContentLineReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static VCardDocument Load(Stream stream, ContentLineReaderOptions options = null, CancellationToken cancellationToken = null) #VCardDocumentLoads from a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static async Task<VCardDocument> LoadAsync(String filePath, ContentLineReaderOptions options = null, CancellationToken cancellationToken = null) #Task<VCardDocument>Asynchronously loads a vCard file.
Parameters
- filePath System.String
- options OfficeIMO.Email.ContentLineReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static async Task<VCardDocument> LoadAsync(Stream stream, ContentLineReaderOptions options = null, CancellationToken cancellationToken = null) #Task<VCardDocument>Asynchronously loads from a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineReaderOptions = null
- cancellationToken System.Threading.CancellationToken = null
public static VCardDocument Parse(String text, ContentLineReaderOptions options = null) #VCardDocumentParses a vCard stream from text.
Parameters
- text System.String
- options OfficeIMO.Email.ContentLineReaderOptions = null
public Void Save(String filePath, ContentLineWriterOptions options = null) #VoidAtomically saves this document to a file.
Parameters
- filePath System.String
- options OfficeIMO.Email.ContentLineWriterOptions = null
public Void Save(Stream stream, ContentLineWriterOptions options = null) #VoidSaves this document to a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineWriterOptions = null
public Task SaveAsync(String filePath, ContentLineWriterOptions options = null, CancellationToken cancellationToken = null) #TaskAsynchronously atomically saves this document to a file.
Parameters
- filePath System.String
- options OfficeIMO.Email.ContentLineWriterOptions = null
- cancellationToken System.Threading.CancellationToken = null
public Task SaveAsync(Stream stream, ContentLineWriterOptions options = null, CancellationToken cancellationToken = null) #TaskAsynchronously saves to a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineWriterOptions = null
- cancellationToken System.Threading.CancellationToken = null
public String Serialize(ContentLineWriterOptions options = null) #StringSerializes this document to text using the configured output encoding.
Parameters
- options OfficeIMO.Email.ContentLineWriterOptions = null
public static Void SetVersion(ContentLineComponent card, VCardVersion version) #VoidReplaces a card's declared syntax version.
Parameters
- card OfficeIMO.Email.ContentLineComponent
- version OfficeIMO.Email.VCardVersion
public Byte[] ToBytes(ContentLineWriterOptions options = null) #Byte[]Serializes this document to bytes.
Parameters
- options OfficeIMO.Email.ContentLineWriterOptions = null
public IReadOnlyList<ContentLineValidationIssue> Validate() #IReadOnlyList<ContentLineValidationIssue>Validates version-specific stable vCard contracts while retaining extension properties.
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public IList<ContentLineComponent> Cards { get; } #Ordered VCARD roots. Repeated, grouped, unknown, and extension properties are retained.