示例#1
0
        public static string Serialize(IKernelCommandEnvelope envelope)
        {
            var serializationModel = new SerializationModel
            {
                command     = envelope.Command,
                commandType = envelope.CommandType,
                token       = envelope.Token
            };

            return(JsonConvert.SerializeObject(
                       serializationModel,
                       Serializer.JsonSerializerSettings));
        }
示例#2
0
 public static void StoreEnvelope(string token, IKernelCommandEnvelope envelope)
 {
     envelopes.AddOrUpdate(token, envelope, (key, oldValue) => envelope);
 }