コード例 #1
0
        public static void TrackEvent(string name, Dictionary <string, string> evt)
        {
            var track = (evt == null) ? new Dictionary <string, string>() : evt;

            track.Add("Version", AsaHelpers.GetVersionString());
            track.Add("OS", AsaHelpers.GetOsName());
            track.Add("OS_Version", AsaHelpers.GetOsVersion());
            track.Add("Method", new System.Diagnostics.StackFrame(1).GetMethod()?.Name ?? "");
            Client?.TrackEvent(name, track);
        }
コード例 #2
0
        public static void TrackTrace(SeverityLevel severityLevel, Exception e)
        {
            var evt = new Dictionary <string, string>();

            evt.Add("Version", AsaHelpers.GetVersionString());
            evt.Add("OS", AsaHelpers.GetOsName());
            evt.Add("OS_Version", AsaHelpers.GetOsVersion());
            evt.Add("Method", new System.Diagnostics.StackFrame(1).GetMethod()?.Name ?? "");
            evt.Add("Stack", (e == null || e.StackTrace == null) ? "" : e.StackTrace);
            Client?.TrackTrace((e == null) ? "Null" : e.GetType().ToString(), severityLevel, evt);
        }