Beispiel #1
0
        public static LLCustomer toCustomer(IDictionary <string, object> customerProps)
        {
            var customer = new LLCustomer();

            customer = LLCustomer.CustomerWithBlock((LLCustomerBuilder builder) =>
            {
                if (customerProps.ContainsKey("_nativeHandle"))
                {
                    toBuilder((LLCustomer)customerProps[@"_nativeHandle"], builder);
                    //customer = (LLCustomer)customerProps[@"_nativeHandle"];
                }
                if (customerProps.ContainsKey(@"customerId"))
                {
                    builder.CustomerId = (string)customerProps[@"customerId"];
                }
                if (customerProps.ContainsKey(@"firstName"))
                {
                    builder.FirstName = (string)customerProps[@"firstName"];
                }
                if (customerProps.ContainsKey(@"lastName"))
                {
                    builder.LastName = (string)customerProps[@"lastName"];
                }
                if (customerProps.ContainsKey(@"fullName"))
                {
                    builder.FullName = (string)customerProps[@"fullName"];
                }
                if (customerProps.ContainsKey(@"emailAddress"))
                {
                    builder.EmailAddress = (string)customerProps[@"emailAddress"];
                }
            });
            return(customer);
        }
Beispiel #2
0
 public static void toBuilder(this LLCustomer customer, LLCustomerBuilder builder)
 {
     builder.CustomerId   = customer.CustomerId;
     builder.EmailAddress = customer.EmailAddress;
     builder.FirstName    = customer.FirstName;
     builder.FullName     = customer.FullName;
     builder.LastName     = customer.LastName;
 }
Beispiel #3
0
 public static LLCustomer toCustomer(IXLCustomer customer)
 {
     return(LLCustomer.CustomerWithBlock((LLCustomerBuilder builder) =>
     {
         builder.CustomerId = customer.CustomerId;
         builder.EmailAddress = customer.EmailAddress;
         builder.FirstName = customer.FirstName;
         builder.FullName = customer.FullName;
         builder.LastName = customer.LastName;
     }));
 }
Beispiel #4
0
 internal static IDictionary <string, object> ToDictionary(this LLCustomer customer)
 {
     return(new Dictionary <string, object>
     {
         { "_nativeHandle", customer },
         { "customerId", customer.CustomerId },
         { "firstName", customer.FirstName },
         { "lastName", customer.LastName },
         { "fullName", customer.FullName },
         { "emailAddress", customer.EmailAddress }
     });
 }
Beispiel #5
0
 public static void TagCustomerLoggedIn(LLCustomer customer, string methodName, NSDictionary attributes)
 {
     Localytics.TagCustomerLoggedInPrivate(customer, methodName, attributes);
 }
Beispiel #6
0
 public static void TagCustomerRegistered(LLCustomer customer, string methodName, NSDictionary attributes)
 {
     Localytics.TagCustomerRegisteredPrivate(customer, methodName, attributes);
 }