summaryrefslogtreecommitdiff
path: root/cs/src/Ice/ReferenceFactory.cs
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-04-25 11:19:13 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-04-25 11:19:13 +0200
commit7e874613ff22bedf988273b51a15ab937f01169f (patch)
tree115a92a902f80fcc6252c5fac6a957ecc548b82c /cs/src/Ice/ReferenceFactory.cs
parentFixed copyrights (diff)
downloadice-7e874613ff22bedf988273b51a15ab937f01169f.tar.bz2
ice-7e874613ff22bedf988273b51a15ab937f01169f.tar.xz
ice-7e874613ff22bedf988273b51a15ab937f01169f.zip
Merged Silverlight support
Diffstat (limited to 'cs/src/Ice/ReferenceFactory.cs')
-rw-r--r--cs/src/Ice/ReferenceFactory.cs24
1 files changed, 14 insertions, 10 deletions
diff --git a/cs/src/Ice/ReferenceFactory.cs b/cs/src/Ice/ReferenceFactory.cs
index d01b5bb420c..b1b03ecc17e 100644
--- a/cs/src/Ice/ReferenceFactory.cs
+++ b/cs/src/Ice/ReferenceFactory.cs
@@ -353,11 +353,11 @@ namespace IceInternal
return create(ident, facet, mode, secure, null, null, propertyPrefix);
}
- ArrayList endpoints = new ArrayList();
+ List<EndpointI> endpoints = new List<EndpointI>();
if(s[beg] == ':')
{
- ArrayList unknownEndpoints = new ArrayList();
+ List<string> unknownEndpoints = new List<string>();
end = beg;
while(end < s.Length && s[end] == ':')
@@ -440,7 +440,7 @@ namespace IceInternal
instance_.initializationData().logger.warning(msg.ToString());
}
- EndpointI[] ep = (EndpointI[])endpoints.ToArray(typeof(EndpointI));
+ EndpointI[] ep = endpoints.ToArray();
return create(ident, facet, mode, secure, ep, null, propertyPrefix);
}
else if(s[beg] == '@')
@@ -629,13 +629,17 @@ namespace IceInternal
// set.
//
WeakReference w = new WeakReference(@ref);
- WeakReference val = (WeakReference)_references[w];
- if(val != null)
+ object v;
+ if(_references.TryGetValue(w, out v))
{
- Reference r = (Reference)val.Target;
- if(r != null && r.Equals(@ref))
+ WeakReference val = (WeakReference)v;
+ if(val != null)
{
- return r;
+ Reference r = (Reference)val.Target;
+ if(r != null && r.Equals(@ref))
+ {
+ return r;
+ }
}
}
_references[w] = w;
@@ -668,7 +672,7 @@ namespace IceInternal
}
}
- ArrayList unknownProps = new ArrayList();
+ List<string> unknownProps = new List<string>();
Dictionary<string, string> props
= instance_.initializationData().properties.getPropertiesForPrefix(prefix + ".");
foreach(String prop in props.Keys)
@@ -820,7 +824,7 @@ namespace IceInternal
private Ice.Communicator _communicator;
private Ice.RouterPrx _defaultRouter;
private Ice.LocatorPrx _defaultLocator;
- private Hashtable _references = new Hashtable();
+ private Dictionary<Object, Object> _references = new Dictionary<Object, Object>();
}
}