83 references to IfNull
Microsoft.Extensions.AI (83)
ChatCompletion\AnonymousDelegatingChatClient.cs (3)
51_ = Throw.IfNull(sharedFunc); 88_ = Throw.IfNull(chatMessages); 126_ = Throw.IfNull(chatMessages);
ChatCompletion\CachingChatClient.cs (2)
50_ = Throw.IfNull(chatMessages); 70_ = Throw.IfNull(chatMessages);
ChatCompletion\ChatClientBuilder.cs (5)
24_ = Throw.IfNull(innerClient); 32_innerClientFactory = Throw.IfNull(innerClientFactory); 66_ = Throw.IfNull(clientFactory); 76_ = Throw.IfNull(clientFactory); 100_ = Throw.IfNull(sharedFunc);
ChatCompletion\ChatClientBuilderChatClientExtensions.cs (1)
21_ = Throw.IfNull(innerClient);
ChatCompletion\ChatClientBuilderServiceCollectionExtensions.cs (5)
32_ = Throw.IfNull(serviceCollection); 33_ = Throw.IfNull(innerClientFactory); 63_ = Throw.IfNull(serviceCollection); 64_ = Throw.IfNull(serviceKey); 65_ = Throw.IfNull(innerClientFactory);
ChatCompletion\ChatClientStructuredOutputExtensions.cs (3)
119_ = Throw.IfNull(chatClient); 120_ = Throw.IfNull(chatMessages); 121_ = Throw.IfNull(serializerOptions);
ChatCompletion\ChatCompletion{T}.cs (2)
34: base(Throw.IfNull(completion).Choices) 36_serializerOptions = Throw.IfNull(serializerOptions);
ChatCompletion\ConfigureOptionsChatClient.cs (1)
33_configureOptions = Throw.IfNull(configure);
ChatCompletion\ConfigureOptionsChatClientBuilderExtensions.cs (2)
31_ = Throw.IfNull(builder); 32_ = Throw.IfNull(configure);
ChatCompletion\DistributedCachingChatClient.cs (8)
35_storage = Throw.IfNull(storage); 42set => _jsonSerializerOptions = Throw.IfNull(value); 48_ = Throw.IfNull(key); 62_ = Throw.IfNull(key); 76_ = Throw.IfNull(key); 77_ = Throw.IfNull(value); 87_ = Throw.IfNull(key); 88_ = Throw.IfNull(value);
ChatCompletion\DistributedCachingChatClientBuilderExtensions.cs (1)
27_ = Throw.IfNull(builder);
ChatCompletion\FunctionInvokingChatClient.cs (5)
192_ = Throw.IfNull(chatMessages); 301_ = Throw.IfNull(chatMessages); 577_ = Throw.IfNull(chat); 591_ = Throw.IfNull(result); 627_ = Throw.IfNull(context);
ChatCompletion\FunctionInvokingChatClientBuilderExtensions.cs (1)
29_ = Throw.IfNull(builder);
ChatCompletion\LoggingChatClient.cs (2)
34_logger = Throw.IfNull(logger); 42set => _jsonSerializerOptions = Throw.IfNull(value);
ChatCompletion\LoggingChatClientBuilderExtensions.cs (1)
27_ = Throw.IfNull(builder);
ChatCompletion\OpenTelemetryChatClient.cs (3)
87set => _jsonSerializerOptions = Throw.IfNull(value); 124_ = Throw.IfNull(chatMessages); 155_ = Throw.IfNull(chatMessages);
ChatCompletion\OpenTelemetryChatClientBuilderExtensions.cs (1)
31Throw.IfNull(builder).Use((innerClient, services) =>
Embeddings\AnonymousDelegatingEmbeddingGenerator.cs (2)
31_ = Throw.IfNull(generateFunc); 40_ = Throw.IfNull(values);
Embeddings\CachingEmbeddingGenerator.cs (1)
31_ = Throw.IfNull(values);
Embeddings\ConfigureOptionsEmbeddingGenerator.cs (1)
40_configureOptions = Throw.IfNull(configure);
Embeddings\ConfigureOptionsEmbeddingGeneratorBuilderExtensions.cs (2)
36_ = Throw.IfNull(builder); 37_ = Throw.IfNull(configure);
Embeddings\DistributedCachingEmbeddingGenerator.cs (5)
36_ = Throw.IfNull(storage); 47_ = Throw.IfNull(value); 55_ = Throw.IfNull(key); 69_ = Throw.IfNull(key); 70_ = Throw.IfNull(value);
Embeddings\DistributedCachingEmbeddingGeneratorBuilderExtensions.cs (1)
34_ = Throw.IfNull(builder);
Embeddings\EmbeddingGeneratorBuilder.cs (5)
27_ = Throw.IfNull(innerGenerator); 35_innerGeneratorFactory = Throw.IfNull(innerGeneratorFactory); 71_ = Throw.IfNull(generatorFactory); 82_ = Throw.IfNull(generatorFactory); 101_ = Throw.IfNull(generateFunc);
Embeddings\EmbeddingGeneratorBuilderEmbeddingGeneratorExtensions.cs (1)
29_ = Throw.IfNull(innerGenerator);
Embeddings\EmbeddingGeneratorBuilderServiceCollectionExtensions.cs (5)
38_ = Throw.IfNull(serviceCollection); 39_ = Throw.IfNull(innerGeneratorFactory); 75_ = Throw.IfNull(serviceCollection); 76_ = Throw.IfNull(serviceKey); 77_ = Throw.IfNull(innerGeneratorFactory);
Embeddings\LoggingEmbeddingGenerator.cs (2)
37_logger = Throw.IfNull(logger); 45set => _jsonSerializerOptions = Throw.IfNull(value);
Embeddings\LoggingEmbeddingGeneratorBuilderExtensions.cs (1)
30_ = Throw.IfNull(builder);
Embeddings\OpenTelemetryEmbeddingGenerator.cs (1)
83_ = Throw.IfNull(values);
Embeddings\OpenTelemetryEmbeddingGeneratorBuilderExtensions.cs (1)
34Throw.IfNull(builder).Use((innerGenerator, services) =>
Functions\AIFunctionFactory.cs (6)
49_ = Throw.IfNull(method); 78_ = Throw.IfNull(method); 121_ = Throw.IfNull(method); 156_ = Throw.IfNull(method); 191_ = Throw.IfNull(method); 192_ = Throw.IfNull(options);
Functions\AIFunctionFactory.Utilities.cs (1)
21_ = Throw.IfNull(memberName);
Functions\AIFunctionFactoryCreateOptions.cs (2)
32set => _options = Throw.IfNull(value); 41set => _schemaCreateOptions = Throw.IfNull(value);