gRPC C#
gRPC C#
Namespaces
Grpc.Core.Utils
Preconditions Class
Preconditions Methods

Preconditions Class

Utility methods to simplify checking preconditions in the code.
Inheritance Hierarchy
System
Object
Grpc.Core.Utils
Preconditions

Namespace: Grpc.Core.Utils
Assembly: Grpc.Core (in Grpc.Core.dll) Version: 0.7.0.0
Syntax
C#
VB
C++
F#
Copy

    public static class Preconditions

    Public NotInheritable Class Preconditions

    public ref class Preconditions abstract sealed

    [<AbstractClassAttribute>]
    [<SealedAttribute>]
    type Preconditions =  class end

Methods

| Name | Description
--- | --- | ---
| CheckArgument(Boolean) | Throws ArgumentException if condition is false.
| CheckArgument(Boolean, String) | Throws ArgumentException with given message if condition is false.
| CheckNotNull T (T) | Throws ArgumentNullException if reference is null.
| CheckNotNull T (T, String) | Throws ArgumentNullException if reference is null.
| CheckState(Boolean) | Throws InvalidOperationException if condition is false.
| CheckState(Boolean, String) | Throws InvalidOperationException with given message if condition is false.

Top
See Also

#### Reference

Grpc.Core.Utils Namespace