当前位置: 首页>>代码示例>>C#>>正文


C# Foundation.Collection4类代码示例

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


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

示例1: Process

		internal virtual void Process(ClassMetadata newClassMetadata)
		{
			if (_pending.Contains(newClassMetadata))
			{
				return;
			}
			ClassMetadata ancestor = newClassMetadata.GetAncestor();
			if (ancestor != null)
			{
				Process(ancestor);
			}
			_pending.Add(newClassMetadata);
			_members.Add(newClassMetadata);
			if (_running)
			{
				return;
			}
			_running = true;
			try
			{
				CheckInits();
				_pending = new Collection4();
			}
			finally
			{
				_running = false;
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:28,代码来源:PendingClassInits.cs

示例2: CommitCapturingUpdatedObjects

 private Collection4 CommitCapturingUpdatedObjects(IExtObjectContainer container)
 {
     var updated = new Collection4();
     EventRegistryFor(container).Updated += new _IEventListener4_51(updated).OnEvent;
     container.Commit();
     return updated;
 }
开发者ID:masroore,项目名称:db4o,代码行数:7,代码来源:TransparentActivationSupportTestCase.cs

示例3: _IRunnable_23

			public _IRunnable_23(DynamicVariableTestCase _enclosing, DynamicVariable variable
				, Collection4 failures)
			{
				this._enclosing = _enclosing;
				this.variable = variable;
				this.failures = failures;
			}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:7,代码来源:DynamicVariableTestCase.cs

示例4: TestContainsAll

 public virtual void TestContainsAll()
 {
     var a = new Item(42);
     var b = new Item(a.id + 1);
     var c = new Item(b.id + 1);
     var a_ = new Item(a.id);
     var needle = new Collection4();
     var haystack = new Collection4();
     haystack.Add(a);
     needle.Add(a);
     needle.Add(b);
     Assert.IsFalse(haystack.ContainsAll(needle));
     needle.Remove(b);
     Assert.IsTrue(haystack.ContainsAll(needle));
     needle.Add(b);
     haystack.Add(b);
     Assert.IsTrue(haystack.ContainsAll(needle));
     needle.Add(a_);
     Assert.IsTrue(haystack.ContainsAll(needle));
     needle.Add(c);
     Assert.IsFalse(haystack.ContainsAll(needle));
     needle.Clear();
     Assert.IsTrue(haystack.ContainsAll(needle));
     haystack.Clear();
     Assert.IsTrue(haystack.ContainsAll(needle));
 }
开发者ID:masroore,项目名称:db4o,代码行数:26,代码来源:Collection4TestCase.cs

示例5: Test

		public virtual void Test()
		{
			Collection4 expected = new Collection4(new object[] { "PING", true, 42 });
			MessagingTestCaseBase.MessageCollector recipient = new MessagingTestCaseBase.MessageCollector
				();
			IObjectServer server = OpenServerWith(recipient);
			try
			{
				IObjectContainer client = OpenClient("client", server);
				try
				{
					IMessageSender sender = MessageSender(client);
					SendAll(expected, sender);
				}
				finally
				{
					client.Close();
				}
			}
			finally
			{
				server.Close();
			}
			Assert.AreEqual(expected.ToString(), recipient.messages.ToString());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:25,代码来源:PrimitiveMessageTestCase.cs

示例6: CacheDirty

		internal virtual void CacheDirty(Collection4 col)
		{
			if (!BitIsTrue(Const4.CachedDirty))
			{
				BitTrue(Const4.CachedDirty);
				col.Add(this);
			}
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:PersistentBase.cs

示例7: CommitCapturingUpdatedObjects

		private Collection4 CommitCapturingUpdatedObjects(IExtObjectContainer container)
		{
			Collection4 updated = new Collection4();
			EventRegistryFor(container).Updated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs>
				(new _IEventListener4_51(updated).OnEvent);
			container.Commit();
			return updated;
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:TransparentActivationSupportTestCase.cs

示例8: CollectKnownClasses

		private void CollectKnownClasses(Collection4 collector, IEnumerator knownClasses)
		{
			while (knownClasses.MoveNext())
			{
				IReflectClass clazz = (IReflectClass)knownClasses.Current;
				CollectKnownClass(collector, clazz);
			}
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:KnownClassesCollector.cs

示例9: AddListener

		public virtual void AddListener(IDiagnosticListener listener)
		{
			if (_listeners == null)
			{
				_listeners = new Collection4();
			}
			_listeners.Add(listener);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:DiagnosticProcessor.cs

示例10: TestMultiThread

		public virtual void TestMultiThread()
		{
			DynamicVariable variable = new DynamicVariable();
			Collection4 failures = new Collection4();
			variable.With("mine", new _IRunnable_23(this, variable, failures));
			Assert.IsNull(variable.Value);
			Assert.IsTrue(failures.IsEmpty(), failures.ToString());
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:8,代码来源:DynamicVariableTestCase.cs

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

示例12: TestFieldTraversal

		public virtual void TestFieldTraversal()
		{
			Collection4 expectedNames = new Collection4(new ArrayIterator4(new string[] { "_id"
				, "_name", "_age" }));
			ClassMetadata classMetadata = ClassMetadataFor(typeof(ClassMetadataIntegrationTestCase.SubClazz
				));
			classMetadata.TraverseAllAspects(new _TraverseFieldCommand_31(expectedNames));
			Assert.IsTrue(expectedNames.IsEmpty());
		}
开发者ID:erdincay,项目名称:db4o,代码行数:9,代码来源:ClassMetadataIntegrationTestCase.cs

示例13: ExcludingReflector

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

示例14: Range

 private Collection4 Range(int end)
 {
     var range = new Collection4();
     for (var i = 0; i < end; ++i)
     {
         range.Add(i);
     }
     return range;
 }
开发者ID:masroore,项目名称:db4o,代码行数:9,代码来源:ConcurrentLazyQueriesTestCase.cs

示例15: NewIterator

		private CompositeIterator4 NewIterator()
		{
			Collection4 iterators = new Collection4();
			iterators.Add(IntArrays4.NewIterator(new int[] { 1, 2, 3 }));
			iterators.Add(IntArrays4.NewIterator(new int[] {  }));
			iterators.Add(IntArrays4.NewIterator(new int[] { 4 }));
			iterators.Add(IntArrays4.NewIterator(new int[] { 5, 6 }));
			CompositeIterator4 iterator = new CompositeIterator4(iterators.GetEnumerator());
			return iterator;
		}
开发者ID:Galigator,项目名称:db4o,代码行数:10,代码来源:CompositeIterator4TestCase.cs


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