Exemplo n.º 1
0
        public static void PostEvent(string key, params object[] namesAndProperties)
        {
            if (string.IsNullOrEmpty(key))
            {
                return;
            }

            ThreadHelper.ThrowIfNotOnUIThread();

            IVsTelemetryEvent telemetryEvent = TelemetryHelper.TelemetryService.CreateEvent(key);

            //telemetryEvent.SetStringProperty("Vs.ReportingAssembly", callingAssemblyName);
            for (int i = 0; i < namesAndProperties.Length; i += 2)
            {
                string propertyName = namesAndProperties[i] as string;
                if (!string.IsNullOrEmpty(propertyName))
                {
                    telemetryEvent.SetProperty(propertyName, namesAndProperties[i + 1]);
                }
            }

            TelemetryHelper.DefaultTelemetrySession.PostEvent(telemetryEvent);
        }
Exemplo n.º 2
0
        private void SetBlockId(IVsTelemetryEvent telemetryEvent, FunctionId functionId, int blockId)
        {
            var blockIdName = functionId.GetPropertyName(BlockId);

            telemetryEvent.SetIntProperty(blockIdName, blockId);
        }
Exemplo n.º 3
0
 private void SetBlockId(IVsTelemetryEvent telemetryEvent, FunctionId functionId, int blockId)
 {
     var blockIdName = functionId.GetPropertyName(BlockId);
     telemetryEvent.SetIntProperty(blockIdName, blockId);
 }