Skip to content

Adding Azure Table storage and ComosDB table provider #5

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

Merged
merged 11 commits into from
Aug 22, 2018

Conversation

Jinhuafei
Copy link
Contributor

  1. Add provider for Azure table storage and CosmosDB table
  2. Update outputcache async module

@Jinhuafei Jinhuafei self-assigned this Aug 13, 2018
@Jinhuafei Jinhuafei requested a review from HongGit August 13, 2018 16:52
if (reader.Read()) {
if ((DateTime)reader["UtcExpiry"] > DateTime.Now.ToUniversalTime()) {
return BinarySerializer.Deserialize((byte[])reader["Value"]);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be sync or async operation? I see #region mentions "private sync method".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is sync code. Previous code causes deadlock under asp.net syncronizationcontext.

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this apply to all the comments below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes.

using (var connection = new SqlConnection(ConnectionString)) {
SqlExecuteNonQuery(connection, cmd);
}
return entry;
Copy link
Contributor

Choose a reason for hiding this comment

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

This one too, change from Async to sync now, it this intended?

}

private bool DoesKeyExist(string key) {
return DoesKeyExistAsync(key).GetAwaiter().GetResult();
using (var cmd = CreateDoesKeyExistCommand(key)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

}

private void RemoveEntry(string key) {
RemoveEntryAsync(key).GetAwaiter().GetResult();
using (var cmd = CreateRemoveEntryCommand(key)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

}

private void UpdateEntry(string key, object entry, DateTime utcExpiry) {
UpdateEntryAsync(key, entry, utcExpiry).GetAwaiter().GetResult();
using (var cmd = CreateUpdateEntryCommand(key, entry, utcExpiry)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

one more

@HongGit HongGit merged commit d086284 into master Aug 22, 2018
@StephenMolloy StephenMolloy deleted the cosmosdbprovider branch January 19, 2023 01:24
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