C# Class ConstantContactUtility.Components.ContactComponent

Parse response Streams into Contacts, creates entries for creating and updating Contacts
Afficher le fichier Open project: constantcontact/Constant-Contact-Dot-Net-ASP-Campaign-Forms

Méthodes publiques

Méthode Description
CreateNewContact ( ConstantContactBO.Contact contact, string accountContactListUri ) : StringBuilder

Get the Atom entry for newly Contact to be send to Constant server

GetContactCollection ( Stream stream, string &next ) : List

Get the collection of Contacts from the Http response stream

GetContactDetails ( Stream stream ) : ConstantContactBO.Contact

Retrieve an Individual Contact from the Http response stream.

RemoveContactFromAllLists ( ConstantContactBO.Contact contact, string accountContactUri ) : StringBuilder

Get the Atom entry for the Contact to be removed from all Contact Lists

UpdateContact ( ConstantContactBO.Contact contact, string apiUri, string accountContactListUri, bool fullUpdate ) : StringBuilder

Get the Atom entry for the Contact to be updated

Private Methods

Méthode Description
ContactComponent ( ) : System

Class constructor

CreateAtomEntry ( ConstantContactBO.Contact contact, string accountContactListUri ) : StringBuilder

Create an Atom entry used to create a new Contact

CreateFullUpdateAtomEntry ( ConstantContactBO.Contact contact, string accountContactUri, string accountContactListUri ) : StringBuilder

Create an Atom entry used to update a Contact

CreateRemoveFromAllListsAtomEntry ( ConstantContactBO.Contact contact, string accountContactUri ) : StringBuilder

Create an Atom entry used to update a Contact

CreateSmallUpdateAtomEntry ( ConstantContactBO.Contact contact, string apiUri, string accountContactListUri ) : StringBuilder

Create an Atom entry used to update a Contact. Only the following fields will be updated: EmailAddress, FirstName, LastName, MiddleName, HomePhone, Addr1, Addr2, Addr3, City, StateCode, StateName, CountryCode, CountryName, PostalCode, SubPostalCode

GetContact ( XPathNavigator node, IXmlNamespaceResolver resolver ) : ConstantContactBO.Contact

Get Contact object from specified Xml data

GetContactDetail ( XPathNavigator node, IXmlNamespaceResolver resolver ) : ConstantContactBO.Contact

Get Contact object with details from specified Xml data

GetContactId ( XPathNavigator node ) : string

Gets the Id of Contact from Xml data

GetContactLink ( XPathNavigator node, IXmlNamespaceResolver resolver ) : string

Gets the edit Link of Contact from Xml data

GetContactListId ( XPathNavigator node ) : string

Gets the Id of Contact List from Xml data

GetContactStatus ( string contactStatus ) : ContactStatus

Get the ContactStatus enum

GetEmailType ( string emailType ) : ContactEmailType

Get the ContactEmailType enum

GetLink ( XPathNavigator navigator, string attributeValue, IXmlNamespaceResolver resolver ) : string

Gets the link with specified rel attribute value

GetNextLink ( XPathNavigator navigator, IXmlNamespaceResolver resolver ) : string

Gets the link to next chunk of data

GetOptSource ( string optSource ) : ContactOptSource

Get the ContactOptSource enum

InitializeContactStatusNames ( ) : void

Initialize ContactStatusName dictionary

InitializeEmailTypeNames ( ) : void

Initialize Email Type Name dictionary

InitializeOptSourceNames ( ) : void

Initialize Opt Source Name dictionary

Method Details

CreateNewContact() public static méthode

Get the Atom entry for newly Contact to be send to Constant server
public static CreateNewContact ( ConstantContactBO.Contact contact, string accountContactListUri ) : StringBuilder
contact ConstantContactBO.Contact Contact to be created
accountContactListUri string Uri address of Account Owner Contact resource
Résultat StringBuilder

GetContactCollection() public static méthode

Get the collection of Contacts from the Http response stream
public static GetContactCollection ( Stream stream, string &next ) : List
stream Stream Response Stream
next string Link to the next chunk of data
Résultat List

GetContactDetails() public static méthode

Retrieve an Individual Contact from the Http response stream.
public static GetContactDetails ( Stream stream ) : ConstantContactBO.Contact
stream Stream Response Stream
Résultat ConstantContactBO.Contact

RemoveContactFromAllLists() public static méthode

Get the Atom entry for the Contact to be removed from all Contact Lists
public static RemoveContactFromAllLists ( ConstantContactBO.Contact contact, string accountContactUri ) : StringBuilder
contact ConstantContactBO.Contact Contact to be updated
accountContactUri string Uri address of Account Owner Contact resource
Résultat StringBuilder

UpdateContact() public static méthode

Get the Atom entry for the Contact to be updated
public static UpdateContact ( ConstantContactBO.Contact contact, string apiUri, string accountContactListUri, bool fullUpdate ) : StringBuilder
contact ConstantContactBO.Contact Contact to be updated
apiUri string Uri of the API
accountContactListUri string Uri address of Account Owner Contact List resource
fullUpdate bool True if all Contact fields will be update; False otherwise (only the following fields /// will be updated: EmailAddress, FirstName, LastName, MiddleName, HomePhone, Addr1, Addr2, Addr3, /// City, StateCode, StateName, CountryCode, CountryName, PostalCode, SubPostalCode)
Résultat StringBuilder