PDIParserParseReader Method

This method is used to parse one or more PDI objects from a TextReader derived object such as a StreamReader or a StringReader.

Definition

Namespace: EWSoftware.PDI.Parser
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2023.1.2.0
public void ParseReader(
	TextReader tr
)

Parameters

tr  TextReader
The text reader object containing the PDI data stream. It is up to you to open the stream with the appropriate text encoding method if necessary.

Remarks

The derived class will build a list of objects based on the data stream. See the derived classes for more information. The stream will be read from its current position to the end of the stream.

Example

C#
VCardParser vcp = new VCardParser();
StreamReader sr = new StreamReader(@"C:\AddressBook.vcf");
vcp.ParseReader(sr);

VCardCollection vCards = vcp.VCards;

Exceptions

ArgumentNullExceptionThis is thrown if the specified text reader object is null.
PDIParserExceptionThis is thrown if there is an error parsing the data stream. Inner exceptions may contain additional information about the cause of the error.

See Also