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

Create a way of simplifying guard clauses #804

Closed
hikalkan opened this issue Jan 17, 2016 · 0 comments
Closed

Create a way of simplifying guard clauses #804

hikalkan opened this issue Jan 17, 2016 · 0 comments
Labels
Milestone

Comments

@hikalkan
Copy link
Member

hikalkan commented Jan 17, 2016

There are several approaches. I want to prefer static methods. Example:

Instead of this one;

public NotificationDefinition(string name)
{
    if (name == null)
    {
        throw new ArgumentNullException("name");
    }

    Name = name;
}

We can use this one:

public NotificationDefinition(string name)
{
    Check.NotNull(name, nameof(name));

    Name = name;
}

I think ABP should include this, since it's fairly common for all applications.

@hikalkan hikalkan added this to the ABP v1.0.0 milestone Jan 17, 2016
@hikalkan hikalkan modified the milestones: v1.0.0, v1.1.0 Sep 10, 2016
@hikalkan hikalkan modified the milestones: v1.1.0, v1.2.0 Nov 10, 2016
@hikalkan hikalkan modified the milestones: v1.3.0, v1.2.0 Dec 27, 2016
@hikalkan hikalkan modified the milestones: v1.3.0, v1.4.0 Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant