121 references to IfNull
Microsoft.Extensions.AI.Abstractions (121)
AdditionalPropertiesDictionary{TValue}.cs (2)
205_ = Throw.IfNull(items); 252private 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)
87Throw.IfNull(writer).WriteStringValue(value.Value);
ChatCompletion\ChatResponse.cs (1)
36_ = Throw.IfNull(message);
ChatCompletion\ChatResponseExtensions.cs (10)
32_ = Throw.IfNull(list); 33_ = Throw.IfNull(response); 61_ = Throw.IfNull(list); 62_ = Throw.IfNull(updates); 84_ = Throw.IfNull(list); 85_ = Throw.IfNull(update); 116_ = Throw.IfNull(list); 117_ = Throw.IfNull(updates); 139_ = Throw.IfNull(updates); 167_ = Throw.IfNull(updates);
ChatCompletion\ChatResponseFormat.cs (1)
82_ = Throw.IfNull(schemaType);
ChatCompletion\ChatRole.cs (1)
100Throw.IfNull(writer).WriteStringValue(value.Value);
ChatCompletion\DelegatingChatClient.cs (2)
29InnerClient = Throw.IfNull(innerClient); 55_ = Throw.IfNull(serviceType);
Contents\DataContent.cs (3)
69: this(Throw.IfNull(uri).ToString(), mediaType) 167_ = Throw.IfNull(stream); 214_ = Throw.IfNull(path);
Contents\FunctionApprovalRequestContent.cs (1)
28FunctionCall = Throw.IfNull(functionCall);
Contents\FunctionApprovalResponseContent.cs (1)
30FunctionCall = Throw.IfNull(functionCall);
Contents\FunctionCallContent.cs (6)
28CallId = Throw.IfNull(callId); 29Name = Throw.IfNull(name); 88_ = Throw.IfNull(encodedArguments); 89_ = Throw.IfNull(callId); 90_ = Throw.IfNull(name); 91_ = Throw.IfNull(argumentParser);
Contents\FunctionResultContent.cs (1)
30CallId = Throw.IfNull(callId);
Contents\McpServerToolApprovalRequestContent.cs (1)
28ToolCall = Throw.IfNull(toolCall);
Contents\UriContent.cs (3)
40: this(new Uri(Throw.IfNull(uri)), mediaType) 58_uri = Throw.IfNull(uri); 66set => _uri = Throw.IfNull(value);
Contents\UsageContent.cs (2)
30_details = Throw.IfNull(details); 37set => _details = Throw.IfNull(value);
Embeddings\BinaryEmbedding.cs (7)
25_vector = Throw.IfNull(vector); 33set => _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)
30InnerGenerator = 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)
108_ = Throw.IfNull(method); 177_ = Throw.IfNull(method); 266_ = Throw.IfNull(method); 345_ = Throw.IfNull(method); 486_ = Throw.IfNull(method); 514_ = Throw.IfNull(method); 515_ = Throw.IfNull(createInstanceFunc);
Functions\DelegatingAIFunction.cs (2)
26InnerFunction = Throw.IfNull(innerFunction); 63_ = Throw.IfNull(serviceType);
Functions\DelegatingAIFunctionDeclaration.cs (2)
23InnerFunction = Throw.IfNull(innerFunction); 50_ = Throw.IfNull(serviceType);
Image\DelegatingImageGenerator.cs (2)
30InnerGenerator = Throw.IfNull(innerGenerator); 53_ = Throw.IfNull(serviceType);
Image\ImageGeneratorExtensions.cs (15)
31_ = Throw.IfNull(generator); 53_ = Throw.IfNull(generator); 54_ = Throw.IfNull(serviceType); 77_ = Throw.IfNull(generator); 102_ = Throw.IfNull(generator); 103_ = Throw.IfNull(prompt); 125_ = Throw.IfNull(generator); 126_ = Throw.IfNull(originalImages); 127_ = Throw.IfNull(prompt); 149_ = Throw.IfNull(generator); 150_ = Throw.IfNull(originalImage); 151_ = Throw.IfNull(prompt); 177_ = Throw.IfNull(generator); 178_ = Throw.IfNull(fileName); 179_ = Throw.IfNull(prompt);
ResponseContinuationToken.cs (2)
63_ = Throw.IfNull(writer); 64_ = Throw.IfNull(value);
SpeechToText\DelegatingSpeechToTextClient.cs (2)
31InnerClient = Throw.IfNull(innerClient); 61_ = Throw.IfNull(serviceType);
SpeechToText\SpeechToTextClientExtensions.cs (5)
30_ = Throw.IfNull(client); 47_ = Throw.IfNull(client); 48_ = Throw.IfNull(audioSpeechContent); 69_ = Throw.IfNull(client); 70_ = Throw.IfNull(audioSpeechContent);
SpeechToText\SpeechToTextResponse.cs (1)
30_contents = Throw.IfNull(contents);
SpeechToText\SpeechToTextResponseUpdate.cs (1)
47_contents = Throw.IfNull(contents);
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
25_ = Throw.IfNull(updates); 46_ = Throw.IfNull(updates);
SpeechToText\SpeechToTextResponseUpdateKind.cs (1)
103=> Throw.IfNull(writer).WriteStringValue(value.Value);
Tools\AITool.cs (1)
45_ = Throw.IfNull(serviceType);
Tools\HostedMcpServerTool.cs (1)
84_ = Throw.IfNull(serverUrl);
UsageDetails.cs (1)
53_ = 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);