mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-29 03:44:27 +01:00
20 lines
496 B
C#
20 lines
496 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BTCPayServer
|
|
{
|
|
public class CompositeDisposable : IDisposable
|
|
{
|
|
List<IDisposable> _Disposables = new List<IDisposable>();
|
|
public void Add(IDisposable disposable) { _Disposables.Add(disposable); }
|
|
public void Dispose()
|
|
{
|
|
foreach (var d in _Disposables)
|
|
d.Dispose();
|
|
_Disposables.Clear();
|
|
}
|
|
}
|
|
}
|