Exemple #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;
     }
 }
        public override sdkxdr.Operation.OperationBody ToOperationBody()
        {
            sdkxdr.ManageDataOp op   = new sdkxdr.ManageDataOp();
            sdkxdr.String64     name = new sdkxdr.String64();
            name.InnerValue = Name;
            op.DataName     = name;

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

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

            return(body);
        }