Esempio n. 1
0
        private static AssemblyName GetAssemblyName(IXapZipArchive zip1, string testAssemblyName)
        {
            string tempFileName = Path.GetTempFileName();
            var    fileData     = zip1.ReadFileIntoBytes(testAssemblyName);

            if (fileData != null)
            {
                File.WriteAllBytes(tempFileName, fileData);
                return(AssemblyName.GetAssemblyName(tempFileName));
            }
            return(null);
        }
Esempio n. 2
0
        private static string LoadAppManifest(IXapZipArchive zip1)
        {
            var fileData = zip1.ReadFileIntoBytes("AppManifest.xaml");

            if (fileData != null)
            {
                string xaml = Encoding.UTF8.GetString(fileData);
                if (xaml[0] == '<')
                {
                    return(xaml);
                }
                return(xaml.Substring(1));
            }

            return(null);
        }
Esempio n. 3
0
        private static string LoadAppManifest(IXapZipArchive zip1)
        {
            var fileData = zip1.ReadFileIntoBytes("AppManifest.xaml");
            if (fileData != null)
            {
                string xaml = Encoding.UTF8.GetString(fileData);
                if (xaml[0] == '<')
                    return xaml;
                return xaml.Substring(1);
            }

            return null;
        }
Esempio n. 4
0
 private static AssemblyName GetAssemblyName(IXapZipArchive zip1, string testAssemblyName)
 {
     string tempFileName = Path.GetTempFileName();
     var fileData = zip1.ReadFileIntoBytes(testAssemblyName);
     if (fileData != null)
     {
         File.WriteAllBytes(tempFileName, fileData);
         return AssemblyName.GetAssemblyName(tempFileName);
     }
     return null;
 }