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); }
private IEnumerable <string> GetTypeNames(Func <IEnumerable <TypeInfo> > getTypes) { return(getTypes().Where(type => type.IsVisible && ComparerContext.IsNotIgnored(type)).Select(type => type.GetCompareableName())); }
private IEnumerable <string> GetFields(TypeInfo typeInfo) { return(typeInfo.GetApiFields().Where(field => ComparerContext.IsNotIgnored(field)).Select(field => field.Name)); }
private IEnumerable <PropertyInfo> GetProperties(TypeInfo typeInfo) { return(typeInfo.GetApiProperties().Where(property => ComparerContext.IsNotIgnored(property))); }
private IEnumerable <string> GetEvents(TypeInfo typeInfo) { return(typeInfo.GetApiEvents().Where(@event => ComparerContext.IsNotIgnored(@event)).Select(@event => @event.Name)); }
private IEnumerable <string> GetInterfaces(TypeInfo typeInfo) { return(typeInfo.GetInterfaces().Where(@interface => ComparerContext.IsNotIgnored(@interface.GetTypeInfo())).Select(@interface => @interface.GetCompareableName())); }