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