75 references to IfNull
Microsoft.Extensions.AI (75)
CachingHelpers.cs (2)
30_ = Throw.IfNull(value); 31_ = Throw.IfNull(serializerOptions);
ChatCompletion\CachingChatClient.cs (2)
44_ = Throw.IfNull(chatMessages); 65_ = Throw.IfNull(chatMessages);
ChatCompletion\ChatClientBuilder.cs (3)
31var chatClient = Throw.IfNull(innerClient); 53_ = Throw.IfNull(clientFactory); 63_ = Throw.IfNull(clientFactory);
ChatCompletion\ChatClientBuilderServiceCollectionExtensions.cs (5)
22_ = Throw.IfNull(services); 23_ = Throw.IfNull(clientFactory); 40_ = Throw.IfNull(services); 41_ = Throw.IfNull(serviceKey); 42_ = Throw.IfNull(clientFactory);
ChatCompletion\ChatClientStructuredOutputExtensions.cs (3)
121_ = Throw.IfNull(chatClient); 122_ = Throw.IfNull(chatMessages); 123_ = Throw.IfNull(serializerOptions);
ChatCompletion\ChatCompletion{T}.cs (2)
34: base(Throw.IfNull(completion).Choices) 36_serializerOptions = Throw.IfNull(serializerOptions);
ChatCompletion\ConfigureOptionsChatClient.cs (1)
53_configureOptions = Throw.IfNull(configureOptions);
ChatCompletion\ConfigureOptionsChatClientBuilderExtensions.cs (2)
42_ = Throw.IfNull(builder); 43_ = Throw.IfNull(configureOptions);
ChatCompletion\DistributedCachingChatClient.cs (8)
31_storage = Throw.IfNull(storage); 39set => _jsonSerializerOptions = Throw.IfNull(value); 45_ = Throw.IfNull(key); 59_ = Throw.IfNull(key); 73_ = Throw.IfNull(key); 74_ = Throw.IfNull(value); 84_ = Throw.IfNull(key); 85_ = Throw.IfNull(value);
ChatCompletion\DistributedCachingChatClientBuilderExtensions.cs (1)
27_ = Throw.IfNull(builder);
ChatCompletion\FunctionInvokingChatClient.cs (5)
174_ = Throw.IfNull(chatMessages); 276_ = Throw.IfNull(chatMessages); 517_ = Throw.IfNull(chat); 531_ = Throw.IfNull(result); 567_ = Throw.IfNull(context);
ChatCompletion\FunctionInvokingChatClientBuilderExtensions.cs (1)
23_ = Throw.IfNull(builder);
ChatCompletion\LoggingChatClient.cs (2)
34_logger = Throw.IfNull(logger); 42set => _jsonSerializerOptions = Throw.IfNull(value);
ChatCompletion\LoggingChatClientBuilderExtensions.cs (1)
24_ = Throw.IfNull(builder);
ChatCompletion\OpenTelemetryChatClient.cs (3)
85set => _jsonSerializerOptions = Throw.IfNull(value); 112_ = Throw.IfNull(chatMessages); 143_ = Throw.IfNull(chatMessages);
ChatCompletion\OpenTelemetryChatClientBuilderExtensions.cs (1)
31Throw.IfNull(builder).Use((services, innerClient) =>
Embeddings\CachingEmbeddingGenerator.cs (1)
31_ = Throw.IfNull(values);
Embeddings\DistributedCachingEmbeddingGenerator.cs (5)
35_ = Throw.IfNull(storage); 46_ = Throw.IfNull(value); 54_ = Throw.IfNull(key); 68_ = Throw.IfNull(key); 69_ = Throw.IfNull(value);
Embeddings\DistributedCachingEmbeddingGeneratorBuilderExtensions.cs (1)
34_ = Throw.IfNull(builder);
Embeddings\EmbeddingGeneratorBuilder.cs (3)
41var embeddingGenerator = Throw.IfNull(innerGenerator); 63_ = Throw.IfNull(generatorFactory); 73_ = Throw.IfNull(generatorFactory);
Embeddings\EmbeddingGeneratorBuilderServiceCollectionExtensions.cs (5)
25_ = Throw.IfNull(services); 26_ = Throw.IfNull(generatorFactory); 46_ = Throw.IfNull(services); 47_ = Throw.IfNull(serviceKey); 48_ = Throw.IfNull(generatorFactory);
Embeddings\LoggingEmbeddingGenerator.cs (2)
37_logger = Throw.IfNull(logger); 45set => _jsonSerializerOptions = Throw.IfNull(value);
Embeddings\LoggingEmbeddingGeneratorBuilderExtensions.cs (1)
27_ = Throw.IfNull(builder);
Embeddings\OpenTelemetryEmbeddingGenerator.cs (1)
78_ = Throw.IfNull(values);
Embeddings\OpenTelemetryEmbeddingGeneratorBuilderExtensions.cs (1)
34Throw.IfNull(builder).Use((services, innerGenerator) =>
Functions\AIFunctionFactory.cs (6)
33_ = Throw.IfNull(method); 46_ = Throw.IfNull(method); 73_ = Throw.IfNull(method); 92_ = Throw.IfNull(method); 127_ = Throw.IfNull(method); 128_ = Throw.IfNull(options);
Functions\AIFunctionFactory.Utilities.cs (1)
21_ = Throw.IfNull(memberName);
Functions\AIFunctionFactoryCreateOptions.cs (1)
31set => _options = Throw.IfNull(value);
Utilities\AIJsonUtilities.Schema.cs (5)
64_ = Throw.IfNull(parameterMetadata); 65_ = Throw.IfNull(functionMetadata); 107_ = Throw.IfNull(parameterName); 141_ = Throw.IfNull(serializerOptions); 181_ = Throw.IfNull(options);