mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 19:58:57 +08:00
Refactor package object model.
This commit is contained in:
@@ -4,7 +4,7 @@ namespace MQTTnet.Internal
|
||||
{
|
||||
public abstract class Disposable : IDisposable
|
||||
{
|
||||
protected bool IsDisposed { get; private set; } = false;
|
||||
protected bool IsDisposed { get; private set; }
|
||||
|
||||
protected void ThrowIfDisposed()
|
||||
{
|
||||
@@ -18,13 +18,6 @@ namespace MQTTnet.Internal
|
||||
{
|
||||
}
|
||||
|
||||
// TODO: override a finalizer only if Dispose(bool disposing) above has code to free unmanaged resources.
|
||||
// ~Disposable()
|
||||
// {
|
||||
// // Do not change this code. Put cleanup code in Dispose(bool disposing) above.
|
||||
// Dispose(false);
|
||||
// }
|
||||
|
||||
// This code added to correctly implement the disposable pattern.
|
||||
public void Dispose()
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace MQTTnet.Internal
|
||||
{
|
||||
public class TestMqttChannel : IMqttChannel
|
||||
{
|
||||
private readonly MemoryStream _stream;
|
||||
readonly MemoryStream _stream;
|
||||
|
||||
public TestMqttChannel(MemoryStream stream)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user