VcfDeserializeAsync(FuncCancellationToken, TaskStream, Encoding, CancellationToken) Method
Deserializes a
Stream of VCF data in an asynchronous operation.
Namespace: FolkerKinzel.VCardsAssembly: FolkerKinzel.VCards (in FolkerKinzel.VCards.dll) Version: 8.0.1+a91cc3f0fd39aeb548e16006a60ca9dd10a304a2
public static Task<IReadOnlyList<VCard>> DeserializeAsync(
Func<CancellationToken, Task<Stream>> factory,
Encoding? textEncoding = null,
CancellationToken token = default
)
Public Shared Function DeserializeAsync (
factory As Func(Of CancellationToken, Task(Of Stream)),
Optional textEncoding As Encoding = Nothing,
Optional token As CancellationToken = Nothing
) As Task(Of IReadOnlyList(Of VCard))
public:
static Task<IReadOnlyList<VCard^>^>^ DeserializeAsync(
Func<CancellationToken, Task<Stream^>^>^ factory,
Encoding^ textEncoding = nullptr,
CancellationToken token = CancellationToken()
)
static member DeserializeAsync :
factory : Func<CancellationToken, Task<Stream>> *
?textEncoding : Encoding *
?token : CancellationToken
(* Defaults:
let _textEncoding = defaultArg textEncoding null
let _token = defaultArg token new CancellationToken()
*)
-> Task<IReadOnlyList<VCard>>
- factory FuncCancellationToken, TaskStream
- A function that takes a CancellationToken as
argument and returns a Stream of VCF data as an
asynchronous operation.
- textEncoding Encoding (Optional)
- The text encoding to use for deserialization or null,
to deserialize the Stream with the standard-compliant text encoding UTF8.
- token CancellationToken (Optional)
- A cancellation token that can be used by other objects or threads to
receive notice of cancellation.
TaskIReadOnlyListVCardThe task object representing the asynchronous operation.
The
Streams that is used within the method will be closed when the method
completes.