Пример #1
0
        static Dictionary <string, string> CreateReferenceToPackage(string version)
        {
            var references = new Dictionary <string, string>();

            foreach (var package in DependenciesGenerator.GetReferences(version))
            {
                foreach (var reference in package.Item2)
                {
                    references.Add(reference, package.Item1.PackageName);
                }
            }
            return(references);
        }
Пример #2
0
        public static string GetPackageVersion(string includeString)
        {
            if (!includeString.StartsWith(DevExpressPrefix, StringComparison.InvariantCultureIgnoreCase))
            {
                return(null);
            }
            var version = DependenciesGenerator.GetVersion(includeString);

            if (version == null)
            {
                return("21.1.*");
            }
            //var referenceName = DependenciesGenerator.GetReferenceName(includeString);
            return(version + ".*");
        }
Пример #3
0
        public static string FindPackageNameFromReferenceName(string includeString)
        {
            if (!IsDevExpress(includeString))
            {
                return(null);
            }
            var    version       = DependenciesGenerator.GetVersion(includeString);
            var    referenceName = DependenciesGenerator.GetReferenceName(includeString);
            string packageName;

            if (TryGetPackageName(referenceName, version, out packageName))
            {
                return(packageName);
            }
            return(null);
        }
Пример #4
0
        public static bool IsReferenceConvertibleToPackageReference(string includeString)
        {
            if (versionToReferences == null)
            {
                versionToReferences = new Dictionary <string, Dictionary <string, string> >();
            }
            var version = DependenciesGenerator.GetVersion(includeString);

            if (version == null)
            {
                return(false);
            }
            var    referenceName = DependenciesGenerator.GetReferenceName(includeString);
            string packageName;

            return(TryGetPackageName(referenceName, version, out packageName));
        }