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

Add optional Methods w/ CancellationToken to IStorage #9279

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Chris-Eckhardt
Copy link
Contributor

@Chris-Eckhardt Chris-Eckhardt commented Jan 8, 2025

9248

Microsoft Reviewers: Open in CodeFlow

@@ -17,7 +17,7 @@ public class CosmosGrainStorageOptions : CosmosOptions
public int InitStage { get; set; } = DEFAULT_INIT_STAGE;

/// <summary>
/// Gets or sets a value indicating whether state should be deleted when <see cref="IStorage.ClearStateAsync"/> is called.
/// Gets or sets a value indicating whether state should be deleted when <see cref="IStorage.ClearStateAsync()"/> is called.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without specifying an overload we get a CS0419 (Ambiguous reference), I could just suppress the warning...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If your change here clears up the ambiguity, then it looks good to me.

/// <returns>
/// A <see cref="Task"/> representing the operation.
/// </returns>
Task ClearStateAsync(CancellationToken cancellationToken) => Task.CompletedTask;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should call the original ClearStateAsync overload (i.e, without the CT param)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Pushed that change, Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants