126 references to IfNull
Microsoft.Extensions.AI.Abstractions (126)
AdditionalPropertiesDictionary{TValue}.cs (2)
205
_ = Throw.
IfNull
(items);
252
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)
28
_ = Throw.
IfNull
(list);
29
_ = Throw.
IfNull
(response);
57
_ = Throw.
IfNull
(list);
58
_ = Throw.
IfNull
(updates);
80
_ = Throw.
IfNull
(list);
81
_ = Throw.
IfNull
(update);
112
_ = Throw.
IfNull
(list);
113
_ = Throw.
IfNull
(updates);
135
_ = Throw.
IfNull
(updates);
163
_ = Throw.
IfNull
(updates);
ChatCompletion\ChatResponseFormat.cs (1)
82
_ = Throw.
IfNull
(schemaType);
ChatCompletion\ChatRole.cs (1)
100
Throw.
IfNull
(writer).WriteStringValue(value.Value);
ChatCompletion\DelegatingChatClient.cs (2)
29
InnerClient = Throw.
IfNull
(innerClient);
55
_ = Throw.
IfNull
(serviceType);
Contents\DataContent.cs (1)
63
: this(Throw.
IfNull
(uri).ToString(), mediaType)
Contents\FunctionApprovalRequestContent.cs (1)
27
FunctionCall = Throw.
IfNull
(functionCall);
Contents\FunctionApprovalResponseContent.cs (1)
29
FunctionCall = Throw.
IfNull
(functionCall);
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\McpServerToolApprovalRequestContent.cs (1)
27
ToolCall = Throw.
IfNull
(toolCall);
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)
29
_ = Throw.
IfNull
(generator);
52
_ = Throw.
IfNull
(generator);
53
_ = Throw.
IfNull
(serviceType);
77
_ = Throw.
IfNull
(generator);
137
_ = Throw.
IfNull
(generator);
138
_ = Throw.
IfNull
(value);
182
_ = Throw.
IfNull
(generator);
183
_ = Throw.
IfNull
(values);
Embeddings\GeneratedEmbeddings.cs (1)
39
_embeddings = new List<TEmbedding>(Throw.
IfNull
(embeddings));
Functions\AIFunctionFactory.cs (7)
109
_ = Throw.
IfNull
(method);
182
_ = Throw.
IfNull
(method);
275
_ = Throw.
IfNull
(method);
358
_ = Throw.
IfNull
(method);
503
_ = Throw.
IfNull
(method);
531
_ = Throw.
IfNull
(method);
532
_ = Throw.
IfNull
(createInstanceFunc);
Functions\DelegatingAIFunction.cs (2)
26
InnerFunction = Throw.
IfNull
(innerFunction);
63
_ = Throw.
IfNull
(serviceType);
Functions\DelegatingAIFunctionDeclaration.cs (2)
23
InnerFunction = Throw.
IfNull
(innerFunction);
50
_ = Throw.
IfNull
(serviceType);
Image\DelegatingImageGenerator.cs (2)
29
InnerGenerator = Throw.
IfNull
(innerGenerator);
52
_ = Throw.
IfNull
(serviceType);
Image\ImageGeneratorExtensions.cs (15)
42
_ = Throw.
IfNull
(generator);
64
_ = Throw.
IfNull
(generator);
65
_ = Throw.
IfNull
(serviceType);
88
_ = Throw.
IfNull
(generator);
113
_ = Throw.
IfNull
(generator);
114
_ = Throw.
IfNull
(prompt);
136
_ = Throw.
IfNull
(generator);
137
_ = Throw.
IfNull
(originalImages);
138
_ = Throw.
IfNull
(prompt);
160
_ = Throw.
IfNull
(generator);
161
_ = Throw.
IfNull
(originalImage);
162
_ = Throw.
IfNull
(prompt);
188
_ = Throw.
IfNull
(generator);
189
_ = Throw.
IfNull
(fileName);
190
_ = Throw.
IfNull
(prompt);
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)
29
_contents = Throw.
IfNull
(contents);
SpeechToText\SpeechToTextResponseUpdate.cs (1)
46
_contents = Throw.
IfNull
(contents);
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
24
_ = Throw.
IfNull
(updates);
45
_ = 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)
42
_jsonTypeInfo_ElementType = Throw.
IfNull
(elementTypeProperty);
54
_jsonPropertyInfo_MemberName = Throw.
IfNull
(memberName);
69
_nullableConverter_ElementConverter_Generic = Throw.
IfNull
(genericFieldInfo);
86
_enumConverter_Options_Generic = Throw.
IfNull
(genericFieldInfo);
95
_enumConverter_NamingPolicy_Generic = Throw.
IfNull
(genericFieldInfo);
Tools\AITool.cs (1)
45
_ = Throw.
IfNull
(serviceType);
Tools\HostedMcpServerTool.cs (2)
25
: this(serverName, new Uri(Throw.
IfNull
(url)))
39
Url = Throw.
IfNull
(url);
UsageDetails.cs (1)
36
_ = Throw.
IfNull
(usage);
Utilities\AIJsonSchemaTransformCache.cs (3)
38
_ = Throw.
IfNull
(transformOptions);
71
_ = Throw.
IfNull
(function);
82
_ = Throw.
IfNull
(responseFormat);
Utilities\AIJsonUtilities.cs (5)
36
_ = Throw.
IfNull
(options);
37
_ = Throw.
IfNull
(typeDiscriminatorId);
53
_ = Throw.
IfNull
(options);
54
_ = Throw.
IfNull
(contentType);
55
_ = Throw.
IfNull
(typeDiscriminatorId);
Utilities\AIJsonUtilities.Schema.Create.cs (1)
79
_ = Throw.
IfNull
(method);
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
25
_ = Throw.
IfNull
(transformOptions);