コード例 #1
0
        private static bool IsPackageFile(PackagePart part)
        {
            string path = UriUtility.GetPath(part.Uri);

            // We exclude any opc files and the manifest file (.nuspec)
            return(!ExcludePaths.Any(p => path.StartsWith(p, StringComparison.OrdinalIgnoreCase)) &&
                   !PackageUtility.IsManifest(path));
        }
コード例 #2
0
        private static bool IsAssemblyReference(PackagePart part)
        {
            // Assembly references are in lib/ and have a .dll/.exe extension
            string path = UriUtility.GetPath(part.Uri);

            return(path.StartsWith(AssemblyReferencesDir, StringComparison.OrdinalIgnoreCase) &&
                   // Exclude resource assemblies
                   !path.EndsWith(ResourceAssemblyExtension, StringComparison.OrdinalIgnoreCase) &&
                   AssemblyReferencesExtensions.Contains(Path.GetExtension(path), StringComparer.OrdinalIgnoreCase));
        }
コード例 #3
0
 public ZipPackageFile(PackagePart part)
     : base(UriUtility.GetPath(part.Uri))
 {
     Debug.Assert(part != null, "part should not be null");
     _streamFactory = () => part.GetStream();
 }