summaryrefslogtreecommitdiff
path: root/csharp/src
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src')
-rw-r--r--csharp/src/Ice/Instance.cs33
1 files changed, 32 insertions, 1 deletions
diff --git a/csharp/src/Ice/Instance.cs b/csharp/src/Ice/Instance.cs
index 6936f13ef71..136d5208889 100644
--- a/csharp/src/Ice/Instance.cs
+++ b/csharp/src/Ice/Instance.cs
@@ -672,7 +672,38 @@ namespace IceInternal
public Type resolveClass(string id)
{
- Type c = AssemblyUtil.findType(this, typeToClass(id));
+ string className = typeToClass(id);
+
+ Type c = AssemblyUtil.findType(this, className);
+
+ //
+ // See if the application defined an Ice.Package.MODULE property.
+ //
+ if(c == null)
+ {
+ int pos = id.IndexOf(':', 2);
+ if(pos != -1)
+ {
+ String topLevelModule = id.Substring(2, pos - 2);
+ String pkg = _initData.properties.getProperty("Ice.Package." + topLevelModule);
+ if(pkg.Length > 0)
+ {
+ c = AssemblyUtil.findType(this, pkg + "." + className);
+ }
+ }
+ }
+
+ //
+ // See if the application defined a default package.
+ //
+ if(c == null)
+ {
+ String pkg = _initData.properties.getProperty("Ice.Default.Package");
+ if(pkg.Length > 0)
+ {
+ c = AssemblyUtil.findType(this, pkg + "." + className);
+ }
+ }
//
// Ensure the class is instantiable.