TokenHelperAppendNotNullT - метод

Appends the specified key-value pair to the dictionary if the value is not .

Definition

Пространство имён: Tessa.Tokens
Сборка: Tessa (в Tessa.dll) Версия: 4.1.3+7e2b1422f9b8c7c41fbbc4b151a843bed05319ab
C#
public static IDictionary<string, Object?> AppendNotNull<T>(
	this IDictionary<string, Object?> request,
	string key,
	T value
)

Параметры

request  IDictionaryString, Object
The dictionary to which the key-value pair will be appended.
key  String
The key under which the value will be stored in the dictionary.
value  T
The value to be stored in the dictionary. If the value is , it will not be added.

Параметры типа

T
The type of the value to be added to the dictionary.

Возвращаемое значение

IDictionaryString, Object
The updated dictionary after the key-value pair (if any) has been appended.

Примечание об использовании

В Visual Basic и C# этот метод можно вызывать как метод экземпляра для любого объекта типа IDictionaryString, Object. При вызове метода для экземпляра следует опускать первый параметр. Дополнительные сведения см. в разделе Методы расширения (Visual Basic) или Методы расширения (Руководство по программированию в C#).

Исключения

ArgumentNullExceptionThrown if the request dictionary is .

См. также