C# Класс YAXLib.MemberWrapper

A wrapper class for members which only can be properties or member variables
Показать файл Открыть проект Примеры использования класса

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

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

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

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

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

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

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

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

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

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

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

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

Determines whether this instance of MemberWrapper can be serialized.
public IsAllowedToBeSerialized ( YAXSerializationFields serializationFields, bool dontSerializePropertiesWithNoSetter ) : bool
serializationFields YAXSerializationFields The serialization fields.
dontSerializePropertiesWithNoSetter bool
Результат bool

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

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

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

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

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

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

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

Returns a T:System.String that represents the current T:System.Object.
public ToString ( ) : string
Результат string