Ejemplo n.º 1
0
 public BillingController(IShipHubConfiguration config, cb.ChargeBeeApi chargeBee, IShipHubQueueClient queueClient, IMixpanelClient mixpanelClient)
 {
     _configuration  = config;
     _queueClient    = queueClient;
     _chargeBee      = chargeBee;
     _mixpanelClient = mixpanelClient;
 }
Ejemplo n.º 2
0
        public virtual MixpanelMessage GetMessage(IMixpanelClient mixpanelClient)
        {
            MixpanelMessage trackMessage = mixpanelClient.GetTrackMessage(this.GetEventName(), this);

            if (trackMessage.get_Data().ContainsKey("properties"))
            {
                Dictionary <string, string>  arg_48_0   = SettingsHolder.get_Settings().get_BannerSettings().GetSettingsAsDictionary();
                IDictionary <string, object> dictionary = (IDictionary <string, object>)trackMessage.get_Data()["properties"];
                foreach (KeyValuePair <string, string> current in arg_48_0)
                {
                    if (dictionary.ContainsKey(current.Key))
                    {
                        dictionary[current.Key] = current.Value;
                    }
                    else
                    {
                        dictionary.Add(current.Key, current.Value);
                    }
                }
                foreach (KeyValuePair <string, string> current2 in BaseMixpanelEvent.GetKvStoreValues())
                {
                    if (dictionary.ContainsKey(current2.Key))
                    {
                        dictionary[current2.Key] = current2.Value;
                    }
                    else
                    {
                        dictionary.Add(current2.Key, current2.Value);
                    }
                }
            }
            return(trackMessage);
        }
Ejemplo n.º 3
0
            internal void <CheckAlias> b__6_0()
            {
                IMixpanelClient mixpanelClient = MixpanelEventSender.GetMixpanelClient();

                if (mixpanelClient == null)
                {
                    return;
                }
                string text = Constants.Alias(false);

                if (!string.IsNullOrEmpty(text))
                {
                    try
                    {
                        BaseMixpanelObject baseMixpanelObject = new BaseMixpanelObject();
                        if (mixpanelClient.Alias(baseMixpanelObject.DistinctId, text))
                        {
                            Constants.Alias(true);
                        }
                    }
                    catch
                    {
                    }
                }
            }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;

            // Get mixpanel project token
            MixpanelClient = new MixpanelClient("");
        }
Ejemplo n.º 5
0
        public MainPage()
        {
            this.InitializeComponent();
            Loaded   += MainPage_Loaded;
            Unloaded += MainPage_Unloaded;

            // get mixpanel project token
            client = new MixpanelClient("");
        }
Ejemplo n.º 6
0
        public override LinkedList <MixpanelMessage> GetMessages(IMixpanelClient mixpanelClient)
        {
            LinkedList <MixpanelMessage> expr_07 = base.GetMessages(mixpanelClient);

            expr_07.AddLast(mixpanelClient.GetPeopleAddMessage(base.DistinctId, new Dictionary <string, object>
            {
                {
                    "Settings opened",
                    1
                }
            }));
            return(expr_07);
        }
Ejemplo n.º 7
0
        public virtual LinkedList <MixpanelMessage> GetMessages(IMixpanelClient mixpanelClient)
        {
            LinkedList <MixpanelMessage> linkedList = new LinkedList <MixpanelMessage>();

            linkedList.AddLast(mixpanelClient.GetPeopleSetMessage(this));
            linkedList.AddLast(mixpanelClient.GetPeopleSetOnceMessage(base.DistinctId, new Dictionary <string, object>
            {
                {
                    "First seen",
                    DateTime.Now
                }
            }));
            Dictionary <string, string> settingsAsDictionary = SettingsHolder.get_Settings().get_BannerSettings().GetSettingsAsDictionary();

            if (settingsAsDictionary.Count > 0)
            {
                linkedList.AddLast(mixpanelClient.GetPeopleSetMessage(base.DistinctId, settingsAsDictionary));
            }
            return(linkedList);
        }
Ejemplo n.º 8
0
 public MixpanelEventTests()
 {
     EmptyHttpClientMock = new Mock <HttpClient>(MockBehavior.Strict);
     EmptyToken          = "token";
     EmptyClient         = new MixpanelClient(EmptyToken, EmptyHttpClientMock.Object);
 }