Example #1
0
 public void DeserializeConstructor(out object value, int version, ISerializationReader reader)
 {
     throw Assert.CreateException("Used invalid serializer");
 }
Example #2
0
 public void DeserializeBacklinks(ref object value, int version, ISerializationReader reader)
 {
     throw Assert.CreateException("Used invalid serializer");
 }
Example #3
0
        public override void DeserializeConstructor(out TimeSpan value, int version, ISerializationReader reader)
        {
            long ticks = reader.ReadPrimitive <long>();

            value = new TimeSpan(ticks);
        }
 public void DeserializeConstructor(out object value, int version, ISerializationReader reader)
 {
     value = new Dictionary <TKey, TValue>();
 }
Example #5
0
 public override T DeserializeConstructor(int version, ISerializationReader reader)
 {
     return(new T());
 }
 public static T ReadPrimitive <T>(this ISerializationReader reader)
 {
     return((T)reader.ReadPrimitive(typeof(T)));
 }
Example #7
0
 public void DeserializeConstructor(out object value, int version, ISerializationReader reader)
 {
     throw Assert.CreateException(
               "can't deserialize constructor of abstract type '{0}'", typeof(T).Name());
 }
Example #8
0
 public void DeserializeBacklinks(ref object value, int version, ISerializationReader reader)
 {
 }
Example #9
0
 public virtual void DeserializeContents(T value, int version, ISerializationReader reader)
 {
 }
Example #10
0
 public virtual void DeserializeBacklinks(T value, int version, ISerializationReader reader)
 {
 }
Example #11
0
 public override void DeserializeConstructor(out T value, int version, ISerializationReader reader)
 {
     value = reader.ReadPrimitive <T>();
 }
Example #12
0
 public virtual void DeserializeConstructor(out T value, int version, ISerializationReader reader)
 {
     value = default(T);
 }
 public void DeserializeBacklinks(ref object value, int version, ISerializationReader reader)
 {
     throw Assert.CreateException("This serializer was marked deprecated and should not be used anymore");
 }
Example #14
0
 public void DeserializeConstructor(out object value, int version, ISerializationReader reader)
 {
     int[] lengths = reader.ReadSet <int>("Length").ToArray();
     value = Array.CreateInstance(_elementType, lengths);
 }
 public static T Read <T>(this ISerializationReader reader, string name, bool allowCircularDependencies = false)
 {
     return((T)reader.Read(typeof(T), name, allowCircularDependencies));
 }
Example #16
0
 public void DeserializeConstructor(out object value, int version, ISerializationReader reader)
 {
     value = new List <T>();
 }
 public static IEnumerable <T> ReadSet <T>(this ISerializationReader reader, string itemName, bool allowCircularDependencies = false)
 {
     return(reader.ReadSet(typeof(T), itemName, allowCircularDependencies).Cast <T>());
 }
Example #18
0
 public override void DeserializeConstructor(out Vector2 value, int version, ISerializationReader reader)
 {
     value.x = reader.Read <float>("X");
     value.y = reader.Read <float>("Y");
 }
Example #19
0
 public abstract T DeserializeConstructor(int version, ISerializationReader reader);