public static void TrackAtomicFeature(RadElement element, string traceEvent)
 {
     if (element == null || element.ElementTree == null || element.ElementTree.Control == null)
     {
         return;
     }
     ControlTraceMonitor.TrackAtomicFeature(element.ElementTree.Control as RadControl, traceEvent);
 }
        public static void TrackFeatureStop(RadControl control, string traceEvent)
        {
            string featureName = ControlTraceMonitor.GetFeatureName(control, traceEvent);

            if (featureName == null)
            {
                return;
            }
            ControlTraceMonitor.AnalyticsMonitor.TrackFeatureEnd(featureName);
        }
        public static void TrackValueCore(RadControl control, string traceEvent, long value)
        {
            string featureName = ControlTraceMonitor.GetFeatureName(control, traceEvent);

            if (featureName == null)
            {
                return;
            }
            ControlTraceMonitor.AnalyticsMonitor.TrackValue(featureName, value);
        }
        public static void TrackErrorCore(RadControl control, string traceEvent, Exception exception)
        {
            string featureName;

            if (exception == null || (featureName = ControlTraceMonitor.GetFeatureName(control, traceEvent)) == null)
            {
                return;
            }
            ControlTraceMonitor.AnalyticsMonitor.TrackError(featureName, exception);
        }
        public static void TrackAtomicFeature(RadControl control, string traceEvent, object value)
        {
            string featureName = ControlTraceMonitor.GetFeatureName(control, traceEvent);

            if (featureName == null)
            {
                return;
            }
            string str = value == null ? (string)null : Convert.ToString(value);

            ControlTraceMonitor.AnalyticsMonitor.TrackAtomicFeature(!string.IsNullOrEmpty(str) ? string.Format("{0}.{1}", (object)featureName, (object)str) : string.Format("{0}.NULL", (object)featureName));
        }
        private static string GetFeatureName(RadControl control, string traceEvent)
        {
            string controlName;

            if (ControlTraceMonitor.AnalyticsMonitor == null || control == null || (string.IsNullOrEmpty(traceEvent) || !control.EnableAnalytics) || (control.IsInitializing || !control.IsHandleCreated || string.IsNullOrEmpty(controlName = ControlTraceMonitor.GetControlName(control))))
            {
                return((string)null);
            }
            if (string.IsNullOrEmpty(controlName))
            {
                return(string.Format("{0}.{1}", (object)control.GetType().Name, (object)traceEvent));
            }
            return(string.Format("{0}.{1}.{2}", (object)control.GetType().Name, (object)controlName, (object)traceEvent));
        }