C# Class FlatRedBall.Content.ObjectMapper

Used to perform methods defined in a MappingMethods class on properties within a class.
The ObjectMapper can be used to perform tasks like code generation and serialization of objects.
Datei anzeigen Open project: vchelaru/FlatRedBall

Public Methods

Method Description
MapObject ( Type typeOfObjectToMap, MappingMethods mappingMethods ) : void
MapObject ( object objectToMap, MappingMethods mappingMethods ) : void

Pass an object and a MappingMethods and MapObject will map each member in that object to the corresponding method from the mappingMethods.

MapObject ( object objectToMap, MappingMethods mappingMethods, Type typeOfArgumentObject ) : void

Private Methods

Method Description
GetMembers ( Type valueType, List acceptedMemberTypes, BindingFlags bitMask ) : List
GetSizeOfMember ( FieldInfo member, int &size, Type &genericType, bool &isGeneric ) : void
GetSizeOfMember ( PropertyInfo member, int &size, Type &genericType, bool &isGeneric ) : void
MapMember ( MemberInfo member, MappingMethods mappingMethods, object value ) : void
SortMembersByName ( MemberInfo m1, MemberInfo m2 ) : int
SortMembersBySizeAndName ( MemberInfo m1, MemberInfo m2 ) : int

Method Details

MapObject() public method

public MapObject ( Type typeOfObjectToMap, MappingMethods mappingMethods ) : void
typeOfObjectToMap System.Type
mappingMethods MappingMethods
return void

MapObject() public method

Pass an object and a MappingMethods and MapObject will map each member in that object to the corresponding method from the mappingMethods.
public MapObject ( object objectToMap, MappingMethods mappingMethods ) : void
objectToMap object object whose members will be called on.
mappingMethods MappingMethods MappingMethods which has dictionaries of members/methods.
return void

MapObject() public method

public MapObject ( object objectToMap, MappingMethods mappingMethods, Type typeOfArgumentObject ) : void
objectToMap object
mappingMethods MappingMethods
typeOfArgumentObject System.Type
return void