/// <summary> /// If addDateTime is sppecified Year, Month, Day properties are added. If time portion is not 00:00:00.000 then also Hour is added. /// </summary> private void LogEvent(TelemetryEvent eventName, IDictionary <string, string> properties) { if (AppConfig.Logging.LogEvents) { var et = new EventTelemetry(eventName.Title()); foreach (var entry in properties) { et.Properties.Add(entry.Key, entry.Value); } et.Sequence = eventName.Sequence(); Client.TrackEvent(et); #if DEBUG Client.Flush(); #endif } }