VcfDeserializeMany Method

Deserializes a collection of Streams of VCF data and allows to specify an AnsiFilter to select the correct Encoding automatically.

Definition

Namespace: FolkerKinzel.VCards
Assembly: FolkerKinzel.VCards (in FolkerKinzel.VCards.dll) Version: 8.0.1+a91cc3f0fd39aeb548e16006a60ca9dd10a304a2
C#
public static IEnumerable<VCard> DeserializeMany(
	IEnumerable<Func<Stream?>?> factories,
	AnsiFilter? filter = null
)

Parameters

factories  IEnumerableFuncStream
A collection of functions that return a either a Stream or null. The collection may return null values.
filter  AnsiFilter  (Optional)
An AnsiFilter instance, or null to parse all Streams with the default Encoding UTF-8.

Return Value

IEnumerableVCard
A collection of parsed VCard objects.

Remarks

AnsiFilter only recognizes one Encoding per Stream. This means that if a Stream contains VCF data with different Encodings, decoding errors may occur.

Any Streams that are used within the method will be closed when the method completes.

Exceptions

ArgumentNullExceptionfactories is null.
ArgumentExceptionOne of the Streams doesn't support reading.
ObjectDisposedExceptionOne of the functions in factories returns a closed stream.
IOException The method could not read from one of the Streams.

See Also