Esempio n. 1
0
        public static T Deserialize <T>(this TimeoutCommand command)
        {
            var state = default(T);

            if (command.TryDeserialize(out state))
            {
                return(state);
            }

            throw new SerializationException($"{command.DataType} can't be deserialized into {typeof(T).FullName}");
        }
Esempio n. 2
0
        public static T Deserialize <T>(this TimeoutCommand command)
        {
            var state = default(T);

            if (command.TryDeserialize(out state))
            {
                return(state);
            }

            throw new SerializationException(string.Format("{0} can't be deserialized into {1}", command.DataType, typeof(T).FullName));
        }