コード例 #1
0
 public override IComparerResult Compare()
 {
     ComparerContext.LogDetail(string.Format("Comparing {0} '{1}'", GetItemType(ReferenceType), ReferenceType.GetCompareableName()));
     CompareAttributes();
     CompareInterfaces();
     CompareBase();
     CompareMethods(type => type.GetApiMethods().Where(method => ComparerContext.IsNotIgnored(method)).Cast <MethodBase>().ToArray(), (type, name, types) => type.GetMethod(name, types), ResultContext.Method);
     CompareMethods(type => type.GetApiConstructors().Where(ctor => ComparerContext.IsNotIgnored(ctor)).Cast <MethodBase>().ToArray(), (type, name, types) => type.GetApiConstructor(name, types), ResultContext.Constructor);
     CompareProperties();
     CompareEvents();
     CompareFields();
     return(ComparerResult);
 }
コード例 #2
0
 private IEnumerable <string> GetTypeNames(Func <IEnumerable <TypeInfo> > getTypes)
 {
     return(getTypes().Where(type => type.IsVisible && ComparerContext.IsNotIgnored(type)).Select(type => type.GetCompareableName()));
 }
コード例 #3
0
 private IEnumerable <string> GetFields(TypeInfo typeInfo)
 {
     return(typeInfo.GetApiFields().Where(field => ComparerContext.IsNotIgnored(field)).Select(field => field.Name));
 }
コード例 #4
0
 private IEnumerable <PropertyInfo> GetProperties(TypeInfo typeInfo)
 {
     return(typeInfo.GetApiProperties().Where(property => ComparerContext.IsNotIgnored(property)));
 }
コード例 #5
0
 private IEnumerable <string> GetEvents(TypeInfo typeInfo)
 {
     return(typeInfo.GetApiEvents().Where(@event => ComparerContext.IsNotIgnored(@event)).Select(@event => @event.Name));
 }
コード例 #6
0
ファイル: TypeComparer.cs プロジェクト: swiebertje/ApiCheck
 private IEnumerable <string> GetInterfaces(TypeInfo typeInfo)
 {
     return(typeInfo.GetInterfaces().Where(@interface => ComparerContext.IsNotIgnored(@interface.GetTypeInfo())).Select(@interface => @interface.GetCompareableName()));
 }