Beispiel #1
0
        public void Construct(
            string workingDirectory,
            string packagesDirectory
            )
        {
            WorkingDirectory = workingDirectory;

            PackagesDirectory = packagesDirectory;

            var fileNamer = new PackageInfoFileNamer();

            Retriever = new PackageInstaller();

            Creator = new PackageCreator();

            FileFinder = new FileFinder();

            Loader = new PackageLoader();

            Builder = new PackageBuilder(
                Loader,
                new FileZipper(
                    FileFinder,
                    new DirectoryMover()
                    ),
                new PackageZipFileNamer()
                );


            Saver = new PackageSaver(
                fileNamer
                );

            Adder = new PackageFileAdder(
                FileFinder,
                Loader,
                Saver
                );

            Sender = new PackageSender(
                Loader,
                fileNamer
                );

            Remover = new PackageFileRemover();

            Scanner = new PackageFileScanner(
                FileFinder
                );

            Repositories = new RepositoryManager();

            Installers = new InstallManager();

            Versions = new VersionManager();
        }
Beispiel #2
0
        public PackageManager(
            string workingDirectory,
            string packagesDirectory,
            PackageInstaller retriever,
            PackageBuilder builder,
            PackageCreator creator,
            PackageSaver saver,
            PackageLoader loader,
            PackageSender sender,
            PackageFileAdder adder,
            PackageFileRemover remover,
            PackageFileScanner scanner,
            IRepositoryManager repositories,
            IFileFinder fileFinder,
            IInstallManager installers,
            VersionManager versions
            )
        {
            PackagesDirectory = packagesDirectory;

            WorkingDirectory = workingDirectory;

            Retriever = retriever;

            Builder = builder;

            Creator = creator;

            Saver = saver;

            Adder = adder;

            Remover = remover;

            Scanner = scanner;

            Loader = loader;

            Sender = sender;

            FileFinder = fileFinder;

            Installers = installers;

            Repositories = repositories;

            Versions = versions;
        }