28 references to ArgumentException
Microsoft.Extensions.AI.Abstractions (28)
ChatCompletion\ChatResponseFormatJson.cs (1)
25Throw.ArgumentException(
Contents\DataContent.cs (1)
89Throw.ArgumentException(nameof(uri), "The provided URI is not a data URI.");
Contents\DataUriParser.cs (1)
89Throw.ArgumentException(parameterName, $"An invalid media type was specified: '{mediaType}'");
Functions\AIFunctionFactory.cs (8)
539Throw.ArgumentException(nameof(method), "Open generic methods are not supported"); 568Throw.ArgumentException(nameof(method), "Open generic methods are not supported"); 573Throw.ArgumentException(nameof(method), "The method must be an instance method."); 662Throw.ArgumentException( 670Throw.ArgumentException( 819Throw.ArgumentException("method", $"Multiple parameters are mapped to the same name '{effectiveName}'. Ensure that any {nameof(AIParameterNameAttribute)} values do not collide with each other or with other parameter names."); 915Throw.ArgumentException(nameof(parameter), "Parameter is missing a name."); 1014Throw.ArgumentException(nameof(arguments), $"The arguments dictionary is missing a value for the required parameter '{argumentName}'.");
src\Shared\Throw\Throw.cs (8)
82ArgumentException(paramName, $"Member {memberName} of {paramName} is null"); 115ArgumentException(paramName, $"Member {memberName} of {paramName} is null"); 151ArgumentException(paramName, "Argument is whitespace"); 184ArgumentException(paramName, "Argument is an empty string"); 206ArgumentException(paramName, $"Buffer too small, needed a size of {requiredSize} but got {bufferSize}"); 270ArgumentException(paramName, "Collection is empty"); 277ArgumentException(paramName, "Collection is empty"); 286ArgumentException(paramName, "Collection is empty");
Tools\HostedMcpServerTool.cs (1)
79Throw.ArgumentException(nameof(serverAddress), "The provided URL is not absolute.");
Utilities\AIJsonSchemaTransformCache.cs (1)
42Throw.ArgumentException(nameof(transformOptions), "The options instance does not specify any transformations.");
Utilities\AIJsonUtilities.cs (2)
59Throw.ArgumentException(nameof(contentType), $"The content type must derive from {nameof(AIContent)}."); 197Throw.ArgumentException(nameof(contentType), $"Cannot register built-in {nameof(AIContent)} types.");
Utilities\AIJsonUtilities.Schema.Create.cs (3)
96Throw.ArgumentException(nameof(parameter), "Parameter is missing a name."); 135Throw.ArgumentException(nameof(method), $"Multiple parameters are mapped to the same name '{parameterSchemaName}'. Ensure that any {nameof(AIParameterNameAttribute)} values do not collide with each other or with other parameter names."); 219Throw.ArgumentException(paramName ?? "schema", "The schema document must be an object or a boolean value.");
Utilities\AIJsonUtilities.Schema.Transform.cs (2)
29Throw.ArgumentException(nameof(transformOptions), "The options instance does not specify any transformations."); 192Throw.ArgumentException(nameof(schema), "Schema must be an object or a boolean value.");