Class ProtoPreconditions (3.23.0)

public static class ProtoPreconditions

Helper methods for throwing exceptions when preconditions are not met.

Inheritance

object > ProtoPreconditions

Namespace

Google.Protobuf

Assembly

Google.Protobuf.dll

Remarks

This class is used internally and by generated code; it is not particularly expected to be used from application code, although nothing prevents it from being used that way.

Methods

CheckNotNull<T>(T, string)

public static T CheckNotNull<T>(T value, string name) where T : class

Throws an ArgumentNullException if the given value is null, otherwise return the value to the caller.

Parameters
Name Description
value T
name string
Returns
Type Description
T
Type Parameter
Name Description
T