예제 #1
0
 /// <summary>
 ///     Construct a new ManageOffer builder from a ManageDataOp XDR.
 /// </summary>
 /// <param name="op">
 ///     <see cref="sdkxdr.ManageDataOp" />
 /// </param>
 public Builder(sdkxdr.ManageDataOp op)
 {
     name = op.DataName.InnerValue;
     if (op.DataValue != null)
     {
         value = op.DataValue.InnerValue;
     }
     else
     {
         value = null;
     }
 }
예제 #2
0
        public override sdkxdr.Operation.OperationBody ToOperationBody()
        {
            var op   = new sdkxdr.ManageDataOp();
            var name = new sdkxdr.String64();

            name.InnerValue = Name;
            op.DataName     = name;

            if (Value != null)
            {
                var dataValue = new sdkxdr.DataValue();
                dataValue.InnerValue = Value;
                op.DataValue         = dataValue;
            }

            var body = new sdkxdr.Operation.OperationBody();

            body.Discriminant = sdkxdr.OperationType.Create(sdkxdr.OperationType.OperationTypeEnum.MANAGE_DATA);
            body.ManageDataOp = op;

            return(body);
        }