Customer Class
The CcfCustomer class is the default implementation of the Customer Interface. The customer or contact defined by the customer class is used as a subject for the session during implementation. The class contains a constructor that allows you to load a customer object.
The following is the default constructor that allows preloading of the customer object:
Public Customer(string customerId, object customerObject, string serializedCustomerObject, bool isNewCustomer, string originatingSearchControl)
{
CustomerId = customerId;
CustomerObject = customerObject;
OriginatingSearchControl = originatingSearchControl;
TargetContextManagerControl = string.Empty;
NewCustomer = isNewCustomer;
SerializedCustomerObject = serializedCustomerObject;
}
The class also contains an extended constructor that allows you to create a customer record while implementing the Context Manager interface:
public CcfCustomer(string customerId, object customerObject, string serializedCustomerObject, bool isNewCustomer, string originatingSearchControl, string targetContextControl)
{
if (string.IsNullOrEmpty(originatingSearchControl))
throw new CcfCustomerException("Originating Search Control is a required field");
CustomerId = customerId;
CustomerObject = customerObject;
OriginatingSearchControl = originatingSearchControl;
TargetContextManagerControl = targetContextControl;
NewCustomer = isNewCustomer;
SerializedCustomerObject = serializedCustomerObject;
}
The following figure shows the public properties and methods of the CcfCustomer class: