126 references to IfNull
Microsoft.Extensions.AI.Abstractions (126)
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)
90Throw.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)
100Throw.IfNull(writer).WriteStringValue(value.Value);
ChatCompletion\DelegatingChatClient.cs (2)
29InnerClient = Throw.IfNull(innerClient); 55_ = Throw.IfNull(serviceType);
Contents\DataContent.cs (1)
63: this(Throw.IfNull(uri).ToString(), mediaType)
Contents\FunctionApprovalRequestContent.cs (1)
27FunctionCall = Throw.IfNull(functionCall);
Contents\FunctionApprovalResponseContent.cs (1)
29FunctionCall = Throw.IfNull(functionCall);
Contents\FunctionCallContent.cs (6)
28CallId = Throw.IfNull(callId); 29Name = Throw.IfNull(name); 78_ = Throw.IfNull(encodedArguments); 79_ = Throw.IfNull(callId); 80_ = Throw.IfNull(name); 81_ = Throw.IfNull(argumentParser);
Contents\FunctionResultContent.cs (1)
30CallId = Throw.IfNull(callId);
Contents\McpServerToolApprovalRequestContent.cs (1)
27ToolCall = 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)
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)
26InnerFunction = Throw.IfNull(innerFunction); 63_ = Throw.IfNull(serviceType);
Functions\DelegatingAIFunctionDeclaration.cs (2)
23InnerFunction = Throw.IfNull(innerFunction); 50_ = Throw.IfNull(serviceType);
Image\DelegatingImageGenerator.cs (2)
29InnerGenerator = 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)
30InnerClient = 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))) 39Url = 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);