private void loadTransfers(CryptoNote.ISerializer serializer) { ulong count = 0; serializer.functorMethod(count, "transferCount"); m_transfers.reserve(count); for (ulong i = 0; i < count; ++i) { ulong txId = 0; serializer.functorMethod(txId, "transactionId"); WalletTransferDtoV2 dto = new WalletTransferDtoV2(); serializer.functorMethod(dto, "transfer"); WalletTransfer tr = new WalletTransfer(); tr.address = dto.address; tr.amount = dto.amount; tr.type = (WalletTransferType)dto.type; m_transfers.emplace_back(std::piecewise_construct, std::forward_as_tuple(txId), std::forward_as_tuple(std::move(tr))); } }
public WalletTransferDtoV2(CryptoNote.WalletTransfer tr) { address = tr.address; amount = tr.amount; type = (byte)tr.type; }