Beispiel #1
0
		static int Main(string[] args)
		{
			string baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
			siteRoot = baseDirectory.Substring(0, baseDirectory.LastIndexOf("\\bin"));
			Console.WriteLine("Compiling [" + siteRoot + "] ...");

			InitializeConfig();

			if (!Directory.Exists(siteRoot))
			{
				PrintHelpMessage(string.Format("The path '{0}' does not exist", siteRoot));
				Console.ReadLine();
				return 1;
			}

			AspViewCompiler compiler = new AspViewCompiler(options.CompilerOptions);

			if (compiler == null)
			{
				PrintHelpMessage("Could not start the compiler.");
				return 2;
			}
			try
			{
				compiler.CompileSite(siteRoot);
				Console.WriteLine("[" + siteRoot + "] compilation finished.");
				return 0;
			}
			catch (Exception ex)
			{
				PrintHelpMessage("Could not compile." + Environment.NewLine + ex.ToString());
				return 3;
			}

		}
Beispiel #2
0
        protected virtual void CompileViewsInMemory()
        {
            options.CompilerOptions.InMemory = true;
            AspViewCompiler compiler = new AspViewCompiler(options.CompilerOptions);

            compiler.CompileSite();
            compilations.Clear();
            LoadCompiledViewsFrom(compiler.Assembly);
        }
Beispiel #3
0
 protected virtual void RecompileViews()
 {
     if (compiler == null)
     {
         compiler = new AspViewCompiler(options.CompilerOptions);
     }
     compiler.CompileSite();
     LoadPrecompiledViews();
 }
Beispiel #4
0
		protected virtual void CompileViewsInMemory()
		{
			options.CompilerOptions.InMemory = true;
			AspViewCompiler compiler = new AspViewCompiler(options.CompilerOptions);
			compiler.CompileSite();
			compilations.Clear();
			LoadCompiledViewsFrom(compiler.Assembly);
		}