public static ChangeTrustResultCode Decode(XdrDataInputStream stream) { int value = stream.ReadInt(); switch (value) { case 0: return(Create(ChangeTrustResultCodeEnum.CHANGE_TRUST_SUCCESS)); case -1: return(Create(ChangeTrustResultCodeEnum.CHANGE_TRUST_MALFORMED)); case -2: return(Create(ChangeTrustResultCodeEnum.CHANGE_TRUST_NO_ISSUER)); case -3: return(Create(ChangeTrustResultCodeEnum.CHANGE_TRUST_INVALID_LIMIT)); case -4: return(Create(ChangeTrustResultCodeEnum.CHANGE_TRUST_LOW_RESERVE)); case -5: return(Create(ChangeTrustResultCodeEnum.CHANGE_TRUST_SELF_NOT_ALLOWED)); default: throw new Exception("Unknown enum value: " + value); } }
public static AllowTrustResultCode Decode(XdrDataInputStream stream) { var value = stream.ReadInt(); switch (value) { case 0: return(Create(AllowTrustResultCodeEnum.ALLOW_TRUST_SUCCESS)); case -1: return(Create(AllowTrustResultCodeEnum.ALLOW_TRUST_MALFORMED)); case -2: return(Create(AllowTrustResultCodeEnum.ALLOW_TRUST_NO_TRUST_LINE)); case -3: return(Create(AllowTrustResultCodeEnum.ALLOW_TRUST_TRUST_NOT_REQUIRED)); case -4: return(Create(AllowTrustResultCodeEnum.ALLOW_TRUST_CANT_REVOKE)); case -5: return(Create(AllowTrustResultCodeEnum.ALLOW_TRUST_SELF_NOT_ALLOWED)); default: throw new Exception("Unknown enum value: " + value); } }
public static MessageType Decode(XdrDataInputStream stream) { int value = stream.ReadInt(); switch (value) { case 0: return(Create(MessageTypeEnum.ERROR_MSG)); case 2: return(Create(MessageTypeEnum.AUTH)); case 3: return(Create(MessageTypeEnum.DONT_HAVE)); case 4: return(Create(MessageTypeEnum.GET_PEERS)); case 5: return(Create(MessageTypeEnum.PEERS)); case 6: return(Create(MessageTypeEnum.GET_TX_SET)); case 7: return(Create(MessageTypeEnum.TX_SET)); case 8: return(Create(MessageTypeEnum.TRANSACTION)); case 9: return(Create(MessageTypeEnum.GET_SCP_QUORUMSET)); case 10: return(Create(MessageTypeEnum.SCP_QUORUMSET)); case 11: return(Create(MessageTypeEnum.SCP_MESSAGE)); case 12: return(Create(MessageTypeEnum.GET_SCP_STATE)); case 13: return(Create(MessageTypeEnum.HELLO)); default: throw new Exception("Unknown enum value: " + value); } }
public static PathPaymentResultCode Decode(XdrDataInputStream stream) { var value = stream.ReadInt(); switch (value) { case 0: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_SUCCESS)); case -1: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_MALFORMED)); case -2: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_UNDERFUNDED)); case -3: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_SRC_NO_TRUST)); case -4: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_SRC_NOT_AUTHORIZED)); case -5: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_NO_DESTINATION)); case -6: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_NO_TRUST)); case -7: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_NOT_AUTHORIZED)); case -8: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_LINE_FULL)); case -9: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_NO_ISSUER)); case -10: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_TOO_FEW_OFFERS)); case -11: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_OFFER_CROSS_SELF)); case -12: return(Create(PathPaymentResultCodeEnum.PATH_PAYMENT_OVER_SENDMAX)); default: throw new Exception("Unknown enum value: " + value); } }
public static ManageOfferResultCode Decode(XdrDataInputStream stream) { var value = stream.ReadInt(); switch (value) { case 0: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_SUCCESS)); case -1: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_MALFORMED)); case -2: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_SELL_NO_TRUST)); case -3: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_BUY_NO_TRUST)); case -4: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_SELL_NOT_AUTHORIZED)); case -5: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_BUY_NOT_AUTHORIZED)); case -6: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_LINE_FULL)); case -7: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_UNDERFUNDED)); case -8: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_CROSS_SELF)); case -9: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_SELL_NO_ISSUER)); case -10: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_BUY_NO_ISSUER)); case -11: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_NOT_FOUND)); case -12: return(Create(ManageOfferResultCodeEnum.MANAGE_OFFER_LOW_RESERVE)); default: throw new Exception("Unknown enum value: " + value); } }
public static AccountMergeResultCode Decode(XdrDataInputStream stream) { int value = stream.ReadInt(); switch (value) { case 0: return(Create(AccountMergeResultCodeEnum.ACCOUNT_MERGE_SUCCESS)); case -1: return(Create(AccountMergeResultCodeEnum.ACCOUNT_MERGE_MALFORMED)); case -2: return(Create(AccountMergeResultCodeEnum.ACCOUNT_MERGE_NO_ACCOUNT)); case -3: return(Create(AccountMergeResultCodeEnum.ACCOUNT_MERGE_IMMUTABLE_SET)); case -4: return(Create(AccountMergeResultCodeEnum.ACCOUNT_MERGE_HAS_SUB_ENTRIES)); case -5: return(Create(AccountMergeResultCodeEnum.ACCOUNT_MERGE_SEQNUM_TOO_FAR)); case -6: return(Create(AccountMergeResultCodeEnum.ACCOUNT_MERGE_DEST_FULL)); default: throw new Exception("Unknown enum value: " + value); } }