mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
* list: added/removed files. * System.Web.Compilation/AspGenerator.cs: reworked user control compilation. Provide the options as a Hashtable for use in compilation. Create the user controls in the private bin path of the domain. * System.Web.Compilation/BaseCompiler.cs: base class for the various compiler types. * System.Web.Compilation/CachingCompiler.cs: actually executes mcs and do some poor caching (it will use Cache when finished). * System.Web.Compilation/CompilationException.cs: this exception has enough information to generate a nice error page. * System.Web.Compilation/CompilationResult.cs: used in caching. * System.Web.Compilation/PageCompiler.cs: now derives from BaseCompiler * System.Web.Compilation/TemplateFactory.cs: no longer needed. * System.Web.Compilation/UserControlCompiler.cs: new class used when compiling user controls. * System.Web.Compilation/WebServiceCompiler.cs: derives from BaseCompiler. * System.Web.Mail/SmtpMail.cs: i don't wanna see that warning :-). * System.Web.UI/TemplateParser.cs: fixed BaseType. * System.Web.UI/UserControlParser.cs: helper class to compile user controls. svn path=/trunk/mcs/; revision=9191
75 lines
1.1 KiB
C#
75 lines
1.1 KiB
C#
//
|
|
// System.Web.Compilation.BaseCompiler
|
|
//
|
|
// Authors:
|
|
// Gonzalo Paniagua Javier ([email protected])
|
|
//
|
|
// (C) 2002 Ximian, Inc (http://www.ximian.com)
|
|
//
|
|
|
|
using System;
|
|
using System.IO;
|
|
|
|
namespace System.Web.Compilation
|
|
{
|
|
abstract class BaseCompiler
|
|
{
|
|
static Random rnd = new Random ((int) DateTime.Now.Ticks);
|
|
string randomName;
|
|
|
|
protected BaseCompiler ()
|
|
{
|
|
}
|
|
|
|
public virtual Type GetCompiledType ()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public virtual string Key {
|
|
get {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public virtual string SourceFile {
|
|
get {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public virtual string [] Dependencies {
|
|
get {
|
|
return null;
|
|
}
|
|
}
|
|
|
|
public virtual string CompilerOptions {
|
|
get {
|
|
return "/r:System.Web.dll /r:System.Data.dll /r:System.Drawing.dll";
|
|
}
|
|
}
|
|
|
|
static string GetRandomFileName ()
|
|
{
|
|
string output;
|
|
|
|
do {
|
|
output = "tmp" + rnd.Next () + ".dll";
|
|
} while (File.Exists (output));
|
|
|
|
return output;
|
|
}
|
|
|
|
public virtual string TargetFile {
|
|
get {
|
|
if (randomName == null)
|
|
randomName = GetRandomFileName ();
|
|
|
|
return randomName;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|