本文整理汇总了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);
}
}
示例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);
}
}
示例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;
}
}
}
示例4: Accept
public void Accept(IVisitor4 visitor)
{
for (int slotChangeIndex = 0; slotChangeIndex < slotChanges.Length; ++slotChangeIndex)
{
SlotChange slotChange = slotChanges[slotChangeIndex];
visitor.Visit(slotChange);
}
}
示例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);
}
}
}
}
示例6: Accept
public void Accept(IVisitor4 visitor)
{
var slotChange = new SlotChange(id);
slotChange.NotifySlotCreated(new Slot(address, length));
visitor.Visit(slotChange);
}
示例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);
}
示例8: TraverseAllIndexSlots
public virtual void TraverseAllIndexSlots(BTree btree, IVisitor4 command)
{
IEnumerator slotIDIter = btree.AllNodeIds(Sourcedb.Transaction(this));
while (slotIDIter.MoveNext())
{
command.Visit(slotIDIter.Current);
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
示例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);
}
}
}
}
}
示例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);
}
}
}
}
示例14: Traverse
public void Traverse(IVisitor4 visitor)
{
if (_preceding != null)
{
_preceding.Traverse(visitor);
}
visitor.Visit((Tree)this);
if (_subsequent != null)
{
_subsequent.Traverse(visitor);
}
}
示例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);
}
}
}
}