Class ReadingStrategy
Represents logic that resolves POD data types and field layouts to CLR types/layouts.
Extend this type and pass its instance into PortableObjectDocument.ToOriginalObject(ReadingStrategy)
Inheritance
System.Object
ReadingStrategy
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Azos.dll
Syntax
public class ReadingStrategy
Constructors
ReadingStrategy()
Declaration
protected ReadingStrategy()
Properties
Default
Returns an instance of default strategy
Declaration
public static ReadingStrategy Default { get; }
Property Value
Methods
CompositeToNative(CompositeData)
Resolves composite data into CLR object
Declaration
public virtual object CompositeToNative(CompositeData data)
Parameters
Returns
Type |
Description |
System.Object |
|
ConstructObject(CompositeData)
Constructs object out of CompositeData. This implementation calls ResolveType then tries to invoke attribute constructor first
then create instance using default ctor
Declaration
public virtual object ConstructObject(CompositeData data)
Parameters
Returns
Type |
Description |
System.Object |
|
DeserializeArray(Array, CompositeArrayData)
Declaration
public virtual void DeserializeArray(Array array, CompositeArrayData data)
Parameters
DeserializeObjectFromCompositeCustomData(Object, CompositeCustomData)
Declaration
public virtual void DeserializeObjectFromCompositeCustomData(object instance, CompositeCustomData data)
Parameters
DeserializeObjectFromCompositeReflectedData(Object, CompositeReflectedData)
Declaration
public virtual void DeserializeObjectFromCompositeReflectedData(object instance, CompositeReflectedData data)
Parameters
DeserializeSerializationInfo(Type, CompositeCustomData, StreamingContext)
Performs deserialization of SerializationInfo from CompositeCustomData bag
Declaration
protected virtual SerializationInfo DeserializeSerializationInfo(Type objType, CompositeCustomData data, StreamingContext context)
Parameters
Type |
Name |
Description |
System.Type |
objType |
|
CompositeCustomData |
data |
|
System.Runtime.Serialization.StreamingContext |
context |
|
Returns
Type |
Description |
System.Runtime.Serialization.SerializationInfo |
|
MakeNewArrayInstance(CompositeArrayData)
Creates an array instance described by the CompositeArrayData instance
Declaration
public virtual object MakeNewArrayInstance(CompositeArrayData arrayData)
Parameters
Returns
Type |
Description |
System.Object |
|
MakeNewObjectInstanceUsingDefaultCtor(Type)
Creates an object using its default .ctor. This implementation uses "magic" to create uninit buffer first
Declaration
public virtual object MakeNewObjectInstanceUsingDefaultCtor(Type clrType)
Parameters
Type |
Name |
Description |
System.Type |
clrType |
|
Returns
Type |
Description |
System.Object |
|
Resolves a meta field definition into actual native field. Returns null wen resolution is not possible and field should be skipped
Declaration
public virtual FieldInfo ResolveField(Type nativeType, MetaComplexType.MetaField mfield)
Parameters
Returns
Type |
Description |
System.Reflection.FieldInfo |
|
Resolves a MetaType instance from a particular document into CLR Type, i.e. an obsolete class named "ABC" may be resolved into
newer class "ABCX"
Declaration
public virtual Type ResolveType(MetaType metaType)
Parameters
Returns
Type |
Description |
System.Type |
|
Performs the assignment of portable data into native field
Declaration
public virtual void SetFieldData(object instance, FieldInfo fieldInfo, CompositeReflectedData data, MetaComplexType.MetaField mfield)
Parameters
Extension Methods