예제 #1
0
        public void ToString_Empty()
        {
            var any = new Any();

            Assert.AreEqual("{ \"@type\": \"\", \"@value\": \"\" }", any.ToString());
        }
예제 #2
0
        private object GetRequestData(Google.Protobuf.WellKnownTypes.Any data, Type requestType)
        {
            var method = data.GetType().GetMethod("Unpack") !.MakeGenericMethod(requestType);

            return((object)method.Invoke(data, null) !);
        }