Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

SessionCollectionExtensions.SetInt and GetInt don't follow the design guidelines #256

Closed
justinvp opened this issue Apr 9, 2015 · 3 comments

Comments

@justinvp
Copy link
Contributor

justinvp commented Apr 9, 2015

SessionCollectionExtensions has the following two methods:

public static class SessionCollectionExtensions
{
    public static void SetInt(this ISessionCollection session, string key, int value);
    public static int? GetInt(this ISessionCollection session, string key);

    ...
}

These method names do not follow the Framework Design Guidelines:

DO use a generic CLR type name, rather than a language-specific name, in the rare cases when an identifier has no semantic meaning beyond its type.

For example, a method converting to Int64 should be named ToInt64, not ToLong (because Int64 is a CLR name for the C#-specific alias long).

These methods should be named SetInt32 and GetInt32.

/cc @terrajobst

@Eilon
Copy link
Contributor

Eilon commented Apr 11, 2015

Agreed.

@davidfowl
Copy link
Member

@justinvp you gonna send a PR ?

@justinvp
Copy link
Contributor Author

Sure. I'll get to it later this week.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants