/// <inheritdoc />
        /// <summary>Initializes a new instance of the <see cref="TestService" /> class.</summary>
        public TestService()
        {
            InitializeComponent();

            var key = ConfigUtility.GetKeyValue();
            var servicesCollection = new ServiceCollection();

            servicesCollection.AddApplicationInsightsTelemetryWorkerService(key);
            var serviceProvider = servicesCollection.BuildServiceProvider();

            ////this.telemetryClient = new TelemetryClient(new TelemetryConfiguration(key)) { InstrumentationKey = key };
            this.telemetryClient = serviceProvider.GetRequiredService <TelemetryClient>();
            this.logger          = serviceProvider.GetRequiredService <ILogger <TestService> >();
        }
        /// <summary>Update app.config with values after install.</summary>
        /// <param name="sender">Sender <see cref="object"/>.</param>
        /// <param name="e"><see cref="InstallEventArgs"/> object.</param>
        private void ProjectInstallerAfterInstall(object sender, InstallEventArgs e)
        {
            var value = this.Context.Parameters["KEY"].Trim();

            ConfigUtility.WriteKeyValue(value);
        }