C# Class YAXLib.MemberWrapper

A wrapper class for members which only can be properties or member variables
Show file Open project: sinairv/YAXLib Class Usage Examples

Public Methods

Method Description
GetOriginalValue ( object obj, object index ) : object

Gets the original value of this member in the specified object

GetRealTypeDefinition ( Type type ) : YAXTypeAttribute
GetValue ( object obj ) : object

Gets the processed value of this member in the specified object

IsAllowedToBeSerialized ( YAXSerializationFields serializationFields, bool dontSerializePropertiesWithNoSetter ) : bool

Determines whether this instance of MemberWrapper can be serialized.

IsRealTypeDefined ( Type type ) : bool
MemberWrapper ( MemberInfo memberInfo, YAXSerializer callerSerializer ) : System

Initializes a new instance of the MemberWrapper class.

SetValue ( object obj, object value ) : void

Sets the value of this member in the specified object

ToString ( ) : string

Returns a T:System.String that represents the current T:System.Object.

Private Methods

Method Description
InitDefaultValue ( ) : void

Initializes the default value for this instance of MemberWrapper.

InitInstance ( ) : void

Initializes this instance of MemberWrapper.

ProcessYaxAttribute ( object attr ) : void

Processes the specified attribute which is an instance of YAXAttribute.

Method Details

GetOriginalValue() public method

Gets the original value of this member in the specified object
public GetOriginalValue ( object obj, object index ) : object
obj object The object whose value corresponding to this instance, must be retreived.
index object The array of indeces (usually null).
return object

GetRealTypeDefinition() public method

public GetRealTypeDefinition ( Type type ) : YAXTypeAttribute
type System.Type
return YAXTypeAttribute

GetValue() public method

Gets the processed value of this member in the specified object
public GetValue ( object obj ) : object
obj object The object whose value corresponding to this instance, must be retreived.
return object

IsAllowedToBeSerialized() public method

Determines whether this instance of MemberWrapper can be serialized.
public IsAllowedToBeSerialized ( YAXSerializationFields serializationFields, bool dontSerializePropertiesWithNoSetter ) : bool
serializationFields YAXSerializationFields The serialization fields.
dontSerializePropertiesWithNoSetter bool
return bool

IsRealTypeDefined() public method

public IsRealTypeDefined ( Type type ) : bool
type System.Type
return bool

MemberWrapper() public method

Initializes a new instance of the MemberWrapper class.
public MemberWrapper ( MemberInfo memberInfo, YAXSerializer callerSerializer ) : System
memberInfo System.Reflection.MemberInfo The member-info to build this instance from.
callerSerializer YAXSerializer The caller serializer.
return System

SetValue() public method

Sets the value of this member in the specified object
public SetValue ( object obj, object value ) : void
obj object The object whose member corresponding to this instance, must be given value.
value object The value.
return void

ToString() public method

Returns a T:System.String that represents the current T:System.Object.
public ToString ( ) : string
return string