C# Class StatePrinting.FieldHarvesters.HarvestHelper

Reusable helper methods when implementing IFieldHarvester
Afficher le fichier Open project: kbilsted/StatePrinter Class Usage Examples

Méthodes publiques

Méthode Description
GetFields ( Type type, BindingFlags flags ) : IEnumerable

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

GetFields ( Type type ) : List

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

GetFieldsAndProperties ( Type type, BindingFlags flags ) : IEnumerable

Returns all Membertype.Field and Membertype.Property except backing-fields

GetFieldsAndProperties ( Type type ) : List
IsHarvestable ( Type type ) : bool

Tell if the type makes any sense to dump

SanitizeFieldName ( string fieldName ) : string

Replaces the name of properties to remove the k__BackingField nonsense from the name.

Private Methods

Méthode Description
GetSanitizedFieldInfoForFieldOrProperty ( MemberInfo memberInfo ) : SanitizedFieldInfo
IndexerFilter ( MemberInfo x ) : bool
NonBackingFieldFilter ( MemberInfo x ) : bool

Method Details

GetFields() public méthode

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

GetFields() public méthode

We ignore all properties as they, in the end, will only point to some computated 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

GetFieldsAndProperties() public méthode

Returns all Membertype.Field and Membertype.Property except backing-fields
public GetFieldsAndProperties ( Type type, BindingFlags flags ) : IEnumerable
type System.Type
flags BindingFlags
Résultat IEnumerable

GetFieldsAndProperties() public méthode

public GetFieldsAndProperties ( Type type ) : List
type System.Type
Résultat List

IsHarvestable() public méthode

Tell if the type makes any sense to dump
public IsHarvestable ( Type type ) : bool
type System.Type
Résultat bool

SanitizeFieldName() public méthode

Replaces the name of properties to remove the k__BackingField nonsense from the name.
public SanitizeFieldName ( string fieldName ) : string
fieldName string
Résultat string