-
Notifications
You must be signed in to change notification settings - Fork 351
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 bulkupdateasync #2655
add bulkupdateasync #2655
Conversation
6d21e4d
to
e7c6769
Compare
test/FunctionalTests/Tests/DataServices/UnitTests/Client.TDD.Tests/Tests/BulkUpdateE2ETests.cs
Show resolved
Hide resolved
03ea6f1
to
52487c2
Compare
test/FunctionalTests/Tests/DataServices/UnitTests/Client.TDD.Tests/Tests/BulkUpdateE2ETests.cs
Outdated
Show resolved
Hide resolved
} | ||
finally | ||
{ | ||
this.HandleCompleted(pereq); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is it getting disposed?
I see that we're disposing perReq
at some point, but looking at the source code of PerRequest.Dispose()
, it doesn't seem to be disposing it's PerRequest.Request
object. So it's still not clear to me at what point we're disposing this.bulkUpdateRequestMessage
.
test/FunctionalTests/Tests/DataServices/UnitTests/Client.TDD.Tests/Tests/BulkUpdateE2ETests.cs
Show resolved
Hide resolved
77a1b0e
to
8b9b30a
Compare
c8ddc6f
to
7725fb9
Compare
test/FunctionalTests/Tests/DataServices/UnitTests/Client.TDD.Tests/Tests/BulkUpdateE2ETests.cs
Outdated
Show resolved
Hide resolved
} | ||
finally | ||
{ | ||
this.HandleCompleted(pereq); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. It's strange that it doesn't implement IDisposable
, seems like design flaw. I wonder whether we may have any resource leaks since at least the underlying HttpClientRequestMessage
is disposable.
4ae957b
to
c0741e4
Compare
Issues
This PR adds the
BulkUpdateAsync
method. This method allows users to carry out bulk update requests asynchronously.The PR uses the
FromAsync
pattern that is currently supported in OData Client to wrap theBeginBulkUpdate
andEndBulkUpdate
methods of aBulkUpdate
operation.To the DataServiceContext, I have added the
BulkUpdateAsync
,BeginBulkUpdate
andEndBulkUpdate
methods. Within theBulkUpdateAsync
method I'm using theFromAsync
method to wrap theBeginBulkUpdate
andEndBulkUpdate
methods.Description
Briefly describe the changes of this pull request.
Checklist (Uncheck if it is not completed)
Additional work necessary
If documentation update is needed, please add "Docs Needed" label to the issue and provide details about the required document change in the issue.