コード例 #1
0
ファイル: Program.cs プロジェクト: mgagne-atman/Projects
		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;
			}

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

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