本文整理汇总了C#中IAssembly.GetCorresponding方法的典型用法代码示例。如果您正苦于以下问题:C# IAssembly.GetCorresponding方法的具体用法?C# IAssembly.GetCorresponding怎么用?C# IAssembly.GetCorresponding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAssembly
的用法示例。
在下文中一共展示了IAssembly.GetCorresponding方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckSurface
private void CheckSurface(INamedTypeDefinition type, IAssembly originalAssembly)
{
var typeName = TypeHelper.GetTypeName(type, NameFormattingOptions.UseGenericTypeNameSuffix);
if (ExcludeTypeFromComparison(type, typeName)) return;
var original = originalAssembly.GetCorresponding(type);
if (original != null)
{
CheckTypeSurface(type, original);
}
else
{
if (type.IsInterface && !TypeHelper.IsVisibleOutsideAssembly(type))
{
// Allow internal interfaces to be in our contract reference assemblies in order to get right virtual bits on some members.
Warning("Interface {0} only exists in contract reference assembly, but it is internal only, so allowed.", TypeHelper.GetTypeName(type));
}
else
{
Error("Type {0} is in contract assembly but not in original assembly", typeName);
}
}
}