Add IAsyncComponent to allow async initialize/terminate (#16536)
* Add IAsyncComponent * Rewrite to use IAsyncComposer * Add AsyncComponentBase and RuntimeAsyncComponentBase * Remove manual disposing of components on restart
This commit is contained in:
@@ -41,8 +41,9 @@ public static class ObjectExtensions
|
||||
public static IEnumerable<T> AsEnumerableOfOne<T>(this T input) => Enumerable.Repeat(input, 1);
|
||||
|
||||
/// <summary>
|
||||
/// Disposes the object if it implements <see cref="IDisposable" />.
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <param name="input">The object.</param>
|
||||
public static void DisposeIfDisposable(this object input)
|
||||
{
|
||||
if (input is IDisposable disposable)
|
||||
|
||||
Reference in New Issue
Block a user