C# Класс NetDiff.DiffCalculator

Показать файл Открыть проект

Открытые методы

Метод Описание
Diff ( object baseObj, object evaluated ) : BaseDiff
DiffCalculator ( double tolerance = 1e-6, Type ignoredClasses = null, bool ignoreMatches = false, string ignoreFieldsNamed = null, string ignoreFieldsContaining = null, string[]>.Dictionary ignoreFieldsNamedByType = null, string[]>.Dictionary ignoreFieldsContainingByType = null ) : System
FieldIsIgnored ( FieldInfo info ) : bool

if the field is ignored, return true. otherwise false.

Приватные методы

Метод Описание
Assemble ( IEnumerable fields, object baseObj, object antagonist ) : ICollection

Assemble a summary of DiffedItems for this object

ContentIsEqual ( IEnumerable sortedBase, IEnumerable sortedAntagonist ) : bool
Diff ( FieldInfo forField, object baseObj, object antagonist ) : BaseDiff

Diff a field

DiffFields ( object baseObj, object antagonist ) : IEnumerable
DiffList ( IEnumerable baseObj, IEnumerable antagonist ) : IEnumerable

Diff two lists. Does not currently

DiffObjects ( object baseObj, object evaluated ) : BaseDiff

Diff two objects

GetExclusiveFields ( object exclusiveTo, object antagonist ) : List

Find all fields which are exclusive to a specific object compared to another object.

GetFieldInfo ( FieldInfo matching, object fromObject ) : FieldInfo

Finds a correlated FieldInfo in an object. Here, correlated refers to an identical name, but that criteria is TBD.

GetMutualObjectFields ( object baseObj, object evaluated ) : List
GetValue ( FieldInfo forField, object obj ) : dynamic

Gets a field value from an object. If a direct value exists, meaning that we don't need a correlate, then it is immediately returned. Otherwise, NetDiff tries to find a correlate and return it. This action defaults to null.

Intersect ( object baseObj, object evaluated ) : ICollection

Finds all fields which are included in both of two dynamic objects

MutuallyExclusive ( object baseObj, object evaluated ) : ICollection

Finds all fields which are mutually exclusive between two dynamic objects

TypeIsIgnored ( object obj ) : bool

Currently there is no way to ignore null values

Описание методов

Diff() публичный Метод

public Diff ( object baseObj, object evaluated ) : BaseDiff
baseObj object
evaluated object
Результат BaseDiff

DiffCalculator() публичный Метод

public DiffCalculator ( double tolerance = 1e-6, Type ignoredClasses = null, bool ignoreMatches = false, string ignoreFieldsNamed = null, string ignoreFieldsContaining = null, string[]>.Dictionary ignoreFieldsNamedByType = null, string[]>.Dictionary ignoreFieldsContainingByType = null ) : System
tolerance double
ignoredClasses System.Type
ignoreMatches bool
ignoreFieldsNamed string
ignoreFieldsContaining string
ignoreFieldsNamedByType string[]>.Dictionary
ignoreFieldsContainingByType string[]>.Dictionary
Результат System

FieldIsIgnored() публичный Метод

if the field is ignored, return true. otherwise false.
public FieldIsIgnored ( FieldInfo info ) : bool
info System.Reflection.FieldInfo
Результат bool