public async Task TrackItemGenAsync(ITemplateInfo template, GenSourceEnum genSource, string appProjectType, string appFx, TemplateCreationResult result) { if (template == null) { throw new ArgumentNullException("template"); } if (result == null) { throw new ArgumentNullException("result"); } if (template != null && result != null) { switch (template.GetTemplateType()) { case TemplateType.Page: await TrackItemGenAsync(TelemetryEvents.PageGen, template, genSource, appProjectType, appFx, result); break; case TemplateType.Feature: await TrackItemGenAsync(TelemetryEvents.FeatureGen, template, genSource, appProjectType, appFx, result); break; case TemplateType.Unspecified: break; } } }
public async Task TrackItemGenAsync(ITemplateInfo template, GenSourceEnum genSource, UserSelectionContext context, TemplateCreationResult result) { if (template == null) { throw new ArgumentNullException(nameof(template)); } if (result == null) { throw new ArgumentNullException(nameof(result)); } if (template != null && result != null) { switch (template.GetTemplateType()) { case TemplateType.Page: await TrackItemGenAsync(TelemetryEvents.PageGen, template, genSource, context, result); break; case TemplateType.Feature: await TrackItemGenAsync(TelemetryEvents.FeatureGen, template, genSource, context, result); break; case TemplateType.Service: await TrackItemGenAsync(TelemetryEvents.ServiceGen, template, genSource, context, result); break; case TemplateType.Testing: await TrackItemGenAsync(TelemetryEvents.TestingGen, template, genSource, context, result); break; case TemplateType.Unspecified: break; } } }
public async Task TrackItemGenAsync(ITemplateInfo template, GenSourceEnum genSource, string appProjectType, string appFrontendFramework, string appBackendFramework, string appPlatform, TemplateCreationResult result) { if (template == null) { throw new ArgumentNullException(nameof(template)); } if (result == null) { throw new ArgumentNullException(nameof(result)); } if (template != null && result != null) { switch (template.GetTemplateType()) { case TemplateType.Page: await TrackItemGenAsync(TelemetryEvents.PageGen, template, genSource, appProjectType, appFrontendFramework, appBackendFramework, appPlatform, result); break; case TemplateType.Feature: await TrackItemGenAsync(TelemetryEvents.FeatureGen, template, genSource, appProjectType, appFrontendFramework, appBackendFramework, appPlatform, result); break; case TemplateType.Service: await TrackItemGenAsync(TelemetryEvents.ServiceGen, template, genSource, appProjectType, appFrontendFramework, appBackendFramework, appPlatform, result); break; case TemplateType.Testing: await TrackItemGenAsync(TelemetryEvents.TestingGen, template, genSource, appProjectType, appFrontendFramework, appBackendFramework, appPlatform, result); break; case TemplateType.Unspecified: break; } } }
private async Task TrackItemGenAsync(string eventToTrack, GenStatusEnum status, UserSelectionContext context, 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, context.FrontEndFramework }, { TelemetryProperties.FrontendFramework, context.FrontEndFramework }, { TelemetryProperties.BackendFramework, context.BackEndFramework }, { TelemetryProperties.TemplateName, templateName }, { TelemetryProperties.GenEngineStatus, genStatus.ToString() }, { TelemetryProperties.GenEngineMessage, message }, { TelemetryProperties.EventName, eventToTrack }, { TelemetryProperties.GenSource, genSource.ToString() }, { TelemetryProperties.ProjectType, context.ProjectType }, { TelemetryProperties.VsProjectCategory, context.Platform }, }; AddPropertiesFromPropertyBag(context, properties); await TelemetryService.Current.TrackEventAsync(eventToTrack, properties).ConfigureAwait(false); }
private async Task TrackItemGenAsync(string eventToTrack, ITemplateInfo template, GenSourceEnum genSource, UserSelectionContext context, TemplateCreationResult result) { GenStatusEnum telemetryStatus = result.Status == CreationResultStatus.Success ? GenStatusEnum.Completed : GenStatusEnum.Error; await TrackItemGenAsync(eventToTrack, telemetryStatus, context, template.GetTelemetryName(), genSource, result.Status, result.Message); }
private async Task TrackItemGenAsync(string eventToTrack, ITemplateInfo template, GenSourceEnum genSource, string appProjectType, string appFrontendFramework, string appBackendFramework, string appPlatform, TemplateCreationResult result) { GenStatusEnum telemetryStatus = result.Status == CreationResultStatus.Success ? GenStatusEnum.Completed : GenStatusEnum.Error; await TrackItemGenAsync(eventToTrack, telemetryStatus, appProjectType, appFrontendFramework, appBackendFramework, appPlatform, template.GetTelemetryName(), genSource, result.Status, result.Message); }
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, ITemplateInfo template, GenSourceEnum genSource, string appProjectType, string appFx, TemplateCreationResult result) { GenStatusEnum telemetryStatus = result.Status == CreationResultStatus.Success ? GenStatusEnum.Completed : GenStatusEnum.Error; await TrackItemGenAsync(eventToTrack, telemetryStatus, appProjectType, appFx, template.Name, genSource, result.Status, result.Message); }