本文整理汇总了C#中TypeDef.GetTypes方法的典型用法代码示例。如果您正苦于以下问题:C# TypeDef.GetTypes方法的具体用法?C# TypeDef.GetTypes怎么用?C# TypeDef.GetTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TypeDef
的用法示例。
在下文中一共展示了TypeDef.GetTypes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Search
void Search(DnSpyFile ownerModule, string nsOwner, TypeDef type) {
var res = filter.GetFilterResult(type);
if (res.FilterResult == FilterResult.Hidden)
return;
if (res.IsMatch && (IsMatch(type.FullName, type) || IsMatch(type.Name, type))) {
onMatch(new SearchResult {
Language = language,
Object = type,
NameObject = type,
TypeImageInfo = TypeTreeNode.GetImageInfo(type, BackgroundType.Search),
LocationObject = new NamespaceSearchResult(nsOwner),
LocationImageInfo = GetImage("Namespace"),
DnSpyFile = ownerModule,
});
}
SearchMembers(ownerModule, type);
foreach (var subType in type.GetTypes()) {
cancellationToken.ThrowIfCancellationRequested();
Search(ownerModule, subType);
}
}
示例2: Search
void Search(IDnSpyFile ownerModule, string nsOwner, TypeDef type)
{
var res = options.Filter.GetResult(type);
if (res.FilterType == FilterType.Hide)
return;
CheckCustomAttributes(ownerModule, type, nsOwner);
if (res.IsMatch && (IsMatch(type.FullName, type) || IsMatch(type.Name, type))) {
options.OnMatch(new SearchResult {
Context = options.Context,
Object = type,
NameObject = type,
ObjectImageReference = options.DotNetImageManager.GetImageReference(type),
LocationObject = new NamespaceSearchResult(nsOwner),
LocationImageReference = options.DotNetImageManager.GetNamespaceImageReference(),
DnSpyFile = ownerModule,
});
}
SearchMembers(ownerModule, type);
foreach (var subType in type.GetTypes()) {
options.CancellationToken.ThrowIfCancellationRequested();
Search(ownerModule, subType);
}
}
示例3: AddAndNested
public void AddAndNested(TypeDef type) {
Add(type);
foreach (var t in type.GetTypes())
Add(t);
}