Beispiel #1
0
 public override void Deserialize(Serialization.IO.CompactReader reader)
 {
     Identifier          = reader.ReadString();
     Message             = reader.ReadString();
     Status              = (RecoveryStatus)reader.ReadInt32();
     PercentageExecution = reader.ReadSingle();
     MessageTime         = reader.ReadDateTime();
     StopTime            = reader.ReadDateTime();
     Details             = Common.Util.SerializationUtility.DeserializeList <ShardRecoveryJobState>(reader);
 }
Beispiel #2
0
 public virtual void Deserialize(Serialization.IO.CompactReader reader)
 {
     Identifier          = reader.ReadString();
     Message             = reader.ReadString();
     Status              = (RecoveryStatus)reader.ReadObject();
     PercentageExecution = reader.ReadSingle();
     _entityName         = reader.ReadString();
     StartTime           = reader.ReadDateTime();
     _submissionTime     = reader.ReadDateTime();
     StopTime            = reader.ReadDateTime();
     _lastOperationID    = (OperationId)reader.ReadObject();
     _lastFullBackupDate = reader.ReadDateTime();
 }
        /// <summary>
        /// Deserializa o valor.
        /// </summary>
        /// <param name="reader"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        private object Deserialize(Serialization.IO.CompactReader reader, PrimitiveTypes type)
        {
            switch (type)
            {
            case PrimitiveTypes.Null:
                return(null);

            case PrimitiveTypes.Boolean:
                return(reader.ReadBoolean());

            case PrimitiveTypes.Byte:
                return(reader.ReadByte());

            case PrimitiveTypes.Bytes:
                var length = reader.ReadInt32();
                return(reader.ReadBytes(length));

            case PrimitiveTypes.Char:
                return(reader.ReadChar());

            case PrimitiveTypes.DateTime:
                return(reader.ReadDateTime());

            case PrimitiveTypes.DateTimeOffset:
                return(new DateTimeOffset(reader.ReadInt64(), new TimeSpan(reader.ReadInt64())));

            case PrimitiveTypes.Decimal:
                return(reader.ReadDecimal());

            case PrimitiveTypes.Double:
                return(reader.ReadDouble());

            case PrimitiveTypes.Int16:
                return(reader.ReadInt16());

            case PrimitiveTypes.Int32:
                return(reader.ReadInt32());

            case PrimitiveTypes.Int64:
                return(reader.ReadInt64());

            case PrimitiveTypes.Single:
                return(reader.ReadSingle());

            case PrimitiveTypes.String:
                return(reader.ReadString());
            }
            throw new InvalidOperationException("Invalid PrimitiveType");
        }
Beispiel #4
0
 public override void Deserialize(Serialization.IO.CompactReader reader)
 {
     Identifier          = reader.ReadString();
     Message             = reader.ReadString();
     Status              = (RecoveryStatus)reader.ReadInt32();
     PercentageExecution = reader.ReadSingle();
     MessageTime         = reader.ReadDateTime();
     StopTime            = reader.ReadDateTime();
     _cluster            = reader.ReadString();
     _shard              = reader.ReadString();
     _node               = reader.ReadString();
     _jobType            = (RecoveryJobType)reader.ReadInt32();
     Detail              = Common.Util.SerializationUtility.DeserializeList <RecoveryJobStateBase>(reader);
     _lastOperationID    = (OperationId)reader.ReadObject();
     _lastFullBackupDate = reader.ReadDateTime();
 }