98 references to IfNull
Microsoft.Extensions.AI.Abstractions (98)
AdditionalPropertiesDictionary{TValue}.cs (2)
208
_ = Throw.
IfNull
(items);
255
private readonly AdditionalPropertiesDictionary<TValue> _properties = Throw.
IfNull
(properties);
ChatCompletion\ChatClientExtensions.cs (12)
27
_ = Throw.
IfNull
(client);
49
_ = Throw.
IfNull
(client);
50
_ = Throw.
IfNull
(serviceType);
73
_ = Throw.
IfNull
(client);
97
_ = Throw.
IfNull
(client);
98
_ = Throw.
IfNull
(chatMessage);
117
_ = Throw.
IfNull
(client);
118
_ = Throw.
IfNull
(chatMessage);
137
_ = Throw.
IfNull
(client);
138
_ = Throw.
IfNull
(chatMessage);
157
_ = Throw.
IfNull
(client);
158
_ = Throw.
IfNull
(chatMessage);
ChatCompletion\ChatFinishReason.cs (1)
90
Throw.
IfNull
(writer).WriteStringValue(value.Value);
ChatCompletion\ChatResponse.cs (1)
35
_ = Throw.
IfNull
(message);
ChatCompletion\ChatResponseExtensions.cs (10)
29
_ = Throw.
IfNull
(list);
30
_ = Throw.
IfNull
(response);
58
_ = Throw.
IfNull
(list);
59
_ = Throw.
IfNull
(updates);
81
_ = Throw.
IfNull
(list);
82
_ = Throw.
IfNull
(update);
112
_ = Throw.
IfNull
(list);
113
_ = Throw.
IfNull
(updates);
135
_ = Throw.
IfNull
(updates);
163
_ = Throw.
IfNull
(updates);
ChatCompletion\ChatRole.cs (1)
100
Throw.
IfNull
(writer).WriteStringValue(value.Value);
ChatCompletion\DelegatingChatClient.cs (2)
28
InnerClient = Throw.
IfNull
(innerClient);
54
_ = Throw.
IfNull
(serviceType);
Contents\DataContent.cs (1)
65
: this(Throw.
IfNull
(uri).ToString(), mediaType)
Contents\FunctionCallContent.cs (6)
28
CallId = Throw.
IfNull
(callId);
29
Name = Throw.
IfNull
(name);
78
_ = Throw.
IfNull
(encodedArguments);
79
_ = Throw.
IfNull
(callId);
80
_ = Throw.
IfNull
(name);
81
_ = Throw.
IfNull
(argumentParser);
Contents\FunctionResultContent.cs (1)
30
CallId = Throw.
IfNull
(callId);
Contents\UriContent.cs (3)
40
: this(new Uri(Throw.
IfNull
(uri)), mediaType)
58
_uri = Throw.
IfNull
(uri);
66
set => _uri = Throw.
IfNull
(value);
Contents\UsageContent.cs (2)
30
_details = Throw.
IfNull
(details);
37
set => _details = Throw.
IfNull
(value);
Embeddings\BinaryEmbedding.cs (7)
25
_vector = Throw.
IfNull
(vector);
33
set => _vector = Throw.
IfNull
(value);
47
_ = Throw.
IfNull
(typeToConvert);
48
_ = Throw.
IfNull
(options);
92
_ = Throw.
IfNull
(writer);
93
_ = Throw.
IfNull
(value);
94
_ = Throw.
IfNull
(options);
Embeddings\DelegatingEmbeddingGenerator.cs (2)
30
InnerGenerator = Throw.
IfNull
(innerGenerator);
50
_ = Throw.
IfNull
(serviceType);
Embeddings\EmbeddingGeneratorExtensions.cs (8)
32
_ = Throw.
IfNull
(generator);
55
_ = Throw.
IfNull
(generator);
56
_ = Throw.
IfNull
(serviceType);
80
_ = Throw.
IfNull
(generator);
140
_ = Throw.
IfNull
(generator);
141
_ = Throw.
IfNull
(value);
185
_ = Throw.
IfNull
(generator);
186
_ = Throw.
IfNull
(values);
Embeddings\GeneratedEmbeddings.cs (1)
39
_embeddings = new List<TEmbedding>(Throw.
IfNull
(embeddings));
Functions\AIFunctionFactory.cs (7)
112
_ = Throw.
IfNull
(method);
185
_ = Throw.
IfNull
(method);
278
_ = Throw.
IfNull
(method);
361
_ = Throw.
IfNull
(method);
473
_ = Throw.
IfNull
(method);
501
_ = Throw.
IfNull
(method);
502
_ = Throw.
IfNull
(createInstanceFunc);
SpeechToText\DelegatingSpeechToTextClient.cs (2)
30
InnerClient = Throw.
IfNull
(innerClient);
60
_ = Throw.
IfNull
(serviceType);
SpeechToText\SpeechToTextClientExtensions.cs (5)
29
_ = Throw.
IfNull
(client);
46
_ = Throw.
IfNull
(client);
47
_ = Throw.
IfNull
(audioSpeechContent);
68
_ = Throw.
IfNull
(client);
69
_ = Throw.
IfNull
(audioSpeechContent);
SpeechToText\SpeechToTextResponse.cs (1)
31
_contents = Throw.
IfNull
(contents);
SpeechToText\SpeechToTextResponseUpdate.cs (1)
48
_contents = Throw.
IfNull
(contents);
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
25
_ = Throw.
IfNull
(updates);
65
_ = Throw.
IfNull
(updates);
SpeechToText\SpeechToTextResponseUpdateKind.cs (1)
102
=> Throw.
IfNull
(writer).WriteStringValue(value.Value);
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (3)
52
_ = Throw.
IfNull
(options);
53
_ = Throw.
IfNull
(type);
72
_ = Throw.
IfNull
(typeInfo);
src\Shared\JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (5)
44
_jsonTypeInfo_ElementType = Throw.
IfNull
(elementTypeProperty);
56
_jsonPropertyInfo_MemberName = Throw.
IfNull
(memberName);
71
_nullableConverter_ElementConverter_Generic = Throw.
IfNull
(genericFieldInfo);
88
_enumConverter_Options_Generic = Throw.
IfNull
(genericFieldInfo);
97
_enumConverter_NamingPolicy_Generic = Throw.
IfNull
(genericFieldInfo);
UsageDetails.cs (1)
36
_ = Throw.
IfNull
(usage);
Utilities\AIJsonSchemaTransformCache.cs (3)
38
_ = Throw.
IfNull
(transformOptions);
62
_ = Throw.
IfNull
(function);
73
_ = Throw.
IfNull
(responseFormat);
Utilities\AIJsonUtilities.cs (5)
39
_ = Throw.
IfNull
(options);
40
_ = Throw.
IfNull
(typeDiscriminatorId);
56
_ = Throw.
IfNull
(options);
57
_ = Throw.
IfNull
(contentType);
58
_ = Throw.
IfNull
(typeDiscriminatorId);
Utilities\AIJsonUtilities.Schema.Create.cs (1)
66
_ = Throw.
IfNull
(method);
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
25
_ = Throw.
IfNull
(transformOptions);