Esempio n. 1
0
        public void TestApplicationUrls()
        {
            using (var helper = new PListFile()) {
                string [] results = MonoDevelop.MacInterop.CoreFoundation.GetApplicationUrls(helper.FilePath, MonoDevelop.MacInterop.CoreFoundation.LSRolesMask.All);

                Assert.Greater(results.Length, 0);
            }
        }
Esempio n. 2
0
        public void TestApplicationUrl()
        {
            using (var helper = new PListFile()) {
                string result = MonoDevelop.MacInterop.CoreFoundation.GetApplicationUrl(helper.FilePath, MonoDevelop.MacInterop.CoreFoundation.LSRolesMask.All);

                Assert.NotNull(result);
            }
        }
        private static byte[] GenerateHashesPList(byte[] codeDirectoryBytes, byte[] alternativeCodeDirectory1Bytes)
        {
            PListFile      plist      = new PListFile();
            DictionaryNode rootNode   = new DictionaryNode();
            ArrayNode      hashesNode = new ArrayNode();

            hashesNode.Add(new DataNode(HashAlgorithmHelper.ComputeHash(HashType.SHA1, codeDirectoryBytes)));
            hashesNode.Add(new DataNode(HashAlgorithmHelper.ComputeHash(HashType.SHA256Truncated, alternativeCodeDirectory1Bytes)));
            rootNode.Add("cdhashes", hashesNode);
            plist.RootNode = rootNode;
            return(plist.GetBytes(PListFormat.Xml));
        }