Skip to content

Conversation

@andy-stark-redis
Copy link
Collaborator

@andy-stark-redis andy-stark-redis commented Jul 23, 2025

DOC-5470

C# versions of the examples in the time series docs.

Note: MRange has a complicated return type, so I just used var declarations for those values (elsewhere, I've mainly used explicit types for return values from commands). Also, the code that outputs the results from MRange simplifies the output slightly, so it just returns a count of the number of data points rather than the timestamps and sample values. I think this helps to keep the example code a bit clearer, but let me know if you think that valuable detail has been lost, and I'll add it back in.

@andy-stark-redis andy-stark-redis self-assigned this Jul 23, 2025
@andy-stark-redis andy-stark-redis added the documentation Improvements or additions to documentation label Jul 23, 2025
@andy-stark-redis andy-stark-redis marked this pull request as ready for review July 23, 2025 12:16
@atakavci
Copy link
Collaborator

hey @andy-stark-redis , i agree code itself is more clear with use of var,, but as you mentioned it hides type info until you port the sample code into an IDE or view actual API.
i believe it is better declare the types explicitly and make it obvious just by looking at example.

@andy-stark-redis
Copy link
Collaborator Author

@atakavci

hey @andy-stark-redis , i agree code itself is more clear with use of var,, but as you mentioned it hides type info until you port the sample code into an IDE or view actual API. i believe it is better declare the types explicitly and make it obvious just by looking at example.

Great feedback, thanks :-) I've added the MRange return types now and tried to wrap them a bit to avoid a lot of scrolling. It's slightly non-standard formatting, but it survives dotnet format, so I figure it's OK.

Copy link
Collaborator

@atakavci atakavci left a comment

Choose a reason for hiding this comment

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

LGTM

@atakavci atakavci merged commit c6d7692 into redis:master Jul 28, 2025
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants