Exemple #1
0
 public ServersContainerViewModel(ServerGroupsTabsViewModel servers, ServerSidePanelViewModel serversSidePanel)
 {
     this.< Servers > k__BackingField         = servers;
     this.< ServerSidePanel > k__BackingField = serversSidePanel;
     base.get_Items().Add(servers);
     base.get_Items().Add(serversSidePanel);
 }
 private void SendSelectionChange(int index)
 {
     if (index == base.get_Items().IndexOf(this._countryServersViewModel))
     {
         ServerGroupsTabsViewModel.SendEvent("countries_click");
         return;
     }
     if (index == base.get_Items().IndexOf(this._favouriteServersViewModel))
     {
         ServerGroupsTabsViewModel.SendEvent("my_favourites_click");
         return;
     }
     if (index == base.get_Items().IndexOf(this._categoryServersViewModel))
     {
         ServerGroupsTabsViewModel.SendEvent("speciality_servers_click");
     }
 }
        private static void SendEvent(string action)
        {
            MethodBase         methodFromHandle   = MethodBase.GetMethodFromHandle(methodof(ServerGroupsTabsViewModel.SendEvent(string)).MethodHandle, typeof(ServerGroupsTabsViewModel).TypeHandle);
            AnalyticsAttribute analyticsAttribute = (AnalyticsAttribute)Activator.CreateInstance(typeof(AnalyticsAttribute));

            analyticsAttribute.Init(null, methodFromHandle, new object[]
            {
                action
            });
            analyticsAttribute.OnEntry();
            try
            {
                analyticsAttribute.OnExit();
            }
            catch (Exception exception)
            {
                analyticsAttribute.OnException(exception);
                throw;
            }
        }