public static void Encode(XdrDataOutputStream stream, TransactionMetaV1 encodedTransactionMetaV1)
 {
     LedgerEntryChanges.Encode(stream, encodedTransactionMetaV1.TxChanges);
     int operationssize = encodedTransactionMetaV1.Operations.Length;
     stream.WriteInt(operationssize);
     for (int i = 0; i < operationssize; i++)
     {
         OperationMeta.Encode(stream, encodedTransactionMetaV1.Operations[i]);
     }
 }
        public static void Encode(XdrDataOutputStream stream, TransactionMeta encodedTransactionMeta)
        {
            stream.WriteInt((int)encodedTransactionMeta.Discriminant);
            switch (encodedTransactionMeta.Discriminant)
            {
            case 0:
                int operationssize = encodedTransactionMeta.Operations.Length;
                stream.WriteInt(operationssize);
                for (int i = 0; i < operationssize; i++)
                {
                    OperationMeta.Encode(stream, encodedTransactionMeta.Operations[i]);
                }
                break;

            case 1:
                TransactionMetaV1.Encode(stream, encodedTransactionMeta.V1);
                break;
            }
        }