Exemple #1
0
 public Ice.ValueFactory find(string id)
 {
     lock (this)
     {
         Ice.ValueFactory factory = null;
         _factoryMap.TryGetValue(id, out factory);
         return(factory);
     }
 }
Exemple #2
0
 public void add(Ice.ValueFactory factory, string id)
 {
     lock (this)
     {
         if (_factoryMap.ContainsKey(id))
         {
             Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException();
             ex.id           = id;
             ex.kindOfObject = "value factory";
             throw ex;
         }
         _factoryMap[id] = factory;
     }
 }
        public void add(Ice.ObjectFactory factory, string id)
        {
            lock (this)
            {
                if (_factoryMap.ContainsKey(id))
                {
                    Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException();
                    ex.id           = id;
                    ex.kindOfObject = "value factory";
                    throw ex;
                }

                Ice.ValueFactory valueFactory = s => { return(factory.create(s)); };
                _factoryMap[id]       = valueFactory;
                _objectFactoryMap[id] = factory;
            }
        }
Exemple #4
0
 public void setFactory(Ice.ValueFactory factory)
 {
     _factory = factory;
 }
Exemple #5
0
 public MyClassFactoryWrapper()
 {
     _factory = null;
 }
Exemple #6
0
 public void setFactory(Ice.ValueFactory factory)
 {
     _factory = factory;
 }