35 references to IfNull
Microsoft.Extensions.AI.Abstractions (35)
ChatCompletion\ChatClientExtensions.cs (4)
26_ = Throw.IfNull(client); 27_ = Throw.IfNull(chatMessage); 44_ = Throw.IfNull(client); 45_ = Throw.IfNull(chatMessage);
ChatCompletion\ChatCompletion.cs (3)
22_choices = Throw.IfNull(choices); 29_ = Throw.IfNull(message); 37set => _choices = Throw.IfNull(value);
ChatCompletion\ChatFinishReason.cs (1)
90Throw.IfNull(writer).WriteStringValue(value.Value);
ChatCompletion\ChatMessage.cs (1)
40_contents = Throw.IfNull(contents);
ChatCompletion\ChatResponseFormat.cs (1)
37new(Throw.IfNull(schema),
ChatCompletion\ChatRole.cs (1)
98Throw.IfNull(writer).WriteStringValue(value.Value);
ChatCompletion\DelegatingChatClient.cs (1)
27InnerClient = Throw.IfNull(innerClient);
Contents\DataContent.cs (1)
49: this(Throw.IfNull(uri).ToString(), mediaType)
Contents\FunctionCallContent.cs (5)
28Name = Throw.IfNull(name); 74_ = Throw.IfNull(callId); 75_ = Throw.IfNull(name); 76_ = Throw.IfNull(encodedArguments); 77_ = Throw.IfNull(argumentParser);
Contents\FunctionResultContent.cs (5)
31CallId = Throw.IfNull(callId); 32Name = Throw.IfNull(name); 49CallId = Throw.IfNull(callId); 50Name = Throw.IfNull(name); 66: this(Throw.IfNull(functionCall).CallId, functionCall.Name, result, exception)
Contents\UsageContent.cs (2)
30_details = Throw.IfNull(details); 37set => _details = Throw.IfNull(value);
Embeddings\DelegatingEmbeddingGenerator.cs (1)
30InnerGenerator = Throw.IfNull(innerGenerator);
Embeddings\EmbeddingGeneratorExtensions.cs (2)
28_ = Throw.IfNull(generator); 29_ = Throw.IfNull(value);
Embeddings\GeneratedEmbeddings.cs (1)
37_embeddings = new List<TEmbedding>(Throw.IfNull(embeddings));
Functions\AIFunctionMetadata.cs (4)
53Name = Throw.IfNull(metadata).Name; 80init => _parameters = Throw.IfNull(value); 100init => _returnParameter = Throw.IfNull(value); 107init => _additionalProperties = Throw.IfNull(value);
Functions\AIFunctionParameterMetadata.cs (1)
30_ = Throw.IfNull(metadata);
Functions\AIFunctionReturnParameterMetadata.cs (1)
25Description = Throw.IfNull(metadata).Description;