Beispiel #1
0
 internal ProjectData(string projectId, NuGetProjectType projectType, int nullCount, int totalCount)
 {
     ProjectId   = new TelemetryPiiProperty(projectId);
     ProjectType = projectType.ToString();
     NullCount   = nullCount;
     TotalCount  = totalCount;
 }
        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));
        }