コード例 #1
0
        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"));
        }
コード例 #2
0
        public static PagingParams FromTuples(params object[] tuples)
        {
            var map = AnyValueMap.FromTuples(tuples);

            return(FromMap(map));
        }