Exemplo n.º 1
0
 public static object Deserializer(System.Type expected, global::Orleans.Serialization.BinaryTokenStreamReader stream)
 {
     DTO.RoleMessage result = new DTO.RoleMessage();
     result.Id = ((int)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(int), stream)));
     result.Name = ((string)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(string), stream)));
     return result;
 }
Exemplo n.º 2
0
 public static object DeepCopier(object original)
 {
     DTO.RoleMessage input = ((DTO.RoleMessage)(original));
     DTO.RoleMessage result = new DTO.RoleMessage();
     Orleans.Serialization.SerializationContext.Current.RecordObject(original, result);
     result.Id = input.Id;
     result.Name = input.Name;
     return result;
 }