예제 #1
0
        public virtual void Conc(IExtObjectContainer oc, int seq)
        {
            EventRegistry(oc).Committed += new System.EventHandler <Db4objects.Db4o.Events.CommitEventArgs>
                                               (new _IEventListener4_74(oc).OnEvent);
            CommittedCallbackRefreshTestCase.Item[] items = new CommittedCallbackRefreshTestCase.Item
                                                            [Count];
            IObjectSet objectSet = NewQuery(typeof(CommittedCallbackRefreshTestCase.Item)).Execute
                                       ();
            int count = 0;

            while (objectSet.HasNext())
            {
                lock (_lock)
                {
                    items[count] = (CommittedCallbackRefreshTestCase.Item)objectSet.Next();
                    items[count].Check();
                    count++;
                }
            }
            for (int i = 0; i < items.Length; i++)
            {
                lock (_lock)
                {
                    items[i].Update();
                    Store(items[i]._subItem);
                    Store(items[i]);
                }
                Db().Commit();
            }
            Runtime4.Sleep(1000);
            for (int i = 0; i < items.Length; i++)
            {
                lock (_lock)
                {
                    items[i].Check();
                }
            }
            Runtime4.Sleep(3000);
        }
		public virtual void Conc(IExtObjectContainer oc, int seq)
		{
			EventRegistry(oc).Committed += new System.EventHandler<Db4objects.Db4o.Events.CommitEventArgs>
				(new _IEventListener4_74(oc).OnEvent);
			CommittedCallbackRefreshTestCase.Item[] items = new CommittedCallbackRefreshTestCase.Item
				[Count];
			IObjectSet objectSet = NewQuery(typeof(CommittedCallbackRefreshTestCase.Item)).Execute
				();
			int count = 0;
			while (objectSet.HasNext())
			{
				lock (_lock)
				{
					items[count] = (CommittedCallbackRefreshTestCase.Item)objectSet.Next();
					items[count].Check();
					count++;
				}
			}
			for (int i = 0; i < items.Length; i++)
			{
				lock (_lock)
				{
					items[i].Update();
					Store(items[i]._subItem);
					Store(items[i]);
				}
				Db().Commit();
			}
			Runtime4.Sleep(1000);
			for (int i = 0; i < items.Length; i++)
			{
				lock (_lock)
				{
					items[i].Check();
				}
			}
			Runtime4.Sleep(3000);
		}