Beispiel #1
0
        public IEnumerable <IPackageInfo> Load(IPackageLog log)
        {
            BottleExploder exploder = BottleExploder.GetPackageExploder(log);
            var            reader   = new PackageManifestReader(new FileSystem(), GetContentFolderForPackage);

            return(_folders.SelectMany(dir => {
                var explodeDirectory = new ExplodeDirectory
                {
                    DestinationDirectory = _explosionDirectory,
                    BottleDirectory = dir,
                    Log = log
                };

                return exploder.ExplodeDirectory(explodeDirectory);
            }).Select(reader.LoadFromFolder));
        }
        public IEnumerable<IPackageInfo> Load(IPackageLog log)
        {
            var fileSystem = new FileSystem();
            var manifestFileSpec = new FileSet { Include = PackageManifest.FILE, DeepSearch = true };
            var manifestReader = new PackageManifestReader(_sourceRoot, fileSystem, folder => folder);

            //how can i 'where' the manifests

            var pis = fileSystem.FileNamesFor(manifestFileSpec, _sourceRoot)
                .Select(Path.GetDirectoryName)
                .Select(manifestReader.LoadFromFolder);

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

            ConsoleWriter.PrintHorizontalLine();
            ConsoleWriter.Write("Solution Package Loader found:");
            filtered.Each(p=>ConsoleWriter.Write("  {0}", p.Name));
            ConsoleWriter.PrintHorizontalLine();

            return filtered;
        }
        public IEnumerable<IPackageInfo> Load(IPackageLog log)
        {
            var manifestReader = new PackageManifestReader(new FileSystem(), folder => folder);

            //how can i 'where' the manifests

            var pis = PackageManifest.FindManifestFilesInDirectory(_sourceRoot)
                .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;
        }
Beispiel #4
0
        public IEnumerable <IPackageInfo> Load(IPackageLog log)
        {
            var fileSystem       = new FileSystem();
            var manifestFileSpec = new FileSet {
                Include = PackageManifest.FILE, DeepSearch = true
            };
            var manifestReader = new PackageManifestReader(_sourceRoot, fileSystem, folder => folder);

            //how can i 'where' the manifests


            var pis = fileSystem.FileNamesFor(manifestFileSpec, _sourceRoot)
                      .Select(Path.GetDirectoryName)
                      .Select(manifestReader.LoadFromFolder);

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

            ConsoleWriter.PrintHorizontalLine();
            ConsoleWriter.Write("Solution Package Loader found:");
            filtered.Each(p => ConsoleWriter.Write("  {0}", p.Name));
            ConsoleWriter.PrintHorizontalLine();

            return(filtered);
        }
        public IEnumerable <IPackageInfo> Load(IPackageLog log)
        {
            var manifestReader = new PackageManifestReader(new FileSystem(), folder => folder);

            //how can i 'where' the manifests


            var pis = PackageManifest.FindManifestFilesInDirectory(_sourceRoot)
                      .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);
        }
 public LinkedFolderPackageLoader(string applicationDirectory, Func<string, string> getContentFolderFromPackageFolder)
 {
     _applicationDirectory = applicationDirectory;
     _reader = new PackageManifestReader(_fileSystem, getContentFolderFromPackageFolder);
 }
        public void SetUp()
        {
            packageFolder = FileSystem.Combine("../../../TestPackage1").ToFullPath();

            var fileSystem = new FileSystem();
            var manifest = new PackageManifest(){
                Name = "pak1"
            };

            manifest.AddAssembly("TestPackage1");

            fileSystem.PersistToFile(manifest, packageFolder, PackageManifest.FILE);

            linkedFolderReader = new LinkedFolderPackageLoader(theApplicationDirectory, f => f);

            reader = new PackageManifestReader(fileSystem, folder => folder);
        }
 public LinkedFolderPackageLoader(string applicationDirectory, Func <string, string> getContentFolderFromPackageFolder)
 {
     _applicationDirectory = applicationDirectory;
     _reader = new PackageManifestReader(_fileSystem, getContentFolderFromPackageFolder);
 }