Table of Contents

Class AttributesHelper

Namespace
SunamoShared.RL
Assembly
SunamoShared.dll

Helper for extracting data member values from objects using reflection.

public class AttributesHelper
Inheritance
AttributesHelper
Inherited Members
Extension Methods

Methods

DataMember(object, List<FieldInfo>, List<string>, Dictionary<string, string>)

Gets values of specified fields from an object, with optional field name translation. Empty string entries in the basic list produce empty string results.

public static List<object> DataMember(object source, List<FieldInfo> fields, List<string> basic, Dictionary<string, string> nameMapping)

Parameters

source object

The source object to extract values from.

fields List<FieldInfo>

The list of available field infos.

basic List<string>

The list of field names to extract (can contain empty string as separator).

nameMapping Dictionary<string, string>

Optional dictionary mapping field names to alternate names. Can be null.

Returns

List<object>