Exemple #1
0
        public static AccountEntryExtensionV1 Decode(XdrDataInputStream stream)
        {
            AccountEntryExtensionV1 decodedAccountEntryExtensionV1 = new AccountEntryExtensionV1();

            decodedAccountEntryExtensionV1.Liabilities = Liabilities.Decode(stream);
            decodedAccountEntryExtensionV1.Ext         = AccountEntryExtensionV1Ext.Decode(stream);
            return(decodedAccountEntryExtensionV1);
        }
            public static void Encode(XdrDataOutputStream stream, AccountEntryExt encodedAccountEntryExt)
            {
                stream.WriteInt((int)encodedAccountEntryExt.Discriminant);
                switch (encodedAccountEntryExt.Discriminant)
                {
                case 0:
                    break;

                case 1:
                    AccountEntryExtensionV1.Encode(stream, encodedAccountEntryExt.V1);
                    break;
                }
            }
            public static AccountEntryExt Decode(XdrDataInputStream stream)
            {
                AccountEntryExt decodedAccountEntryExt = new AccountEntryExt();
                int             discriminant           = stream.ReadInt();

                decodedAccountEntryExt.Discriminant = discriminant;
                switch (decodedAccountEntryExt.Discriminant)
                {
                case 0:
                    break;

                case 1:
                    decodedAccountEntryExt.V1 = AccountEntryExtensionV1.Decode(stream);
                    break;
                }
                return(decodedAccountEntryExt);
            }
Exemple #4
0
 public static void Encode(XdrDataOutputStream stream, AccountEntryExtensionV1 encodedAccountEntryExtensionV1)
 {
     Liabilities.Encode(stream, encodedAccountEntryExtensionV1.Liabilities);
     AccountEntryExtensionV1Ext.Encode(stream, encodedAccountEntryExtensionV1.Ext);
 }