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)); }
public static void StoreEnvelope(string token, IKernelCommandEnvelope envelope) { envelopes.AddOrUpdate(token, envelope, (key, oldValue) => envelope); }