本文整理汇总了C#中ITypeDefinition.Dispatch方法的典型用法代码示例。如果您正苦于以下问题:C# ITypeDefinition.Dispatch方法的具体用法?C# ITypeDefinition.Dispatch怎么用?C# ITypeDefinition.Dispatch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITypeDefinition
的用法示例。
在下文中一共展示了ITypeDefinition.Dispatch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Visit
/// <summary>
/// Visits the specified type definition.
/// </summary>
/// <param name="typeDefinition">The type definition.</param>
public virtual void Visit(ITypeDefinition typeDefinition)
{
if (this.stopTraversal) return;
//^ int oldCount = this.path.Count;
this.path.Push(typeDefinition);
this.Visit(typeDefinition.Attributes);
this.Visit(typeDefinition.BaseClasses);
this.Visit(typeDefinition.ExplicitImplementationOverrides);
if (typeDefinition.HasDeclarativeSecurity)
this.Visit(typeDefinition.SecurityAttributes);
this.Visit(typeDefinition.Interfaces);
if (typeDefinition.IsGeneric)
this.Visit(typeDefinition.GenericParameters);
this.Visit(typeDefinition.Members);
//^ assume this.path.Count == oldCount+1; //True because all of the virtual methods of this class promise not decrease this.path.Count.
this.path.Pop();
typeDefinition.Dispatch(this);
}
示例2: Traverse
/// <summary>
/// Traverses the specified type definition.
/// </summary>
public void Traverse(ITypeDefinition typeDefinition)
{
Contract.Requires(typeDefinition != null);
typeDefinition.Dispatch(this.dispatchingVisitor);
}
示例3: Traverse
/// <summary>
/// Traverses the specified type definition.
/// </summary>
public void Traverse(ITypeDefinition typeDefinition)
{
typeDefinition.Dispatch(this.dispatchingVisitor);
}