summaryrefslogtreecommitdiff
path: root/cs/src/Ice/ObjectFactoryManager.cs
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2007-02-01 17:09:49 +0000
committerBernard Normier <bernard@zeroc.com>2007-02-01 17:09:49 +0000
commitabada90e3f84dc703b8ddc9efcbed8a946fadead (patch)
tree2c6f9dccd510ea97cb927a7bd635422efaae547a /cs/src/Ice/ObjectFactoryManager.cs
parentremoving trace message (diff)
downloadice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.bz2
ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.tar.xz
ice-abada90e3f84dc703b8ddc9efcbed8a946fadead.zip
Expanded tabs into spaces
Diffstat (limited to 'cs/src/Ice/ObjectFactoryManager.cs')
-rwxr-xr-xcs/src/Ice/ObjectFactoryManager.cs130
1 files changed, 65 insertions, 65 deletions
diff --git a/cs/src/Ice/ObjectFactoryManager.cs b/cs/src/Ice/ObjectFactoryManager.cs
index 9b66bad471f..7f686f7b957 100755
--- a/cs/src/Ice/ObjectFactoryManager.cs
+++ b/cs/src/Ice/ObjectFactoryManager.cs
@@ -14,73 +14,73 @@ namespace IceInternal
public sealed class ObjectFactoryManager
{
- public void add(Ice.ObjectFactory factory, string id)
- {
- lock(this)
- {
- object o = _factoryMap[id];
- if(o != null)
- {
- Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException();
- ex.id = id;
- ex.kindOfObject = "object factory";
- throw ex;
- }
- _factoryMap[id] = factory;
- }
- }
-
- public void remove(string id)
- {
- object o = null;
- lock(this)
- {
- o = _factoryMap[id];
- if(o == null)
- {
- Ice.NotRegisteredException ex = new Ice.NotRegisteredException();
- ex.id = id;
- ex.kindOfObject = "object factory";
- throw ex;
- }
- _factoryMap.Remove(id);
- }
- ((Ice.ObjectFactory)o).destroy();
- }
-
- public Ice.ObjectFactory find(string id)
- {
- lock(this)
- {
- return (Ice.ObjectFactory)_factoryMap[id];
- }
- }
-
- //
- // Only for use by Instance
- //
- internal ObjectFactoryManager()
- {
- _factoryMap = new Hashtable();
- }
-
- internal void destroy()
- {
- Hashtable oldMap = null;
+ public void add(Ice.ObjectFactory factory, string id)
+ {
+ lock(this)
+ {
+ object o = _factoryMap[id];
+ if(o != null)
+ {
+ Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException();
+ ex.id = id;
+ ex.kindOfObject = "object factory";
+ throw ex;
+ }
+ _factoryMap[id] = factory;
+ }
+ }
+
+ public void remove(string id)
+ {
+ object o = null;
+ lock(this)
+ {
+ o = _factoryMap[id];
+ if(o == null)
+ {
+ Ice.NotRegisteredException ex = new Ice.NotRegisteredException();
+ ex.id = id;
+ ex.kindOfObject = "object factory";
+ throw ex;
+ }
+ _factoryMap.Remove(id);
+ }
+ ((Ice.ObjectFactory)o).destroy();
+ }
+
+ public Ice.ObjectFactory find(string id)
+ {
+ lock(this)
+ {
+ return (Ice.ObjectFactory)_factoryMap[id];
+ }
+ }
+
+ //
+ // Only for use by Instance
+ //
+ internal ObjectFactoryManager()
+ {
+ _factoryMap = new Hashtable();
+ }
+
+ internal void destroy()
+ {
+ Hashtable oldMap = null;
- lock(this)
- {
- oldMap = _factoryMap;
- _factoryMap = new Hashtable();
- }
+ lock(this)
+ {
+ oldMap = _factoryMap;
+ _factoryMap = new Hashtable();
+ }
- foreach(Ice.ObjectFactory factory in oldMap.Values)
- {
- factory.destroy();
- }
- }
-
- private Hashtable _factoryMap;
+ foreach(Ice.ObjectFactory factory in oldMap.Values)
+ {
+ factory.destroy();
+ }
+ }
+
+ private Hashtable _factoryMap;
}
}