49 references to IfNull
Microsoft.Extensions.AI.Abstractions (49)
ChatCompletion\ChatClientExtensions.cs (9)
25_ = Throw.IfNull(client); 42_ = Throw.IfNull(client); 43_ = Throw.IfNull(chatMessage); 60_ = Throw.IfNull(client); 61_ = Throw.IfNull(chatMessage); 78_ = Throw.IfNull(client); 79_ = Throw.IfNull(chatMessage); 96_ = Throw.IfNull(client); 97_ = Throw.IfNull(chatMessage);
ChatCompletion\ChatCompletion.cs (3)
23_choices = Throw.IfNull(choices); 30_ = Throw.IfNull(message); 38set => _choices = Throw.IfNull(value);
ChatCompletion\ChatFinishReason.cs (1)
90Throw.IfNull(writer).WriteStringValue(value.Value);
ChatCompletion\ChatMessage.cs (1)
39_contents = Throw.IfNull(contents);
ChatCompletion\ChatRole.cs (1)
98Throw.IfNull(writer).WriteStringValue(value.Value);
ChatCompletion\DelegatingChatClient.cs (2)
27InnerClient = Throw.IfNull(innerClient); 55_ = Throw.IfNull(serviceType);
ChatCompletion\StreamingChatCompletionUpdateExtensions.cs (2)
37_ = Throw.IfNull(updates); 65_ = Throw.IfNull(updates);
Contents\DataContent.cs (1)
50: this(Throw.IfNull(uri).ToString(), mediaType)
Contents\FunctionCallContent.cs (6)
28CallId = Throw.IfNull(callId); 29Name = Throw.IfNull(name); 74_ = Throw.IfNull(callId); 75_ = Throw.IfNull(name); 76_ = Throw.IfNull(encodedArguments); 77_ = Throw.IfNull(argumentParser);
Contents\FunctionResultContent.cs (1)
30CallId = Throw.IfNull(callId);
Contents\UsageContent.cs (2)
30_details = Throw.IfNull(details); 37set => _details = Throw.IfNull(value);
Embeddings\DelegatingEmbeddingGenerator.cs (2)
30InnerGenerator = Throw.IfNull(innerGenerator); 50_ = Throw.IfNull(serviceType);
Embeddings\EmbeddingGeneratorExtensions.cs (5)
32_ = Throw.IfNull(generator); 99_ = Throw.IfNull(generator); 100_ = Throw.IfNull(value); 135_ = Throw.IfNull(generator); 136_ = Throw.IfNull(values);
Embeddings\GeneratedEmbeddings.cs (1)
39_embeddings = new List<TEmbedding>(Throw.IfNull(embeddings));
Functions\AIFunctionMetadata.cs (4)
56Name = Throw.IfNull(metadata).Name; 84init => _parameters = Throw.IfNull(value); 104init => _returnParameter = Throw.IfNull(value); 148init => _additionalProperties = Throw.IfNull(value);
Functions\AIFunctionParameterMetadata.cs (1)
30_ = Throw.IfNull(metadata);
Functions\AIFunctionReturnParameterMetadata.cs (1)
29Description = Throw.IfNull(metadata).Description;
UsageDetails.cs (1)
34_ = Throw.IfNull(usage);
Utilities\AIJsonUtilities.cs (5)
27_ = Throw.IfNull(options); 28_ = Throw.IfNull(typeDiscriminatorId); 44_ = Throw.IfNull(options); 45_ = Throw.IfNull(contentType); 46_ = Throw.IfNull(typeDiscriminatorId);