Exemplo n.º 1
0
        internal virtual Config4Field ConfigField(string fieldName)
        {
            Hashtable4 exceptionalFields = ExceptionalFieldsOrNull();

            if (exceptionalFields == null)
            {
                return(null);
            }
            Config4Field config4Field = (Config4Field)exceptionalFields.Get(fieldName);

            if (config4Field == null)
            {
                return(null);
            }
            config4Field.Used(true);
            return(config4Field);
        }
Exemplo n.º 2
0
        public void ApplyConfigurationItems(IInternalObjectContainer container)
        {
            Hashtable4 items = ConfigurationItems();

            if (items == null)
            {
                return;
            }
            IEnumerator i = items.Iterator();

            while (i.MoveNext())
            {
                IEntry4            entry = (IEntry4)i.Current;
                IConfigurationItem item  = (IConfigurationItem)entry.Value();
                item.Apply(container);
            }
        }
Exemplo n.º 3
0
        public virtual void Test()
        {
            Hashtable4          ht        = new Hashtable4();
            ObjectContainerBase container = Container();

            container.ShowInternalClasses(true);
            IQuery q = Db().Query();

            q.Constrain(typeof(Db4oDatabase));
            IObjectSet objectSet = q.Execute();

            while (objectSet.HasNext())
            {
                Db4oDatabase identity = (Db4oDatabase)objectSet.Next();
                Assert.IsFalse(ht.ContainsKey(identity.i_signature));
                ht.Put(identity.i_signature, string.Empty);
            }
            container.ShowInternalClasses(false);
        }
        public sealed override bool SetSemaphore(Transaction trans, string name, int timeout
                                                 )
        {
            if (name == null)
            {
                throw new ArgumentNullException();
            }
            lock (_lock)
            {
                if (_semaphores == null)
                {
                    _semaphores = new Hashtable4(10);
                }
            }
            BooleanByRef acquired = new BooleanByRef();

            _semaphoresLock.Run(new _IClosure4_625(this, trans, name, acquired, timeout));
            return(acquired.value);
        }
Exemplo n.º 5
0
 private static Prototypes.IntegerConverter IntegerConverterforClassName(IReflector
                                                                         reflector, string className)
 {
     if (_integerConverters == null)
     {
         _integerConverters = new Hashtable4();
         Prototypes.IntegerConverter[] converters = new Prototypes.IntegerConverter[] { new
                                                                                        _IntegerConverter_211(), new _IntegerConverter_215(), new _IntegerConverter_219(
                                                                                            ), new _IntegerConverter_223(), new _IntegerConverter_227(), new _IntegerConverter_231
                                                                                            (), new _IntegerConverter_235(), new _IntegerConverter_239() };
         for (int converterIndex = 0; converterIndex < converters.Length; ++converterIndex)
         {
             Prototypes.IntegerConverter converter = converters[converterIndex];
             _integerConverters.Put(converter.PrimitiveName(), converter);
             if (!converter.PrimitiveName().Equals(converter.WrapperName(reflector)))
             {
                 _integerConverters.Put(converter.WrapperName(reflector), converter);
             }
         }
     }
     return((Prototypes.IntegerConverter)_integerConverters.Get(className));
 }
Exemplo n.º 6
0
        protected virtual void AssertItemsCanBeRetrievedByUUID(Hashtable4 uuidCache)
        {
            IQuery     q         = NewItemQuery();
            IObjectSet objectSet = q.Execute();

            while (objectSet.HasNext())
            {
                UUIDTestCase.Item item = (UUIDTestCase.Item)objectSet.Next();
                Db4oUUID          uuid = Uuid(item);
                Assert.IsNotNull(uuid);
                Assert.AreSame(item, Db().GetByUUID(uuid));
                Db4oUUID cached = (Db4oUUID)uuidCache.Get(item.name);
                if (cached != null)
                {
                    Assert.AreEqual(cached, uuid);
                }
                else
                {
                    uuidCache.Put(item.name, uuid);
                }
            }
        }
Exemplo n.º 7
0
 public MemoryIoAdapter()
 {
     _memoryFiles = new Hashtable4();
     _growBy      = 10000;
 }
Exemplo n.º 8
0
 public CustomClassRepository()
 {
     // fields must be public so test works on less capable runtimes
     _classes = new Hashtable4();
 }
Exemplo n.º 9
0
 public IndexedNodeCollector(QCandidates candidates)
 {
     _nodes     = new Collection4();
     _nodeCache = new Hashtable4();
     CollectIndexedNodes(candidates);
 }
Exemplo n.º 10
0
 internal LRULongCache(int size)
 {
     _maxSize = size;
     _slots   = new Hashtable4(size);
 }
Exemplo n.º 11
0
 internal Db4oSignatureMap(IInternalObjectContainer stream)
 {
     _stream     = stream;
     _identities = new Hashtable4();
 }
Exemplo n.º 12
0
        public virtual void AssertIsIteratable(object[] keys)
        {
            Hashtable4 table = TableFromKeys(keys);

            AssertIterator(table, keys);
        }
Exemplo n.º 13
0
 private SynchronizedHashtable4(Hashtable4 delegate_)
 {
     _delegate = delegate_;
 }
Exemplo n.º 14
0
 public Set4()
 {
     _table = new Hashtable4();
 }
Exemplo n.º 15
0
 public Set4(int size)
 {
     _table = new Hashtable4(size);
 }
 public _IVisitor4_589(Hashtable4 semaphores)
 {
     this.semaphores = semaphores;
 }
Exemplo n.º 17
0
 private SynchronizedHashtable4(Hashtable4 delegate_)
 {
     _delegate = delegate_;
 }