예제 #1
0
        public static DependencyGroup CreateWithEntry(DependencyInfo dependencyInfo)
        {
            var dependencyGroup = new DependencyGroup
            {
                DependencyName           = dependencyInfo.Name,
                VersionDependencyInfoMap = new Dictionary <string, List <DependencyInfo> >()
            };

            dependencyGroup.AddEntry(dependencyInfo);

            return(dependencyGroup);
        }
예제 #2
0
        public static DependencyGroup CreateWithEntry(DependencyInfo dependencyInfo)
        {
            var dependencyGroup = new DependencyGroup
            {
                DependencyName = dependencyInfo.Name,
                VersionDependencyInfoMap = new Dictionary<string, List<DependencyInfo>>()
            };

            dependencyGroup.AddEntry(dependencyInfo);

            return dependencyGroup;
        }
예제 #3
0
        public void AddEntry(DependencyInfo dependencyInfo)
        {
            if (!dependencyInfo.Name.Equals(DependencyName, StringComparison.OrdinalIgnoreCase))
            {
                throw new Exception("Added dependency does not match group");
            }

            if (VersionDependencyInfoMap.ContainsKey(dependencyInfo.Version))
            {
                VersionDependencyInfoMap[dependencyInfo.Version].Add(dependencyInfo);
            }
            else
            {
                VersionDependencyInfoMap[dependencyInfo.Version] = new List <DependencyInfo>()
                {
                    dependencyInfo
                };
            }
        }
예제 #4
0
        public void AddEntry(DependencyInfo dependencyInfo)
        {
            if (!dependencyInfo.Name.Equals(DependencyName, StringComparison.OrdinalIgnoreCase))
            {
                throw new Exception("Added dependency does not match group");
            }

            if (VersionDependencyInfoMap.ContainsKey(dependencyInfo.Version))
            {
                VersionDependencyInfoMap[dependencyInfo.Version].Add(dependencyInfo);
            }
            else
            {
                VersionDependencyInfoMap[dependencyInfo.Version] = new List<DependencyInfo>()
                {
                    dependencyInfo
                };
            }
        }