using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DapperORMCore.Domain.Infrastructure
{
///
/// 释放对象
///
public abstract class DisposableObject : IDisposable
{
#region Finalization Constructs
///
/// Finalize完成后释放代码
///
~DisposableObject()
{
this.Dispose(false);
}
#endregion
#region Protected Methods
///
/// 显式释放代码
///
///
protected abstract void Dispose(bool disposing);
///
/// 显式释放
///
protected void ExplicitDispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
#endregion
#region IDisposable Members
///
/// 显式释放
///
public void Dispose()
{
this.ExplicitDispose();
}
#endregion
}
}