namespace View_by_Distance.FaceRecognitionDotNet;
///
/// Represents a class which has managed or unmanaged resources.
///
public abstract class DisposableObject : IDisposable
{
#region Properties
///
/// Gets a value indicating whether this instance has been disposed.
///
/// true if this instance has been disposed; otherwise, false.
public bool IsDisposed
{
get;
private set;
/* Unmerged change from project 'FaceRecognitionotNet(netstandard2.0)'
Before:
/// If this object is disposed, then is thrown.
After:
/// If this object is disposed, then is thrown.
*/
}
#endregion
#region Methods
///
/// If this object is disposed, then is thrown.
///
public void ThrowIfDisposed()
{
if (IsDisposed)
throw new ObjectDisposedException(GetType().FullName);
}
internal void ThrowIfDisposed(string objectName)
{
if (IsDisposed)
throw new ObjectDisposedException(objectName);
}
#region Overrides
///
/// Releases all managed resources.
///
protected virtual void DisposeManaged()
{
}
///
/// Releases all unmanaged resources.
///
protected virtual void DisposeUnmanaged()
{
}
#endregion
#endregion
#region IDisposable Members
///
/// Releases all resources used by this .
///
public void Dispose()
{
GC.SuppressFinalize(this);
/* Unmerged change from project 'FaceRecognitionotNet(netstandard2.0)'
Before:
Dispose(true);
After:
Dispose(true);
*/
Dispose(true);
}
///
/// Releases all resources used by this .
///
/// Indicate value whether method was called.
private void Dispose(bool disposing)
{
if (IsDisposed)
{
return;
/* Unmerged change from project 'FaceRecognitionotNet(netstandard2.0)'
Before:
IsDisposed = true;
After:
IsDisposed = true;
*/
}
IsDisposed = true;
if (disposing)
/* Unmerged change from project 'FaceRecognitionotNet(netstandard2.0)'
Before:
DisposeManaged();
After:
DisposeManaged();
*/
DisposeManaged();
/* Unmerged change from project 'FaceRecognitionotNet(netstandard2.0)'
Before:
DisposeUnmanaged();
After:
DisposeUnmanaged();
*/
DisposeUnmanaged();
}
#endregion
}