aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Servers/Base/ServerUtils.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Servers/Base/ServerUtils.cs')
-rw-r--r--OpenSim/Servers/Base/ServerUtils.cs19
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)