diff options
author | Paolo Molaro <lupus@oddwiz.org> | 2004-09-09 21:40:50 +0400 |
---|---|---|
committer | Paolo Molaro <lupus@oddwiz.org> | 2004-09-09 21:40:50 +0400 |
commit | f622d2f2fcebde3678d1739a23a6414a95e534f3 (patch) | |
tree | 60c39235fbfd8cfd34c0d6263c7128b10bf6ef1e /mcs | |
parent | 92cf05a7ec5c0479677ff66361c341da636503a4 (diff) |
Thu Sep 9 07:09:11 PDT 2004 Paolo Molaro <lupus@ximian.com>
* ScriptCompilerInfo.cs: avoid using a .cctor and fix precomp.
svn path=/branches/mono-1-0/mcs/; revision=33662
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog | 5 | ||||
-rwxr-xr-x | mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs | 20 |
2 files changed, 16 insertions, 9 deletions
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog index ece4b875d31..f8ba6ca28e1 100644 --- a/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog +++ b/mcs/class/System.XML/Mono.Xml.Xsl/ChangeLog @@ -1,3 +1,8 @@ + +Thu Sep 9 07:09:11 PDT 2004 Paolo Molaro <lupus@ximian.com> + + * ScriptCompilerInfo.cs: avoid using a .cctor and fix precomp. + 2004-06-18 Atsushi Enomoto <atsushi@ximian.com> * Debug.cs, HtmlEmitter.cs, MSXslScriptManager.cs, diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs b/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs index 0a5d72ed4cb..87438fa2bb0 100755 --- a/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs +++ b/mcs/class/System.XML/Mono.Xml.Xsl/ScriptCompilerInfo.cs @@ -216,12 +216,6 @@ end namespace { static Type providerType; - static JScriptCompilerInfo () - { - Assembly jsasm = Assembly.LoadWithPartialName ("Microsoft.JScript", null); - providerType = jsasm.GetType ("Microsoft.JScript.JScriptCodeProvider"); - } - public JScriptCompilerInfo () { this.CompilerCommand = "mjs"; @@ -231,9 +225,17 @@ end namespace this.DefaultCompilerOptions = "/t:library /r:Microsoft.VisualBasic.dll"; } - public override CodeDomProvider CodeDomProvider {
- get { return (CodeDomProvider) Activator.CreateInstance (providerType); }
- }
+ public override CodeDomProvider CodeDomProvider { + get { + // no need for locking + if (providerType == null) { + Assembly jsasm = Assembly.LoadWithPartialName ("Microsoft.JScript", null); + if (jsasm != null) + providerType = jsasm.GetType ("Microsoft.JScript.JScriptCodeProvider"); + } + return (CodeDomProvider) Activator.CreateInstance (providerType); + } + } public override string Extension { get { return ".js"; } |