98 references to IfNull
Microsoft.Extensions.AI.Abstractions (98)
AdditionalPropertiesDictionary{TValue}.cs (2)
208_ = Throw.IfNull(items); 255private 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)
29_ = Throw.IfNull(list); 30_ = Throw.IfNull(response); 58_ = Throw.IfNull(list); 59_ = Throw.IfNull(updates); 81_ = Throw.IfNull(list); 82_ = Throw.IfNull(update); 112_ = Throw.IfNull(list); 113_ = Throw.IfNull(updates); 135_ = Throw.IfNull(updates); 163_ = Throw.IfNull(updates);
ChatCompletion\ChatRole.cs (1)
100Throw.IfNull(writer).WriteStringValue(value.Value);
ChatCompletion\DelegatingChatClient.cs (2)
28InnerClient = Throw.IfNull(innerClient); 54_ = Throw.IfNull(serviceType);
Contents\DataContent.cs (1)
65: this(Throw.IfNull(uri).ToString(), mediaType)
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\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)
32_ = Throw.IfNull(generator); 55_ = Throw.IfNull(generator); 56_ = Throw.IfNull(serviceType); 80_ = Throw.IfNull(generator); 140_ = Throw.IfNull(generator); 141_ = Throw.IfNull(value); 185_ = Throw.IfNull(generator); 186_ = Throw.IfNull(values);
Embeddings\GeneratedEmbeddings.cs (1)
39_embeddings = new List<TEmbedding>(Throw.IfNull(embeddings));
Functions\AIFunctionFactory.cs (7)
112_ = Throw.IfNull(method); 185_ = Throw.IfNull(method); 278_ = Throw.IfNull(method); 361_ = Throw.IfNull(method); 473_ = Throw.IfNull(method); 501_ = Throw.IfNull(method); 502_ = Throw.IfNull(createInstanceFunc);
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)
31_contents = Throw.IfNull(contents);
SpeechToText\SpeechToTextResponseUpdate.cs (1)
48_contents = Throw.IfNull(contents);
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
25_ = Throw.IfNull(updates); 65_ = 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)
44_jsonTypeInfo_ElementType = Throw.IfNull(elementTypeProperty); 56_jsonPropertyInfo_MemberName = Throw.IfNull(memberName); 71_nullableConverter_ElementConverter_Generic = Throw.IfNull(genericFieldInfo); 88_enumConverter_Options_Generic = Throw.IfNull(genericFieldInfo); 97_enumConverter_NamingPolicy_Generic = Throw.IfNull(genericFieldInfo);
UsageDetails.cs (1)
36_ = Throw.IfNull(usage);
Utilities\AIJsonSchemaTransformCache.cs (3)
38_ = Throw.IfNull(transformOptions); 62_ = Throw.IfNull(function); 73_ = Throw.IfNull(responseFormat);
Utilities\AIJsonUtilities.cs (5)
39_ = Throw.IfNull(options); 40_ = Throw.IfNull(typeDiscriminatorId); 56_ = Throw.IfNull(options); 57_ = Throw.IfNull(contentType); 58_ = Throw.IfNull(typeDiscriminatorId);
Utilities\AIJsonUtilities.Schema.Create.cs (1)
66_ = Throw.IfNull(method);
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
25_ = Throw.IfNull(transformOptions);