<PackageReference Include="System.Reactive" Version="5.0.0" />

SubjectBase<T>

public abstract class SubjectBase<T> : ISubject<T>, ISubject<T, T>, IObserver<T>, IObservable<T>, IDisposable
Base class for objects that are both an observable sequence as well as an observer.
using System.Runtime.CompilerServices; namespace System.Reactive.Subjects { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] public abstract class SubjectBase<[System.Runtime.CompilerServices.Nullable(2)] T> : ISubject<T>, ISubject<T, T>, IObserver<T>, IObservable<T>, IDisposable { public abstract bool HasObservers { get; } public abstract bool IsDisposed { get; } public abstract void Dispose(); public abstract void OnCompleted(); public abstract void OnError(Exception error); public abstract void OnNext(T value); public abstract IDisposable Subscribe(IObserver<T> observer); } }