public AppInsightsTelemetryProvider (TelemetryClient client,
			[ImportMany (typeof (IContextEnricher))] IEnumerable<IContextEnricher> contextEnrichers,
			[ImportMany (typeof (ITelemetryEnricher))] IEnumerable<ITelemetryEnricher> telemetryEnrichers,
			[Import("AppInsightsInitializer", typeof(IContextInitializer))] IContextInitializer contextInitializer,
			[Import ("AppInsightsTranslator", typeof (ITelemetryTranslator))] ITelemetryTranslator telemetryTranslator)
		{
			this.client = client;
			this.contextEnrichers = contextEnrichers;
			this.telemetryEnrichers = telemetryEnrichers;
			this.contextInitializer = contextInitializer;
			this.telemetryTranslator = telemetryTranslator;

			Initialize ();
		}
Exemplo n.º 2
0
        public AppInsightsTelemetryProvider(TelemetryClient client,
                                            [ImportMany(typeof(IContextEnricher))] IEnumerable <IContextEnricher> contextEnrichers,
                                            [ImportMany(typeof(ITelemetryEnricher))] IEnumerable <ITelemetryEnricher> telemetryEnrichers,
                                            [Import("AppInsightsInitializer", typeof(IContextInitializer))] IContextInitializer contextInitializer,
                                            [Import("AppInsightsTranslator", typeof(ITelemetryTranslator))] ITelemetryTranslator telemetryTranslator)
        {
            this.client              = client;
            this.contextEnrichers    = contextEnrichers;
            this.telemetryEnrichers  = telemetryEnrichers;
            this.contextInitializer  = contextInitializer;
            this.telemetryTranslator = telemetryTranslator;

            Initialize();
        }