/
vshmidt
/
masstransit
Обзор
Документация
Войти
/
vshmidt
/
masstransit
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/MassTransit/Serialization/DisposingCryptoStream.cs
43 строки
971 B
Omar Msaaf
The function FlushFinalBlock cryptostream should be called for the serialization process (refactored)
28 фев 2020, 21:08
28 фев 2020, 21:08
78bba70
Код
Авторство
О чём код?
namespace MassTransit.Serialization { using System.IO; using System.Security.Cryptography; class DisposingCryptoStream : CryptoStream { Stream _stream; ICryptoTransform _transform; internal DisposingCryptoStream(Stream stream, ICryptoTransform transform, CryptoStreamMode mode) : base(stream, transform, mode) { _stream = stream; _transform = transform; } protected override void Dispose(bool disposing) { if (!disposing) return; if (!HasFlushedFinalBlock) FlushFinalBlock(); base.Dispose(true); if (_stream != null) { _stream.Dispose(); _stream = null; } if (_transform != null) { _transform.Dispose(); _transform = null; } } } }