Ejemplo n.º 1
0
        public PackageAssemblyResolver(
            IFileSystem fileSystem, IPackageContainer packageContainer, ILogProvider logProvider, IAssemblyUtility assemblyUtility)
        {
            if (fileSystem == null)
            {
                throw new ArgumentNullException(nameof(fileSystem));
            }
            if (packageContainer == null)
            {
                throw new ArgumentNullException(nameof(packageContainer));
            }
            if (logProvider == null)
            {
                throw new ArgumentNullException(nameof(logProvider));
            }
            if (assemblyUtility == null)
            {
                throw new ArgumentNullException(nameof(assemblyUtility));
            }

            _fileSystem       = fileSystem;
            _packageContainer = packageContainer;
            _logger           = logProvider.ForCurrentType();
            _assemblyUtility  = assemblyUtility;
        }
Ejemplo n.º 2
0
        public PackageAssemblyResolver(IFileSystem fileSystem, IPackageContainer packageContainer, ILog logger)
        {
            Guard.AgainstNullArgument("fileSystem", fileSystem);
            Guard.AgainstNullArgumentProperty("fileSystem", "PackagesFolder", fileSystem.PackagesFolder);
            Guard.AgainstNullArgumentProperty("fileSystem", "PackagesFile", fileSystem.PackagesFile);

            _fileSystem = fileSystem;
            _packageContainer = packageContainer;
            _logger = logger;
        }
Ejemplo n.º 3
0
        public PackageAssemblyResolver(IFileSystem fileSystem, IPackageContainer packageContainer, ILog logger)
        {
            Guard.AgainstNullArgument("fileSystem", fileSystem);
            Guard.AgainstNullArgumentProperty("fileSystem", "PackagesFolder", fileSystem.PackagesFolder);
            Guard.AgainstNullArgumentProperty("fileSystem", "PackagesFile", fileSystem.PackagesFile);

            _fileSystem       = fileSystem;
            _packageContainer = packageContainer;
            _logger           = logger;
        }
Ejemplo n.º 4
0
        public ScriptLibraryComposer(IFileSystem fileSystem, IFilePreProcessor preProcessor, IPackageContainer packageContainer, IPackageAssemblyResolver packageAssemblyResolver, ILog logger)
        {
            Guard.AgainstNullArgument("fileSystem", fileSystem);
            Guard.AgainstNullArgument("preProcessor", preProcessor);
            Guard.AgainstNullArgument("packageContainer", packageContainer);
            Guard.AgainstNullArgument("packageAssemblyResolver", packageAssemblyResolver);
            Guard.AgainstNullArgument("logger", logger);

            _fileSystem              = fileSystem;
            _preProcessor            = preProcessor;
            _packageContainer        = packageContainer;
            _packageAssemblyResolver = packageAssemblyResolver;
            _logger = logger;
        }
Ejemplo n.º 5
0
        public ScriptLibraryComposer(IFileSystem fileSystem, IFilePreProcessor preProcessor, IPackageContainer packageContainer, IPackageAssemblyResolver packageAssemblyResolver, ILog logger)
        {
            Guard.AgainstNullArgument("fileSystem", fileSystem);
            Guard.AgainstNullArgument("preProcessor", preProcessor);
            Guard.AgainstNullArgument("packageContainer", packageContainer);
            Guard.AgainstNullArgument("packageAssemblyResolver", packageAssemblyResolver);
            Guard.AgainstNullArgument("logger", logger);

            _fileSystem = fileSystem;
            _preProcessor = preProcessor;
            _packageContainer = packageContainer;
            _packageAssemblyResolver = packageAssemblyResolver;
            _logger = logger;
        }
Ejemplo n.º 6
0
        public PackageAssemblyResolver(
            IFileSystem fileSystem, IPackageContainer packageContainer, ILogProvider logProvider, IAssemblyUtility assemblyUtility)
        {
            Guard.AgainstNullArgument("fileSystem", fileSystem);
            Guard.AgainstNullArgumentProperty("fileSystem", "PackagesFolder", fileSystem.PackagesFolder);
            Guard.AgainstNullArgumentProperty("fileSystem", "PackagesFile", fileSystem.PackagesFile);

            Guard.AgainstNullArgument("packageContainer", packageContainer);
            Guard.AgainstNullArgument("logProvider", logProvider);
            Guard.AgainstNullArgument("assemblyUtility", assemblyUtility);

            _fileSystem       = fileSystem;
            _packageContainer = packageContainer;
            _logger           = logProvider.ForCurrentType();
            _assemblyUtility  = assemblyUtility;
        }
Ejemplo n.º 7
0
        public PackageAssemblyResolver(
            IFileSystem fileSystem, IPackageContainer packageContainer, ILogProvider logProvider, IAssemblyUtility assemblyUtility)
        {
            Guard.AgainstNullArgument("fileSystem", fileSystem);
            Guard.AgainstNullArgumentProperty("fileSystem", "PackagesFolder", fileSystem.PackagesFolder);
            Guard.AgainstNullArgumentProperty("fileSystem", "PackagesFile", fileSystem.PackagesFile);

            Guard.AgainstNullArgument("packageContainer", packageContainer);
            Guard.AgainstNullArgument("logProvider", logProvider);
            Guard.AgainstNullArgument("assemblyUtility", assemblyUtility);

            _fileSystem = fileSystem;
            _packageContainer = packageContainer;
            _logger = logProvider.ForCurrentType();
            _assemblyUtility = assemblyUtility;
        }
Ejemplo n.º 8
0
        private static IContainer Configure(IPackageContainer <IModule> packageContainer)
        {
            var builder = new ContainerBuilder();

            builder.RegisterType <PluginHost>().As <IPluginHost>().SingleInstance();

            Trace.TraceInformation("Register plugins...");

            if (!packageContainer.Items.Any())
            {
                packageContainer.Update();
            }

            foreach (var module in packageContainer.Items)
            {
                builder.RegisterModule(module);
            }

            return(builder.Build());
        }
Ejemplo n.º 9
0
 public PackageAssemblyResolver(IFileSystem fileSystem, IPackageContainer packageContainer)
 {
     _fileSystem       = fileSystem;
     _packageContainer = packageContainer;
 }
Ejemplo n.º 10
0
 public PackageAssemblyResolver(
     IFileSystem fileSystem, IPackageContainer packageContainer, Common.Logging.ILog logger, IAssemblyUtility assemblyUtility)
     : this(fileSystem, packageContainer, new CommonLoggingLogProvider(logger), assemblyUtility)
 {
 }
Ejemplo n.º 11
0
 public PackageAssemblyResolver(
     IFileSystem fileSystem, IPackageContainer packageContainer, Common.Logging.ILog logger, IAssemblyUtility assemblyUtility)
     : this(fileSystem, packageContainer, new CommonLoggingLogProvider(logger), assemblyUtility)
 {
 }
Ejemplo n.º 12
0
 public PackageAssemblyResolver(IFileSystem fileSystem, IPackageContainer packageContainer, ILog logger)
 {
     _fileSystem = fileSystem;
     _packageContainer = packageContainer;
     _logger = logger;
 }
Ejemplo n.º 13
0
 public ScriptLibraryComposer(IFileSystem fileSystem, IFilePreProcessor preProcessor, IPackageContainer packageContainer, IPackageAssemblyResolver packageAssemblyResolver, Common.Logging.ILog logger)
     : this(fileSystem, preProcessor, packageContainer, packageAssemblyResolver, new CommonLoggingLogProvider(logger))
 {
 }
Ejemplo n.º 14
0
 public ScriptLibraryComposer(IFileSystem fileSystem, IFilePreProcessor preProcessor, IPackageContainer packageContainer, IPackageAssemblyResolver packageAssemblyResolver, Common.Logging.ILog logger)
     : this(fileSystem, preProcessor, packageContainer, packageAssemblyResolver, new CommonLoggingLogProvider(logger))
 {
 }