C# Class StatePrinting.FieldHarvesters.ToStringAwareHarvester

Harvest all fields, public and private. Or use the ToString() if such is implemented on the class. We ignore the types from the following namespaces System.Reflection System.Runtime System.Func
Inheritance: IFieldHarvester
Afficher le fichier Open project: kbilsted/StatePrinter

Méthodes publiques

Méthode Description
CanHandleType ( Type type ) : bool
GetFields ( Type type ) : List

We ignore all properties as they, in the end, will only point to some computed state or other fields. Hence they do not provide information about the actual state of the object.

ToStringAwareHarvester ( ) : System

Private Methods

Méthode Description
GetMethodInfo ( Type type ) : MethodInfo

This more thorough way to avoid the "Ambiguous match found" exception while retrieving the ToString method Explained here http://stackoverflow.com/questions/11443707/getproperty-reflection-results-in-ambiguous-match-found-on-new-property

Method Details

CanHandleType() public méthode

public CanHandleType ( Type type ) : bool
type System.Type
Résultat bool

GetFields() public méthode

We ignore all properties as they, in the end, will only point to some computed state or other fields. Hence they do not provide information about the actual state of the object.
public GetFields ( Type type ) : List
type System.Type
Résultat List

ToStringAwareHarvester() public méthode

public ToStringAwareHarvester ( ) : System
Résultat System