diff options
Diffstat (limited to 'mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs')
-rw-r--r-- | mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs new file mode 100644 index 00000000000..9828f6bcf0e --- /dev/null +++ b/mcs/class/System.Web/System.Web.Compilation/BaseCompiler.cs @@ -0,0 +1,74 @@ +// +// System.Web.Compilation.BaseCompiler +// +// Authors: +// Gonzalo Paniagua Javier (gonzalo@ximian.com) +// +// (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; + } + } + } +} + |