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); } } }
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); } } }