BridgeComponentBase
using System;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
namespace Polly.Utils.Pipeline
{
    [System.Runtime.CompilerServices.NullableContext(1)]
    [System.Runtime.CompilerServices.Nullable(0)]
    internal abstract class BridgeComponentBase : PipelineComponent
    {
        private readonly object _strategy;
        protected BridgeComponentBase(object strategy)
        {
            _strategy = strategy;
        }
        public override ValueTask DisposeAsync()
        {
            IAsyncDisposable asyncDisposable = _strategy as IAsyncDisposable;
            if (asyncDisposable != null)
                return asyncDisposable.DisposeAsync();
            (_strategy as IDisposable)?.Dispose();
            return default(ValueTask);
        }
    }
}