4using System.Reflection;
5using System.Collections;
6using System.Collections.Generic;
7using System.Runtime.Serialization;
22 public Type
type {
get;
set; }
70 string typeName = (string) info.GetValue(
"typeName", typeof(
string));
71 type = Type.GetType(typeName);
72 reflectedProperties = (Dictionary<string, object>) info.GetValue(
"reflectedProperties", typeof(Dictionary<string, object>));
78 public void GetObjectData(SerializationInfo info, StreamingContext context)
81 info.AddValue(
"typeName",
type.AssemblyQualifiedName, typeof(
string));
84 info.AddValue(
"reflectedProperties",
reflectedProperties, typeof(Dictionary<string, object>));
108 return pb_Reflection.ReflectProperties(
target);
virtual Dictionary< string, object > PopulateSerializableDictionary()
T target
A reference to the component being serialized. Will be null on deserialization.
virtual void ApplyProperties(object obj)
Called after an object is deserialized and constructed to it's base type.
void GetObjectData(SerializationInfo info, StreamingContext context)
Type type
The type of component stored.
pb_SerializableObject(SerializationInfo info, StreamingContext context)
object GetObject(string key)
pb_SerializableObject(T obj)
Dictionary< string, object > reflectedProperties
A key-value store of all serializable properties and fields on this object. Populated on serializatio...
Dictionary< string, object > PopulateSerializableDictionary()
void ApplyDictionaryValues(Dictionary< string, object > values)