diff options
author | Jeff Ames | 2008-06-04 09:59:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-04 09:59:27 +0000 |
commit | 4ec4e16c809cf86a63b736d2b7b6ad7291595a5f (patch) | |
tree | cfa896ef9057228171e2ee39c4807060101ba90b /OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs | |
parent | * If a ThreadAbortException reaches AuthUser() then let it pass through unmol... (diff) | |
download | opensim-SC-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.zip opensim-SC-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.tar.gz opensim-SC-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.tar.bz2 opensim-SC-4ec4e16c809cf86a63b736d2b7b6ad7291595a5f.tar.xz |
Formatting cleanup, minor refactoring, svn properties.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs b/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs index 8107788..cf15b67 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/Script/AssemblyResolver.cs | |||
@@ -37,25 +37,25 @@ namespace OpenSim.Region.ScriptEngine.XEngine.Script | |||
37 | public static Assembly OnAssemblyResolve(object sender, | 37 | public static Assembly OnAssemblyResolve(object sender, |
38 | ResolveEventArgs args) | 38 | ResolveEventArgs args) |
39 | { | 39 | { |
40 | if(!(sender is System.AppDomain)) | 40 | if (!(sender is System.AppDomain)) |
41 | return null; | 41 | return null; |
42 | 42 | ||
43 | AppDomain myDomain = (AppDomain)sender; | 43 | AppDomain myDomain = (AppDomain)sender; |
44 | string dirName = myDomain.FriendlyName; | 44 | string dirName = myDomain.FriendlyName; |
45 | 45 | ||
46 | string[] pathList=new string[] {"bin", "ScriptEngines", | 46 | string[] pathList = new string[] {"bin", "ScriptEngines", |
47 | Path.Combine("ScriptEngines", dirName)}; | 47 | Path.Combine("ScriptEngines", dirName)}; |
48 | 48 | ||
49 | string assemblyName = args.Name; | 49 | string assemblyName = args.Name; |
50 | if(assemblyName.IndexOf(",") != -1) | 50 | if (assemblyName.IndexOf(",") != -1) |
51 | assemblyName=args.Name.Substring(0, args.Name.IndexOf(",")); | 51 | assemblyName = args.Name.Substring(0, args.Name.IndexOf(",")); |
52 | 52 | ||
53 | foreach (string s in pathList) | 53 | foreach (string s in pathList) |
54 | { | 54 | { |
55 | string path=Path.Combine(Directory.GetCurrentDirectory(), | 55 | string path = Path.Combine(Directory.GetCurrentDirectory(), |
56 | Path.Combine(s, assemblyName))+".dll"; | 56 | Path.Combine(s, assemblyName))+".dll"; |
57 | 57 | ||
58 | if(File.Exists(path)) | 58 | if (File.Exists(path)) |
59 | return Assembly.LoadFrom(path); | 59 | return Assembly.LoadFrom(path); |
60 | } | 60 | } |
61 | 61 | ||