private void provideGameAnalytics() { ServiceLocator.ProvideService(typeof(GameAnalyticsAPI), false); api = ServiceLocator.GetService <IGameAnalyticsAPI>(); api.SendInit("698deede3c3e55cfa6a4e242b21ed0c6", "e894c3b2524f011a3aa8e53f88a86659356406f3", 1); api.SendUserSessionStart(); }
//public public void Connect(IBuilder builder) { string[] p = builder.GetParams(); if (p == null || p.Length != 2) { throw new ArgumentException("params must have a length of 2. Use Egg82LibEnhanced.Reflection.ExceptionHandlers.Builders.GameAnalyticsBuilder"); } api = ServiceLocator.GetService <IGameAnalyticsAPI>(); if (api == null || api.GetGameKey() != p[0]) { api = new GameAnalyticsAPI(); api.SendInit(p[0], p[1], 1); } foreach (Exception ex in exceptions) { api.SendError(ex.ToString()); } exceptions.Clear(); AddDomain(AppDomain.CurrentDomain); resendTimer = new Timer(60.0d * 60.0d * 1000.0d); resendTimer.Elapsed += onResendTimer; resendTimer.AutoReset = true; resendTimer.Start(); }