C# Класс Google.Protobuf.ProtoPreconditions

Helper methods for throwing exceptions when preconditions are not met.
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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CheckNotNull ( value, string name ) : T

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

Приватные методы

Метод Описание
CheckNotNullUnconstrained ( value, string name ) : T

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

This is equivalent to CheckNotNull{T}(T, string) but without the type parameter constraint. In most cases, the constraint is useful to prevent you from calling CheckNotNull with a value type - but it gets in the way if either you want to use it with a nullable value type, or you want to use it with an unconstrained type parameter.

Описание методов

CheckNotNull() публичный статический Метод

Throws an ArgumentNullException if the given value is null, otherwise return the value to the caller.
public static CheckNotNull ( value, string name ) : T
name string
Результат T