mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
25 lines
493 B
C#
25 lines
493 B
C#
using System;
|
|
|
|
namespace Remotely.Shared.Utilities
|
|
{
|
|
public static class Disposer
|
|
{
|
|
public static void TryDisposeAll(params IDisposable[] disposables)
|
|
{
|
|
if (disposables is null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
foreach (var disposable in disposables)
|
|
{
|
|
try
|
|
{
|
|
disposable?.Dispose();
|
|
}
|
|
catch { }
|
|
}
|
|
}
|
|
}
|
|
}
|