Class CustomerAddressHelper

Helper class.

Inheritance
System.Object
CustomerAddressHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Customers
Assembly: Mediachase.Commerce.dll
Version: 10.8.0
Syntax
public class CustomerAddressHelper

Constructors

CustomerAddressHelper()

Declaration
public CustomerAddressHelper()

Methods

CheckAddressesEquality(CustomerAddress, CustomerAddress)

Checks if 2 customer addresses are the same (have same first, last names, city, state,...). Address ids and names are ignored.

Declaration
public static bool CheckAddressesEquality(CustomerAddress address1, CustomerAddress address2)
Parameters
Type Name Description
CustomerAddress address1
CustomerAddress address2
Returns
Type Description
System.Boolean

GetAddressString(CustomerAddress)

Converts address to a string (in HTML format) without phone numbers.

Declaration
public static string GetAddressString(CustomerAddress address)
Parameters
Type Name Description
CustomerAddress address
Returns
Type Description
System.String

GetAddressString(CustomerAddress, Boolean)

Converts address to a string (in HTML format).

Declaration
public static string GetAddressString(CustomerAddress address, bool includePhones)
Parameters
Type Name Description
CustomerAddress address
System.Boolean includePhones
Returns
Type Description
System.String

IsAddressInCollection(IEnumerable<CustomerAddress>, CustomerAddress)

Checks if customer address collection already contains the specified address.

Declaration
public static bool IsAddressInCollection(IEnumerable<CustomerAddress> collection, CustomerAddress address)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<CustomerAddress> collection

Customer addresses collection (Profile.Account.Addresses).

CustomerAddress address

Address to check.

Returns
Type Description
System.Boolean

True, if address is already in the collection.

Remarks

Only address' properties are checked (like first, last name, city, state,...). Address name and addressId are ignored.