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