mirror of
https://github.com/tym1116/BH3.git
synced 2025-12-16 16:34:41 +01:00
27 lines
354 B
C#
27 lines
354 B
C#
using System;
|
|
|
|
namespace UniRx
|
|
{
|
|
public class BooleanDisposable : IDisposable, ICancelable
|
|
{
|
|
public bool IsDisposed { get; private set; }
|
|
|
|
public BooleanDisposable()
|
|
{
|
|
}
|
|
|
|
internal BooleanDisposable(bool isDisposed)
|
|
{
|
|
IsDisposed = isDisposed;
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
if (!IsDisposed)
|
|
{
|
|
IsDisposed = true;
|
|
}
|
|
}
|
|
}
|
|
}
|