public static Customer toCustomer(IDictionary <string, object> customerProps) { Customer.Builder builder = new Customer.Builder(); if (customerProps.ContainsKey("_nativeHandle")) { toBuilder((Customer)customerProps[@"_nativeHandle"], builder); } if (customerProps.ContainsKey(@"customerId")) { builder.SetCustomerId((string)customerProps[@"customerId"]); } if (customerProps.ContainsKey(@"firstName")) { builder.SetFirstName((string)customerProps[@"firstName"]); } if (customerProps.ContainsKey(@"lastName")) { builder.SetLastName((string)customerProps[@"lastName"]); } if (customerProps.ContainsKey(@"fullName")) { builder.SetFullName((string)customerProps[@"fullName"]); } if (customerProps.ContainsKey(@"emailAddress")) { builder.SetEmailAddress((string)customerProps[@"emailAddress"]); } return(builder.Build()); }
public static Customer toCustomer(IXLCustomer customer) { Customer.Builder builder = new Customer.Builder(); builder.SetCustomerId(customer.CustomerId); builder.SetEmailAddress(customer.EmailAddress); builder.SetFirstName(customer.FirstName); builder.SetFullName(customer.FullName); builder.SetLastName(customer.LastName); return(builder.Build()); }