MapiContact.FromVCardAsync

FromVCardAsync(string, CancellationToken)

Reads MapiContact from the specified vCard file asynchronously. The supported vCard versions are 2.1 and 3.0

public static Task<MapiContact> FromVCardAsync(string filePath, CancellationToken token = default)
ParameterTypeDescription
filePathStringA file name to read from
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

A read MapiContact

Exceptions

exceptioncondition
ArgumentExceptionfilePath is null or empty

See Also


FromVCardAsync(string, VCardLoadOptions, CancellationToken)

Reads MapiContact from the specified vCard file asynchronously. The supported vCard versions are 2.1 and 3.0

public static Task<MapiContact> FromVCardAsync(string filePath, VCardLoadOptions options, 
    CancellationToken token = default)
ParameterTypeDescription
filePathStringA file name to read from
optionsVCardLoadOptionsAdditional options when loading a VCardContact
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

A read MapiContact

Exceptions

exceptioncondition
ArgumentExceptionfilePath is null or empty

See Also


FromVCardAsync(Stream, CancellationToken)

Reads MapiContact from the specified stream containing vCard asynchronously. The supported vCard versions are 2.1 and 3.0

public static Task<MapiContact> FromVCardAsync(Stream stream, CancellationToken token = default)
ParameterTypeDescription
streamStreamA stream to read from
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

A read MapiContact

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null
NotSupportedExceptionstream does not support reading

See Also


FromVCardAsync(Stream, VCardLoadOptions, CancellationToken)

Reads MapiContact from the specified stream containing vCard asynchronously. The supported vCard versions are 2.1 and 3.0

public static Task<MapiContact> FromVCardAsync(Stream stream, VCardLoadOptions options, 
    CancellationToken token = default)
ParameterTypeDescription
streamStreamA stream to read from
optionsVCardLoadOptionsAdditional options when loading a VCardContact
tokenCancellationTokenPropagates notification that operations should be canceled.

Return Value

A read MapiContact

Exceptions

exceptioncondition
ArgumentNullExceptionstream is null
NotSupportedExceptionstream does not support reading

See Also