public static void Encode(XdrDataOutputStream stream, AllowTrustOpAsset encodedAllowTrustOpAsset)
            {
                stream.WriteInt((int)encodedAllowTrustOpAsset.Discriminant.InnerValue);
                switch (encodedAllowTrustOpAsset.Discriminant.InnerValue)
                {
                case AssetType.AssetTypeEnum.ASSET_TYPE_CREDIT_ALPHANUM4:
                    AssetCode4.Encode(stream, encodedAllowTrustOpAsset.AssetCode4);
                    break;

                case AssetType.AssetTypeEnum.ASSET_TYPE_CREDIT_ALPHANUM12:
                    AssetCode12.Encode(stream, encodedAllowTrustOpAsset.AssetCode12);
                    break;
                }
            }
Пример #2
0
 public static void Encode(XdrDataOutputStream stream, AssetAlphaNum4 encodedAssetAlphaNum4)
 {
     AssetCode4.Encode(stream, encodedAssetAlphaNum4.AssetCode);
     AccountID.Encode(stream, encodedAssetAlphaNum4.Issuer);
 }