public void Stop() { if (monitor != null) { monitor = null; } }
private static void TryInitializeMonitor() { if (!ConfigurationManager.AppSettings.Keys.OfType <string>().Contains(AnalyticsProductKey)) { return; } if (!isTrackingEnabled) { throw new InvalidOperationException("TryInitializeMonitor cannot be called when isTrackingEnabled is false. Set Instance.IsTrackingEnabled to true first."); } if (monitor != null) { return; } string productKey = ConfigurationManager.AppSettings[AnalyticsProductKey]; if (!string.IsNullOrEmpty(productKey)) { monitor = new GoogleAnalyticsMonitor(productKey, AppName, GetAppVersion()); } }