Пример #1
0
 public static object Deserializer(System.Type expected, global::Orleans.Serialization.BinaryTokenStreamReader stream)
 {
     AdventureTerreInterfaces.Models.Descriptor result = new AdventureTerreInterfaces.Models.Descriptor();
     result.Flags = ((Dictionary<String,Boolean>)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Dictionary<String,Boolean>), stream)));
     result.IsDefault = ((Boolean)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Boolean), stream)));
     result.Name = ((String)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(String), stream)));
     result.SetFlags = ((Dictionary<String,Boolean>)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Dictionary<String,Boolean>), stream)));
     result.Text = ((String)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(String), stream)));
     return result;
 }
Пример #2
0
 public static object DeepCopier(object original)
 {
     AdventureTerreInterfaces.Models.Descriptor input = ((AdventureTerreInterfaces.Models.Descriptor)(original));
     AdventureTerreInterfaces.Models.Descriptor result = new AdventureTerreInterfaces.Models.Descriptor();
     Orleans.Serialization.SerializationContext.Current.RecordObject(original, result);
     result.Flags = ((Dictionary<String,Boolean>)(Orleans.Serialization.SerializationManager.DeepCopyInner(input.Flags)));
     result.IsDefault = input.IsDefault;
     result.Name = input.Name;
     result.SetFlags = ((Dictionary<String,Boolean>)(Orleans.Serialization.SerializationManager.DeepCopyInner(input.SetFlags)));
     result.Text = input.Text;
     return result;
 }