示例#1
0
 public Type CompileSingle(ViewCodeSource source, ViewEngineOptions options) {
     var info = new ViewCompilerInfo
                    {
                        AssemblyName = Guid.NewGuid().ToString(),
                        InMemory = true,
                        Sources = new[] {source},
                        Options =  options,
                    };
     var assembly = this.Compile(info);
     return assembly.GetType(source.Key.Replace("/","_0_"));
 }
示例#2
0
 public Assembly CompileApplication(ViewEngineOptions options) {
     var resolver = (BrailSourceResolver)Resolver ?? new BrailSourceResolver();
     var sources = resolver.GetAll();
     var assemblyname = "_application_views";
     var targetdirectory = resolver.FileSystem.Resolve("~/tmp/", false);
     var info = new ViewCompilerInfo
                    {
                        AssemblyName = assemblyname,
                        Sources = sources,
                        TargetDirecrtory = targetdirectory,
                        InMemory = false,
                        Options =  options,
                    };
     if(!info.InMemory) {
         Directory.CreateDirectory(targetdirectory);
     }
     return Compile(info);
 }
		public MONORAILTransformToBrailStep(ViewEngineOptions options)
		{
			this.options = options;
		}
 public MONORAILBrailTypeFactory(IViewSourceResolver resolver, ViewEngineOptions options):base(resolver,options,null) {
     this.Compiler = new BrailCompiler();
     ((BrailCompiler)this.Compiler).PreparePipeline += MONORAILBrailTypeFactory_PreparePipeline;
 }