Search Results for

    Guard

    NuGet NuGet NuGet License

    Getting Started

    Install the Guard package from NuGet:

    dotnet add package O9d.Guard
    

    Import the Guard Extensions into your classes:

    using O9d.Guard;
    

    Enjoy cleaner argument checking:

    public Customer(string name, PhoneNumber phone)
    {
        Name = name.NotNullOrWhiteSpace(nameof(name));
        Phone = phone.NotNull(nameof(phone));
    }
    

    To see the full list of extensions browse the API Docs.

    • Improve this Doc
    In This Article
    Back to top Generated by DocFX