Esempio n. 1
0
        private async Task TrackItemGenAsync(string eventToTrack, GenStatusEnum status, string appType, string pageFx, string templateName, GenSourceEnum genSource, CreationResultStatus genStatus = CreationResultStatus.Success, string message = "")
        {
            var properties = new Dictionary <string, string>()
            {
                { TelemetryProperties.Status, status.ToString() },
                { TelemetryProperties.Framework, pageFx },
                { TelemetryProperties.TemplateName, templateName },
                { TelemetryProperties.GenEngineStatus, genStatus.ToString() },
                { TelemetryProperties.GenEngineMessage, message },
                { TelemetryProperties.EventName, eventToTrack },
                { TelemetryProperties.GenSource, genSource.ToString() }
            };

            await TelemetryService.Current.TrackEventAsync(eventToTrack, properties).ConfigureAwait(false);
        }
        private async Task TrackItemGenAsync(string eventToTrack, GenStatusEnum status, string appType, string appFrontendFramework, string appBackendFramework, string appPlatform, string templateName, GenSourceEnum genSource, CreationResultStatus genStatus = CreationResultStatus.Success, string message = "")
        {
            // TODO: Remove TelemetryProperties.Framework and use TelemetryProperties.FrontendFramework
            var properties = new Dictionary <string, string>
            {
                { TelemetryProperties.Status, status.ToString() },
                { TelemetryProperties.Framework, appFrontendFramework },
                { TelemetryProperties.FrontendFramework, appFrontendFramework },
                { TelemetryProperties.BackendFramework, appBackendFramework },
                { TelemetryProperties.TemplateName, templateName },
                { TelemetryProperties.GenEngineStatus, genStatus.ToString() },
                { TelemetryProperties.GenEngineMessage, message },
                { TelemetryProperties.EventName, eventToTrack },
                { TelemetryProperties.GenSource, genSource.ToString() },
                { TelemetryProperties.ProjectType, appType },
                { TelemetryProperties.VsProjectCategory, appPlatform },
            };

            await TelemetryService.Current.TrackEventAsync(eventToTrack, properties).ConfigureAwait(false);
        }