summaryrefslogtreecommitdiff
path: root/csharp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-01-07 19:43:26 +0100
committerJose <jose@zeroc.com>2019-01-07 19:43:26 +0100
commitd3071f82b8f9237033d7eb49da30b509889ff224 (patch)
treeec2525161d9fe4f1760df6a04c5d0b64c37ee24d /csharp/src
parentRemove outdated comment (diff)
downloadice-d3071f82b8f9237033d7eb49da30b509889ff224.tar.bz2
ice-d3071f82b8f9237033d7eb49da30b509889ff224.tar.xz
ice-d3071f82b8f9237033d7eb49da30b509889ff224.zip
C# PluginManagerI fix plug-in initialization
Diffstat (limited to 'csharp/src')
-rw-r--r--csharp/src/Ice/PluginManagerI.cs27
1 files changed, 15 insertions, 12 deletions
diff --git a/csharp/src/Ice/PluginManagerI.cs b/csharp/src/Ice/PluginManagerI.cs
index a5805fcf530..a6d9c98c5a9 100644
--- a/csharp/src/Ice/PluginManagerI.cs
+++ b/csharp/src/Ice/PluginManagerI.cs
@@ -209,26 +209,29 @@ namespace Ice
// entryPoint will be ignored but the rest of the plugin
// specification might be used.
//
- foreach(var p in _loadOnInitialization)
+ foreach(var name in _loadOnInitialization)
{
- var property = prefix + p;
+ string key = "Ice.Plugin." + name + ".clr";
string r = null;
- if(!plugins.TryGetValue(property + ".clr", out r))
+ plugins.TryGetValue(key, out r);
+ if(r != null)
{
- plugins.TryGetValue(property, out r);
+ plugins.Remove("Ice.Plugin." + name);
}
else
{
- plugins.Remove(r);
+ key = "Ice.Plugin." + name;
+ plugins.TryGetValue(key, out r);
}
if(r != null)
{
- loadPlugin(p, r, ref cmdArgs);
+ loadPlugin(name, r, ref cmdArgs);
+ plugins.Remove(key);
}
else
{
- loadPlugin(p, "", ref cmdArgs);
+ loadPlugin(name, "", ref cmdArgs);
}
}
@@ -265,20 +268,20 @@ namespace Ice
}
string key = "Ice.Plugin." + loadOrder[i] + ".clr";
- bool hasKey = plugins.ContainsKey(key);
- if(hasKey)
+ string value = null;
+ plugins.TryGetValue(key, out value);
+ if(value != null)
{
plugins.Remove("Ice.Plugin." + loadOrder[i]);
}
else
{
key = "Ice.Plugin." + loadOrder[i];
- hasKey = plugins.ContainsKey(key);
+ plugins.TryGetValue(key, out value);
}
- if(hasKey)
+ if(value != null)
{
- string value = plugins[key];
loadPlugin(loadOrder[i], value, ref cmdArgs);
plugins.Remove(key);
}