Closed WhitWaldo closed 9 months ago
Attention: 2 lines
in your changes are missing coverage. Please review.
Comparison is base (
034de3e
) 67.28% compared to head (fada655
) 67.36%.
Files | Patch % | Lines |
---|---|---|
src/Dapr.Client/BulkStateItem.cs | 71.42% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@halspang @philliphoff is this ready for merge? just checking since there's a corresponding docs PR waiting in the wings for this :)
@hhunter-ms @halspang If Hal is ok with the last set to changes he requested (and the required merge is clean), I say merge it.
Adds overload to BulkStateItem and GetBulkStateAsync to perform SDK-based deserialization of returned values instead of strictly returning serialized strings.
Signed-off-by: Whit Waldo whit.waldo@innovian.net
Description
Explained in more detail at #1172 , but
GetBulkItemAsync
returns aBulkStateItem
with a Key, ETag and Value wherein each is typed as a string and the user is expected to deserialize the Value. Because the state might have been originally added one by one, relying on Dapr and its serialization options to serialize everything, this can cause downstream issues deserializing values not originally serialized by the developer.As such, just as
GetStateAsync
allows a type parameter to deserialize each returned value, I've added the same overload toGetBulkItemAsync
to deserialize using the same mechanism asGetStateAsync
to deserialize each of the returned items as part of an overloaded and generically-typedBulkItemState
.Issue reference
As it's a simple addition, I didn't think it really merited a lot of discussion as the functionality is already available for single items (and this just adds the same for multiple items).
Please reference the issue this PR will close: #1172
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
I'll work on finding relevant documentation and updating that right now.