DesktopAnalytics.Analytics.TrackWithApplicationProperties C# (CSharp) Method

TrackWithApplicationProperties() private static method

All calls to Segment.Analytics.Client.Track should run through here so we can provide defaults for every event
private static TrackWithApplicationProperties ( string eventName, Properties properties = null ) : void
eventName string
properties Properties
return void
		private static void TrackWithApplicationProperties(string eventName, Properties properties = null)
		{
			if (_singleton == null)
			{
				throw new ApplicationException("The application must first construct a single Analytics object");
			}
			if (properties == null)
				properties = new Properties();
			foreach (var p in _singleton._propertiesThatGoWithEveryEvent)
			{
				if (properties.ContainsKey(p.Key))
					properties.Remove(p.Key);
				properties.Add(p.Key, p.Value ?? string.Empty);
			}
			Segment.Analytics.Client.Track(AnalyticsSettings.Default.IdForAnalytics, eventName, properties);
		}