Skip to content
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

SingleRange Begin/End needs to be exposed for GrainServices #2839

Merged
merged 1 commit into from
Apr 17, 2017

Conversation

jamescarter-le
Copy link
Contributor

Added ISingleRange interface to be exposed externally. Also exposed helper method NextTimeSpan from StandardExtensions as well as some helper methods in RangeFactory.

@jamescarter-le
Copy link
Contributor Author

Can be included in a 1.4.X if one of those are going out.

public static TimeSpan NextTimeSpan(this SafeRandom random, TimeSpan timeSpan)
public static TimeSpan NextTimeSpan(TimeSpan timeSpan)
{
var random = new SafeRandom();
Copy link
Contributor

Choose a reason for hiding this comment

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

This line would allocate on every call. Can we avoid that?

@sergeybykov sergeybykov added this to the 1.5.0 milestone Mar 16, 2017
@jamescarter-le
Copy link
Contributor Author

jamescarter-le commented Mar 16, 2017 via email

@sergeybykov
Copy link
Contributor

In general, we've been reluctant to expose public extension methods for BCL types, so that we don't appear to be extending functionality of those types: TimeSpan, Task, etc. The concern is that if similar functionality is added at some point to BCL, our extensions will look odd. Of course, we violated that general rule where we deemed it necessary.

In that light, I'm wondering if it's really necessary to expose StandardExtensions and SafeRandom as part of the Orleans API surface.

@jamescarter-le
Copy link
Contributor Author

jamescarter-le commented Mar 16, 2017 via email

@sergeybykov
Copy link
Contributor

Let's try that approach then. Thanks!

@jamescarter-le
Copy link
Contributor Author

@sergeybykov I have removed the change to expose the Timer extension method.

@sergeybykov sergeybykov merged commit 0179388 into dotnet:master Apr 17, 2017
@sergeybykov
Copy link
Contributor

Thank you, @jamescarter-le! Sorry about delay.

sergeybykov pushed a commit to sergeybykov/orleans that referenced this pull request May 31, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants