public void JsonDataString_ImplicitConversion() { JsonDataString jsonDataString = "{ \"monster\": 20}"; JsonDataString jsonDataStringJsonValue = new JsonValue("{ \"monster\": 20}"); string outputString = jsonDataString; JsonValue jsonValue = jsonDataStringJsonValue; }
public void JsonDataString_Serialization() { JsonDataString jsonDataString = new JsonDataString("{ \"monster\": 20}"); string output = JsonConvert.SerializeObject(jsonDataString); JsonDataString deserializedJsonDataString = JsonConvert.DeserializeObject <JsonDataString>(output); deserializedJsonDataString.ShouldBe(jsonDataString); }
public WorkflowMessage(string messageTypeName, JsonDataString data, ActorPath replyTo = null, Guid transactionId = default, Guid transactionGroupId = default) { if (transactionId == default) { TransactionId = Guid.NewGuid(); } else { TransactionId = transactionId; } if (transactionGroupId == default) { TransactionGroupId = Guid.NewGuid(); } else { TransactionGroupId = transactionGroupId; } MessageTypeName = messageTypeName; Data = data; ReplyTo = replyTo; MessageCreationTime = DateTime.UtcNow; }