Exemplo n.º 1
0
 public static void Serializer(object untypedInput, Orleans.Serialization.BinaryTokenStreamWriter stream, System.Type expected)
 {
     GPSTracker.Common.DeviceStatusMessage input = ((GPSTracker.Common.DeviceStatusMessage)(untypedInput));
     Orleans.Serialization.SerializationManager.SerializeInner(input.Description, stream, typeof(String));
     Orleans.Serialization.SerializationManager.SerializeInner(input.DeviceId, stream, typeof(Guid));
     Orleans.Serialization.SerializationManager.SerializeInner(input.Latitude, stream, typeof(Double));
     Orleans.Serialization.SerializationManager.SerializeInner(input.Longitude, stream, typeof(Double));
     Orleans.Serialization.SerializationManager.SerializeInner(input.MessageId, stream, typeof(Int32));
     Orleans.Serialization.SerializationManager.SerializeInner(input.Timestamp, stream, typeof(DateTime));
     Orleans.Serialization.SerializationManager.SerializeInner(input.Velocity, stream, typeof(Double));
 }
Exemplo n.º 2
0
 public static object Deserializer(System.Type expected, Orleans.Serialization.BinaryTokenStreamReader stream)
 {
     GPSTracker.Common.DeviceStatusMessage result = new GPSTracker.Common.DeviceStatusMessage();
     result.Description = ((String)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(String), stream)));
     result.DeviceId    = ((Guid)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Guid), stream)));
     result.Latitude    = ((Double)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Double), stream)));
     result.Longitude   = ((Double)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Double), stream)));
     result.MessageId   = ((Int32)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Int32), stream)));
     result.Timestamp   = ((DateTime)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(DateTime), stream)));
     result.Velocity    = ((Double)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Double), stream)));
     return(result);
 }
Exemplo n.º 3
0
 public static object DeepCopier(object original)
 {
     GPSTracker.Common.DeviceStatusMessage input  = ((GPSTracker.Common.DeviceStatusMessage)(original));
     GPSTracker.Common.DeviceStatusMessage result = new GPSTracker.Common.DeviceStatusMessage();
     Orleans.Serialization.SerializationContext.Current.RecordObject(original, result);
     result.Description = input.Description;
     result.DeviceId    = ((Guid)(Orleans.Serialization.SerializationManager.DeepCopyInner(input.DeviceId)));
     result.Latitude    = input.Latitude;
     result.Longitude   = input.Longitude;
     result.MessageId   = input.MessageId;
     result.Timestamp   = input.Timestamp;
     result.Velocity    = input.Velocity;
     return(result);
 }
Exemplo n.º 4
0
 public System.Threading.Tasks.Task SendMessage(GPSTracker.Common.DeviceStatusMessage message)
 {
     return(base.InvokeMethodAsync <object>(-1204653416, new object[] { message }, TimeSpan.Zero, options:  InvokeMethodOptions.Unordered));
 }