예제 #1
0
        protected virtual void CompileViewsInMemory()
        {
            OnlineCompiler compiler = new OnlineCompiler(
                new CSharpCodeProviderAdapterFactory(),
                new PreProcessor(),
                compilationContext,
                options.CompilerOptions);

            compilations.Clear();

            LoadCompiledViewsFrom(compiler.Execute());
        }
        public void Compiler_Compiles()
        {
            // ViewSourceLoader
            // ViewsFolder
            // Target Bin Folder
            //

            ICodeProviderAdapterFactory codeProviderAdapterFactory = new MockedCodeProviderAdapterFactory();
            IPreProcessor       preProcessor = new MockedPreProcessor();
            var                 basePath     = AppDomain.CurrentDomain.BaseDirectory;
            ICompilationContext context      = new CompilationContext(
                new DirectoryInfo(basePath),
                new DirectoryInfo(basePath),
                new DirectoryInfo(basePath),
                new DirectoryInfo(basePath));
            var options = new AspViewCompilerOptions();

            var compiler = new OnlineCompiler(
                codeProviderAdapterFactory, preProcessor, context, options);

            var compiledViews = compiler.Execute();
        }
예제 #3
0
		public void Compiler_Compiles()
		{
			// ViewSourceLoader 
			// ViewsFolder
			// Target Bin Folder
			// 

			ICodeProviderAdapterFactory codeProviderAdapterFactory = new MockedCodeProviderAdapterFactory();
			IPreProcessor preProcessor = new MockedPreProcessor();
			string basePath = AppDomain.CurrentDomain.BaseDirectory;
			ICompilationContext context = new CompilationContext(
				new DirectoryInfo(basePath),
				new DirectoryInfo(basePath),
				new DirectoryInfo(basePath),
				new DirectoryInfo(basePath));
			AspViewCompilerOptions options = new AspViewCompilerOptions();

			OnlineCompiler compiler = new OnlineCompiler(
				codeProviderAdapterFactory, preProcessor, context, options);

			Assembly compiledViews = compiler.Execute();


		}
예제 #4
0
		protected virtual void CompileViewsInMemory()
		{
			compilations.Clear();

			foreach (var compilationContext in compilationContexts)
			{
				var compiler = new OnlineCompiler(
					new CSharpCodeProviderAdapterFactory(),
					new PreProcessor(),
					compilationContext,
					options.CompilerOptions);

				LoadCompiledViewsFrom(compiler.Execute());
			}
		}