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


C# IVisitor4.Visit方法代码示例

本文整理汇总了C#中IVisitor4.Visit方法的典型用法代码示例。如果您正苦于以下问题:C# IVisitor4.Visit方法的具体用法?C# IVisitor4.Visit怎么用?C# IVisitor4.Visit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IVisitor4的用法示例。


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

示例1: TraverseKeys

		public static void TraverseKeys(IBTreeRange result, IVisitor4 visitor)
		{
			IEnumerator i = result.Keys();
			while (i.MoveNext())
			{
				visitor.Visit(i.Current);
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:8,代码来源:BTreeAssert.cs

示例2: TraverseMutable

		public virtual void TraverseMutable(IVisitor4 visitor)
		{
			Collection4 currentContent = new Collection4();
			TraverseLocked(new _IVisitor4_51(currentContent));
			IEnumerator i = currentContent.GetEnumerator();
			while (i.MoveNext())
			{
				visitor.Visit(i.Current);
			}
		}
开发者ID:superyfwy,项目名称:db4o,代码行数:10,代码来源:LockedTree.cs

示例3: ForEachKeyForIdentity

 public virtual void ForEachKeyForIdentity(IVisitor4 visitor, object obj)
 {
     for (var i = 0; i < _table.Length; i++)
     {
         var entry = _table[i];
         while (entry != null)
         {
             if (entry._object == obj)
             {
                 visitor.Visit(entry.Key());
             }
             entry = entry._next;
         }
     }
 }
开发者ID:masroore,项目名称:db4o,代码行数:15,代码来源:Hashtable4.cs

示例4: Accept

				public void Accept(IVisitor4 visitor)
				{
					for (int slotChangeIndex = 0; slotChangeIndex < slotChanges.Length; ++slotChangeIndex)
					{
						SlotChange slotChange = slotChanges[slotChangeIndex];
						visitor.Visit(slotChange);
					}
				}
开发者ID:Galigator,项目名称:db4o,代码行数:8,代码来源:IdSystemTestSuite.cs

示例5: ForEachCollectionElement

 internal static void ForEachCollectionElement(Object obj, IVisitor4 visitor)
 {
     IEnumerator enumerator = GetCollectionEnumerator(obj, false);
     if (enumerator != null)
     {
         // If obj is a map (IDictionary in .NET speak) call Visit() with the key
         // otherwise use the element itself
         if (enumerator is IDictionaryEnumerator)
         {
             IDictionaryEnumerator dictEnumerator = enumerator as IDictionaryEnumerator;
             while (enumerator.MoveNext())
             {
                 visitor.Visit(dictEnumerator.Key);
             }
         }
         else
         {
             while (enumerator.MoveNext())
             {
                 visitor.Visit(enumerator.Current);
             }
         }
     }
 }
开发者ID:superyfwy,项目名称:db4o,代码行数:24,代码来源:Platform4.cs

示例6: Accept

 public void Accept(IVisitor4 visitor)
 {
     var slotChange = new SlotChange(id);
     slotChange.NotifySlotCreated(new Slot(address, length));
     visitor.Visit(slotChange);
 }
开发者ID:masroore,项目名称:db4o,代码行数:6,代码来源:ConsistencyCheckerTestSuite.cs

示例7: TraverseFromLeaves

		public void TraverseFromLeaves(IVisitor4 a_visitor)
		{
			if (_preceding != null)
			{
				_preceding.TraverseFromLeaves(a_visitor);
			}
			if (_subsequent != null)
			{
				_subsequent.TraverseFromLeaves(a_visitor);
			}
			a_visitor.Visit(this);
		}
开发者ID:erdincay,项目名称:db4o,代码行数:12,代码来源:Tree.cs

示例8: TraverseAllIndexSlots

		public virtual void TraverseAllIndexSlots(BTree btree, IVisitor4 command)
		{
			IEnumerator slotIDIter = btree.AllNodeIds(Sourcedb.Transaction(this));
			while (slotIDIter.MoveNext())
			{
				command.Visit(slotIDIter.Current);
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:8,代码来源:DefragmentServicesImpl.cs

示例9: TraverseAllNodes

		/// <summary>This traversal goes over all nodes, not just leafs</summary>
		internal void TraverseAllNodes(Transaction trans, IVisitor4 command)
		{
			ByteArrayBuffer reader = PrepareRead(trans);
			command.Visit(this);
			if (_isLeaf)
			{
				return;
			}
			for (int childIdx = 0; childIdx < _count; childIdx++)
			{
				Child(reader, childIdx).TraverseAllNodes(trans, command);
			}
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:14,代码来源:BTreeNode.cs

示例10: TraverseKeys

		public void TraverseKeys(Transaction trans, IVisitor4 visitor)
		{
			ByteArrayBuffer reader = PrepareRead(trans);
			if (_isLeaf)
			{
				for (int i = 0; i < _count; i++)
				{
					object obj = Key(trans, reader, i);
					if (obj != No4.Instance)
					{
						visitor.Visit(obj);
					}
				}
			}
			else
			{
				for (int i = 0; i < _count; i++)
				{
					Child(reader, i).TraverseKeys(trans, visitor);
				}
			}
		}
开发者ID:bvangrinsven,项目名称:db4o-net,代码行数:22,代码来源:BTreeNode.cs

示例11: Hc_traverse

		public virtual void Hc_traverse(IVisitor4 visitor)
		{
			if (_hcPreceding != null)
			{
				_hcPreceding.Hc_traverse(visitor);
			}
			if (_hcSubsequent != null)
			{
				_hcSubsequent.Hc_traverse(visitor);
			}
			// Traversing the leaves first allows to add ObjectReference 
			// nodes to different ReferenceSystem trees during commit
			visitor.Visit(this);
		}
开发者ID:Galigator,项目名称:db4o,代码行数:14,代码来源:ObjectReference.cs

示例12: CollectConstraints

		internal virtual void CollectConstraints(Transaction trans, QConObject a_parent, 
			object a_template, IVisitor4 a_visitor)
		{
			object obj = GetOn(trans, a_template);
			if (obj != null)
			{
				Collection4 objs = Platform4.FlattenCollection(trans.Container(), obj);
				IEnumerator j = objs.GetEnumerator();
				while (j.MoveNext())
				{
					obj = j.Current;
					if (obj != null)
					{
						if (_isPrimitive && !_isArray)
						{
							object nullValue = _reflectField.GetFieldType().NullValue();
							if (obj.Equals(nullValue))
							{
								return;
							}
						}
						if (Platform4.IgnoreAsConstraint(obj))
						{
							return;
						}
						if (!a_parent.HasObjectInParentPath(obj))
						{
							QConObject constraint = new QConObject(trans, a_parent, QField(trans), obj);
							constraint.ByExample();
							a_visitor.Visit(constraint);
						}
					}
				}
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:35,代码来源:FieldMetadata.cs

示例13: IterateTopLevelClasses

		public void IterateTopLevelClasses(IVisitor4 visitor)
		{
			ClassMetadataIterator i = Iterator();
			while (i.MoveNext())
			{
				ClassMetadata classMetadata = i.CurrentClass();
				if (!classMetadata.IsInternal())
				{
					if (classMetadata.GetAncestor() == null)
					{
						visitor.Visit(classMetadata);
					}
				}
			}
		}
开发者ID:Orvid,项目名称:SQLInterfaceCollection,代码行数:15,代码来源:ClassMetadataRepository.cs

示例14: Traverse

		public void Traverse(IVisitor4 visitor)
		{
			if (_preceding != null)
			{
				_preceding.Traverse(visitor);
			}
			visitor.Visit((Tree)this);
			if (_subsequent != null)
			{
				_subsequent.Traverse(visitor);
			}
		}
开发者ID:erdincay,项目名称:db4o,代码行数:12,代码来源:Tree.cs

示例15: ForEachChildField

		internal virtual void ForEachChildField(string name, IVisitor4 visitor)
		{
			IEnumerator i = IterateChildren();
			while (i.MoveNext())
			{
				object obj = i.Current;
				if (obj is QConObject)
				{
					if (((QConObject)obj).GetField().Name().Equals(name))
					{
						visitor.Visit(obj);
					}
				}
			}
		}
开发者ID:Galigator,项目名称:db4o,代码行数:15,代码来源:QCon.cs


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