VCardDocument
OfficeIMO.Email
A standalone vCard stream containing one or more ordered VCARD objects.
Inheritance
- object
- VCardDocument
Usage
Explore 7 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 7
- Property EmailDataOpenResult.Contact
- Method EmailContactConsolidation.Consolidate
- Method EmailPortableContentCollection.ToVCards
- Method EmailPortableContentExport.ToVCard
- Method VCardDocument.Load
- Method VCardDocument.LoadAsync
- Method VCardDocument.Parse
Constructors
Methods
public ContentLineComponent AddCard(VCardVersion version = V4_0) #Adds an empty card with an explicit VERSION property.
Parameters
- version OfficeIMO.Email.VCardVersion = V4_0
Returns
ContentLineComponentpublic ContentLineComponent AddGroup(string formattedName, IEnumerable<string> memberUris) #Adds an RFC 6350 group card with ordered MEMBER URI properties.
Parameters
- formattedName string
- memberUris System.Collections.Generic.IEnumerable<string>
Returns
ContentLineComponentpublic static VCardVersion GetVersion(ContentLineComponent card) #Gets a card's declared syntax version.
Parameters
- card OfficeIMO.Email.ContentLineComponent
Returns
VCardVersionpublic static VCardDocument Load(byte[] bytes, ContentLineReaderOptions? options = null) #Loads a vCard stream from memory.
Parameters
- bytes byte[]
- options OfficeIMO.Email.ContentLineReaderOptions? = null
Returns
VCardDocumentpublic static VCardDocument Load(string filePath, ContentLineReaderOptions? options = null, CancellationToken cancellationToken = default) #Loads a vCard file.
Parameters
- filePath string
- options OfficeIMO.Email.ContentLineReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
VCardDocumentpublic static VCardDocument Load(Stream stream, ContentLineReaderOptions? options = null, CancellationToken cancellationToken = default) #Loads from a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
VCardDocumentpublic static async Task<VCardDocument> LoadAsync(string filePath, ContentLineReaderOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously loads a vCard file.
Parameters
- filePath string
- options OfficeIMO.Email.ContentLineReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<VCardDocument>public static async Task<VCardDocument> LoadAsync(Stream stream, ContentLineReaderOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously loads from a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineReaderOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Task<VCardDocument>public static VCardDocument Parse(string text, ContentLineReaderOptions? options = null) #Parses a vCard stream from text.
Parameters
- text string
- options OfficeIMO.Email.ContentLineReaderOptions? = null
Returns
VCardDocumentpublic void Save(string filePath, ContentLineWriterOptions? options = null) #Atomically saves this document to a file.
Parameters
- filePath string
- options OfficeIMO.Email.ContentLineWriterOptions? = null
public void Save(Stream stream, ContentLineWriterOptions? options = null) #Saves 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 = default) #Asynchronously atomically saves this document to a file.
Parameters
- filePath string
- options OfficeIMO.Email.ContentLineWriterOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Taskpublic Task SaveAsync(Stream stream, ContentLineWriterOptions? options = null, CancellationToken cancellationToken = default) #Asynchronously saves to a caller-owned stream without closing it.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Email.ContentLineWriterOptions? = null
- cancellationToken System.Threading.CancellationToken = default
Returns
Taskpublic string Serialize(ContentLineWriterOptions? options = null) #Serializes this document to text using the configured output encoding.
Parameters
- options OfficeIMO.Email.ContentLineWriterOptions? = null
Returns
stringpublic static void SetVersion(ContentLineComponent card, VCardVersion version) #Replaces a card's declared syntax version.
Parameters
- card OfficeIMO.Email.ContentLineComponent
- version OfficeIMO.Email.VCardVersion
public byte[] ToBytes(ContentLineWriterOptions? options = null) #Serializes this document to bytes.
Parameters
- options OfficeIMO.Email.ContentLineWriterOptions? = null
Returns
byte[]public IReadOnlyList<ContentLineValidationIssue> Validate() #Validates version-specific stable vCard contracts while retaining extension properties.
Returns
IReadOnlyList<ContentLineValidationIssue>Inherited Methods
Properties
public IList<ContentLineComponent> Cards { get; } #Ordered VCARD roots. Repeated, grouped, unknown, and extension properties are retained.