-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: dictionary increment stub (#143)
This introduces a stub command and response object for `DictionaryIncrement`. A user interacts with a numeric dictionary value using `DictionaryIncrementAsync`. Additionally a user may reset, set, or get values using the normal `DictionarySet` and `DictionaryGet` commands, operating on string representations of integers. See the documentation for `DictionaryIncrementAsync` for examples.
- Loading branch information
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
src/Momento.Sdk/Incubating/Responses/CacheDictionaryIncrementResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Momento.Sdk.Incubating.Responses; | ||
|
||
public enum CacheDictionaryIncrementStatus | ||
{ | ||
OK, | ||
PARSE_ERROR | ||
} | ||
|
||
public class CacheDictionaryIncrementResponse | ||
{ | ||
public CacheDictionaryIncrementStatus Status { get; private set; } | ||
public long? Value { get; private set; } | ||
|
||
public CacheDictionaryIncrementResponse() | ||
{ | ||
Status = CacheDictionaryIncrementStatus.OK; | ||
Value = 42; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters