Tanoda
GILES.Serialization.pb_ObjectContainer< T > Class Template Reference
Inheritance diagram for GILES.Serialization.pb_ObjectContainer< T >:
GILES.Serialization.pb_ObjectWrapper

Public Member Functions

 pb_ObjectContainer (T value)
 
new System.Type GetType ()
 
object GetValue ()
 
 pb_ObjectContainer (SerializationInfo info, StreamingContext context)
 
void GetObjectData (SerializationInfo info, StreamingContext context)
 
override string ToString ()
 
object GetValue ()
 

Static Public Member Functions

static implicit operator T (pb_ObjectContainer< T > container)
 

Public Attributes

value
 The value to be serialized. More...
 

Detailed Description

Json.Net when deserializing arrays or child objects will not invoke custom converters because Deserialize<T> is called with object as the type, not the correct type. By storing custom classes in container objects with strongly typed properties it is possible to circumvent this restriction.

Definition at line 23 of file pb_ObjectContainer.cs.

Constructor & Destructor Documentation

◆ pb_ObjectContainer() [1/2]

Create a new container object with T type.

Definition at line 31 of file pb_ObjectContainer.cs.

◆ pb_ObjectContainer() [2/2]

GILES.Serialization.pb_ObjectContainer< T >.pb_ObjectContainer ( SerializationInfo  info,
StreamingContext  context 
)

Constructor coming from serialization.

Definition at line 63 of file pb_ObjectContainer.cs.

Member Function Documentation

◆ GetObjectData()

void GILES.Serialization.pb_ObjectContainer< T >.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)

Serialize data for ISerializable.

Definition at line 71 of file pb_ObjectContainer.cs.

◆ GetType()

new System.Type GILES.Serialization.pb_ObjectContainer< T >.GetType ( )

Return the type contained within this wrapper.

Definition at line 47 of file pb_ObjectContainer.cs.

◆ GetValue()

object GILES.Serialization.pb_ObjectContainer< T >.GetValue ( )

Get the contained value.

Implements GILES.Serialization.pb_ObjectWrapper.

Definition at line 55 of file pb_ObjectContainer.cs.

◆ operator T()

static implicit GILES.Serialization.pb_ObjectContainer< T >.operator T ( pb_ObjectContainer< T >  container)
static

Return the value stored in this container.

Definition at line 39 of file pb_ObjectContainer.cs.

◆ ToString()

override string GILES.Serialization.pb_ObjectContainer< T >.ToString ( )

Definition at line 76 of file pb_ObjectContainer.cs.

Member Data Documentation

◆ value

The value to be serialized.

Definition at line 26 of file pb_ObjectContainer.cs.


The documentation for this class was generated from the following file: