C# Class Thought.vCards.vCardStandardReader

Reads a vCard written in the standard 2.0 or 3.0 text formats. This is the primary (standard) vCard format used by most applications.
Inheritance: Thought.vCards.vCardReader
Mostra file Open project: drlongnecker/Thought.vCards Class Usage Examples

Public Methods

Method Description
DecodeBase64 ( char value ) : byte[]

Converts BASE64 data that has been stored in a character array.

DecodeBase64 ( string value ) : byte[]

Decodes a string containing BASE64 characters.

DecodeEmailAddressType ( string keyword ) : vCardEmailAddressType?

Parses the name of an email address type.

DecodeEscaped ( string value ) : string

Decodes a string that has been encoded with the standard vCard escape codes.

DecodeHexadecimal ( char value ) : int

Converts a single hexadecimal character to its integer value.

DecodeQuotedPrintable ( string value ) : string

DecodeQuotedPrintable ( string value, Encoding encoding ) : string

Decodes a string that has been encoded in QUOTED-PRINTABLE format.

IsHexDigit ( char value ) : bool

Indicates whether the specified character is a hexadecimal digit.

ParseDate ( string value ) : DateTime?

Parses a string containing a date/time value.

Some revision dates, such as those generated by Outlook, are not directly supported by the .NET DateTime parser. This function attempts to accomodate the non-standard formats.

ParseDeliveryAddressType ( string value ) : vCardDeliveryAddressTypes

Parses the type of postal address.

ParseEncoding ( string name ) : vCardEncoding

Parses an encoding name (such as "BASE64") and returns the corresponding vCardEncoding value.

ParsePhoneType ( string name ) : vCardPhoneTypes

Parses the name of a phone type and returns the corresponding vCardPhoneTypes value.

ReadInto ( Thought.vCards.vCard card, TextReader reader ) : void

Reads a vCard (VCF) file from an input stream.

ReadInto ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Updates a vCard object based on the contents of a vCardProperty.

This method examines the contents of a property and attempts to update an existing vCard based on the property name and value. This function must be updated when new vCard properties are implemented.

ReadProperty ( TextReader reader ) : Thought.vCards.vCardProperty

Reads a property from a text reader.

ReadProperty ( string text ) : Thought.vCards.vCardProperty

Reads a property from a string.

vCardStandardReader ( ) : System

Initializes a new instance of the vCardStandardReader.

Private Methods

Method Description
GetCharsetEncoding ( string encodingName ) : Encoding
ReadInto_ADR ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads an ADR property.

ReadInto_BDAY ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the BDAY property.

ReadInto_CATEGORIES ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the CATEGORIES property.

ReadInto_CLASS ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the CLASS property.

ReadInto_EMAIL ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads an EMAIL property.

ReadInto_FN ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the FN property.

ReadInto_GEO ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the GEO property.

ReadInto_KEY ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the KEY property.

ReadInto_LABEL ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the LABEL property.

ReadInto_MAILER ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the MAILER property.

ReadInto_N ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the N property.

ReadInto_NAME ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the NAME property.

ReadInto_NICKNAME ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the NICKNAME property.

ReadInto_NOTE ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the NOTE property.

ReadInto_ORG ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the ORG property.

ReadInto_PHOTO ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the PHOTO property.

ReadInto_PRODID ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the PRODID property.

ReadInto_REV ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the REV property.

ReadInto_ROLE ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the ROLE property.

ReadInto_SOURCE ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the SOURCE property.

ReadInto_TEL ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the TEL property.

ReadInto_TITLE ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the TITLE property.

ReadInto_TZ ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads a TZ property.

ReadInto_UID ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the UID property.

ReadInto_URL ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the URL property.

ReadInto_X_WAB_GENDER ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void

Reads the X-WAB-GENDER property.

Method Details

DecodeBase64() public static method

Converts BASE64 data that has been stored in a character array.
public static DecodeBase64 ( char value ) : byte[]
value char /// A character array containing BASE64 data. ///
return byte[]

DecodeBase64() public static method

Decodes a string containing BASE64 characters.
public static DecodeBase64 ( string value ) : byte[]
value string /// A string containing data that has been encoded with /// the BASE64 format. ///
return byte[]

DecodeEmailAddressType() public static method

Parses the name of an email address type.
public static DecodeEmailAddressType ( string keyword ) : vCardEmailAddressType?
keyword string /// The email address type keyword found in the vCard file (e.g. AOL or INTERNET). ///
return vCardEmailAddressType?

DecodeEscaped() public static method

Decodes a string that has been encoded with the standard vCard escape codes.
public static DecodeEscaped ( string value ) : string
value string /// A string encoded with vCard escape codes. ///
return string

DecodeHexadecimal() public static method

Converts a single hexadecimal character to its integer value.
public static DecodeHexadecimal ( char value ) : int
value char /// A Unicode character. ///
return int

DecodeQuotedPrintable() public static method

public static DecodeQuotedPrintable ( string value ) : string
value string
return string

DecodeQuotedPrintable() public static method

Decodes a string that has been encoded in QUOTED-PRINTABLE format.
public static DecodeQuotedPrintable ( string value, Encoding encoding ) : string
value string /// A string that has been encoded in QUOTED-PRINTABLE. ///
encoding System.Text.Encoding /// charset encoding ///
return string

IsHexDigit() public static method

Indicates whether the specified character is a hexadecimal digit.
public static IsHexDigit ( char value ) : bool
value char /// A unicode character ///
return bool

ParseDate() public static method

Parses a string containing a date/time value.
Some revision dates, such as those generated by Outlook, are not directly supported by the .NET DateTime parser. This function attempts to accomodate the non-standard formats.
public static ParseDate ( string value ) : DateTime?
value string /// A string containing a date/time value. ///
return DateTime?

ParseDeliveryAddressType() public static method

Parses the type of postal address.
public static ParseDeliveryAddressType ( string value ) : vCardDeliveryAddressTypes
value string /// The single value of a TYPE subproperty for the ADR property. ///
return vCardDeliveryAddressTypes

ParseEncoding() public static method

Parses an encoding name (such as "BASE64") and returns the corresponding vCardEncoding value.
public static ParseEncoding ( string name ) : vCardEncoding
name string /// The name of an encoding from a standard vCard property. ///
return vCardEncoding

ParsePhoneType() public static method

Parses the name of a phone type and returns the corresponding vCardPhoneTypes value.
public static ParsePhoneType ( string name ) : vCardPhoneTypes
name string /// The name of a phone type from a TEL vCard property. ///
return vCardPhoneTypes

ReadInto() public method

Reads a vCard (VCF) file from an input stream.
public ReadInto ( Thought.vCards.vCard card, TextReader reader ) : void
card Thought.vCards.vCard /// An initialized vCard. ///
reader TextReader /// A text reader pointing to the beginning of /// a standard vCard file. ///
return void

ReadInto() public method

Updates a vCard object based on the contents of a vCardProperty.

This method examines the contents of a property and attempts to update an existing vCard based on the property name and value. This function must be updated when new vCard properties are implemented.

public ReadInto ( Thought.vCards.vCard card, Thought.vCards.vCardProperty property ) : void
card Thought.vCards.vCard /// An initialized vCard object. ///
property Thought.vCards.vCardProperty /// An initialized vCardProperty object. ///
return void

ReadProperty() public method

Reads a property from a text reader.
public ReadProperty ( TextReader reader ) : Thought.vCards.vCardProperty
reader TextReader
return Thought.vCards.vCardProperty

ReadProperty() public method

Reads a property from a string.
public ReadProperty ( string text ) : Thought.vCards.vCardProperty
text string
return Thought.vCards.vCardProperty

vCardStandardReader() public method

Initializes a new instance of the vCardStandardReader.
public vCardStandardReader ( ) : System
return System