C# Класс StatePrinting.FieldHarvesters.HarvestHelper

Reusable helper methods when implementing IFieldHarvester
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

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

Метод Описание
GetSanitizedFieldInfoForFieldOrProperty ( MemberInfo memberInfo ) : SanitizedFieldInfo
IndexerFilter ( MemberInfo x ) : bool
NonBackingFieldFilter ( MemberInfo x ) : bool

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

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

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
Результат IEnumerable

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

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
Результат List

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

Returns all Membertype.Field and Membertype.Property except backing-fields
public GetFieldsAndProperties ( Type type, BindingFlags flags ) : IEnumerable
type System.Type
flags BindingFlags
Результат IEnumerable

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

public GetFieldsAndProperties ( Type type ) : List
type System.Type
Результат List

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

Tell if the type makes any sense to dump
public IsHarvestable ( Type type ) : bool
type System.Type
Результат bool

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

Replaces the name of properties to remove the k__BackingField nonsense from the name.
public SanitizeFieldName ( string fieldName ) : string
fieldName string
Результат string