• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Foundation.BooleanByRef类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Db4objects.Db4o.Foundation.BooleanByRef的典型用法代码示例。如果您正苦于以下问题:C# BooleanByRef类的具体用法?C# BooleanByRef怎么用?C# BooleanByRef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BooleanByRef类属于Db4objects.Db4o.Foundation命名空间,在下文中一共展示了BooleanByRef类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FailingTestSuite

			private FailingTestSuite(bool failOnSetup, bool failOnTeardown, BooleanByRef tearDownCalled
				, IClosure4 tests) : base(tests)
			{
				_failOnSetUp = failOnSetup;
				_failOnTeardown = failOnTeardown;
				_tearDownCalled = tearDownCalled;
			}
开发者ID:erdincay,项目名称:db4o,代码行数:7,代码来源:OpaqueTestSuiteFailureTestCase.cs


示例2: Test

		/// <exception cref="System.Exception"></exception>
		public virtual void Test()
		{
			BooleanByRef disconnected = new BooleanByRef();
			Lock4 Lock = new Lock4();
			if (IsNetworking())
			{
				IDb4oClientServerFixture clientServerFixture = (IDb4oClientServerFixture)Fixture(
					);
				IObjectServerEvents objectServerEvents = (IObjectServerEvents)clientServerFixture
					.Server();
				objectServerEvents.ClientDisconnected += new System.EventHandler<Db4objects.Db4o.Events.StringEventArgs>
					(new _IEventListener4_46(Lock, disconnected).OnEvent);
			}
			DeleteOnDeletingCallbackTestCase.RootItem root = ((DeleteOnDeletingCallbackTestCase.RootItem
				)RetrieveOnlyInstance(typeof(DeleteOnDeletingCallbackTestCase.RootItem)));
			root.child = new DeleteOnDeletingCallbackTestCase.Item();
			Db().Store(root);
			Db().Delete(root);
			Reopen();
			if (IsNetworking())
			{
				Lock.Run(new _IClosure4_63(disconnected, Lock));
			}
			AssertClassIndexIsEmpty();
		}
开发者ID:Galigator,项目名称:db4o,代码行数:26,代码来源:DeleteOnDeletingCallbackTestCase.cs


示例3: AssertSingleEntry

 public virtual void AssertSingleEntry(LocalObjectContainer container, long id)
 {
     var called = new BooleanByRef();
     Index(container).TraverseKeys(container.SystemTransaction(), new _IVisitor4_24(id
         , called));
     Assert.IsTrue(called.value);
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:FieldIndexAssert.cs


示例4: _IEventListener4_51

			public _IEventListener4_51(string clientName, BooleanByRef eventRaised, Lock4 Lock
				)
			{
				this.clientName = clientName;
				this.eventRaised = eventRaised;
				this.Lock = Lock;
			}
开发者ID:superyfwy,项目名称:db4o,代码行数:7,代码来源:ObjectServerTestCase.cs


示例5: TestExceptionInUpdateCallback

		/// <exception cref="System.Exception"></exception>
		public virtual void TestExceptionInUpdateCallback()
		{
			BooleanByRef doThrow = new BooleanByRef();
			EventRegistryFactory.ForObjectContainer(Db()).Updated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs>
				(new _IEventListener4_42(doThrow).OnEvent);
			ExceptionsInCallbackTestCase.Holder holder = new ExceptionsInCallbackTestCase.Holder
				();
			ExceptionsInCallbackTestCase.Item item = new ExceptionsInCallbackTestCase.Item();
			Store(holder);
			Store(item);
			Commit();
			doThrow.value = true;
			holder.list = new ArrayList();
			holder.list.Add(item);
			try
			{
				Db().Store(holder, int.MaxValue);
			}
			catch (Exception)
			{
			}
			// rex.printStackTrace();
			Checkdb();
			Commit();
			Checkdb();
			Reopen();
			Checkdb();
		}
开发者ID:erdincay,项目名称:db4o,代码行数:29,代码来源:ExceptionsInCallbackTestCase.cs


示例6: TestExceptionInUpdateCallback

 /// <exception cref="System.Exception"></exception>
 public virtual void TestExceptionInUpdateCallback()
 {
     var doThrow = new BooleanByRef();
     EventRegistryFactory.ForObjectContainer(Db()).Updated += new _IEventListener4_42(doThrow).OnEvent;
     var holder = new Holder
         ();
     var item = new Item();
     Store(holder);
     Store(item);
     Commit();
     doThrow.value = true;
     holder.list = new ArrayList();
     holder.list.Add(item);
     try
     {
         Db().Store(holder, int.MaxValue);
     }
     catch (Exception)
     {
     }
     // rex.printStackTrace();
     Checkdb();
     Commit();
     Checkdb();
     Reopen();
     Checkdb();
 }
开发者ID:masroore,项目名称:db4o,代码行数:28,代码来源:ExceptionsInCallbackTestCase.cs


示例7: TestClientDisconnectedEvent

 // closing is asynchronous, relying on completion is hard
 // That's why there is no test here. 
 // ClientProcessesTestCase tests closing.
 public virtual void TestClientDisconnectedEvent()
 {
     var client = (ClientObjectContainer) OpenClient();
     var clientName = client.UserName;
     var eventRaised = new BooleanByRef();
     var events = (IObjectServerEvents) server;
     var Lock = new Lock4();
     events.ClientDisconnected += new _IEventListener4_51(clientName, eventRaised, Lock).OnEvent;
     Lock.Run(new _IClosure4_58(client, eventRaised, Lock));
 }
开发者ID:masroore,项目名称:db4o,代码行数:13,代码来源:ObjectServerTestCase.cs


示例8: TestSplits

		public virtual void TestSplits()
		{
			BooleanByRef splitNotified = new BooleanByRef();
			IBTreeStructureListener listener = new _IBTreeStructureListener_18(splitNotified);
			_btree.StructureListener(listener);
			for (int i = 0; i < BtreeNodeSize + 1; i++)
			{
				Add(i);
			}
			Assert.IsTrue(splitNotified.value);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:11,代码来源:BTreeStructureChangeListenerTestCase.cs


示例9: TestFailOnTearDown

		public virtual void TestFailOnTearDown()
		{
			BooleanByRef tearDownCalled = new BooleanByRef();
			TestResult result = new TestResult();
			new TestRunner(Iterators.Iterable(new OpaqueTestSuiteFailureTestCase.FailingTestSuite
				[] { new OpaqueTestSuiteFailureTestCase.FailingTestSuite(false, true, tearDownCalled
				) })).Run(result);
			Assert.AreEqual(1, result.TestCount);
			Assert.AreEqual(2, result.Failures.Count);
			Assert.IsTrue(tearDownCalled.value);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:11,代码来源:OpaqueTestSuiteFailureTestCase.cs


示例10: ShareParentForClass

		internal override QConClass ShareParentForClass(IReflectClass a_class, BooleanByRef
			 removeExisting)
		{
			if (i_parent == null)
			{
				return null;
			}
			QConClass newConstraint = new QConClass(i_trans, i_parent, GetField(), a_class);
			Morph(removeExisting, newConstraint, a_class);
			return newConstraint;
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:11,代码来源:QConPath.cs


示例11: TestTransactionInEventArgs

 public virtual void TestTransactionInEventArgs()
 {
     var factory = EventRegistryFactory.ForObjectContainer(Db());
     var called = new BooleanByRef();
     var foundTrans = new ObjectByRef();
     factory.Creating += new _IEventListener4_20(called, foundTrans).OnEvent;
     Db().Store(new Item());
     Db().Commit();
     Assert.IsTrue(called.value);
     Assert.AreSame(Trans(), foundTrans.value);
 }
开发者ID:masroore,项目名称:db4o,代码行数:11,代码来源:EventArgsTransactionTestCase.cs


示例12: TestClientDisconnectedEvent

		// closing is asynchronous, relying on completion is hard
		// That's why there is no test here. 
		// ClientProcessesTestCase tests closing.
		public virtual void TestClientDisconnectedEvent()
		{
			ClientObjectContainer client = (ClientObjectContainer)OpenClient();
			string clientName = client.UserName;
			BooleanByRef eventRaised = new BooleanByRef();
			IObjectServerEvents events = (IObjectServerEvents)server;
			Lock4 Lock = new Lock4();
			events.ClientDisconnected += new System.EventHandler<Db4objects.Db4o.Events.StringEventArgs>
				(new _IEventListener4_51(clientName, eventRaised, Lock).OnEvent);
			Lock.Run(new _IClosure4_58(client, eventRaised, Lock));
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:14,代码来源:ObjectServerTestCase.cs


示例13: TestTransactionInEventArgs

		public virtual void TestTransactionInEventArgs()
		{
			IEventRegistry factory = EventRegistryFactory.ForObjectContainer(Db());
			BooleanByRef called = new BooleanByRef();
			ObjectByRef foundTrans = new ObjectByRef();
			factory.Creating += new System.EventHandler<Db4objects.Db4o.Events.CancellableObjectEventArgs>
				(new _IEventListener4_20(called, foundTrans).OnEvent);
			Db().Store(new EventArgsTransactionTestCase.Item());
			Db().Commit();
			Assert.IsTrue(called.value);
			Assert.AreSame(Trans(), foundTrans.value);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:12,代码来源:EventArgsTransactionTestCase.cs


示例14: TestFailOnSetup

 public virtual void TestFailOnSetup()
 {
     var tearDownCalled = new BooleanByRef();
     var result = new TestResult();
     new TestRunner(Iterators.Iterable(new[]
     {
         new FailingTestSuite(true, false, tearDownCalled
             )
     })).Run(result);
     Assert.AreEqual(0, result.TestCount);
     Assert.AreEqual(1, result.Failures.Count);
     Assert.IsFalse(tearDownCalled.value);
 }
开发者ID:masroore,项目名称:db4o,代码行数:13,代码来源:OpaqueTestSuiteFailureTestCase.cs


示例15: Test

		//COR-1839
		#if !SILVERLIGHT
		/// <exception cref="System.Exception"></exception>
		public virtual void Test()
		{
			if (!Platform4.HasWeakReferences())
			{
				return;
			}
			WeakReferenceCollectionTestCase.Item item = new WeakReferenceCollectionTestCase.Item
				();
			Store(item);
			Commit();
			ByRef reference = new ByRef();
			ReferenceSystem().TraverseReferences(new _IVisitor4_30(reference));
			Assert.IsNotNull(((ObjectReference)reference.value));
			item = null;
			long timeout = 10000;
			long startTime = Runtime.CurrentTimeMillis();
			while (true)
			{
				long currentTime = Runtime.CurrentTimeMillis();
				if (currentTime - startTime >= timeout)
				{
					Assert.Fail("Timeout waiting for WeakReference collection.");
				}
				Runtime.Gc();
				Runtime.RunFinalization();
				Thread.Sleep(1);
				if (((ObjectReference)reference.value).GetObject() == null)
				{
					break;
				}
			}
			startTime = Runtime.CurrentTimeMillis();
			while (true)
			{
				long currentTime = Runtime.CurrentTimeMillis();
				if (currentTime - startTime >= timeout)
				{
					Assert.Fail("Timeout waiting for removal of ObjectReference from ReferenceSystem."
						);
				}
				BooleanByRef found = new BooleanByRef();
				ReferenceSystem().TraverseReferences(new _IVisitor4_63(reference, found));
				if (!found.value)
				{
					return;
				}
				Thread.Sleep(10);
			}
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:52,代码来源:WeakReferenceCollectionTestCase.cs


示例16: ShareParent

		internal override QCon ShareParent(object a_object, BooleanByRef removeExisting)
		{
			if (i_parent == null)
			{
				return null;
			}
			object obj = GetField().Coerce(a_object);
			if (obj == No4.Instance)
			{
				QCon falseConstraint = new QConUnconditional(i_trans, false);
				Morph(removeExisting, falseConstraint, ReflectClassForObject(obj));
				return falseConstraint;
			}
			QConObject newConstraint = new QConObject(i_trans, i_parent, GetField(), obj);
			Morph(removeExisting, newConstraint, ReflectClassForObject(obj));
			return newConstraint;
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:17,代码来源:QConPath.cs


示例17: ActivateAspects

		public void ActivateAspects(UnmarshallingContext context)
		{
			BooleanByRef schemaUpdateDetected = new BooleanByRef();
			ContextState savedState = context.SaveState();
			ITraverseAspectCommand command = new _MarshallingInfoTraverseAspectCommand_63(context
				, schemaUpdateDetected, EnsureFieldList(context));
			// TODO: cant the aspect handle it itself?
			// Probably no because old aspect versions might not be able
			// to handle null...
			TraverseAllAspects(context, command);
			if (schemaUpdateDetected.value)
			{
				context.RestoreState(savedState);
				command = new _MarshallingInfoTraverseAspectCommand_94(context, EnsureFieldList(context
					));
				TraverseAllAspects(context, command);
			}
		}
开发者ID:Galigator,项目名称:db4o,代码行数:18,代码来源:StandardReferenceTypeHandler.cs


示例18: Test

 /// <exception cref="System.Exception"></exception>
 public virtual void Test()
 {
     var disconnected = new BooleanByRef();
     var Lock = new Lock4();
     if (IsNetworking())
     {
         var clientServerFixture = (IDb4oClientServerFixture) Fixture(
             );
         var objectServerEvents = (IObjectServerEvents) clientServerFixture
             .Server();
         objectServerEvents.ClientDisconnected += new _IEventListener4_46(Lock, disconnected).OnEvent;
     }
     var root = ((RootItem
         ) RetrieveOnlyInstance(typeof (RootItem)));
     root.child = new Item();
     Db().Store(root);
     Db().Delete(root);
     Reopen();
     if (IsNetworking())
     {
         Lock.Run(new _IClosure4_63(disconnected, Lock));
     }
     AssertClassIndexIsEmpty();
 }
开发者ID:masroore,项目名称:db4o,代码行数:25,代码来源:DeleteOnDeletingCallbackTestCase.cs


示例19: _MarshallingInfoTraverseAspectCommand_456

 public _MarshallingInfoTraverseAspectCommand_456(ClassAspect aspect, BooleanByRef
     found, ObjectHeaderContext context, IMarshallingInfo baseArg1) : base(baseArg1)
 {
     this.aspect = aspect;
     this.found = found;
     this.context = context;
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:StandardReferenceTypeHandler.cs


示例20: _IVisitor4_39

			public _IVisitor4_39(TransactionLogHandler _enclosing, BooleanByRef ret)
			{
				this._enclosing = _enclosing;
				this.ret = ret;
			}
开发者ID:erdincay,项目名称:db4o,代码行数:5,代码来源:TransactionLogHandler.cs



注:本文中的Db4objects.Db4o.Foundation.BooleanByRef类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Foundation.ByRef类代码示例发布时间:2022-05-24
下一篇:
C# Datos.DatosSistema类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap