Inheritance: IPackageManifestReader
Ejemplo n.º 1
0
        public IEnumerable<IPackageInfo> Load(IPackageLog log)
        {
            var manifestReader = new PackageManifestReader(new FileSystem(), folder => folder);

            var pis = PackageManifest.FindManifestFilesInDirectory(_searchPoint)
                .Select(Path.GetDirectoryName)
                .Select(manifestReader.LoadFromFolder);

            var filtered = pis.Where(pi=>BottleRoles.Module.Equals(pi.Role));

            LogWriter.Current.PrintHorizontalLine();
            LogWriter.Current.Trace("Solution Package Loader found:");
            LogWriter.Current.Indent(() =>
            {
                filtered.Each(p => LogWriter.Current.Trace(p.Name));
            });

            LogWriter.Current.PrintHorizontalLine();

            return filtered;
        }
Ejemplo n.º 2
0
        public TopshelfPackageLoader(IBottleExploder exploder)
        {
            _exploder = exploder;

            _reader = new PackageManifestReader(new FileSystem(), getContentFolderForPackage);
        }
 public LinkedFolderPackageLoader(string applicationDirectory, Func<string, string> getContentFolderFromPackageFolder)
 {
     _applicationDirectory = applicationDirectory;
     _reader = new PackageManifestReader(_fileSystem, getContentFolderFromPackageFolder);
 }
Ejemplo n.º 4
0
        public static PackageManifest DetermineManifest(Assembly assembly)
        {
            var resourceName = assembly.GetName().Name + "." + PackageManifest.FILE;

            using (var resource = assembly.GetManifestResourceStream(resourceName))
            {
                if (resource != null)
                {
                    var manifest = new PackageManifestReader(new FileSystem(), s => s).LoadFromStream(resource);
                    if (manifest.Name.IsEmpty())
                    {
                        manifest.Name = assembly.GetName().Name;
                    }

                    return manifest;
                }
            }

            return defaults(assembly);
        }