Complete Notifications when Plc is disposed

This commit is contained in:
Peter Butzhammer
2024-02-07 08:51:40 +01:00
parent d678924b6e
commit 956f39cc66
3 changed files with 17 additions and 38 deletions

View File

@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Disposables;
namespace Sharp7.Rx.Extensions
@@ -11,11 +9,5 @@ namespace Sharp7.Rx.Extensions
{
compositeDisposable.Add(disposable);
}
public static void DisposeItems(this IEnumerable<object> disposables)
{
foreach (IDisposable disposable in disposables.OfType<IDisposable>())
disposable?.Dispose();
}
}
}