예제 #1
0
        public void AddProject(NuGetProjectType projectType, string projectId, int nullCount, int totalCount)
        {
            List <ProjectData> projectDatas;

            if (ComplexData.TryGetValue(Data, out object value) && value is List <ProjectData> data)
            {
                projectDatas = data;
            }
            else
            {
                projectDatas = new List <ProjectData>();

                ComplexData[Data] = projectDatas;
            }

            projectDatas.Add(new ProjectData(projectId, projectType, nullCount, 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));
        }