public void TestCreate()
        {
            const string address = "hx4873b94352c8c1f3b2f09aaeccea31ce9e90bd31";
            var          p       = new TokenBalance
            {
                Owner = address
            };

            var @params = (RpcObject)RpcItemCreator.Create(p);

            var expectedParams = new RpcObject.Builder()
                                 .Put("Owner", new RpcValue(address))
                                 .Build();

            Assert.Equal(@params.GetItem("Owner").ToString(),
                         expectedParams.GetItem("Owner").ToString());

            Assert.Null(@params.GetItem("outerVar"));
        }
示例#2
0
 public RpcItem ConvertFrom(List <ScoreApi> @object)
 {
     return(RpcItemCreator.Create(@object));
 }
示例#3
0
            /// <summary>
            ///    Sets params
            /// </summary>
            public CallBuilder Params <T>(T @params)
            {
                _dataBuilder.Put("params", RpcItemCreator.Create(@params));

                return(this);
            }
示例#4
0
 public RpcItem ConvertFrom(ConfirmedTransaction @object)
 {
     return(RpcItemCreator.Create(@object));
 }
示例#5
0
 public RpcItem ConvertFrom(TransactionResult @object)
 {
     return(RpcItemCreator.Create(@object));
 }
示例#6
0
 public RpcItem ConvertFrom(Block @object)
 {
     return(RpcItemCreator.Create(@object));
 }
示例#7
0
 public RpcItem ConvertFrom(byte[] @object)
 {
     return(RpcItemCreator.Create(@object));
 }
示例#8
0
 public RpcItem ConvertFrom(string @object)
 {
     return(RpcItemCreator.Create(@object));
 }
示例#9
0
 public RpcItem ConvertFrom(BigInteger @object)
 {
     return(RpcItemCreator.Create(@object));
 }
示例#10
0
            public Builder Params <T>(T @params)
            {
                _params = RpcItemCreator.Create(@params);

                return(this);
            }