Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Configurator"/> class. This overload
        /// allows passing in a <see cref="Preprocessor"/> that can be reused and pre-configured
        /// with directives not sourced from the script.
        /// </summary>
        /// <param name="engine">The engine to configure.</param>
        /// <param name="preprocessor">The preprocessor.</param>
        public Configurator(Engine engine, Preprocessor preprocessor)
        {
            _engine = engine;
            _preprocessor = preprocessor;
            _assemblyResolver = new AssemblyResolver(_scriptManager); 
            AssemblyLoader = new AssemblyLoader(engine.FileSystem, engine.Assemblies, _assemblyResolver);
            PackageInstaller = new PackageInstaller(engine.FileSystem, AssemblyLoader);
            ClassCatalog = new ClassCatalog();

            // Add this namespace and assembly
            engine.Namespaces.Add(typeof(ScriptBase).Namespace);
            engine.Assemblies.Add(typeof(ScriptBase).Assembly);
        }
Esempio n. 2
0
 public WyamFolderNuGetProject(IFileSystem fileSystem, AssemblyLoader assemblyLoader, NuGetFramework currentFramework, string root) : base(root)
 {
     _fileSystem = fileSystem;
     _assemblyLoader = assemblyLoader;
     _currentFramework = currentFramework;
 }