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

C# Foundation.ByRef类代码示例

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

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



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

示例1: _IVisitor4_29

			public _IVisitor4_29(OverlapMap _enclosing, ByRef prevSlot, Sharpen.Util.ISet overlaps
				)
			{
				this._enclosing = _enclosing;
				this.prevSlot = prevSlot;
				this.overlaps = overlaps;
			}
开发者ID:Galigator,项目名称:db4o,代码行数:7,代码来源:OverlapMap.cs


示例2: _ICodeBlock_34

			public _ICodeBlock_34(SaveAsStorageTestCase _enclosing, string oldFileName, ByRef
				 newPath)
			{
				this._enclosing = _enclosing;
				this.oldFileName = oldFileName;
				this.newPath = newPath;
			}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:SaveAsStorageTestCase.cs


示例3: TestOnDiscard

		public virtual void TestOnDiscard()
		{
			CacheTestUnit.TestPuppet puppet = new CacheTestUnit.TestPuppet();
			puppet.FillCache();
			ByRef discarded = new ByRef();
			puppet.Produce(42, new _IProcedure4_19(discarded));
			Assert.AreEqual("0", ((string)discarded.value));
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:CacheTestUnit.cs


示例4: ExcludingReflector

		public ExcludingReflector(ByRef loaderClass, Type[] excludedClasses)
		{
			_excludedClasses = new Collection4();
			for (int claxxIndex = 0; claxxIndex < excludedClasses.Length; ++claxxIndex)
			{
				Type claxx = excludedClasses[claxxIndex];
				_excludedClasses.Add(claxx.FullName);
			}
		}
开发者ID:Galigator,项目名称:db4o,代码行数:9,代码来源:ExcludingReflector.cs


示例5: TestReentrantUpdateThrows

 public virtual void TestReentrantUpdateThrows()
 {
     var updatedTriggered = new ByRef();
     updatedTriggered.value = false;
     var registry = EventRegistryFactory.ForObjectContainer(Db());
     registry.Updated += new _IEventListener4_102(this, updatedTriggered).OnEvent;
     var items = QueryItemsByName("foo");
     Assert.AreEqual(1, items.Count);
     Assert.IsFalse((((bool) updatedTriggered.value)));
     Store(items.Next());
     Assert.IsTrue((((bool) updatedTriggered.value)));
 }
开发者ID:masroore,项目名称:db4o,代码行数:12,代码来源:UpdateInCallbackThrowsTestCase.cs


示例6: 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


示例7: TestReflectField

		/// <exception cref="System.Exception"></exception>
		public virtual void TestReflectField()
		{
			Store(new OldVersionReflectFieldAfterRefactorTestCase.ItemBefore(IdValue));
			Reopen();
			FileSession().StoredClass(typeof(OldVersionReflectFieldAfterRefactorTestCase.ItemBefore
				)).Rename(typeof(OldVersionReflectFieldAfterRefactorTestCase.ItemAfter).FullName
				);
			Reopen();
			ClassMetadata classMetadata = Container().ClassMetadataForName(typeof(OldVersionReflectFieldAfterRefactorTestCase.ItemAfter
				).FullName);
			ByRef originalField = new ByRef();
			classMetadata.TraverseDeclaredFields(new _IProcedure4_37(originalField));
			Assert.AreEqual(typeof(int).FullName, ((FieldMetadata)originalField.value).GetStoredType
				().GetName());
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:16,代码来源:OldVersionReflectFieldAfterRefactorTestCase.cs


示例8: TestExistingFileWillNotBeOverWritten

 public virtual void TestExistingFileWillNotBeOverWritten()
 {
     Db().Store(new Item(1));
     var oldFileName = FileSession().FileName();
     var newPath = new ByRef();
     try
     {
         newPath.value = Path.GetTempFileName();
         Assert.IsTrue(File.Exists(((string) newPath.value)));
         Assert.Expect(typeof (InvalidOperationException), new _ICodeBlock_34(this, oldFileName
             , newPath));
         AssertItems(Db(), 1);
     }
     finally
     {
         File4.Delete(((string) newPath.value));
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:18,代码来源:SaveAsStorageTestCase.cs


示例9: TestReentrantUpdateThrows

		public virtual void TestReentrantUpdateThrows()
		{
			ByRef updatedTriggered = new ByRef();
			updatedTriggered.value = false;
			IEventRegistry registry = EventRegistryFactory.ForObjectContainer(Db());
			registry.Updated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs>
				(new _IEventListener4_102(this, updatedTriggered).OnEvent);
			IObjectSet items = QueryItemsByName("foo");
			Assert.AreEqual(1, items.Count);
			Assert.IsFalse((((bool)updatedTriggered.value)));
			Store(items.Next());
			Assert.IsTrue((((bool)updatedTriggered.value)));
		}
开发者ID:Galigator,项目名称:db4o,代码行数:13,代码来源:UpdateInCallbackThrowsTestCase.cs


示例10: _IVisitor4_32

 public _IVisitor4_32(ByRef mergedSlot, IList mergedSlots)
 {
     this.mergedSlot = mergedSlot;
     this.mergedSlots = mergedSlots;
 }
开发者ID:masroore,项目名称:db4o,代码行数:5,代码来源:SlotMapImpl.cs


示例11: NewInstance

		public static ByRef NewInstance(object initialValue)
		{
			ByRef instance = new ByRef();
			instance.value = initialValue;
			return instance;
		}
开发者ID:erdincay,项目名称:db4o,代码行数:6,代码来源:ByRef.cs


示例12: _IVisitor4_160

 public _IVisitor4_160(bool[] innerRes, bool isNot, ByRef pending)
 {
     this.innerRes = innerRes;
     this.isNot = isNot;
     this.pending = pending;
 }
开发者ID:masroore,项目名称:db4o,代码行数:6,代码来源:QCandidate.cs


示例13: _IVisitor4_173

 public _IVisitor4_173(ByRef pending)
 {
     this.pending = pending;
 }
开发者ID:masroore,项目名称:db4o,代码行数:4,代码来源:QCandidate.cs


示例14: _TraverseFieldCommand_1056

 public _TraverseFieldCommand_1056(string name, ByRef byReference)
 {
     this.name = name;
     this.byReference = byReference;
 }
开发者ID:masroore,项目名称:db4o,代码行数:5,代码来源:ClassMetadata.cs


示例15: _IVisitor4_107

			public _IVisitor4_107(ByRef ids)
			{
				this.ids = ids;
			}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:4,代码来源:Statistics.cs


示例16: _IRunnable_60

			public _IRunnable_60(ByRef isDaemon)
			{
				this.isDaemon = isDaemon;
			}
开发者ID:erdincay,项目名称:db4o,代码行数:4,代码来源:ThreadPoolTestCase.cs


示例17: _IVisitor4_176

			public _IVisitor4_176(ByRef addressTree)
			{
				this.addressTree = addressTree;
			}
开发者ID:superyfwy,项目名称:db4o,代码行数:4,代码来源:InMemoryFreespaceManager.cs


示例18: _IVisitor4_30

			public _IVisitor4_30(ByRef reference)
			{
				this.reference = reference;
			}
开发者ID:superyfwy,项目名称:db4o,代码行数:4,代码来源:WeakReferenceCollectionTestCase.cs


示例19: _TraverseFieldCommand_693

			public _TraverseFieldCommand_693(string fieldName, ByRef foundField)
			{
				this.fieldName = fieldName;
				this.foundField = foundField;
			}
开发者ID:erdincay,项目名称:db4o,代码行数:5,代码来源:ObjectContainerBase.cs


示例20: Descend

		internal virtual object Descend(Transaction trans, object obj, string[] path)
		{
			lock (_lock)
			{
				trans = CheckTransaction(trans);
				ObjectReference @ref = trans.ReferenceForObject(obj);
				if (@ref == null)
				{
					return null;
				}
				string fieldName = path[0];
				if (fieldName == null)
				{
					return null;
				}
				ClassMetadata classMetadata = @ref.ClassMetadata();
				ByRef foundField = new ByRef();
				classMetadata.TraverseAllAspects(new _TraverseFieldCommand_693(fieldName, foundField
					));
				FieldMetadata field = (FieldMetadata)foundField.value;
				if (field == null)
				{
					return null;
				}
				object child = @ref.IsActive() ? field.Get(trans, obj) : DescendMarshallingContext
					(trans, @ref).ReadFieldValue(field);
				if (path.Length == 1)
				{
					return child;
				}
				if (child == null)
				{
					return null;
				}
				string[] subPath = new string[path.Length - 1];
				System.Array.Copy(path, 1, subPath, 0, path.Length - 1);
				return Descend(trans, child, subPath);
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:39,代码来源:ObjectContainerBase.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Foundation.Collection4类代码示例发布时间:2022-05-24
下一篇:
C# Foundation.BooleanByRef类代码示例发布时间: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