コード例 #1
0
        public void save(Common.IOutputStream destination, WalletSaveLevel saveLevel)
        {
            CryptoNote.BinaryOutputStreamSerializer s = new CryptoNote.BinaryOutputStreamSerializer(destination);

            byte saveLevelValue = (byte)saveLevel;

            s.functorMethod(saveLevelValue, "saveLevel");

            saveKeyListAndBalances(s.functorMethod, saveLevel == WalletSaveLevel.SAVE_ALL);

            if (saveLevel == WalletSaveLevel.SAVE_KEYS_AND_TRANSACTIONS || saveLevel == WalletSaveLevel.SAVE_ALL)
            {
                saveTransactions(s.functorMethod);
                saveTransfers(s.functorMethod);
            }

            if (saveLevel == WalletSaveLevel.SAVE_ALL)
            {
                saveTransfersSynchronizer(s.functorMethod);
                saveUnlockTransactionsJobs(s.functorMethod);
                s.functorMethod(m_uncommitedTransactions, "uncommitedTransactions");
            }

            s.functorMethod(m_extra, "extra");
        }
コード例 #2
0
 public BinaryOutputStreamSerializer(Common.IOutputStream strm)
 {
     this.stream = new Common.IOutputStream(strm);
 }