23 references to ArgumentException
Microsoft.Extensions.AI.Abstractions (23)
ChatCompletion\ChatResponseFormatJson.cs (1)
25
Throw.
ArgumentException
(
Contents\DataContent.cs (1)
85
Throw.
ArgumentException
(nameof(uri), "The provided URI is not a data URI.");
Contents\DataUriParser.cs (1)
79
Throw.
ArgumentException
(parameterName, $"An invalid media type was specified: '{mediaType}'");
Functions\AIFunctionFactory.cs (5)
477
Throw.
ArgumentException
(nameof(method), "Open generic methods are not supported");
506
Throw.
ArgumentException
(nameof(method), "Open generic methods are not supported");
511
Throw.
ArgumentException
(nameof(method), "The method must be an instance method.");
757
Throw.
ArgumentException
(nameof(parameter), "Parameter is missing a name.");
836
Throw.
ArgumentException
(nameof(arguments), $"The arguments dictionary is missing a value for the required parameter '{parameter.Name}'.");
src\Shared\Throw\Throw.cs (8)
82
ArgumentException
(paramName, $"Member {memberName} of {paramName} is null");
115
ArgumentException
(paramName, $"Member {memberName} of {paramName} is null");
151
ArgumentException
(paramName, "Argument is whitespace");
184
ArgumentException
(paramName, "Argument is an empty string");
206
ArgumentException
(paramName, $"Buffer too small, needed a size of {requiredSize} but got {bufferSize}");
270
ArgumentException
(paramName, "Collection is empty");
277
ArgumentException
(paramName, "Collection is empty");
286
ArgumentException
(paramName, "Collection is empty");
Utilities\AIJsonSchemaTransformCache.cs (1)
42
Throw.
ArgumentException
(nameof(transformOptions), "The options instance does not specify any transformations.");
Utilities\AIJsonUtilities.cs (2)
62
Throw.
ArgumentException
(nameof(contentType), "The content type must derive from AIContent.");
196
Throw.
ArgumentException
(nameof(contentType), "Cannot register built-in AI content types.");
Utilities\AIJsonUtilities.Schema.Create.cs (2)
79
Throw.
ArgumentException
(nameof(parameter), "Parameter is missing a name.");
184
Throw.
ArgumentException
(paramName ?? "schema", "The schema document must be an object or a boolean value.");
Utilities\AIJsonUtilities.Schema.Transform.cs (2)
29
Throw.
ArgumentException
(nameof(transformOptions), "The options instance does not specify any transformations.");
192
Throw.
ArgumentException
(nameof(schema), "Schema must be an object or a boolean value.");