Ejemplo n.º 1
0
 public WriteToLogPackage(
     string sRequestText,
     string sResponseText,
     ExperianServiceType nServiceType,
     int nCustomerID,
     int?nDirectorID      = null,
     string firstname     = null,
     string surname       = null,
     DateTime?dob         = null,
     string postCode      = null,
     string companyRefNum = null
     )
 {
     In  = new InputData(sRequestText, sResponseText, nServiceType, nCustomerID, nDirectorID, firstname, surname, dob, postCode, companyRefNum);
     Out = new OutputData();
 }         // constructor
Ejemplo n.º 2
0
        public static WriteToLogPackage.OutputData WriteLog <TX, TY>(
            TX input,
            TY output,
            ExperianServiceType type,
            int customerId,
            int?directorId       = null,
            string firstname     = null,
            string surname       = null,
            DateTime?dob         = null,
            string postCode      = null,
            string companyRefNum = null
            )
            where TX : class
            where TY : class
        {
            string serializedInput;
            string serializedOutput;

            if (typeof(TX) == typeof(string) && typeof(TY) == typeof(string))
            {
                serializedInput  = input as string;
                serializedOutput = output as string;
            }
            else
            {
                serializedInput  = XSerializer.Serialize(input);
                serializedOutput = XSerializer.Serialize(output);
            }             // if

            var pkg = new WriteToLogPackage(
                serializedInput,
                serializedOutput,
                type,
                customerId,
                directorId,
                firstname,
                surname,
                dob,
                postCode,
                companyRefNum
                );

            return(WriteLog(pkg));
        }         // WriteLog
Ejemplo n.º 3
0
 public InputData(
     string sRequest,
     string sResponse,
     ExperianServiceType nServiceType,
     int nCustomerID,
     int?nDirectorID,
     string firstname     = null,
     string surname       = null,
     DateTime?dob         = null,
     string postCode      = null,
     string companyRefNum = null
     )
 {
     Request       = sRequest;
     Response      = sResponse;
     ServiceType   = nServiceType;
     CustomerID    = nCustomerID;
     DirectorID    = nDirectorID;
     Firstname     = firstname;
     Surname       = surname;
     DateOfBirth   = dob;
     PostCode      = postCode;
     CompanyRefNum = companyRefNum;
 }             // constructor