Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exposing SingleAssignmentDisposableValue and making it ICancelable #1630

Merged
merged 4 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace System.Reactive.Disposables
/// Represents a disposable resource which only allows a single assignment of its underlying disposable resource.
/// If an underlying disposable resource has already been set, future attempts to set the underlying disposable resource will throw an <see cref="InvalidOperationException"/>.
/// </summary>
internal struct SingleAssignmentDisposableValue
public struct SingleAssignmentDisposableValue
{
private IDisposable? _current;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,12 @@ public sealed class SingleAssignmentDisposable : System.IDisposable, System.Reac
public bool IsDisposed { get; }
public void Dispose() { }
}
public struct SingleAssignmentDisposableValue
{
public System.IDisposable? Disposable { get; set; }
public bool IsDisposed { get; }
public void Dispose() { }
}
public abstract class StableCompositeDisposable : System.IDisposable, System.Reactive.Disposables.ICancelable
{
protected StableCompositeDisposable() { }
Expand Down Expand Up @@ -3152,4 +3158,4 @@ public void Start<TStateMachine>(ref TStateMachine stateMachine)
where TStateMachine : System.Runtime.CompilerServices.IAsyncStateMachine { }
public static System.Runtime.CompilerServices.TaskObservableMethodBuilder<T> Create() { }
}
}
}