diff options
author | Melanie Thielker | 2009-05-10 22:31:10 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-05-10 22:31:10 +0000 |
commit | b2111f6a19235f38c90dad26c7bf041b950b0bd7 (patch) | |
tree | 3ed4621f54b1203232f804d3b4c3266c99f5fad2 /OpenSim/Servers/Base/ServerUtils.cs | |
parent | * Rather than crash the region simulator, declare the teleport a failure if t... (diff) | |
download | opensim-SC_OLD-b2111f6a19235f38c90dad26c7bf041b950b0bd7.zip opensim-SC_OLD-b2111f6a19235f38c90dad26c7bf041b950b0bd7.tar.gz opensim-SC_OLD-b2111f6a19235f38c90dad26c7bf041b950b0bd7.tar.bz2 opensim-SC_OLD-b2111f6a19235f38c90dad26c7bf041b950b0bd7.tar.xz |
Enhance the submodule loader and port the enhancements to the services base
Diffstat (limited to 'OpenSim/Servers/Base/ServerUtils.cs')
-rw-r--r-- | OpenSim/Servers/Base/ServerUtils.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Servers/Base/ServerUtils.cs b/OpenSim/Servers/Base/ServerUtils.cs index 4e8f472..834576b 100644 --- a/OpenSim/Servers/Base/ServerUtils.cs +++ b/OpenSim/Servers/Base/ServerUtils.cs | |||
@@ -96,6 +96,20 @@ namespace OpenSim.Servers.Base | |||
96 | 96 | ||
97 | public static T LoadPlugin<T>(string dllName, Object[] args) where T:class | 97 | public static T LoadPlugin<T>(string dllName, Object[] args) where T:class |
98 | { | 98 | { |
99 | string[] parts = dllName.Split(new char[] {':'}); | ||
100 | |||
101 | dllName = parts[0]; | ||
102 | |||
103 | string className = String.Empty; | ||
104 | |||
105 | if (parts.Length > 1) | ||
106 | className = parts[1]; | ||
107 | |||
108 | return LoadPlugin<T>(dllName, className, args); | ||
109 | } | ||
110 | |||
111 | public static T LoadPlugin<T>(string dllName, string className, Object[] args) where T:class | ||
112 | { | ||
99 | string interfaceName = typeof(T).ToString(); | 113 | string interfaceName = typeof(T).ToString(); |
100 | 114 | ||
101 | try | 115 | try |
@@ -106,6 +120,11 @@ namespace OpenSim.Servers.Base | |||
106 | { | 120 | { |
107 | if (pluginType.IsPublic) | 121 | if (pluginType.IsPublic) |
108 | { | 122 | { |
123 | if (className != String.Empty && | ||
124 | pluginType.ToString() != | ||
125 | pluginType.Namespace + "." + className) | ||
126 | continue; | ||
127 | |||
109 | Type typeInterface = | 128 | Type typeInterface = |
110 | pluginType.GetInterface(interfaceName, true); | 129 | pluginType.GetInterface(interfaceName, true); |
111 | if (typeInterface != null) | 130 | if (typeInterface != null) |