예제 #1
0
        public static string[] GetReferences()
        {
            string text;
            string version;

            UWPReferences.GetSDKFolderAndVersion(out text, out version);
            HashSet <string> hashSet = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase);
            string           item    = Path.Combine(text, "UnionMetadata\\Facade\\Windows.winmd");

            hashSet.Add(item);
            string[] platform = UWPReferences.GetPlatform(text, version);
            for (int i = 0; i < platform.Length; i++)
            {
                string item2 = platform[i];
                hashSet.Add(item2);
            }
            UWPReferences.UWPExtension[] extensions = UWPReferences.GetExtensions(text, version);
            for (int j = 0; j < extensions.Length; j++)
            {
                UWPReferences.UWPExtension uWPExtension = extensions[j];
                string[] references = uWPExtension.References;
                for (int k = 0; k < references.Length; k++)
                {
                    string item3 = references[k];
                    hashSet.Add(item3);
                }
            }
            return(hashSet.ToArray <string>());
        }
예제 #2
0
        private static UWPReferences.UWPExtension[] GetExtensions(string folder, string version)
        {
            string path             = Path.Combine(folder, "Extension SDKs");
            string referencesFolder = Path.Combine(folder, "References");
            List <UWPReferences.UWPExtension> list = new List <UWPReferences.UWPExtension>();

            string[] directories = Directory.GetDirectories(path);
            for (int i = 0; i < directories.Length; i++)
            {
                string text  = directories[i];
                string text2 = FileUtil.CombinePaths(new string[]
                {
                    text,
                    version,
                    "SDKManifest.xml"
                });
                if (File.Exists(text2))
                {
                    try
                    {
                        UWPReferences.UWPExtension item = new UWPReferences.UWPExtension(text2, referencesFolder);
                        list.Add(item);
                    }
                    catch
                    {
                    }
                }
            }
            return(list.ToArray());
        }
예제 #3
0
        public static string[] GetReferences(Version sdkVersion)
        {
            string windowsKit = UWPReferences.GetWindowsKit10();

            string[] result;
            if (string.IsNullOrEmpty(windowsKit))
            {
                result = new string[0];
            }
            else
            {
                string           text    = UWPReferences.SdkVersionToString(sdkVersion);
                HashSet <string> hashSet = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase);
                string           text2   = UWPReferences.CombinePaths(new string[]
                {
                    windowsKit,
                    "UnionMetadata",
                    text,
                    "Facade",
                    "Windows.winmd"
                });
                if (!File.Exists(text2))
                {
                    text2 = UWPReferences.CombinePaths(new string[]
                    {
                        windowsKit,
                        "UnionMetadata",
                        "Facade",
                        "Windows.winmd"
                    });
                }
                hashSet.Add(text2);
                string[] platform = UWPReferences.GetPlatform(windowsKit, text);
                for (int i = 0; i < platform.Length; i++)
                {
                    string item = platform[i];
                    hashSet.Add(item);
                }
                UWPReferences.UWPExtension[] extensions = UWPReferences.GetExtensions(windowsKit, text);
                for (int j = 0; j < extensions.Length; j++)
                {
                    UWPReferences.UWPExtension uWPExtension = extensions[j];
                    string[] references = uWPExtension.References;
                    for (int k = 0; k < references.Length; k++)
                    {
                        string item2 = references[k];
                        hashSet.Add(item2);
                    }
                }
                result = hashSet.ToArray <string>();
            }
            return(result);
        }
예제 #4
0
        private static UWPReferences.UWPExtension[] GetExtensions(string windowsKitsFolder, string version)
        {
            List <UWPReferences.UWPExtension> list = new List <UWPReferences.UWPExtension>();

            foreach (UWPExtensionSDK current in UWPReferences.GetExtensionSDKs(windowsKitsFolder, version))
            {
                try
                {
                    UWPReferences.UWPExtension item = new UWPReferences.UWPExtension(current.ManifestPath, windowsKitsFolder, version);
                    list.Add(item);
                }
                catch
                {
                }
            }
            return(list.ToArray());
        }
예제 #5
0
        private static UWPReferences.UWPExtension[] GetExtensions(string folder, string version)
        {
            List <UWPReferences.UWPExtension> list = new List <UWPReferences.UWPExtension>();
            string referencesFolder = Path.Combine(folder, "References");

            foreach (UWPExtensionSDK current in UWPReferences.GetExtensionSDKs(folder, version))
            {
                try
                {
                    UWPReferences.UWPExtension item = new UWPReferences.UWPExtension(current.ManifestPath, referencesFolder);
                    list.Add(item);
                }
                catch
                {
                }
            }
            return(list.ToArray());
        }
예제 #6
0
        public static string[] GetReferences()
        {
            string  text;
            Version version;

            UWPReferences.GetWindowsKit10(out text, out version);
            string text2 = version.ToString();

            if (version.Minor == -1)
            {
                text2 += ".0";
            }
            if (version.Build == -1)
            {
                text2 += ".0";
            }
            if (version.Revision == -1)
            {
                text2 += ".0";
            }
            HashSet <string> hashSet = new HashSet <string>(StringComparer.InvariantCultureIgnoreCase);
            string           item    = Path.Combine(text, "UnionMetadata\\Facade\\Windows.winmd");

            hashSet.Add(item);
            string[] platform = UWPReferences.GetPlatform(text, text2);
            for (int i = 0; i < platform.Length; i++)
            {
                string item2 = platform[i];
                hashSet.Add(item2);
            }
            UWPReferences.UWPExtension[] extensions = UWPReferences.GetExtensions(text, text2);
            for (int j = 0; j < extensions.Length; j++)
            {
                UWPReferences.UWPExtension uWPExtension = extensions[j];
                string[] references = uWPExtension.References;
                for (int k = 0; k < references.Length; k++)
                {
                    string item3 = references[k];
                    hashSet.Add(item3);
                }
            }
            return(hashSet.ToArray <string>());
        }
예제 #7
0
 private static UWPReferences.UWPExtension[] GetExtensions(string folder, string version)
 {
   string path = Path.Combine(folder, "Extension SDKs");
   string referencesFolder = Path.Combine(folder, "References");
   List<UWPReferences.UWPExtension> uwpExtensionList = new List<UWPReferences.UWPExtension>();
   foreach (string directory in Directory.GetDirectories(path))
   {
     string str = FileUtil.CombinePaths(directory, version, "SDKManifest.xml");
     if (File.Exists(str))
     {
       try
       {
         UWPReferences.UWPExtension uwpExtension = new UWPReferences.UWPExtension(str, referencesFolder);
         uwpExtensionList.Add(uwpExtension);
       }
       catch
       {
       }
     }
   }
   return uwpExtensionList.ToArray();
 }
예제 #8
0
        private static UWPReferences.UWPExtension[] GetExtensions(string folder, string version)
        {
            string path             = Path.Combine(folder, "Extension SDKs");
            string referencesFolder = Path.Combine(folder, "References");
            List <UWPReferences.UWPExtension> uwpExtensionList = new List <UWPReferences.UWPExtension>();

            foreach (string directory in Directory.GetDirectories(path))
            {
                string str = FileUtil.CombinePaths(directory, version, "SDKManifest.xml");
                if (File.Exists(str))
                {
                    try
                    {
                        UWPReferences.UWPExtension uwpExtension = new UWPReferences.UWPExtension(str, referencesFolder);
                        uwpExtensionList.Add(uwpExtension);
                    }
                    catch
                    {
                    }
                }
            }
            return(uwpExtensionList.ToArray());
        }