public ProjectTelemetryEvent( string nuGetVersion, string projectId, NuGetProjectType nuGetProjectType, int installedPackageCount) : base(ProjectInformationEventName, new Dictionary <string, object> { { nameof(InstalledPackageCount), installedPackageCount }, { nameof(NuGetProjectType), nuGetProjectType }, { nameof(NuGetVersion), nuGetVersion }, { nameof(ProjectId), projectId.ToString() } }) { }
public void AddProject(NuGetProjectType projectType, string projectId, int nullCount, int totalCount) { ProjectTypeAndData projectTypeAndData; if (ComplexData.TryGetValue(Data, out object value) && value is ProjectTypeAndData data) { projectTypeAndData = data; } else { projectTypeAndData = new ProjectTypeAndData(projectType.ToString()); ComplexData[Data] = projectTypeAndData; } projectTypeAndData.Projects.Add(new ProjectData(projectId, nullCount, totalCount)); }