public void TestGetAsString() { var message = AnyValueMap.FromTuples( "key1", 123, "key2", "ABC" ); var restoredMessageObject = JsonConverter.FromJson <object>(JsonConverter.ToJson(message)); var restoredMessage = AnyValueMap.FromValue(restoredMessageObject); Assert.Equal(2, restoredMessage.Count); Assert.Equal(123, restoredMessage.GetAsInteger("key1")); Assert.Equal("ABC", restoredMessage.GetAsString("key2")); }
public static PagingParams FromTuples(params object[] tuples) { var map = AnyValueMap.FromTuples(tuples); return(FromMap(map)); }