13 types derived from ArgumentException
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\ToolArgumentException.cs (1)
12internal class ToolArgumentException : ArgumentException
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\Framework\System\ComponentModel\InvalidEnumArgumentException.cs (1)
12public class InvalidEnumArgumentException : ArgumentException
ToolArgumentException.cs (1)
10internal class ToolArgumentException : ArgumentException
System.ComponentModel.Primitives (2)
System\ComponentModel\InvalidAsynchronousStateException.cs (1)
16public class InvalidAsynchronousStateException : ArgumentException
System\ComponentModel\InvalidEnumArgumentException.cs (1)
15public class InvalidEnumArgumentException : ArgumentException
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (1)
16public class ArgumentNullException : ArgumentException
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (1)
18public class ArgumentOutOfRangeException : ArgumentException
src\libraries\System.Private.CoreLib\src\System\DuplicateWaitObjectException.cs (1)
15public class DuplicateWaitObjectException : ArgumentException
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureNotFoundException.cs (1)
12public class CultureNotFoundException : ArgumentException
src\libraries\System.Private.CoreLib\src\System\Text\DecoderExceptionFallback.cs (1)
74public sealed class DecoderFallbackException : ArgumentException
src\libraries\System.Private.CoreLib\src\System\Text\EncoderExceptionFallback.cs (1)
73public sealed class EncoderFallbackException : ArgumentException
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexParseException.cs (1)
19sealed class RegexParseException : ArgumentException
System.Text.RegularExpressions.Generator (1)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParseException.cs (1)
19sealed class RegexParseException : ArgumentException
7672 instantiations of ArgumentException
aspire (4)
Backchannel\ExtensionBackchannel.cs (1)
159throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, ErrorStrings.InvalidSocketPath, endpoint));
src\Shared\CircularBuffer.cs (2)
33throw new ArgumentException("Circular buffer must have a capacity greater than 0.", nameof(capacity)); 229throw new ArgumentException("Array does not contain enough space for items");
Templating\TemplateProvider.cs (1)
16throw new ArgumentException(TemplatingStrings.AtLeastOneTemplateFactoryMustBeProvided, nameof(factories));
Aspire.Azure.Messaging.EventHubs (3)
src\Shared\StableConnectionStringBuilder.cs (3)
198throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString)); 203throw new ArgumentException($"Duplicate key in connection string: '{key}'", nameof(connectionString)); 216throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString));
Aspire.Azure.Messaging.ServiceBus (3)
src\Shared\StableConnectionStringBuilder.cs (3)
198throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString)); 203throw new ArgumentException($"Duplicate key in connection string: '{key}'", nameof(connectionString)); 216throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString));
Aspire.Azure.Messaging.WebPubSub (3)
src\Shared\StableConnectionStringBuilder.cs (3)
198throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString)); 203throw new ArgumentException($"Duplicate key in connection string: '{key}'", nameof(connectionString)); 216throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString));
Aspire.Confluent.Kafka (4)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\OpenTelemetryConsumeResultExtensions.cs (1)
89throw new ArgumentException("Invalid consumer type.", nameof(consumer));
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\Guard.cs (3)
82throw new ArgumentException("Must not be null or empty", paramName); 99throw new ArgumentException("Must not be null or whitespace", paramName); 116throw new ArgumentException(message, paramName);
Aspire.Dashboard (4)
Otlp\Storage\TelemetryRepository.cs (1)
1173throw new ArgumentException("Span has no SpanId");
src\Shared\CircularBuffer.cs (2)
33throw new ArgumentException("Circular buffer must have a capacity greater than 0.", nameof(capacity)); 229throw new ArgumentException("Array does not contain enough space for items");
Utils\FormatHelpers.cs (1)
132_ => throw new ArgumentException("Unexpected value.", nameof(maxDecimalPlaces))
Aspire.EndToEnd.Tests (13)
IntegrationServicesFixture.cs (3)
97throw new ArgumentException($"Only one resource is supported at a time. resource: {resource}"); 104_ => throw new ArgumentException($"Unknown resource: {resource}") 137_ => throw new ArgumentException($"Unknown test scenario '{TestScenario}'")
tests\Shared\TemplatesTesting\BuildEnvironment.cs (6)
108throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 131throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 140throw new ArgumentException($"Environment variable SDK_FOR_TEMPLATES_TESTING_PATH is unset"); 146throw new ArgumentException($"Cannot find base directory for SDK_FOR_TEMPLATES_TESTING_PATH - {baseDir}"); 154throw new ArgumentException($"Cannot find 'BUILT_NUGETS_PATH={EnvironmentVariables.BuiltNuGetsPath}' or {BuiltNuGetsPath}"); 161throw new ArgumentException($"Cannot find TestAssetsPath={TestAssetsPath}");
tests\Shared\TemplatesTesting\DotNetNewCommand.cs (1)
23throw new ArgumentException("No custom hive directory was provided, and the BuildEnvironment does not have one set either");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (2)
91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}"); 95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
tests\testproject\Common\TestResourceNames.cs (1)
30throw new ArgumentException($"Unknown resource name: {resourceName}");
Aspire.Hosting (26)
ApplicationModel\AspireStore.cs (1)
26throw new ArgumentException($"An absolute path is required: '${basePath}'", nameof(basePath));
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (2)
27throw new ArgumentException($"Name '{value}' must be a simple file or folder name and not include any path separators (eg, / or \\). To specify parent folders, use one or more ContainerDirectory entries.", nameof(value)); 182throw new ArgumentException($"A search pattern was specified, but the given path '{fullPath}' is a file. Search patterns are only valid for directories.", nameof(searchPattern));
ApplicationModel\ContainerMountAnnotation.cs (2)
33throw new ArgumentException(Resources.ContainerMountBindMountsRequireRootedPaths, nameof(source)); 39throw new ArgumentException(Resources.ContainerMountAnonymousVolumesReadOnlyExceptionMessage, nameof(isReadOnly));
ApplicationModel\IInteractionService.cs (1)
219throw new ArgumentException("Error message cannot be null or empty.", nameof(errorMessage));
ApplicationModel\ModelName.cs (1)
29throw new ArgumentException(validationMessage, nameof(name));
Dashboard\DashboardServiceHost.cs (1)
161throw new ArgumentException($"{ResourceServiceUrlVariableName} must contain a local loopback address.");
Dcp\DcpNameGenerator.cs (1)
101throw new ArgumentException($"Could not generate a unique name for service '{candidateName}'");
Dcp\Model\Container.cs (5)
246throw new ArgumentException("Port protocol value must be 'TCP' or 'UDP'"); 260throw new ArgumentException("Supported protocols are TCP and UDP"); 273throw new ArgumentException("Supported protocols are TCP and UDP"); 344_ => throw new ArgumentException("Unknown file system entry type") 363throw new ArgumentException("Both SourcePath and Contents are set for a file entry");
Dcp\ResourceLogSource.cs (1)
25throw new ArgumentException("Cancellation token must be cancellable in order to prevent leaking resources.", nameof(cancellationToken));
ExternalServiceBuilderExtensions.cs (2)
33throw new ArgumentException($"The external service URL '{url}' is invalid: {message}", nameof(url)); 171throw new ArgumentException($"The path '{path}' is not a valid relative URL.", nameof(path));
ExternalServiceResource.cs (3)
86return new ArgumentException("The URI for the external service must be absolute.", nameof(uri)); 90return new ArgumentException("The URI absolute path must be \"/\".", nameof(uri)); 94return new ArgumentException("The URI cannot contain a fragment.", nameof(uri));
ParameterResourceBuilderExtensions.cs (1)
78throw new ArgumentException("A parameter cannot be both secret and published as a default value.", nameof(secret));
src\Shared\CircularBuffer.cs (2)
33throw new ArgumentException("Circular buffer must have a capacity greater than 0.", nameof(capacity)); 229throw new ArgumentException("Array does not contain enough space for items");
Utils\PasswordGenerator.cs (2)
79void ThrowArgumentException() => throw new ArgumentException($"'{minValueParamName}' must be 0 if '{enabledParamName}' is disabled."); 114(false, false, false, false) => throw new ArgumentException("At least one character type must be enabled.")
VolumeNameGenerator.cs (1)
25throw new ArgumentException($"The suffix '{suffix}' contains invalid characters. It must match [a-zA-Z0-9][a-zA-Z0-9_.-]*.", nameof(suffix));
Aspire.Hosting.Analyzers (1)
src\Aspire.Hosting\ApplicationModel\ModelName.cs (1)
29throw new ArgumentException(validationMessage, nameof(name));
Aspire.Hosting.Azure.AppContainers (1)
ContainerAppExtensions.cs (1)
66throw new ArgumentException("Cannot configure custom domain when resource is not parented by ResourceModuleConstruct.", nameof(app));
Aspire.Hosting.Azure.CosmosDB (9)
AzureCosmosDBContainerResource.cs (4)
33throw new ArgumentException("At least one partition key path should be provided.", nameof(partitionKeyPaths)); 37throw new ArgumentException("Partition key paths cannot contain null or empty strings.", nameof(partitionKeyPaths)); 93throw new ArgumentException("At least one partition key path should be provided.", nameof(value)); 97throw new ArgumentException("Partition key paths cannot contain null or empty strings.", nameof(value));
AzureCosmosDBExtensions.cs (2)
298throw new ArgumentException("At least one partition key path should be provided.", nameof(partitionKeyPaths)); 303throw new ArgumentException("Partition key paths cannot contain null or empty strings.", nameof(partitionKeyPaths));
src\Shared\StableConnectionStringBuilder.cs (3)
198throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString)); 203throw new ArgumentException($"Duplicate key in connection string: '{key}'", nameof(connectionString)); 216throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString));
Aspire.Hosting.Azure.KeyVault (2)
AzureKeyVaultResourceExtensions.cs (2)
291throw new ArgumentException("Secret name cannot be longer than 127 characters.", nameof(secretName)); 296throw new ArgumentException("Secret name can only contain ASCII letters (a-z, A-Z), digits (0-9), and dashes (-).", nameof(secretName));
Aspire.Hosting.Azure.Tests (2)
AzureManifestUtils.cs (2)
34throw new ArgumentException("Specified resource does not contain a path property.", nameof(resource)); 39throw new ArgumentException("Path node in resource is null, empty, or does not exist.", nameof(resource));
Aspire.Hosting.Docker (3)
EnvVarEscaper.cs (3)
37throw new ArgumentException("Input string exceeds maximum allowed length", nameof(input)); 208throw new ArgumentException("Variable content exceeds maximum allowed length"); 273throw new ArgumentException("Variable content exceeds maximum allowed length");
Aspire.Hosting.Python (2)
PythonAppResourceBuilderExtensions.cs (1)
189throw new ArgumentException($"Array params contains empty item: [{values}]", nameof(scriptArgs));
PythonProjectResourceBuilderExtensions.cs (1)
192throw new ArgumentException($"Array params contains empty item: [{values}]", nameof(scriptArgs));
Aspire.Hosting.Testing (6)
DistributedApplicationFactory.cs (1)
164throw new ArgumentException($"Array params contains empty item: [{values}]", nameof(args));
DistributedApplicationHostingTestingExtensions.cs (4)
52throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.ResourceDoesNotExposeConnectionStringExceptionMessage, resourceName), nameof(resourceName)); 85throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.ResourceNotFoundExceptionMessage, resourceName), nameof(resourceName)); 96throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.ResourceHasNoAllocatedEndpointsExceptionMessage, resourceName), nameof(resourceName)); 111throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.EndpointForResourceNotFoundExceptionMessage, endpointName, resourceName), nameof(endpointName));
DistributedApplicationTestingBuilder.cs (1)
170throw new ArgumentException($"Array params contains empty item: [{values}]", nameof(args));
Aspire.Hosting.Testing.Tests (1)
tests\testproject\Common\TestResourceNames.cs (1)
30throw new ArgumentException($"Unknown resource name: {resourceName}");
Aspire.Hosting.Tests (6)
Dcp\TestKubernetesService.cs (2)
54throw new ArgumentException($"Resource '{namespaceParameter ?? ""}/{name}' not found"); 195throw new ArgumentException($"Resource '{obj.Metadata.NamespaceProperty}/{obj.Metadata.Name}' not found");
SlimTestProgramTests.cs (1)
35var app = testProgram.App ?? throw new ArgumentException("TestProgram.App is null");
src\Shared\StableConnectionStringBuilder.cs (3)
198throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString)); 203throw new ArgumentException($"Duplicate key in connection string: '{key}'", nameof(connectionString)); 216throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString));
Aspire.Hosting.Yarp (5)
ConfigurationBuilder\YarpCluster.cs (1)
82_ => throw new ArgumentException("Cannot find a http or https endpoint for this resource.", nameof(resource))
YarpJsonConfigGeneratorBuilder.cs (4)
34throw new ArgumentException("Configuring programmatically clusters while providing a configuration file isn't supported"); 44throw new ArgumentException("Configuring programmatically routes while providing a configuration file isn't supported"); 54throw new ArgumentException("Providing a configuration file isn't supported when configuring routes and clusters programmatically"); 156throw new ArgumentException("Invalid parameter", nameof(name));
Aspire.Microsoft.Azure.Cosmos (3)
src\Shared\StableConnectionStringBuilder.cs (3)
198throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString)); 203throw new ArgumentException($"Duplicate key in connection string: '{key}'", nameof(connectionString)); 216throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString));
Aspire.Microsoft.Data.SqlClient (3)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (3)
80throw new ArgumentException("Must not be null or empty", paramName); 97throw new ArgumentException("Must not be null or whitespace", paramName); 114throw new ArgumentException(message, paramName);
Aspire.Microsoft.EntityFrameworkCore.Cosmos (3)
src\Shared\StableConnectionStringBuilder.cs (3)
198throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString)); 203throw new ArgumentException($"Duplicate key in connection string: '{key}'", nameof(connectionString)); 216throw new ArgumentException($"Invalid segment in connection string: '{part}'", nameof(connectionString));
Aspire.Microsoft.EntityFrameworkCore.SqlServer (3)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (3)
80throw new ArgumentException("Must not be null or empty", paramName); 97throw new ArgumentException("Must not be null or whitespace", paramName); 114throw new ArgumentException(message, paramName);
Aspire.Playground.Tests (3)
src\Aspire.Hosting\Utils\PasswordGenerator.cs (2)
79void ThrowArgumentException() => throw new ArgumentException($"'{minValueParamName}' must be 0 if '{enabledParamName}' is disabled."); 114(false, false, false, false) => throw new ArgumentException("At least one character type must be enabled.")
tests\Aspire.TestUtilities\RequiresToolsAttribute.cs (1)
17throw new ArgumentException("At least one executable must be provided", nameof(executablesOnPath));
Aspire.StackExchange.Redis (3)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\Guard.cs (3)
88throw new ArgumentException("Must not be null or empty", paramName); 105throw new ArgumentException("Must not be null or whitespace", paramName); 122throw new ArgumentException(message, paramName);
Aspire.Templates.Tests (9)
tests\Shared\TemplatesTesting\BuildEnvironment.cs (6)
108throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 131throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 140throw new ArgumentException($"Environment variable SDK_FOR_TEMPLATES_TESTING_PATH is unset"); 146throw new ArgumentException($"Cannot find base directory for SDK_FOR_TEMPLATES_TESTING_PATH - {baseDir}"); 154throw new ArgumentException($"Cannot find 'BUILT_NUGETS_PATH={EnvironmentVariables.BuiltNuGetsPath}' or {BuiltNuGetsPath}"); 161throw new ArgumentException($"Cannot find TestAssetsPath={TestAssetsPath}");
tests\Shared\TemplatesTesting\DotNetNewCommand.cs (1)
23throw new ArgumentException("No custom hive directory was provided, and the BuildEnvironment does not have one set either");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (2)
91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}"); 95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
Aspire.TestUtilities (1)
RequiresToolsAttribute.cs (1)
17throw new ArgumentException("At least one executable must be provided", nameof(executablesOnPath));
BoundTreeGenerator (26)
BoundNodeClassWriter.cs (26)
161throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 213throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 230throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 246throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 272throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 322throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 340throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 384throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 555throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 655throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 790throw new ArgumentException($"Field '{fieldName}' on node '{node.Name}' should have a nullable type, since it isn't a value type and it is marked null=allow or null=always"); 806throw new ArgumentException("Unexpected value", nameof(f.Null)); 875throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 900throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 952throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1176throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1234throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1362throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1489throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1679throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1723throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1755throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1790throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1867throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1885throw new ArgumentException("Unexpected target language", nameof(_targetLang)); 1900throw new ArgumentException("Unexpected target language", nameof(_targetLang));
ClientSample (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
CodeGenerator (1)
HttpUtilities\HttpUtilities.cs (1)
251throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "MethodAsciiString {0} length is greather than {1}", method, length));
ConfigurationSchemaGenerator (2)
RuntimeSource\Configuration.Binder\Specs\InterceptorInfo.cs (1)
176throw new ArgumentException(InvalidInvocationErrMsg, nameof(invocation));
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Crossgen2Tasks (3)
CommonFilePulledFromSdkRepo\LogAdapter.cs (1)
76throw new ArgumentException(
CommonFilePulledFromSdkRepo\Logger.cs (2)
126throw new ArgumentException( 135throw new ArgumentException(
csc (1)
src\Compilers\Shared\BuildProtocol.cs (1)
134throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
DemoConsole (2)
CustomControls\CustomButtonDesignerActionList.cs (1)
91throw new ArgumentException($"Property {propertyName} not found in {nameof(CustomButton)}");
NameCreationService.cs (1)
94throw new ArgumentException($"Invalid name: {name}");
dotnet-dev-certs (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
dotnet-getdocument (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
dotnet-openapi (14)
Commands\AddProjectCommand.cs (1)
49throw new ArgumentException($"{SourceProjectArgName} of '{sourceFile}' was not valid. Valid values must be project file(s)");
Commands\BaseCommand.cs (9)
104throw new ArgumentException($"The project '{project}' does not exist."); 112throw new ArgumentException("No project files were found in the current directory. Either move to a new directory or provide the project explicitly"); 116throw new ArgumentException("More than one project was found in this directory, either remove a duplicate or explicitly provide the project."); 218throw new ArgumentException("dotnet was not found on the path."); 235throw new ArgumentException($"Adding package `{packageId}` to `{projectFile.Directory}` took longer than {timeout} seconds."); 251throw new ArgumentException($"Adding package `{packageId}` to `{projectFile.Directory}` returned ExitCode `{process.ExitCode}` and gave error `{error}` and output `{output}`"); 286throw new ArgumentException($"The given url returned '{response.StatusCode}', indicating failure. The url might be wrong, or there might be a networking issue."); 432throw new ArgumentException($"Invalid value '{value}' given as code generator."); 518throw new ArgumentException($"File '{destinationPath}' already exists. Aborting to avoid conflicts. Provide the '--output-file' argument with an unused file to resolve.");
Commands\RefreshCommand.cs (2)
53throw new ArgumentException("There was no OpenAPI reference to refresh with the given URL."); 62throw new ArgumentException("'dotnet openapi refresh' must be given a URL");
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
dotnet-sql-cache (3)
Program.cs (1)
268throw new ArgumentException(
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
dotnet-svcutil.xmlserializer (8)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (6)
176throw new ArgumentException(SR.Format(SR.ErrSwitchMissing, arg)); 187throw new ArgumentException(SR.Format(SR.ErrUnexpectedDelimiter)); 215throw new ArgumentException(SR.Format(SR.ErrUnknownSwitch, arg.ToLower(CultureInfo.InvariantCulture))); 223throw new ArgumentException(SR.Format(SR.ErrUnexpectedValue, arg.ToLower(CultureInfo.InvariantCulture))); 228throw new ArgumentException(SR.Format(SR.ErrExpectedValue, arg.ToLower(CultureInfo.InvariantCulture))); 235throw new ArgumentException(SR.Format(SR.ErrSingleUseSwitch, arg.ToLower(CultureInfo.InvariantCulture)));
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
440throw new ArgumentException("Invalid smreference value"); 473throw new ArgumentException("Need to pass the System.ServiceModel.Primitives.dll path through the 'smreference' parameter.");
dotnet-svcutil-lib (342)
CodeDomFixup\ConfigToCode.cs (1)
450throw new ArgumentException(SR.NotClientBaseType);
FrameworkFork\Microsoft.CodeDom\Compiler\CodeGenerator.cs (5)
824throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1143throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1803throw new ArgumentException(string.Format(SRCodeDom.InvalidPrimitiveType, e.Value.GetType().ToString())); 1911throw new ArgumentException(string.Format(SRCodeDom.Argument_NullComment, "e"), "e"); 2165throw new ArgumentException(string.Format(SRCodeDom.InvalidIdentifier, value));
FrameworkFork\Microsoft.CodeDom\Compiler\CodeValidator.cs (10)
62throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 99throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 500throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 701throw new ArgumentException(string.Format(SRCodeDom.ArityDoesntMatch, baseType, e.TypeArguments.Count)); 710throw new ArgumentException(message, "typeName"); 719throw new ArgumentException(message, "identifier"); 833throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1019throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1025throw new ArgumentException(string.Format(SRCodeDom.InvalidPathCharsInChecksum, e.FileName)); 1031throw new ArgumentException(string.Format(SRCodeDom.InvalidRegion, e.RegionText));
FrameworkFork\Microsoft.CodeDom\Compiler\TempFiles.cs (3)
104throw new ArgumentException(string.Format(SRCodeDom.InvalidNullEmptyArgument, "fileExtension"), "fileExtension"); // fileExtension not specified 116throw new ArgumentException(string.Format(SRCodeDom.InvalidNullEmptyArgument, "fileName"), "fileName"); // fileName not specified 119throw new ArgumentException(string.Format(SRCodeDom.DuplicateFileName, fileName), "fileName"); // duplicate fileName
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (5)
1219throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1405throw new ArgumentException(string.Format(SRCodeDom.InvalidPrimitiveType, e.Value.GetType().ToString())); 1588throw new ArgumentException(string.Format(SRCodeDom.Argument_NullComment, "e"), "e"); 1969throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 3641throw new ArgumentException(string.Format(SRCodeDom.InvalidIdentifier, value));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlCharCheckingWriter.cs (8)
143throw new ArgumentException(ResXml.Xml_EmptyLocalName); 161throw new ArgumentException(ResXml.Xml_EmptyLocalName); 254throw new ArgumentException(string.Format(ResXml.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(ws, i))); 326throw new ArgumentException(ResXml.Xml_EmptyName); 369throw new ArgumentException(ResXml.Xml_EmptyName); 374throw new ArgumentException(string.Format(len == 0 ? ResXml.Xml_BadStartNameChar : ResXml.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(ncname, len))); 382throw new ArgumentException(ResXml.Xml_EmptyName); 389throw new ArgumentException(string.Format(res, XmlException.BuildCharExceptionArgs(name, len)));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlEncodedRawTextWriter.cs (3)
1527throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar); 1733throw new ArgumentException(string.Format(ResXml.Xml_IndentCharsNotWhitespace, propertyName)); 1780throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharsInIndent, new string[] { propertyName, error }));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReader.cs (1)
1926throw new ArgumentException(ResXml.XmlBinary_NoParserContext, "inputContext");
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReaderSettings.cs (1)
430throw new ArgumentException(ResXml.XmlConvert_BadUri, "inputUri");
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextEncoder.cs (3)
224throw new ArgumentException(ResXml.Xml_SurrogatePairSplit); 457throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar); 517throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (2)
585throw new ArgumentException(ResXml.Xml_EmptyUrl, "url"); 8295throw new ArgumentException((_incReadDecoder is IncrementalReadCharsDecoder) ? "count" : "len");
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextWriter.cs (26)
345throw new ArgumentException(ResXml.Xml_InvalidIndentation); 365throw new ArgumentException(ResXml.Xml_InvalidQuote); 397throw new ArgumentException(ResXml.Xml_ClosedOrError); 401throw new ArgumentException(ResXml.Xml_NoRoot); 475throw new ArgumentException(ResXml.Xml_UndefPrefix); 518throw new ArgumentException(ResXml.Xml_NoNamespaces); 584throw new ArgumentException(ResXml.Xml_XmlnsBelongsToReservedNs); 603throw new ArgumentException(ResXml.Xml_XmlnsBelongsToReservedNs); 615throw new ArgumentException(ResXml.Xml_UndefPrefix); 656throw new ArgumentException(ResXml.Xml_NoNamespaces); 707throw new ArgumentException(ResXml.Xml_InvalidCDataChars); 731throw new ArgumentException(ResXml.Xml_InvalidCommentChars); 755throw new ArgumentException(ResXml.Xml_InvalidPiChars); 759throw new ArgumentException(ResXml.Xml_DupXmlDecl); 814throw new ArgumentException(ResXml.Xml_NonWhitespace); 1033throw new ArgumentException(string.Format(ResXml.Xml_UndefNamespace, ns)); 1047throw new ArgumentException(ResXml.Xml_NoNamespaces); 1063throw new ArgumentException(ResXml.Xml_EmptyName); 1113throw new ArgumentException(ResXml.Xml_EmptyName); 1117throw new ArgumentException(string.Format(ResXml.Xml_InvalidNameChars, name)); 1415throw new ArgumentException(ResXml.Xml_CanNotBindToReservedNamespace); 1442throw new ArgumentException(ResXml.Xml_PrefixForEmptyNs); 1627throw new ArgumentException(ResXml.Xml_EmptyName); 1677throw new ArgumentException(string.Format(ResXml.Xml_InvalidNameChars, name)); 1701throw new ArgumentException(string.Format(ResXml.Xml_InvalidXmlSpace, value)); 1724throw new ArgumentException(ResXml.Xml_InvalidPrefix);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlUtf8RawTextWriter.cs (3)
1375throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar); 1613throw new ArgumentException(string.Format(ResXml.Xml_IndentCharsNotWhitespace, propertyName)); 1660throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharsInIndent, new string[] { propertyName, error }));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlValidatingReaderImpl.cs (2)
144throw new ArgumentException(ResXml.Arg_ExpectingXmlTextReader, "reader"); 226throw new ArgumentException(ResXml.Arg_ExpectingXmlTextReader, "reader");
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWellformedWriter.cs (28)
361throw new ArgumentException(ResXml.Xml_NoRoot); 381throw new ArgumentException(ResXml.Xml_EmptyName); 412throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), "pubid"); 419throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), "sysid"); 426throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), "subset"); 449throw new ArgumentException(ResXml.Xml_EmptyLocalName); 476throw new ArgumentException(ResXml.Xml_PrefixForEmptyNs); 640throw new ArgumentException(ResXml.Xml_EmptyLocalName); 679throw new ArgumentException(ResXml.Xml_XmlnsPrefix); 702throw new ArgumentException(ResXml.Xml_XmlnsPrefix); 712throw new ArgumentException(ResXml.Xml_XmlPrefix); 808throw new ArgumentException(ResXml.Xml_PrefixForEmptyNs); 812throw new ArgumentException(ResXml.Xml_CanNotBindToReservedNamespace); 852throw new ArgumentException(string.Format(ResXml.Xml_InvalidXmlSpace, value)); 924throw new ArgumentException(ResXml.Xml_EmptyName); 939throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? ResXml.Xml_DupXmlDecl : ResXml.Xml_CannotWriteXmlDecl); 975throw new ArgumentException(ResXml.Xml_EmptyName); 1002throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar); 1058throw new ArgumentException(ResXml.Xml_NonWhitespace); 1368throw new ArgumentException(ResXml.Xml_EmptyLocalName); 1381throw new ArgumentException(string.Format(ResXml.Xml_UndefNamespace, ns)); 1716throw new ArgumentException(ResXml.Xml_XmlPrefix); 1726throw new ArgumentException(ResXml.Xml_XmlnsPrefix); 1743throw new ArgumentException(string.Format(ResXml.Xml_NamespaceDeclXmlXmlns, prefix)); 1827throw new ArgumentException(string.Format(ResXml.Xml_NamespaceDeclXmlXmlns, prefix)); 1835throw new ArgumentException(ResXml.Xml_XmlPrefix); 1840throw new ArgumentException(ResXml.Xml_XmlnsPrefix); 2190return new ArgumentException(string.Format(ResXml.Xml_InvalidNameCharsDetail, args));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWriter.cs (2)
243throw new ArgumentException(ResXml.Xml_EmptyName); 263throw new ArgumentException(string.Format(ResXml.Xml_UndefNamespace, ns));
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentXPathNavigator.cs (1)
1275throw new ArgumentException(string.Format(ResXml.XPathDocument_SchemaSetNotAllowed, null));
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlAttribute.cs (1)
30throw new ArgumentException(ResXml.Xdom_Attr_Name);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlAttributeCollection.cs (7)
118throw new ArgumentException(ResXml.Xdom_AttrCol_Object); 137throw new ArgumentException(ResXml.Xdom_NamedNode_Context); 156throw new ArgumentException(ResXml.Xdom_NamedNode_Context); 182throw new ArgumentException(ResXml.Xdom_AttrCol_Insert); 185throw new ArgumentException(ResXml.Xdom_NamedNode_Context); 211throw new ArgumentException(ResXml.Xdom_AttrCol_Insert); 214throw new ArgumentException(ResXml.Xdom_NamedNode_Context);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlDeclaration.cs (4)
25throw new ArgumentException(ResXml.Xdom_Version); 28throw new ArgumentException(string.Format(ResXml.Xdom_standalone, standalone)); 61throw new ArgumentException(string.Format(ResXml.Xdom_standalone, value)); 108throw new ArgumentException(ResXml.Xdom_Version);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlDocument.cs (4)
170throw new ArgumentException(string.Format(ResXml.Xdom_Attr_Reserved_XmlNS, namespaceURI)); 1101throw new ArgumentException(string.Format(ResXml.Arg_CannotCreateNode, type)); 1196throw new ArgumentException(string.Format(ResXml.Xdom_Invalid_NT_String, nodeTypeString)); 1440throw new ArgumentException(string.Format(ResXml.XmlDocument_NodeNotFromDocument, "nodeToValidate"));
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlDocumentFragment.cs (1)
56throw new ArgumentException(ResXml.Xdom_Node_Null_Doc);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlElement.cs (1)
33throw new ArgumentException(ResXml.Xdom_Empty_LocalName);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlEntityReference.cs (1)
45throw new ArgumentException(ResXml.Xdom_InvalidCharacter_EntityReference);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlLoader.cs (4)
41throw new ArgumentException(ResXml.Xdom_Load_NoDocument); 43throw new ArgumentException(ResXml.Xdom_Load_NoReader); 79throw new ArgumentException(ResXml.Xdom_Load_NoDocument); 81throw new ArgumentException(ResXml.Xdom_Load_NoReader);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNode.cs (10)
30throw new ArgumentException(ResXml.Xdom_Node_Null_Doc); 236throw new ArgumentException(ResXml.Xdom_Node_Insert_Child); 245throw new ArgumentException(ResXml.Xdom_Node_Insert_Path); 253throw new ArgumentException(ResXml.Xdom_Node_Insert_Context); 350throw new ArgumentException(ResXml.Xdom_Node_Insert_Child); 359throw new ArgumentException(ResXml.Xdom_Node_Insert_Path); 367throw new ArgumentException(ResXml.Xdom_Node_Insert_Context); 480throw new ArgumentException(ResXml.Xdom_Node_Remove_Child); 577throw new ArgumentException(ResXml.Xdom_Node_Insert_Child); 584throw new ArgumentException(ResXml.Xdom_Node_Insert_Context);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlSignificantWhitespace.cs (2)
18throw new ArgumentException(ResXml.Xdom_WS_Char); 91throw new ArgumentException(ResXml.Xdom_WS_Char);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlWhitespace.cs (2)
18throw new ArgumentException(ResXml.Xdom_WS_Char); 84throw new ArgumentException(ResXml.Xdom_WS_Char);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaSet.cs (1)
717throw new ArgumentException(ResXml.Sch_SchemaDoesNotExist, "schema");
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (1)
401throw new ArgumentException(ResXml.Sch_InvalidPartialValidationType);
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDateTime.cs (1)
518throw new ArgumentException(string.Format(ResXml.Sch_XsdDateTimeCompare, left.TypeCode, right.TypeCode));
FrameworkFork\Microsoft.Xml\Xml\Serialization\Advanced\SchemaImporterExtension.cs (1)
79throw new ArgumentException(string.Format(ResXml.XmlInvalidSchemaExtension, type));
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifier.cs (3)
100if (!IsValid(c)) throw new ArgumentException(string.Format(ResXml.XmlInternalErrorDetails, "Invalid identifier character " + ((Int16)c).ToString()), "c"); 153throw new ArgumentException(string.Format(ResXml.XmlInternalErrorDetails, "Unhandled category " + uc), "c"); 164throw new ArgumentException(string.Format(ResXml.XmlInvalidIdentifier, ident), "ident");
FrameworkFork\Microsoft.Xml\Xml\Serialization\CodeIdentifiers.cs (1)
27throw new ArgumentException(null, "obj");
FrameworkFork\Microsoft.Xml\Xml\Serialization\Mappings.cs (1)
115throw new ArgumentException(string.Format(ResXml.Xml_InvalidNameChars, name), "name");
FrameworkFork\Microsoft.Xml\Xml\Serialization\SoapSchemaExporter.cs (1)
198throw new ArgumentException(ResXml.XmlInternalError, "mapping");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlAnyElementAttribute.cs (1)
84throw new ArgumentException(ResXml.XmlDisallowNegativeValues, "Order");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlArrayAttribute.cs (1)
90throw new ArgumentException(ResXml.XmlDisallowNegativeValues, "Order");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlElementAttribute.cs (1)
141throw new ArgumentException(ResXml.XmlDisallowNegativeValues, "Order");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlReflectionImporter.cs (4)
297throw new ArgumentException(ResXml.XmlInternalError, "mapping"); 489throw new ArgumentException(string.Format(ResXml.XmlGetSchemaMethodName, provider.MethodName), "MethodName"); 622throw new ArgumentException(ResXml.XmlInternalError, "context"); 1152throw new ArgumentException(ResXml.XmlInternalError, "context");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaExporter.cs (3)
402throw new ArgumentException(ResXml.XmlInternalError, "mapping"); 434throw new ArgumentException(ResXml.XmlInternalError, "mapping"); 576throw new ArgumentException(ResXml.XmlInternalError, "mapping");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (1)
583throw new ArgumentException(ResXml.XmlInternalError, "desiredMappingType");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (9)
1015throw new ArgumentException(string.Format(ResXml.XmlEmptyArrayType, CurrentTag()), "value"); 1029throw new ArgumentException(ResXml.XmlInvalidArraySyntax, "value"); 1037throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayDimentions, CurrentTag()), "value"); 1042throw new ArgumentException(ResXml.XmlMismatchedArrayBrackets, "value"); 1059throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayLength, lengthString), "value"); 1074throw new ArgumentException(ResXml.XmlMismatchedArrayBrackets, "value"); 1076throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayDimentions, CurrentTag()), "value"); 1078throw new ArgumentException(ResXml.XmlInvalidArraySyntax, "value"); 1128throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayLength, dimensions[i]), "value");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (2)
1593throw new ArgumentException(ResXml.XmlInternalError, "xmlMapping"); 1599throw new ArgumentException(ResXml.XmlInternalError, "xmlMapping");
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
75throw new ArgumentException(ResXml.XmlInternalError, "xmlMapping"); 81throw new ArgumentException(ResXml.XmlInternalError, "xmlMapping");
FrameworkFork\Microsoft.Xml\Xml\ValidateNames.cs (1)
648throw new ArgumentException(string.Format(ResXml.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0')), "name");
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (6)
867throw new ArgumentException(string.Format(ResXml.Sch_InvalidDateTimeOption, dateTimeOption, "dateTimeOption")); 1421throw new ArgumentException(string.Format(ResXml.Sch_InvalidDateTimeOption, dateTimeOption, "dateTimeOption")); 1768return new ArgumentException(res); 1785return new ArgumentException(string.Format(res, arg)); 1802return new ArgumentException(string.Format(res, args)); 1880return (name == null) ? new ArgumentNullException(argumentName) : new ArgumentException(ResXml.Xml_EmptyName, argumentName);
FrameworkFork\Microsoft.Xml\Xml\XmlEncoding.cs (5)
35throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { -1 }), (string)null); 551throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null); 590throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null); 630throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null); 670throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null);
FrameworkFork\Microsoft.Xml\Xml\XmlNamespaceManager.cs (2)
144throw new ArgumentException(ResXml.Xml_XmlPrefix); 148throw new ArgumentException(ResXml.Xml_XmlnsPrefix);
FrameworkFork\Microsoft.Xml\Xml\XPath\XPathNavigator.cs (1)
2130throw new ArgumentException(ResXml.Xml_InvalidOperation, "reader");
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (3)
70throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.CannotImportInvalidSchemas), ex)); 79throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.CannotImportNullSchema))); 102throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.CannotImportNullDataContractName)));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerContext.cs (1)
209throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.NullKnownType, "knownTypes")));
FrameworkFork\System.Runtime.Serialization\System\Text\Base64Encoding.cs (4)
181throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlArrayTooSmall), "bytes")); 263throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlArrayTooSmall), "bytes")); 320throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlArrayTooSmall), "chars")); 415throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlArrayTooSmall), "chars"));
FrameworkFork\System.Runtime.Serialization\System\Text\BinHexEncoding.cs (2)
70throw new ArgumentException(SRSerialization.XmlArrayTooSmall, "bytes"); 141throw new ArgumentException(SRSerialization.XmlArrayTooSmall, "chars");
FrameworkFork\System.Runtime.Serialization\System\Text\SurrogateChar.cs (3)
27throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidSurrogate, ch.ToString("X", CultureInfo.InvariantCulture)), "ch")); 38throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidLowSurrogate, ((int)lowChar).ToString("X", CultureInfo.InvariantCulture)), "lowChar")); 41throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidHighSurrogate, ((int)highChar).ToString("X", CultureInfo.InvariantCulture)), "highChar"));
FrameworkFork\System.Runtime.Serialization\System\Xml\UniqueId.cs (1)
93throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlArrayTooSmallInput, guidLength), "guid"));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (25)
216throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlPrefixBoundToNamespace, "xml", xmlNamespace, ns), "ns")); 224throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), "ns")); 242throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlUndefinedPrefix, prefix), "prefix")); 249throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlEmptyNamespaceRequiresNullPrefix), "prefix")); 261throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xmlns", ns))); 263throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xml", ns))); 322throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidXmlSpace, _attributeValue))); 375throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidXmlSpace, _attributeValue))); 419throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidCommentChars), "text")); 478throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName")); 493throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlUndefinedPrefix, prefix), "prefix")); 523throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName")); 547throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlUndefinedPrefix, prefix), "prefix")); 780throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlNamespaceNotFound, namespaceUri), "namespaceUri")); 794throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName")); 813throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName")); 858throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlProcessingInstructionNotSupported), "name")); 940throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlOnlyWhitespace), "whitespace")); 1090throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlMissingLowSurrogate), "ch")); 1210throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlNestedArraysNotSupported), "value")); 1923throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlReservedPrefix), "prefix")); 1936throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlPrefixBoundToNamespace, prefix, nameSpace.Uri, uri), "prefix")); 1940throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlEmptyNamespaceRequiresNullPrefix), "prefix")); 1942throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xmlns", uri))); 1945throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xml", uri)));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryReaderQuotas.cs (5)
100throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.QuotaMustBePositive), "value")); 118throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.QuotaMustBePositive), "value")); 136throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.QuotaMustBePositive), "value")); 155throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.QuotaMustBePositive), "value")); 174throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.QuotaMustBePositive), "value"));
FrameworkFork\System.ServiceModel\Internals\System\Runtime\ExceptionTrace.cs (1)
173return TraceException<ArgumentException>(new ArgumentException(message, paramName));
FrameworkFork\System.ServiceModel\SMDiagnostics\System\ServiceModel\Diagnostics\ExceptionUtility.cs (3)
41return (ArgumentException)this.ThrowHelperError(new ArgumentException(message)); 46return (ArgumentException)this.ThrowHelperError(new ArgumentException(message, paramName)); 61return (ArgumentException)this.ThrowHelperError(new ArgumentException(SRServiceModel.StringNullOrEmpty, arg));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\SecurityKeyIdentifier.cs (1)
97throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.NoKeyIdentifierClauseFound, typeof(TClause)), "TClause"));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\SymmetricKey.cs (1)
30throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.SymmetricKeyLengthTooShort, symmetricKey.Length)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeaderCollection.cs (3)
31throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MessageHeaderIsNull0)); 39throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MessageHeaderIsNull0)); 105throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MultipleMessageHeaders, name, ns)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AsymmetricSecurityBindingElement.cs (3)
169throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.CannotImportProtectionLevelForContract, contract.Name, contract.Namespace))); 373throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.CannotImportProtectionLevelForContract, policyContext.Contract.Name, policyContext.Contract.Namespace))); 401throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.CannotImportProtectionLevelForContract, policyContext.Contract.Name, policyContext.Contract.Namespace)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ChannelManagerBase.cs (1)
48return new ArgumentException(string.Format(SRServiceModel.ChannelTypeNotSupported, type), "TChannel");
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
353return new ArgumentException(string.Format(SRServiceModel.HttpToMustEqualVia, to, via));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Message.cs (4)
891throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.InvalidReaderPositionOnCreateMessage, "reader")); 917throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.InvalidReaderPositionOnCreateMessage, "reader")); 1250Exception versionMismatchException = new ArgumentException(string.Format(SRServiceModel.EncoderEnvelopeVersionMismatch, envelopeVersion, desiredVersion.Envelope), "reader"); 1452Exception versionMismatchException = new ArgumentException(string.Format(SRServiceModel.EncoderEnvelopeVersionMismatch, envelopeVersion, desiredVersion.Envelope), "reader");
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeader.cs (2)
356throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFXHeaderNameCannotBeNullOrEmpty, "name")); 444throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MessageHeaderVersionNotSupported, this.GetType().FullName, messageVersion.ToString()), "version"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeaders.cs (4)
398throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException( 494throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MessageHeaderVersionMismatch, collection._version.ToString(), _version.ToString()), "collection")); 1211throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MessageHeaderVersionNotSupported, 1386throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (4)
67throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MessagePropertyNotFound, name))); 464throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MessagePropertyReturnedNullCopy)); 636throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.DuplicateMessageProperty, name))); 728throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MessagePropertiesArraySize0));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MtomMessageEncodingBindingElement.cs (2)
36throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MtomEncoderBadMessageVersion, messageVersion.ToString()), "messageVersion")); 153throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MtomEncoderBadMessageVersion, value.ToString()), "value"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestReplyCorrelator.cs (1)
79throw TraceUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SuppliedMessageIsNotAReplyItHasNoRelatesTo0), reply);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (1)
791throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxInvalidCallbackIAsyncResult));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransactionFlowBindingElement.cs (1)
171throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.TransactionFlowBadOption)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportDefaults.cs (1)
79throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MessageTextEncodingNotSupported, charSet), "encoding"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\UriGenerator.cs (1)
31throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.UriGeneratorSchemeMustNotBeEmpty, "scheme"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\CustomAttributeProvider.cs (1)
50throw ExceptionHelper.AsError(new ArgumentException());
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
276throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(e.Message, "name"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (1)
705throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.SFxInvalidCallbackContractType, callbackType.Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (2)
148throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.EndpointsMustHaveAValidBinding1, endpoint.Name))); 262throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.DuplicateContractQNameNameOnExport, contract.Name, contract.Namespace)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (2)
231throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.WsdlImporterContractMustBeInKnownContracts)); 624throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(doc.Identifier, e));
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\TraceUtility.cs (1)
251return (ArgumentException)TraceUtility.ThrowHelperError(new ArgumentException(message, paramName), msg);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (1)
409throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SPS_InvalidAsyncResult));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\MessageOperationFormatter.cs (5)
29throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxParametersMustBeEmpty)); 41throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxParameterMustBeArrayOfOneElement)); 49throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxResultMustBeMessage)); 51throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxParametersMustBeEmpty)); 61throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxParameterMustBeMessage));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (2)
521new ArgumentException(string.Format(SRServiceModel.SFxParameterCountMismatch, "parts", parts.Length, "parameters", parameters.Length), "parameters")); 586new ArgumentException(string.Format(SRServiceModel.SFxParameterCountMismatch, "parts", parts.Length, "parameters", parameters.Length), "parameters"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\StreamFormatter.cs (1)
251throw TraceUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.SFxInvalidStreamOffsetLength, offset + count)), _message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (1)
66throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxInvalidCallbackIAsyncResult));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
74throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxInvalidCallbackIAsyncResult));
FrameworkFork\System.ServiceModel\System\ServiceModel\EndpointAddress.cs (1)
149throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MultipleIdentities, "extensionReader"));
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultReason.cs (2)
49throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.AtLeastOneFaultReasonMustBeSpecified, "translations")); 94throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.NoMatchingTranslationFoundForFaultText));
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageHeaderT.cs (1)
173throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException("typedHeaderInstance"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityAlgorithmSuite.cs (2)
266throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.Psha1KeyLengthInvalid, this.DefaultEncryptionKeyDerivationLength))); 341throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.Psha1KeyLengthInvalid, this.DefaultSignatureKeyDerivationLength)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (4)
749throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MultipleSupportingAuthenticatorsOfSameType, spec.TokenParameters.GetType()))); 756throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MultipleSupportingAuthenticatorsOfSameType, spec.TokenParameters.GetType()))); 1104throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException( 1118throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WindowsClientCredential.cs (1)
44throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.UnsupportedTokenImpersonationLevel, "AllowedImpersonationLevel", value.ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs (2)
306throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SynchronizedCollectionWrongTypeNull)); 311throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.SynchronizedCollectionWrongType1, value.GetType().FullName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedKeyedCollection.cs (2)
102throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.CannotAddTwoItemsWithTheSameKeyToSynchronizedKeyedCollection0)); 112throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.ItemDoesNotExistInSynchronizedKeyedCollection0));
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
269throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(message));
FrameworkFork\System.Web.Services\Configuration\WebServicesSection.cs (2)
61throw new ArgumentException(string.Format(ResWebServices.RequiredXmlFormatExtensionAttributeIsMissing1, extensionType.FullName), "extensionTypes"); 113throw new ArgumentException(string.Format(ResWebServices.TheSyntaxOfTypeMayNotBeExtended1, type.FullName), "type");
FrameworkFork\System.Web.Services\Services\Description\MimeFormatExtensions.cs (3)
184if (value < 0) throw new ArgumentException(string.Format(ResWebServices.WebNegativeValue, "group")); 196if (value < 0) throw new ArgumentException(string.Format(ResWebServices.WebNegativeValue, "capture")); 208if (value < 0) throw new ArgumentException(string.Format(ResWebServices.WebNegativeValue, "repeats"));
FrameworkFork\System.Web.Services\Services\Description\ServiceDescription.cs (4)
1451throw new ArgumentException(string.Format(ResWebServices.MissingMessagePartForMessageFromNamespace3, partName, Name, ServiceDescription.TargetNamespace), "partName"); 1772throw new ArgumentException(string.Format(ResWebServices.OnlyXmlElementsOrTypesDerivingFromServiceDescriptionFormatExtension0), "value"); 2044throw new ArgumentException(string.Format(ResWebServices.OnlyOperationInputOrOperationOutputTypes), "value"); 3193throw new ArgumentException(GetDuplicateMessage(value.GetType(), key), e.InnerException);
FrameworkFork\System.Web.Services\Services\Description\ServiceDescriptions.cs (1)
185throw new ArgumentException(string.Format(ResWebServices.WebDescriptionMissing, name.ToString(), name.Namespace), "name");
Metadata\MetadataDocumentLoader.cs (3)
97throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrInvalidUriFormat, uri)); 139throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrInvalidUriFormat, uri)); 144throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrUrlNotAllowedOnMultipleInputsFormat, metadataUri));
Metadata\MetadataFileNameManager.cs (1)
255throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrDirectoryInsteadOfFileFormat, path));
Metadata\ServiceDescriptor.cs (2)
37throw new ArgumentException(nameof(serviceUri)); 50throw new ArgumentException(nameof(metadataFiles));
Shared\MSBuildProj.cs (2)
393throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorFullPathNotAProjectFilePathFormat, fullPath)); 398throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorProjectFileAlreadyExistsFormat, fullPath));
Shared\Options\ApplicationOptions.cs (2)
205throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.WarningUnrecognizedOptionFormat, optionId)); 288var ex = new ArgumentException(error);
Shared\Options\ListValue.cs (1)
33throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionDuplicateValueFormat, this.Owner.Name, value));
Shared\Options\OptionBase.cs (1)
182throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionAlreadyDeserializedFormat, this.SerializationName));
Shared\Options\OptionsSerializer.cs (1)
70var jOptionsObject = jPropInfo.Value as JObject ?? throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, jPropInfo.Value?.Type, option.SerializationName));
Shared\Options\OptionValueParser.cs (3)
240throw new ArgumentException(string.Concat(invalidValueError, " ", supportedValues)); 271throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, value, option.Name)); 277throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, value, option.Name), innerException);
Shared\ProjectDependency.cs (10)
77throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, filePath, nameof(filePath))); 82throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName))); 91throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageVersion, nameof(packageVersion))); 96throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, dependencyType, nameof(dependencyType))); 104throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName))); 110throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName))); 120throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName))); 127throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, filePath, nameof(filePath))); 140throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, filePath, nameof(filePath))); 180throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, dependencySpec, nameof(dependencySpec)));
Shared\ProjectPropertyResolver.cs (1)
248throw new ArgumentException(nameof(propertyName));
Shared\Utilities\LogTag.cs (1)
39throw new ArgumentException(string.Empty, nameof(tag));
dotnet-user-jwts (3)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
28throw new ArgumentException(SecretsHelpersResources.FormatError_InvalidSecretsId(newSecretsId));
dotnet-user-secrets (3)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
28throw new ArgumentException(SecretsHelpersResources.FormatError_InvalidSecretsId(newSecretsId));
GenerateDocumentationAndConfigFiles (51)
Program.cs (1)
1338throw new ArgumentException($"Unexpected arguments. '{nameof(enable)}' can't be false while '{nameof(enableAsWarning)}' is true.");
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (8)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException( 239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
GetDocument.Insider (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
http2cat (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IdeBenchmarks (1)
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
39throw new ArgumentException("Couldn't find solution.");
IdeCoreBenchmarks (18)
ClassificationBenchmarks.cs (3)
49throw new ArgumentException($"Unable to restore {_solutionPath}"); 58throw new ArgumentException("Couldn't find Roslyn.sln"); 74throw new ArgumentException("Couldn't create workspace");
CSharpIdeAnalyzerBenchmarks.cs (1)
41throw new ArgumentException();
FindReferencesBenchmarks.cs (4)
48throw new ArgumentException($"Unable to restore {solutionPath}"); 57throw new ArgumentException("Couldn't find Compilers.slnf"); 73throw new ArgumentException("Couldn't create workspace"); 85throw new ArgumentException("Couldn't get storage service");
FormatterBenchmarks.cs (1)
34throw new ArgumentException();
IncrementalAnalyzerBenchmarks.cs (1)
40throw new ArgumentException();
IncrementalSourceGeneratorBenchmarks.cs (3)
51throw new ArgumentException($"Unable to restore {_solutionPath}"); 60throw new ArgumentException("Couldn't find Roslyn.sln"); 75throw new ArgumentException("Couldn't create workspace");
NavigateToBenchmarks.cs (3)
52throw new ArgumentException($"Unable to restore {_solutionPath}"); 61throw new ArgumentException("Couldn't find Roslyn.sln"); 76throw new ArgumentException("Couldn't create workspace");
RenameBenchmarks.cs (1)
32throw new ArgumentException();
SyntacticChangeRangeBenchmark.cs (1)
41throw new ArgumentException("Code location not found");
IIS.Common.TestLib (1)
TestConnections.cs (1)
242throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
IIS.FunctionalTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IIS.LongTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IIS.NewHandler.FunctionalTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IIS.NewShim.FunctionalTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IIS.ShadowCopy.Tests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IISExpress.FunctionalTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
illink (22)
ILLink.RoslynAnalyzer (16)
DataFlow\ControlFlowGraphProxy.cs (4)
164throw new ArgumentException("Must be a catch, filter, or finally region: {}", nameof(catchOrFilterOrFinallyRegion)); 193throw new ArgumentException("Must be a catch or filter region: {}", nameof(catchOrFilterRegion)); 197throw new ArgumentException("Must not be a catch block with filter: {}", nameof(catchOrFilterRegion)); 242throw new ArgumentException("Must be a catch region: {}", nameof(catchRegion));
DataFlowAnalyzerContext.cs (1)
20throw new System.ArgumentException($"Analyzer {analyzer.GetType().Name} is not in the cache");
src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (3)
85throw new ArgumentException(null, nameof(tryOrCatchOrFilterRegion)); 108throw new ArgumentException(null, nameof(finallyRegion)); 121throw new ArgumentException(null, nameof(finallyRegion));
src\tools\illink\src\ILLink.Shared\DiagnosticId.cs (1)
249_ => throw new ArgumentException($"The provided diagnostic id '{diagnosticId}' does not fall into the range of supported warning codes 2001 to 6000 (inclusive).")
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (6)
421_ => throw new ArgumentException($"Reflection call '{calledMethod.GetDisplayName()}' inside '{GetContainingSymbolDisplayName()}' is of unexpected member type."), 435_ => throw new ArgumentException($"Reflection call '{calledMethod.GetDisplayName()}' inside '{GetContainingSymbolDisplayName()}' is of unexpected member type."), 479_ => throw new ArgumentException($"Reflection call '{calledMethod.GetDisplayName()}' inside '{GetContainingSymbolDisplayName()}' is of unexpected member type."), 547throw new ArgumentException($"Reflection call '{calledMethod.GetDisplayName()}' inside '{GetContainingSymbolDisplayName()}' is an unexpected intrinsic."); 773_ => throw new ArgumentException($"Reflection call '{calledMethod.GetDisplayName()}' inside '{GetContainingSymbolDisplayName()}' is of unexpected member type."), 803throw new ArgumentException($"Error processing reflection call '{calledMethod.GetDisplayName()}' inside {GetContainingSymbolDisplayName()}. Unexpected member kind.");
src\tools\illink\src\ILLink.Shared\TypeSystemProxy\WellKnownType.cs (1)
42_ => throw new System.ArgumentException(type.ToString())
ILLink.Tasks (6)
LinkTask.cs (6)
402throw new ArgumentException($"optimization metadata {optimization} must be True or False"); 412throw new ArgumentException($"TrimmerSingleWarn metadata must be True or False"); 488throw new ArgumentException("custom data requires \"Value\" metadata"); 500throw new ArgumentException("feature settings require \"Value\" metadata"); 525throw new ArgumentException("custom step requires \"Type\" metadata"); 532throw new ArgumentException("custom step may not have both \"BeforeStep\" and \"AfterStep\" metadata");
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
136throw new ArgumentException("Certificate was not from this issuer", nameof(certificate));
src\Servers\Kestrel\shared\test\TestConnection.cs (1)
62throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
installer.tasks (3)
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (1)
56?? throw new ArgumentException($"{item.ItemSpec} specifies no Branch.");
StaticFileRegeneration\TpnDocument.cs (1)
47throw new ArgumentException($"No sections found.");
StaticFileRegeneration\TpnSectionHeader.cs (1)
108throw new ArgumentException(
InteropClient (1)
InteropClient.cs (1)
281throw new ArgumentException("Unknown test case " + options.TestCase);
Metrics (38)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
Metrics.Legacy (38)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
Microsoft.Analyzers.Local.Tests (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Arcade.Test.Common (1)
MockFileSystem.cs (1)
87throw new ArgumentException("targetPath is not relative to basePath");
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenGenerator.cs (1)
44throw new ArgumentException(
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTokenSerializerTest.cs (1)
168throw new ArgumentException("Invalid salt value in data");
Microsoft.AspNetCore.App.Analyzers (4)
Infrastructure\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException("Must be a surrogate char.", nameof(surrogateChar)); 79throw new ArgumentException("Span should not be empty.", nameof(span));
Infrastructure\VirtualChars\VirtualCharSequence.cs (2)
58throw new ArgumentException("Span start out of range."); 63throw new ArgumentException("Span end out of range.");
Microsoft.AspNetCore.App.Analyzers.Test (5)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (5)
124throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw multiple occurrences of {0}", PositionString)); 137throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", SpanEndString, SpanStartString)); 151throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", NamedSpanEndString, NamedSpanStartString)); 164throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", SpanStartString, SpanEndString)); 169throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", NamedSpanEndString, NamedSpanEndString));
Microsoft.AspNetCore.AsyncState (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.AspNetCore.Authentication (1)
RemoteAuthenticationOptions.cs (1)
55throw new ArgumentException(Resources.FormatException_OptionMustBeProvided(nameof(CallbackPath)), nameof(CallbackPath));
Microsoft.AspNetCore.Authentication.Abstractions (2)
AuthenticationScheme.cs (1)
26throw new ArgumentException("handlerType must implement IAuthenticationHandler.");
TokenExtensions.cs (1)
39throw new ArgumentException("Token name cannot be null for any token.", nameof(tokens));
Microsoft.AspNetCore.Authentication.Negotiate (1)
LdapSettings.cs (1)
89throw new ArgumentException($"{nameof(MachineAccountPassword)} should only be specified when {nameof(MachineAccountName)} is configured.");
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthOptions.cs (1)
36throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Exception_OptionMustBeProvided, nameof(CallbackPath)), nameof(CallbackPath));
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectOptions.cs (1)
104throw new ArgumentException("Options.CallbackPath must be provided.", nameof(CallbackPath));
Microsoft.AspNetCore.Components (22)
CascadingValue.cs (3)
81throw new ArgumentException($"The parameter '{nameof(Name)}' for component '{nameof(CascadingValue<TValue>)}' does not allow null or empty values."); 90throw new ArgumentException($"The component '{nameof(CascadingValue<TValue>)}' does not accept a parameter with the name '{parameter.Name}'."); 105throw new ArgumentException($"Missing required parameter '{nameof(Value)}' for component '{GetType().Name}'.");
DefaultComponentActivator.cs (1)
21throw new ArgumentException($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", nameof(componentType));
LayoutAttribute.cs (1)
25throw new ArgumentException($"Invalid layout type: {layoutType.FullName} " +
NavigationManager.cs (3)
289throw new ArgumentException(message); 315throw new ArgumentException(message); 595throw new ArgumentException(message);
PersistentComponentState.cs (2)
89throw new ArgumentException($"There is already a persisted object under the same key '{key}'"); 107throw new ArgumentException($"There is already a persisted object under the same key '{key}'");
Rendering\RenderTreeBuilder.cs (2)
424throw new ArgumentException($"The {nameof(frame.FrameType)} must be {RenderTreeFrameType.Attribute}."); 502throw new ArgumentException($"The component type must implement {typeof(IComponent).FullName}.");
RenderTree\Renderer.cs (4)
588throw new ArgumentException($"The frame's {nameof(RenderTreeFrame.FrameType)} property must equal {RenderTreeFrameType.Component}", nameof(frameIndex)); 593throw new ArgumentException($"The frame already has a non-null component instance", nameof(frameIndex)); 745throw new ArgumentException($"There is no event handler associated with this event. EventId: '{eventHandlerId}'.", nameof(eventHandlerId)); 764: throw new ArgumentException($"The renderer does not have a component with ID {componentId}.");
RenderTree\StackObjectPool.cs (1)
64throw new ArgumentException($"Attempting to return wrong pooled instance. {nameof(Get)}/{nameof(Return)} calls must form a stack.");
Routing\RouteData.cs (1)
26throw new ArgumentException($"The value must implement {nameof(IComponent)}.", nameof(pageType));
Sections\SectionContent.cs (1)
104throw new ArgumentException($"Unknown parameter '{param.Name}'");
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
379throw new ArgumentException($"An element with the key '{key}' already exists in the {nameof(RouteValueDictionary)}.");
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (1)
734throw new ArgumentException(Resources.FormatTemplateRoute_InvalidLiteral(content));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
113throw new ArgumentException("Unsupported Language");
Microsoft.AspNetCore.Components.Endpoints (4)
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
108throw new ArgumentException(Resources.FormatTypeMustDeriveFromType(componentType, typeof(IComponent)));
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (1)
168_ => throw new ArgumentException(Resources.FormatUnsupportedRenderMode(mode), nameof(mode)),
Rendering\SSRRenderModeBoundary.cs (1)
50_ => throw new ArgumentException($"Server-side rendering does not support the render mode '{renderMode}'.", nameof(renderMode))
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
36?? throw new ArgumentException("Could not deserialize state correctly", nameof(existingState));
Microsoft.AspNetCore.Components.Forms (8)
FieldIdentifier.cs (8)
50throw new ArgumentException("The model must be a reference-typed object.", nameof(model)); 117throw new ArgumentException("The provided expression must evaluate to a non-null value."); 132throw new ArgumentException("The provided expression must evaluate to a non-null value."); 137throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object."); 149throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object."); 163value = model.Value ?? throw new ArgumentException("The provided expression must evaluate to a non-null value."); 177throw new ArgumentException("The provided expression must evaluate to a non-null value."); 209throw new ArgumentException("The provided expression must evaluate to a non-null value.");
Microsoft.AspNetCore.Components.QuickGrid (2)
Columns\GridSort.cs (2)
140throw new ArgumentException(ExpressionNotRepresentableMessage); 165throw new ArgumentException(ExpressionNotRepresentableMessage);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
113throw new ArgumentException("Unsupported Language");
Microsoft.AspNetCore.Components.Server (7)
BlazorPack\Requires.cs (1)
20throw new ArgumentException(message, paramName);
Circuits\CircuitHost.cs (1)
63throw new ArgumentException($"Property '{nameof(CircuitId.Secret)}' cannot be null.", nameof(circuitId));
Circuits\CircuitRegistry.cs (1)
82throw new ArgumentException($"Circuit with identity {circuitHost.CircuitId} is already registered.");
Circuits\RemoteJSDataStream.cs (1)
50throw new ArgumentException($"SignalR MaximumIncomingBytes must be at least 1 kb.");
Circuits\RemoteJSRuntime.cs (1)
180throw new ArgumentException($"The stream {streamId} is already pending.");
src\Components\Shared\src\RenderBatchWriter.cs (1)
201throw new ArgumentException($"Unsupported frame type: {frame.FrameType}");
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
36?? throw new ArgumentException("Could not deserialize state correctly", nameof(existingState));
Microsoft.AspNetCore.Components.Server.Tests (1)
ProtectedBrowserStorageTest.cs (1)
341throw new ArgumentException($"The value is not protected with the expected purpose '{_purpose}'. Value supplied: '{protectedString}'", nameof(protectedData));
Microsoft.AspNetCore.Components.Web (4)
JSComponents\JSComponentInterop.cs (2)
70throw new ArgumentException($"There is no registered JS component with identifier '{identifier}'."); 137throw new ArgumentException($"There is no declared parameter named '{parameterName}', so the supplied object cannot be deserialized.");
Routing\NavigationLock.cs (1)
61throw new ArgumentException($"The component '{nameof(NavigationLock)}' does not accept a parameter with the name '{parameter.Name}'.");
WebEventData\ChangeEventArgsReader.cs (1)
37throw new ArgumentException($"Unsupported {nameof(ChangeEventArgs)} value {jsonElement}.");
Microsoft.AspNetCore.Components.WebAssembly (2)
Hosting\RootComponentMapping.cs (1)
26throw new ArgumentException(
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
36?? throw new ArgumentException("Could not deserialize state correctly", nameof(existingState));
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
PullFromJSDataStreamTest.cs (1)
126throw new ArgumentException($"Unexpected call to InvokeAsync, expected byte[] got {typeof(TValue)}");
Microsoft.AspNetCore.Components.WebView (1)
src\Components\Shared\src\RenderBatchWriter.cs (1)
201throw new ArgumentException($"Unsupported frame type: {frame.FrameType}");
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
RootComponent.cs (1)
26 throw new ArgumentException($"'{nameof(selector)}' cannot be null or whitespace.", nameof(selector));
RootComponentCollectionExtensions.cs (1)
46 throw new ArgumentException($"There is no root component with selector '{selector}'.", nameof(selector));
Microsoft.AspNetCore.ConcurrencyLimiter (3)
ConcurrencyLimiterMiddleware.cs (1)
32throw new ArgumentException("The value of 'options.OnRejected' must not be null.", nameof(options));
QueuePolicies\BasePolicy.cs (2)
26throw new ArgumentException("MaxConcurrentRequests must be a positive integer.", nameof(options)); 32throw new ArgumentException("The RequestQueueLimit cannot be a negative number.", nameof(options));
Microsoft.AspNetCore.Cors (1)
Infrastructure\CorsService.cs (1)
65throw new ArgumentException(Resources.InsecureConfiguration, nameof(policy));
Microsoft.AspNetCore.DataProtection (4)
AuthenticatedEncryption\ConfigurationModel\XmlSerializedDescriptorInfo.cs (1)
30throw new ArgumentException(
Error.cs (2)
20return new ArgumentException(Resources.Common_ArgumentCannotBeNullOrEmpty, parameterName); 26return new ArgumentException(message, parameterName);
XmlEncryption\EncryptedXmlInfo.cs (1)
29throw new ArgumentException(
Microsoft.AspNetCore.DataProtection.Abstractions (5)
DataProtectionCommonExtensions.cs (2)
42throw new ArgumentException(Resources.DataProtectionExtensions_NullPurposesCollection, nameof(purposes)); 50throw new ArgumentException(Resources.DataProtectionExtensions_NullPurposesCollection, nameof(purposes));
src\Shared\WebEncoders\WebEncoders.cs (3)
159throw new ArgumentException( 299throw new ArgumentException( 472throw new ArgumentException(
Microsoft.AspNetCore.Diagnostics (1)
StatusCodePage\StatusCodePagesMiddleware.cs (1)
30throw new ArgumentException("Missing options.HandleAsync implementation.");
Microsoft.AspNetCore.Diagnostics.HealthChecks (2)
Builder\HealthCheckApplicationBuilderExtensions.cs (2)
119throw new ArgumentException("The port must be a valid integer.", nameof(port)); 182throw new ArgumentException("The port must be a valid integer.", nameof(port));
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\Json\JsonConverterHelper.cs (2)
125throw new ArgumentException("Invalid field type"); 221throw new ArgumentException("Invalid field type");
Microsoft.AspNetCore.HeaderParsing (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.AspNetCore.Hosting (3)
Internal\HostingEnvironmentExtensions.cs (2)
19throw new ArgumentException($"The content root '{contentRootPath}' does not exist.", nameof(contentRootPath)); 70throw new ArgumentException($"The content root '{contentRootPath}' does not exist.", nameof(contentRootPath));
Internal\StartupLoader.cs (1)
242throw new ArgumentException(
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingStartupAttribute.cs (1)
24throw new ArgumentException($@"""{hostingStartupType}"" does not implement {typeof(IHostingStartup)}.", nameof(hostingStartupType));
Microsoft.AspNetCore.Http (2)
HeaderDictionary.cs (1)
198throw new ArgumentException("The key is null");
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
236throw new ArgumentException($"An element with the key '{key}' already exists in the {nameof(AdaptiveCapacityDictionary<TKey, TValue>)}.", nameof(key));
Microsoft.AspNetCore.Http.Abstractions (11)
CookieBuilder.cs (1)
24: throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(value));
Extensions\MapExtensions.cs (1)
56throw new ArgumentException("The path must not end with a '/'", nameof(pathMatch));
Extensions\MapMiddleware.cs (1)
28throw new ArgumentException("Branch not set on options.", nameof(options));
Extensions\MapWhenMiddleware.cs (2)
28throw new ArgumentException("Predicate not set on options.", nameof(options)); 33throw new ArgumentException("Branch not set on options.", nameof(options));
Extensions\UsePathBaseMiddleware.cs (1)
27throw new ArgumentException($"{nameof(pathBase)} cannot be null or empty.");
FragmentString.cs (1)
30throw new ArgumentException("The leading '#' must be included for a non-empty fragment.", nameof(value));
PathString.cs (1)
41throw new ArgumentException(Resources.FormatException_PathMustStartWithSlash(nameof(value)), nameof(value));
QueryString.cs (1)
32throw new ArgumentException("The leading '?' must be included for a non-empty query.", nameof(value));
Routing\RouteValueDictionary.cs (1)
377throw new ArgumentException(message, nameof(key));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Http.Connections (3)
src\Shared\WebEncoders\WebEncoders.cs (3)
159throw new ArgumentException( 299throw new ArgumentException( 472throw new ArgumentException(
Microsoft.AspNetCore.Http.Connections.Client (6)
HttpConnection.cs (2)
141throw new ArgumentException("Options does not have a URL specified.", nameof(httpConnectionOptions)); 158throw new ArgumentException("ServerSentEvents can not be the only transport specified when running in the browser.", nameof(httpConnectionOptions));
Internal\DefaultTransportFactory.cs (1)
24throw new ArgumentException($"{nameof(httpClient)} cannot be null when {nameof(requestedTransportType)} is not {nameof(HttpTransportType.WebSockets)}.", nameof(httpClient));
Internal\LongPollingTransport.cs (1)
47throw new ArgumentException($"The '{transferFormat}' transfer format is not supported by this transport.", nameof(transferFormat));
Internal\ServerSentEventsTransport.cs (1)
50throw new ArgumentException($"The '{transferFormat}' transfer format is not supported by this transport.", nameof(transferFormat));
Internal\WebSocketsTransport.cs (1)
293throw new ArgumentException($"The '{transferFormat}' transfer format is not supported by this transport.", nameof(transferFormat));
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
234throw new ArgumentException($"{nameof(methodInfo)} does not have a declaring type.");
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (1)
56_ => throw new ArgumentException($"Received unexpected HTTP method: {endpoint.HttpMethod}")
Microsoft.AspNetCore.Http.Results (1)
ValidationProblem.cs (1)
23throw new ArgumentException($"{nameof(ValidationProblem)} only supports a 400 Bad Request response status code.", nameof(problemDetails));
Microsoft.AspNetCore.HttpLogging (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.InternalTesting (4)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
49throw new ArgumentException("Must not be null or empty", paramName);
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
39throw new ArgumentException("The value cannot be an empty string.", paramName); 68throw new ArgumentException("The value cannot be an empty or whitespace string.", paramName);
TestFileOutputContext.cs (1)
61throw new ArgumentException("The extension must start with '.' if one is provided.", nameof(extension));
Microsoft.AspNetCore.InternalTesting.Tests (1)
ExceptionAssertTest.cs (1)
18throw new ArgumentException("Value cannot be null or an empty string.", "foo");
Microsoft.AspNetCore.JsonPatch (2)
Converters\JsonPatchDocumentConverter.cs (1)
27throw new ArgumentException(Resources.FormatParameterMustMatchType(nameof(objectType), "JsonPatchDocument"), nameof(objectType));
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
49throw new ArgumentException("Must not be null or empty", paramName);
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Converters\JsonConverterForJsonPatchDocumentOfT.cs (1)
22throw new ArgumentException(Resources.FormatParameterMustMatchType(nameof(typeToConvert), nameof(JsonPatchDocument<T>)), nameof(typeToConvert));
Converters\JsonPatchDocumentConverter.cs (1)
21throw new ArgumentException(Resources.FormatParameterMustMatchType(nameof(typeToConvert), nameof(JsonPatchDocument)), nameof(typeToConvert));
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (1)
WriteOnceDynamicTestObject.cs (1)
111throw new ArgumentException($"Value for {key} already exists");
Microsoft.AspNetCore.JsonPatch.Tests (1)
WriteOnceDynamicTestObject.cs (1)
111throw new ArgumentException($"Value for {key} already exists");
Microsoft.AspNetCore.Localization (1)
ApplicationBuilderExtensions.cs (1)
86throw new ArgumentException(Resources.Exception_CulturesShouldNotBeEmpty);
Microsoft.AspNetCore.Mvc.Abstractions (6)
ModelBinding\BindingInfo.cs (1)
67throw new ArgumentException(
ModelBinding\BindingSource.cs (1)
189throw new ArgumentException(message, nameof(bindingSource));
ModelBinding\CompositeBindingSource.cs (4)
36throw new ArgumentException(message, nameof(bindingSources)); 44throw new ArgumentException(message, nameof(bindingSources)); 52throw new ArgumentException(message, nameof(bindingSources)); 87throw new ArgumentException(message, nameof(bindingSource));
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ActualApiResponseMetadata.cs (1)
30public int StatusCode => _statusCode ?? throw new ArgumentException("Status code is not available when IsDefaultResponse is true");
Microsoft.AspNetCore.Mvc.Core (36)
ActionConstraints\HttpMethodActionConstraint.cs (1)
41throw new ArgumentException($"{nameof(httpMethods)} cannot contain null or empty strings.");
ActionResultOfT.cs (2)
28throw new ArgumentException(error); 44throw new ArgumentException(error);
ApiConventionMethodAttribute.cs (2)
55throw new ArgumentException(Resources.FormatApiConventionMethod_NoMethodFound(methodName, conventionType), nameof(methodName)); 59throw new ArgumentException(Resources.FormatApiConventionMethod_AmbiguousMethodName(methodName, conventionType), nameof(methodName));
ApiConventionTypeAttribute.cs (2)
58throw new ArgumentException(Resources.FormatApiConventionMustBeStatic(conventionType), nameof(conventionType)); 78throw new ArgumentException(errorMessage, nameof(conventionType));
BindPropertyAttribute.cs (1)
48throw new ArgumentException(
ControllerContext.cs (1)
40throw new ArgumentException(Resources.FormatActionDescriptorMustBeBasedOnControllerAction(
Controllers\ControllerActivatorProvider.cs (1)
47throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Controllers\ControllerFactoryProvider.cs (3)
45throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 80throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 101throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Controllers\DefaultControllerActivator.cs (2)
34throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 43throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Controllers\DefaultControllerFactory.cs (1)
45throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Controllers\DefaultControllerPropertyActivator.cs (1)
40throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Filters\FilterCollection.cs (2)
84throw new ArgumentException(message, nameof(filterType)); 162throw new ArgumentException(message, nameof(filterType));
Formatters\FormatterMappings.cs (3)
60throw new ArgumentException(message, nameof(format)); 87throw new ArgumentException( 101throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Format_NotValid, format), nameof(format));
Formatters\MediaType.cs (1)
64throw new ArgumentException(Resources.FormatArgument_InvalidOffsetLength(nameof(offset), nameof(length)));
Infrastructure\ModelStateInvalidFilter.cs (1)
34throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
ModelBinderAttribute.cs (1)
66throw new ArgumentException(
ModelBinding\Binders\BinderTypeModelBinder.cs (1)
29throw new ArgumentException(
ModelBinding\BindingSourceValueProvider.cs (2)
44throw new ArgumentException(message, nameof(bindingSource)); 52throw new ArgumentException(message, nameof(bindingSource));
ModelBinding\JQueryKeyValuePairNormalizer.cs (1)
71throw new ArgumentException(
ModelBinding\Metadata\BindingMetadata.cs (1)
47throw new ArgumentException(
ModelBinding\ModelBindingHelper.cs (1)
229throw new ArgumentException(message, nameof(modelType));
ModelBinding\ModelMetadataProviderExtensions.cs (1)
38throw new ArgumentException(message, nameof(propertyName));
ModelBinding\Validation\ValidationVisitor.cs (1)
173throw new ArgumentException(Resources.FormatValidationVisitor_ContainerCannotBeSpecified(metadata.MetadataKind));
Routing\DynamicControllerRouteValueTransformerMetadata.cs (1)
16throw new ArgumentException(
Routing\UrlHelperFactory.cs (2)
25throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 32throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Microsoft.AspNetCore.Mvc.Core.Test (5)
Infrastructure\ControllerActionInvokerTest.cs (1)
1877throw new ArgumentException("Argument Exception");
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (2)
1287set { throw new ArgumentException("This is an exception.", "value"); } 1293set { throw new ArgumentException("This is a different exception.", "value"); }
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (2)
1462set { throw new ArgumentException("This is an exception.", "value"); } 1468set { throw new ArgumentException("This is a different exception.", "value"); }
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
DataAnnotationsModelValidator.cs (2)
55throw new ArgumentException( 63throw new ArgumentException(
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
EnumerableWrapperProvider.cs (1)
36throw new ArgumentException(
SerializableErrorWrapperProvider.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
HtmlGenerationWithCultureTest.cs (1)
197throw new ArgumentException($"Document does not contain element that matches the selector {selector}: " + Environment.NewLine + document.DocumentElement.OuterHtml);
Infrastructure\IHtmlDocumentExtensions.cs (1)
16throw new ArgumentException($"Document does not contain element that matches the selector {selector}: " + Environment.NewLine + document.DocumentElement.OuterHtml);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
JsonHelperExtensions.cs (1)
44throw new ArgumentException(message, nameof(jsonHelper));
Microsoft.AspNetCore.Mvc.Razor (4)
Compilation\CompiledViewDescriptor.cs (1)
46throw new ArgumentException(Resources.FormatCompiledViewDescriptor_NoData(nameof(item), nameof(attribute)));
RazorFileHierarchy.cs (1)
18throw new ArgumentException(Resources.RazorProject_PathMustStartWithForwardSlash, nameof(path));
RazorViewEngine.cs (2)
61throw new ArgumentException( 68throw new ArgumentException(
Microsoft.AspNetCore.Mvc.RazorPages (9)
ApplicationModels\PageConventionCollection.cs (2)
256throw new ArgumentException(Resources.FormatInvalidValidPageName(pageName), argumentName); 267throw new ArgumentException(Resources.PathMustBeRootRelativePath, nameof(folderPath));
DependencyInjection\MvcRazorPagesMvcBuilderExtensions.cs (1)
45throw new ArgumentException(Resources.PathMustBeRootRelativePath, nameof(rootDirectory));
Infrastructure\DefaultPageActivatorProvider.cs (1)
27throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Infrastructure\DefaultPageModelActivatorProvider.cs (1)
26throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Infrastructure\DynamicPageRouteValueTransformerMetadata.cs (1)
17throw new ArgumentException(
Infrastructure\ServiceBasedPageModelActivatorProvider.cs (1)
21throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
PageResult.cs (1)
54throw new ArgumentException(Resources.FormatPageViewResult_ContextIsInvalid(
RazorPagesOptions.cs (1)
37throw new ArgumentException(Resources.PathMustBeRootRelativePath, nameof(value));
Microsoft.AspNetCore.Mvc.TagHelpers (6)
Cache\DistributedCacheTagHelperFormatter.cs (1)
22throw new ArgumentException(
ComponentTagHelper.cs (1)
75throw new ArgumentException(
TagHelperOutputExtensions.cs (3)
70throw new ArgumentException( 153throw new ArgumentException(Resources.ArgumentCannotContainHtmlSpace, nameof(classValue)); 207throw new ArgumentException(Resources.ArgumentCannotContainHtmlSpace, nameof(classValue));
ValidationSummaryTagHelper.cs (1)
68throw new ArgumentException(
Microsoft.AspNetCore.Mvc.TagHelpers.Test (2)
GlobbingUrlBuilderTest.cs (1)
460throw new ArgumentException($"{nameof(rootNode)} must have children.", nameof(rootNode));
TagHelperOutputExtensionsTest.cs (1)
1043var expected = new ArgumentException(Resources.ArgumentCannotContainHtmlSpace, nameof(classValue)).Message;
Microsoft.AspNetCore.Mvc.ViewFeatures (18)
AttributeDictionary.cs (3)
162throw new ArgumentException( 193throw new ArgumentException( 251throw new ArgumentException(
Controller.cs (1)
55throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(ViewData));
DefaultHtmlGenerator.cs (4)
545throw new ArgumentException( 622throw new ArgumentException( 724throw new ArgumentException( 1150throw new ArgumentException(
ExpressionHelper.cs (1)
208throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
HtmlHelper.cs (3)
376throw new ArgumentException(message, nameof(TEnum)); 394throw new ArgumentException(message, nameof(enumType)); 1378throw new ArgumentException(message, nameof(metadata));
HtmlHelperOfT.cs (2)
54throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 80throw new ArgumentException(Resources.FormatArgumentPropertyUnexpectedType(
Rendering\HtmlHelperComponentExtensions.cs (1)
77_ => throw new ArgumentException($"Unsupported render mode {renderMode}", nameof(renderMode)),
Rendering\TagBuilder.cs (1)
50throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(tagBuilder));
ViewComponents\DefaultViewComponentActivator.cs (1)
43throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
ViewDataDictionaryControllerPropertyActivator.cs (1)
58throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
DefaultDisplayTemplatesTest.cs (1)
353throw new ArgumentException(expectedMessage);
Microsoft.AspNetCore.OutputCaching (3)
Memory\MemoryOutputCacheStore.cs (1)
91throw new ArgumentException(Resources.TagCannotBeNull);
RecyclableArrayBufferWriter.cs (1)
47throw new ArgumentException(null, nameof(count));
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Owin (3)
OwinEnvironment.cs (3)
43throw new ArgumentException("Missing required feature: " + nameof(IHttpRequestFeature) + ".", nameof(context)); 47throw new ArgumentException("Missing required feature: " + nameof(IHttpResponseFeature) + ".", nameof(context)); 183throw new ArgumentException("Not enough available space in array", nameof(array));
Microsoft.AspNetCore.RateLimiting (3)
RateLimiterOptions.cs (3)
55throw new ArgumentException($"There already exists a policy with the name {policyName}.", nameof(policyName)); 73throw new ArgumentException($"There already exists a policy with the name {policyName}.", nameof(policyName)); 98throw new ArgumentException($"There already exists a policy with the name {policyName}.", nameof(policyName));
Microsoft.AspNetCore.RateLimiting.Tests (2)
TestPartitionedRateLimiter.cs (2)
38throw new ArgumentException("Tests only support 1 permit at a time"); 64throw new ArgumentException("Tests only support 1 permit at a time");
Microsoft.AspNetCore.ResponseCaching (2)
ResponseCachingFeature.cs (1)
26throw new ArgumentException($"When {nameof(value)} contains more than one value, it cannot contain a null or empty value.", nameof(value));
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.ResponseCompression (2)
CompressionProviderCollection.cs (1)
39throw new ArgumentException($"The provider must implement {nameof(ICompressionProvider)}.", nameof(providerType));
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Rewrite (5)
ApacheModRewrite\RuleBuilder.cs (3)
98throw new ArgumentException("Invalid operation for integer comparison."); 121throw new ArgumentException("Invalid operation for string comparison."); 149throw new ArgumentException("Invalid operation for property comparison");
RedirectToNonWwwRule.cs (1)
27throw new ArgumentException($"One or more {nameof(domains)} must be provided.");
RedirectToWwwRule.cs (1)
27throw new ArgumentException($"One or more {nameof(domains)} must be provided.");
Microsoft.AspNetCore.Routing (15)
DefaultLinkGenerator.cs (1)
162throw new ArgumentException("A host must be provided.", nameof(host));
LinkGeneratorEndpointNameAddressExtensions.cs (2)
312throw new ArgumentException("A host must be provided.", nameof(host)); 361throw new ArgumentException("A host must be provided.", nameof(host));
Matching\CandidateSet.cs (1)
43throw new ArgumentException($"The provided {nameof(endpoints)}, {nameof(values)}, and {nameof(scores)} must have the same length.");
Patterns\RoutePatternFactory.cs (9)
734throw new ArgumentException(Resources.FormatTemplateRoute_InvalidLiteral(content)); 775throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 798throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 825throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 830throw new ArgumentException(Resources.TemplateRoute_OptionalCannotHaveDefaultValue); 859throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 864throw new ArgumentException(Resources.TemplateRoute_OptionalCannotHaveDefaultValue); 895throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 900throw new ArgumentException(Resources.TemplateRoute_OptionalCannotHaveDefaultValue);
Template\TemplateParser.cs (1)
30throw new ArgumentException(ex.Message, nameof(routeTemplate), ex);
Tree\TreeRouter.cs (1)
113throw new ArgumentException(
Microsoft.AspNetCore.Server.HttpSys (2)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
265throw new ArgumentException("An item with the same key has already been added.");
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
265throw new ArgumentException("An item with the same key has already been added.");
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Server.IntegrationTesting (10)
Deployers\ApplicationDeployer.cs (1)
34throw new ArgumentException($"Invalid ServerType '{DeploymentParameters.ServerType}'.");
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (6)
39throw new ArgumentException($"Invalid value '{_deploymentParameters.ServerName}' for {nameof(RemoteWindowsDeploymentParameters.ServerName)}"); 44throw new ArgumentException($"Invalid value '{_deploymentParameters.ServerAccountName}' for {nameof(RemoteWindowsDeploymentParameters.ServerAccountName)}." + 50throw new ArgumentException($"Invalid value '{_deploymentParameters.ServerAccountPassword}' for {nameof(RemoteWindowsDeploymentParameters.ServerAccountPassword)}." + 57throw new ArgumentException($"Invalid value '{_deploymentParameters.DotnetRuntimePath}' for {nameof(RemoteWindowsDeploymentParameters.DotnetRuntimePath)}. " + 63throw new ArgumentException($"Invalid value for {nameof(RemoteWindowsDeploymentParameters.RemoteServerFileSharePath)}." + 69throw new ArgumentException($"Invalid value for {nameof(RemoteWindowsDeploymentParameters.ApplicationBaseUriHint)}.");
TestMatrix.cs (3)
96throw new ArgumentException("No servers were specified."); 102throw new ArgumentException("No TFMs were specified."); 160throw new ArgumentException(server.ToString());
Microsoft.AspNetCore.Server.Kestrel.Core (15)
Internal\Http\HttpHeaders.cs (2)
102throw new ArgumentException(); 112throw new ArgumentException(CoreStrings.KeyAlreadyExists);
Internal\Infrastructure\ConnectionManager.cs (2)
50throw new ArgumentException("Unable to add connection.", nameof(id)); 58throw new ArgumentException("Unable to remove connection.", nameof(id));
Internal\Infrastructure\TimeoutControl.cs (2)
316throw new ArgumentException(CoreStrings.PositiveFiniteTimeSpanRequired, nameof(timeSpan)); 330throw new ArgumentException(CoreStrings.PositiveFiniteTimeSpanRequired, nameof(timeSpan));
Internal\Infrastructure\TransportConnectionManager.cs (3)
29throw new ArgumentException("Unable to add specified id.", nameof(id)); 39throw new ArgumentException("No value found for the specified id.", nameof(id)); 51throw new ArgumentException("No value found for the specified id.", nameof(id));
KestrelConfigurationLoader.cs (1)
184throw new ArgumentException(CoreStrings.UnixSocketPathMustBeAbsolute, nameof(socketPath));
KestrelServerOptions.cs (1)
589throw new ArgumentException(CoreStrings.UnixSocketPathMustBeAbsolute, nameof(socketPath));
ListenOptionsHttpsExtensions.cs (1)
254throw new ArgumentException($"{nameof(TlsHandshakeCallbackOptions.OnConnection)} must not be null.");
Middleware\HttpsConnectionMiddleware.cs (1)
68throw new ArgumentException(CoreStrings.ServerCertificateRequired, nameof(options));
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
136throw new ArgumentException("Certificate was not from this issuer", nameof(certificate));
src\Servers\Kestrel\shared\test\TestConnection.cs (1)
62throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Shared.Tests (9)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
236throw new ArgumentException($"An element with the key '{key}' already exists in the {nameof(AdaptiveCapacityDictionary<TKey, TValue>)}.", nameof(key));
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
265throw new ArgumentException("An item with the same key has already been added.");
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
src\Shared\WebEncoders\WebEncoders.cs (3)
159throw new ArgumentException( 299throw new ArgumentException( 472throw new ArgumentException(
Microsoft.AspNetCore.SignalR.Common (1)
Protocol\CompletionMessage.cs (1)
41throw new ArgumentException($"Expected either '{nameof(error)}' or '{nameof(result)}' to be provided, but not both");
Microsoft.AspNetCore.SignalR.Tests (1)
HubConnectionHandlerTests.cs (1)
5455throw new ArgumentException("Input must be greater than zero.", nameof(count));
Microsoft.AspNetCore.SpaServices.Extensions (3)
AngularCli\AngularCliMiddleware.cs (1)
32throw new ArgumentException("Property 'SourcePath' cannot be null or empty", nameof(spaBuilder));
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (1)
32throw new ArgumentException("Property 'SourcePath' cannot be null or empty", nameof(spaBuilder));
StaticFiles\DefaultSpaStaticFileProvider.cs (1)
26throw new ArgumentException($"The {nameof(options.RootPath)} property " +
Microsoft.AspNetCore.StaticFiles (2)
Infrastructure\SharedOptions.cs (1)
34throw new ArgumentException("Request path must not end in a slash");
StaticFileContext.cs (1)
48throw new ArgumentException($"{nameof(subPath)} cannot wrap a null value.", nameof(subPath));
Microsoft.AspNetCore.TestHost (1)
RequestBuilder.cs (1)
61throw new ArgumentException("Invalid header name: " + name, nameof(name));
Microsoft.AspNetCore.Testing (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.AspNetCore.WebUtilities (10)
FileMultipartSection.cs (1)
34throw new ArgumentException("Argument must be a file section", nameof(section));
FormMultipartSection.cs (1)
34throw new ArgumentException("Argument must be a form section", nameof(section));
FormPipeReader.cs (1)
58throw new ArgumentException("UTF7 is unsupported and insecure. Please select a different encoding.");
HttpRequestStreamReader.cs (1)
80throw new ArgumentException(Resources.HttpRequestStreamReader_StreamNotReadable, nameof(stream));
HttpResponseStreamWriter.cs (1)
76throw new ArgumentException(Resources.HttpResponseStreamWriter_StreamNotWritable, nameof(stream));
MultipartSectionStreamExtensions.cs (1)
34throw new ArgumentException("Multipart section must have a body to be read.", nameof(section));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
src\Shared\WebEncoders\WebEncoders.cs (3)
159throw new ArgumentException( 299throw new ArgumentException( 472throw new ArgumentException(
Microsoft.Build (13)
BuildCheck\API\WorkerNodeCheck.cs (1)
25throw new ArgumentException("The registration context for InternalBuildAnalyzer must be of type IInternalBuildCheckRegistrationContext.", nameof(registrationContext));
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (3)
640throw new ArgumentException("index"); 679throw new ArgumentException("arrayIndex"); 784throw new ArgumentException("newSize");
ErrorUtilities.cs (3)
356throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args), innerException); 532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName)); 622throw new ArgumentException(
Graph\GraphBuilder.cs (1)
256throw new ArgumentException(
Graph\ParallelWorkSet.cs (1)
83throw new ArgumentException("Degree of parallelism must be a positive integer.");
Graph\ProjectGraph.cs (1)
795throw new ArgumentException(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("OM_TargetNameNullOrEmpty", nameof(GetTargetLists)));
Instance\ProjectInstance.cs (2)
960throw new ArgumentException(nameof(linkedProject)); 1089throw new ArgumentException(nameof(elementsCollection));
Logging\TerminalLogger\TerminalNodeStatus.cs (1)
35throw new ArgumentException("Target should not contain any escape codes, if you want to colorize target use the other constructor.");
Microsoft.Build.Engine.OM.UnitTests (4)
ErrorUtilities.cs (3)
356throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args), innerException); 532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName)); 622throw new ArgumentException(
TransientIO.cs (1)
85throw new ArgumentException(nameof(relative));
Microsoft.Build.Engine.UnitTests (11)
BackEnd\BuildResult_Tests.cs (1)
323result.AddResultsForTarget("omega", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new ArgumentException("The argument was invalid"))));
BackEnd\CustomTaskHelper.cs (1)
61throw new ArgumentException(builder.ToString());
BackEnd\EventSourceSink_Tests.cs (1)
96exceptionList.Add(new ArgumentException());
BackEnd\MockHost.cs (1)
211_ => throw new ArgumentException("Unexpected type " + type),
BackEnd\TargetBuilder_Tests.cs (1)
1855_ => throw new ArgumentException("Unexpected type " + type),
BackEnd\TargetEntry_Tests.cs (1)
1325_ => throw new ArgumentException("Unexpected type " + type),
BackEnd\TargetResult_Tests.cs (1)
65TargetResult result = new TargetResult(new TaskItem[] { item }, BuildResultUtilities.GetStopWithErrorResult(new ArgumentException()));
BackEnd\TaskBuilder_Tests.cs (1)
1296_ => throw new ArgumentException("Unexpected type " + type),
BackEnd\TaskThatReturnsDictionaryTaskItem.cs (3)
116throw new ArgumentException("An item with the same key has already been added."); 143throw new ArgumentException("Array must be one-dimensional.", nameof(array)); 153throw new ArgumentException("The number of elements in the source is greater than the available space from index to the end of the destination array.");
Microsoft.Build.Framework (20)
HashHelpers.cs (1)
63throw new ArgumentException(SR.Arg_HTCapacityOverflow);
ImmutableSegmentedList`1.cs (3)
346throw new ArgumentException(); 473throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 487throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
ImmutableSegmentedList`1+ValueBuilder.cs (1)
249throw new ArgumentException();
SegmentedArray.cs (8)
34throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 36throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 54throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 56throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 80throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 82throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 149throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 151throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
SegmentedArray`1.cs (1)
316throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
ThrowHelper.cs (6)
69throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 116return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 177throw new ArgumentException(SR.Argument_InvalidArrayType); 200return new ArgumentException(GetResourceString(resource)); 205return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 210return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
Microsoft.Build.Tasks.CodeAnalysis (4)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
855throw new ArgumentException(e.Message, "Sources");
src\Compilers\Core\MSBuildTask\Utilities.cs (2)
142return new ArgumentException(string.Format(CultureInfo.CurrentCulture, errorString, args), e); 148return new ArgumentException(string.Format(CultureInfo.CurrentCulture, errorString, args));
src\Compilers\Shared\BuildProtocol.cs (1)
134throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
Microsoft.Build.Tasks.CodeAnalysis.Sdk (4)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
855throw new ArgumentException(e.Message, "Sources");
src\Compilers\Core\MSBuildTask\Utilities.cs (2)
142return new ArgumentException(string.Format(CultureInfo.CurrentCulture, errorString, args), e); 148return new ArgumentException(string.Format(CultureInfo.CurrentCulture, errorString, args));
src\Compilers\Shared\BuildProtocol.cs (1)
134throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
Microsoft.Build.Tasks.Core (31)
ErrorUtilities.cs (3)
356throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args), innerException); 532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName)); 622throw new ArgumentException(
GenerateManifestBase.cs (1)
447throw new ArgumentException(String.Empty /* no message */, nameof(manifestType));
ManifestUtil\mansign2.cs (2)
1149throw new ArgumentException("value"); 1173throw new ArgumentException("value");
ManifestUtil\SecurityUtil.cs (2)
569throw new ArgumentException(resources.GetString("CertNotInStore"), nameof(certThumbprint)); 578throw new ArgumentException("TargetFrameworkVersion");
ManifestUtil\TrustInfo.cs (1)
504throw new ArgumentException("Partial trust is not supported.");
MetadataConversionUtilities.cs (1)
46throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("General.InvalidAttributeMetadata", item.ItemSpec, itemMetadataName, metadataValue, "bool"), e);
ResourceHandling\MSBuildResXReader.cs (4)
343throw new ArgumentException(nameof(stringValue)); 349throw new ArgumentException(nameof(stringValue)); 359throw new ArgumentException(nameof(stringValue)); 365throw new ArgumentException(nameof(stringValue));
ResourceHandling\NameUtilities.cs (1)
23throw new ArgumentException(nameof(assemblyQualifiedName));
system.design\stronglytypedresourcebuilder.cs (1)
172throw new ArgumentException(SR.GetString(SR.InvalidIdentifier, className));
XmlPeek.cs (5)
186throw new ArgumentException(ResourceUtilities.GetResourceString("XmlPeek.NamespacesParameterNotWellFormed"), xe); 198throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XmlPeek.NamespacesParameterNoAttribute", prefixAttr)); 205throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XmlPeek.NamespacesParameterNoAttribute", uriAttr)); 237throw new ArgumentException(ResourceUtilities.GetResourceString("XmlPeek.XmlInput.TooMany")); 242throw new ArgumentException(ResourceUtilities.GetResourceString("XmlPeek.XmlInput.TooFew"));
XmlPoke.cs (3)
172throw new ArgumentException(ResourceUtilities.GetResourceString("XmlPoke.NamespacesParameterNotWellFormed"), xe); 185throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XmlPoke.NamespacesParameterNoAttribute", prefixAttr)); 192throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XmlPoke.NamespacesParameterNoAttribute", uriAttr));
XslTransformation.cs (7)
225throw new ArgumentException(ResourceUtilities.GetResourceString("XslTransform.XsltParameterNotWellFormed"), xe); 236throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XslTransform.XsltParameterNoAttribute", "Name")); 241throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XslTransform.XsltParameterNoAttribute", "Value")); 277throw new ArgumentException(ResourceUtilities.GetResourceString("XslTransform.XmlInput.TooMany")); 281throw new ArgumentException(ResourceUtilities.GetResourceString("XslTransform.XmlInput.TooFew")); 386throw new ArgumentException(ResourceUtilities.GetResourceString("XslTransform.XsltInput.TooMany")); 390throw new ArgumentException(ResourceUtilities.GetResourceString("XslTransform.XsltInput.TooFew"));
Microsoft.Build.Tasks.UnitTests (1)
AssemblyDependency\ResolveAssemblyReferenceCacheSerialization.cs (1)
48_ => throw new ArgumentException(),
Microsoft.Build.UnitTests.Shared (1)
MockEngine.cs (1)
208throw new ArgumentException("Expected log setter to be used only to reset the log to empty.");
Microsoft.Build.Utilities.Core (9)
ErrorUtilities.cs (3)
356throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args), innerException); 532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName)); 622throw new ArgumentException(
ToolLocationHelper.cs (6)
3767throw new ArgumentException("Invalid frameworkReferenceRoot", nameof(frameworkReferenceRoot)); 3836throw new ArgumentException("Invalid frameworkReferenceRoot", nameof(frameworkReferenceRoot)); 3841throw new ArgumentException("Invalid frameworkIdentifier", nameof(frameworkIdentifier)); 3903throw new ArgumentException("Invalid frameworkReferenceRoot", nameof(frameworkReferenceRoot)); 3908throw new ArgumentException("Invalid frameworkIdentifier", nameof(frameworkIdentifier)); 3913throw new ArgumentException("Invalid frameworkVersion", nameof(frameworkVersion));
Microsoft.Cci.Extensions (3)
Mappings\SimpleElementMapping.cs (1)
30throw new ArgumentException("Only understand values -1, 0, 1", "diff");
Writers\CSharp\CSDeclarationWriter.Enums.cs (1)
186throw new ArgumentException($"Unsupported type {value.GetType()}", nameof(value));
Writers\DocumentIdWriter.cs (1)
90throw new ArgumentException($"Unknown member type {member}", "member");
Microsoft.CodeAnalysis (159)
CodeAnalysisEventSource.Common.cs (1)
190throw new ArgumentException("Pinned value must match string.");
CommandLine\AnalyzerConfig.cs (1)
191throw new ArgumentException("Must be an absolute path to an editorconfig file", nameof(pathToFile));
Compilation\Compilation.cs (32)
112throw new ArgumentException(CodeAnalysisResources.InconsistentSyntaxTreeFeature, nameof(trees)); 234throw new ArgumentException(CodeAnalysisResources.ReturnTypeCannotBeValuePointerbyRefOrOpen, nameof(globalsType)); 239throw new ArgumentException(CodeAnalysisResources.ReturnTypeCannotBeVoidByRefOrOpen, nameof(returnType)); 250throw new ArgumentException(CodeAnalysisResources.TypeMustBeSameAsHostObjectTypeOfPreviousSubmission, nameof(globalsType)); 274throw new ArgumentException(CodeAnalysisResources.InvalidOutputKindForSubmission, nameof(options)); 283throw new ArgumentException(CodeAnalysisResources.InvalidCompilationOptions, nameof(options)); 355throw new ArgumentException($"{nameof(arity)} must be >= 0", nameof(arity)); 685throw new ArgumentException(string.Format(CodeAnalysisResources.ReferenceOfTypeIsInvalid1, reference.GetType()), 845throw new ArgumentException(string.Format(CodeAnalysisResources.MetadataRefNotFoundToRemove1, r), 1310throw new ArgumentException(CodeAnalysisResources.TuplesNeedAtLeastTwoElements, nameof(elementNames)); 1353throw new ArgumentException(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, nameof(elementNullableAnnotations)); 1368throw new ArgumentException(CodeAnalysisResources.TupleElementNameCountMismatch, nameof(elementNames)); 1375throw new ArgumentException(CodeAnalysisResources.TupleElementNameEmpty, $"{nameof(elementNames)}[{i}]"); 1396throw new ArgumentException(CodeAnalysisResources.TupleElementLocationCountMismatch, nameof(elementLocations)); 1472throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeMemberAndNamesCountMismatch2, 1478throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeArgumentCountMismatch2, 1484throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeArgumentCountMismatch2, 1490throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeArgumentCountMismatch2, 1643throw new ArgumentException(string.Format(CodeAnalysisResources.IsSymbolAccessibleBadWithin, nameof(within)), nameof(within)); 1659throw new ArgumentException(string.Format(CodeAnalysisResources.IsSymbolAccessibleWrongAssembly, parameterName), parameterName); 2833throw new ArgumentException(CodeAnalysisResources.StreamMustSupportWrite, nameof(peStream)); 2840throw new ArgumentException(CodeAnalysisResources.PdbStreamUnexpectedWhenEmbedding, nameof(pdbStream)); 2845throw new ArgumentException(CodeAnalysisResources.StreamMustSupportWrite, nameof(pdbStream)); 2850throw new ArgumentException(CodeAnalysisResources.PdbStreamUnexpectedWhenEmittingMetadataOnly, nameof(pdbStream)); 2856throw new ArgumentException(CodeAnalysisResources.MetadataPeStreamUnexpectedWhenEmittingMetadataOnly, nameof(metadataPEStream)); 2861throw new ArgumentException(CodeAnalysisResources.IncludingPrivateMembersUnexpectedWhenEmittingToMetadataPeStream, nameof(metadataPEStream)); 2873throw new ArgumentException(CodeAnalysisResources.EmbeddingPdbUnexpectedWhenEmittingMetadata, nameof(metadataPEStream)); 2880throw new ArgumentException(CodeAnalysisResources.CannotTargetNetModuleWhenEmittingRefAssembly, nameof(metadataPEStream)); 2884throw new ArgumentException(CodeAnalysisResources.CannotTargetNetModuleWhenEmittingRefAssembly, nameof(options.EmitMetadataOnly)); 2892throw new ArgumentException(CodeAnalysisResources.StreamMustSupportReadAndSeek, nameof(win32Resources)); 2898throw new ArgumentException(CodeAnalysisResources.StreamMustSupportRead, nameof(sourceLinkStream)); 2906throw new ArgumentException(CodeAnalysisResources.EmbeddedTextsRequirePdb, nameof(embeddedTexts));
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
138throw new ArgumentException(nameof(isSuppressed));
Diagnostic\Diagnostic_SimpleDiagnostic.cs (1)
44throw new ArgumentException($"{nameof(warningLevel)} ({warningLevel}) and {nameof(severity)} ({severity}) are not compatible.", nameof(warningLevel));
Diagnostic\DiagnosticDescriptor.cs (1)
166throw new ArgumentException(CodeAnalysisResources.DiagnosticIdCantBeNullOrWhitespace, nameof(id));
Diagnostic\SuppressionDescriptor.cs (2)
60throw new ArgumentException(CodeAnalysisResources.SuppressionIdCantBeNullOrWhitespace, nameof(id)); 65throw new ArgumentException(CodeAnalysisResources.DiagnosticIdCantBeNullOrWhitespace, nameof(suppressedDiagnosticId));
DiagnosticAnalyzer\AnalysisResult.cs (1)
75throw new ArgumentException(CodeAnalysisResources.UnsupportedAnalyzerInstance, nameof(analyzer));
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (2)
60throw new ArgumentException("Cannot be empty", nameof(assemblyResolvers)); 85var fullDirectoryPath = Path.GetDirectoryName(resolvedPath) ?? throw new ArgumentException(message: null, paramName: nameof(resolvedPath));
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (3)
229throw new ArgumentException($"Not a valid assembly: {originalPath}"); 249throw new ArgumentException("Path not registered: " + originalPath, nameof(originalPath)); 268throw new ArgumentException("Path not registered: " + originalPath, nameof(originalPath));
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
440throw new ArgumentException("language");
DiagnosticAnalyzer\AnalyzerImageReference.cs (1)
28throw new ArgumentException("Cannot have null-valued analyzer", nameof(analyzers));
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (2)
307throw new ArgumentException(string.Format(CodeAnalysisResources.SupportedDiagnosticsHasNullDescriptor, analyzer.ToString()), nameof(DiagnosticAnalyzer.SupportedDiagnostics)); 387throw new ArgumentException(string.Format(CodeAnalysisResources.SupportedSuppressionsHasNullDescriptor, analyzer.ToString()), nameof(DiagnosticSuppressor.SupportedSuppressions));
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (10)
137throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(analyzers)); 142throw new ArgumentException(CodeAnalysisResources.ArgumentElementCannotBeNull, nameof(analyzers)); 148throw new ArgumentException(CodeAnalysisResources.DuplicateAnalyzerInstances, nameof(analyzers)); 158throw new ArgumentException(CodeAnalysisResources.UnsupportedAnalyzerInstance, nameof(analyzer)); 166throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(analyzer)); 176throw new ArgumentException(CodeAnalysisResources.UnsupportedAnalyzerInstance, nameof(_analyzers)); 182throw new ArgumentException(CodeAnalysisResources.DuplicateAnalyzerInstances, nameof(analyzers)); 195throw new ArgumentException(CodeAnalysisResources.InvalidTree, nameof(model)); 208throw new ArgumentException(CodeAnalysisResources.InvalidTree, nameof(tree)); 221throw new ArgumentException(CodeAnalysisResources.InvalidAdditionalFile, nameof(file));
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (4)
1363throw new ArgumentException(CodeAnalysisResources.InvalidOperationBlockForAnalysisContext, nameof(operationBlock)); 1496throw new ArgumentException(CodeAnalysisResources.InvalidOperationBlockForAnalysisContext, nameof(operationBlock)); 1941throw new ArgumentException(message); 1948throw new ArgumentException(message);
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (7)
63throw new ArgumentException(string.Format(CodeAnalysisResources.UnsupportedDiagnosticReported, diagnostic.Id), nameof(diagnostic)); 71throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticIdReported, diagnostic.Id), nameof(diagnostic)); 99throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticLocationReported, id, location.SourceTree.FilePath), "diagnostic"); 105throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticSpanReported, id, location.SourceSpan, location.SourceTree.FilePath), "diagnostic"); 126throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(symbolKinds)); 140throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(syntaxKinds)); 153throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(operationKinds));
DiagnosticAnalyzer\DiagnosticStartAnalysisScope.cs (1)
563throw new ArgumentException($"{context.Symbol.Kind} is not supported.", nameof(context));
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (2)
78throw new ArgumentException($"Must be a full path: {baseDirectory}", nameof(baseDirectory)); 230throw new ArgumentException($"Shadow copy path '{shadowCopyPath}' must not be the root directory");
DiagnosticAnalyzer\Suppression.cs (1)
27throw new ArgumentException(message);
DiaSymReader\Utilities\ComMemoryStream.cs (1)
186throw new ArgumentException($"{nameof(origin)} ({origin}) is invalid.", nameof(origin));
EmbeddedText.cs (3)
108throw new ArgumentException(CodeAnalysisResources.SourceTextCannotBeEmbedded, nameof(text)); 147throw new ArgumentException(CodeAnalysisResources.StreamMustSupportReadAndSeek, nameof(stream)); 204throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(filePath));
Emit\SemanticEdit.cs (8)
131throw new ArgumentException("Syntax map can only be specified for updates", nameof(syntaxMap)); 136throw new ArgumentException(CodeAnalysisResources.MethodSymbolExpected, nameof(oldSymbol)); 141throw new ArgumentException(CodeAnalysisResources.MethodSymbolExpected, nameof(newSymbol)); 147throw new ArgumentException("Partial member implementation required", nameof(oldSymbol)); 152throw new ArgumentException("Partial member implementation required", nameof(newSymbol)); 157throw new ArgumentException("Deleted symbol must be a method, property or an event", nameof(oldSymbol)); 174throw new ArgumentException(CodeAnalysisResources.MethodSymbolExpected, nameof(oldSymbol)); 179throw new ArgumentException(CodeAnalysisResources.MethodSymbolExpected, nameof(newSymbol));
FileSystem\CompilerPathUtilities.cs (1)
20throw new ArgumentException(Microsoft.CodeAnalysis.CodeAnalysisResources.AbsolutePathExpected, argumentName);
FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
InternalUtilities\ConcurrentLruCache.cs (1)
124throw new ArgumentException("Key already exists", nameof(key));
MetadataReference\AssemblyIdentity.cs (5)
113throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidAssemblyName, name), nameof(name)); 118throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidCultureName, cultureName), nameof(cultureName)); 131throw new ArgumentException(CodeAnalysisResources.InvalidPublicKey, nameof(publicKeyOrToken)); 138throw new ArgumentException(CodeAnalysisResources.InvalidSizeOfPublicKeyToken, nameof(publicKeyOrToken)); 144throw new ArgumentException(CodeAnalysisResources.WinRTIdentityCantBeRetargetable, nameof(isRetargetable));
MetadataReference\AssemblyMetadata.cs (2)
202throw new ArgumentException(CodeAnalysisResources.AssemblyMustHaveAtLeastOneModule, nameof(modules)); 214throw new ArgumentException(CodeAnalysisResources.ModuleCopyCannotBeUsedToCreateAssemblyMetadata, nameof(modules) + "[" + i + "]");
MetadataReference\CompilationReference.cs (1)
91throw new ArgumentException(CodeAnalysisResources.CannotCreateReferenceToModule);
MetadataReference\MetadataReference.cs (1)
351throw new ArgumentException(CodeAnalysisResources.CantCreateModuleReferenceToAssembly, nameof(properties));
MetadataReference\MetadataReferenceProperties.cs (3)
49throw new ArgumentException(CodeAnalysisResources.CannotEmbedInteropTypesFromModule, nameof(embedInteropTypes)); 54throw new ArgumentException(CodeAnalysisResources.CannotAliasModule, nameof(aliases)); 64throw new ArgumentException(CodeAnalysisResources.InvalidAlias, nameof(aliases));
MetadataReference\ModuleMetadata.cs (1)
217throw new ArgumentException(CodeAnalysisResources.StreamMustSupportReadAndSeek, nameof(peStream));
Operations\ControlFlowGraph.cs (2)
182throw new ArgumentException(CodeAnalysisResources.NotARootOperation, argumentNameForException); 187throw new ArgumentException(CodeAnalysisResources.OperationHasNullSemanticModel, argumentNameForException);
ResourceDescription.cs (2)
76throw new ArgumentException(CodeAnalysisResources.EmptyOrInvalidResourceName, nameof(resourceName)); 88throw new ArgumentException(CodeAnalysisResources.EmptyOrInvalidFileName, nameof(fileName));
RuleSet\RuleSet.cs (1)
74throw new ArgumentException("Effective action cannot be applied to rulesets with Includes");
SourceFileResolver.cs (3)
49throw new ArgumentException(CodeAnalysisResources.AbsolutePathExpected, nameof(baseDirectory)); 68throw new ArgumentException(CodeAnalysisResources.EmptyKeyInPathMap, nameof(pathMap)); 73throw new ArgumentException(CodeAnalysisResources.NullValueInPathMap, nameof(pathMap));
SourceGeneration\AdditionalSourcesCollection.cs (5)
64throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameInvalidChar, hintName, c, i), nameof(hintName)); 72throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameInvalidSegment, hintName, match.Value, match.Index), nameof(hintName)); 78throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameUniquePerGenerator, hintName), nameof(hintName)); 83throw new ArgumentException(string.Format(CodeAnalysisResources.SourceTextRequiresEncoding, hintName), nameof(source)); 129throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameUniquePerGenerator, source.HintName), "hintName");
SourceGeneration\GeneratorDriverOptions.cs (1)
47throw new ArgumentException(message: CodeAnalysisResources.AbsolutePathExpected, nameof(baseDirectory));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
StrongName\DesktopStrongNameProvider.cs (1)
58throw new ArgumentException(CodeAnalysisResources.AbsolutePathExpected, nameof(keyFileSearchPaths));
SymbolDisplay\SymbolDisplayExtensions.cs (2)
27throw new ArgumentException(nameof(parts)); 60throw new ArgumentException(nameof(parts));
Syntax\GreenNode.cs (2)
92if (annotation == null) throw new ArgumentException(paramName: nameof(annotations), message: "" /*CSharpResources.ElementsCannotBeNull*/); 107if (annotation == null) throw new ArgumentException(paramName: nameof(annotations), message: "" /*CSharpResources.ElementsCannotBeNull*/);
Syntax\SeparatedSyntaxList.cs (2)
576throw new ArgumentException("separatorToken"); 582throw new ArgumentException("newSeparator");
Syntax\SyntaxList`1.cs (1)
340throw new ArgumentException(nameof(nodeInList));
Syntax\SyntaxListBuilder.cs (1)
74throw new ArgumentException("Cannot add a null node.");
Syntax\SyntaxNodeExtensions_Tracking.cs (1)
47throw new ArgumentException(CodeAnalysisResources.InvalidNodeToTrack);
Syntax\SyntaxNodeOrToken.cs (1)
904throw new ArgumentException("Must be within node's FullSpan", nameof(position));
Text\LinePositionSpan.cs (1)
33throw new ArgumentException(string.Format(CodeAnalysisResources.EndMustNotBeLessThanStart, start, end), nameof(end));
Text\SourceText.cs (5)
56throw new ArgumentException(CodeAnalysisResources.InvalidHash, nameof(checksum)); 86throw new ArgumentException(CodeAnalysisResources.UnsupportedHashAlgorithm, nameof(checksumAlgorithm)); 194throw new ArgumentException(CodeAnalysisResources.StreamMustSupportReadAndSeek, nameof(stream)); 769throw new ArgumentException(CodeAnalysisResources.ChangesMustBeWithinBoundsOfSourceText, nameof(changes)); 786throw new ArgumentException(CodeAnalysisResources.ChangesMustNotOverlap, nameof(changes));
Text\SourceTextStream.cs (1)
85throw new ArgumentException($"{nameof(count)} must be greater than or equal to {_minimumTargetBufferCount}", nameof(count));
Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
XmlFileResolver.cs (1)
26throw new ArgumentException(CodeAnalysisResources.AbsolutePathExpected, nameof(baseDirectory));
Microsoft.CodeAnalysis.Analyzers (50)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (8)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException( 239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Microsoft.CodeAnalysis.Analyzers.UnitTests (7)
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzerTests.cs (3)
198_ => throw new ArgumentException("Unknown target framework"), 212_ => throw new ArgumentException("Unknown target framework"), 228_ => throw new ArgumentException("Unknown target framework"),
MetaAnalyzers\MissingKindArgumentToRegisterActionRuleTests.cs (2)
234_ => throw new ArgumentException("Unsupported argument kind", nameof(kind)), 249_ => throw new ArgumentException("Unsupported argument kind", nameof(kind)),
MetaAnalyzers\StartActionWithNoRegisteredActionsRuleTests.cs (1)
526_ => throw new ArgumentException("Unsupported action kind", nameof(kind)),
MetaAnalyzers\StartActionWithOnlyEndActionRuleTests.cs (1)
375throw new ArgumentException("Unsupported argument kind", nameof(kind));
Microsoft.CodeAnalysis.AnalyzerUtilities (46)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\ConstructorMapper.cs (1)
96throw new ArgumentException($"ConstructorMapper PropertyAbstractValues has invalid length (expected {propertyCount}, actual length {this.PropertyAbstractValues.Length})");
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\HazardousUsageEvaluator.cs (1)
73throw new ArgumentException(
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\HazardousUsageEvaluatorCollection.cs (1)
31throw new ArgumentException("No HazardUsageEvaluators specified", nameof(hazardousUsageEvaluators));
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\PropertyMapperCollection.cs (3)
26throw new ArgumentException("No PropertyMappers specified", nameof(propertyMappers)); 33throw new ArgumentException( 43throw new ArgumentException(
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\SourceInfo.cs (1)
66throw new ArgumentException("Can't specify constantArrayLengthMatcher unless taintConstantArray is true");
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\InterproceduralAnalysisPredicate.cs (1)
27throw new ArgumentException("You must provide at least one non-null predicate argument");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
Microsoft.CodeAnalysis.BannedApiAnalyzers (50)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (8)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException( 239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Microsoft.CodeAnalysis.CodeStyle (35)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (8)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException( 239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Microsoft.CodeAnalysis.Collections.Package (20)
Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
Microsoft.CodeAnalysis.CSharp (104)
Binder\Binder.QueryUnboundLambdaState.cs (1)
55public override TypeWithAnnotations ParameterTypeWithAnnotations(int index) { throw new ArgumentException(); } // implicitly typed
Binder\LookupOptions.cs (1)
174throw new ArgumentException(CSharpResources.LookupOptionsHasInvalidCombo);
Compilation\CSharpCompilation.cs (29)
546throw new ArgumentException(CodeAnalysisResources.InconsistentLanguageVersions, nameof(syntaxTrees)); 874throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, $"{nameof(trees)}[{i}]"); 879throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, $"{nameof(trees)}[{i}]"); 884throw new ArgumentException(CSharpResources.SubmissionCanOnlyInclude, $"{nameof(trees)}[{i}]"); 896throw new ArgumentException(CSharpResources.SubmissionCanHaveAtMostOne, nameof(trees)); 947throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, $"{nameof(trees)}[{i}]"); 950throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, $"{nameof(trees)}[{i}]"); 1004throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, nameof(newTree)); 1015throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, nameof(oldTree)); 1018throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, nameof(oldTree)); 1023throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, nameof(newTree)); 2401throw new ArgumentException(nameof(rank)); 2547throw new ArgumentException(CSharpResources.SyntaxTreeNotFound, nameof(syntaxTree)); 4121throw new ArgumentException(string.Format(CSharpResources.NotSameNumberParameterTypesAndRefKinds, parameterTypes.Length, parameterRefKinds.Length)); 4127throw new ArgumentException(CSharpResources.OutIsNotValidForReturn); 4132throw new ArgumentException(string.Format(CSharpResources.CallingConventionTypesRequireUnmanaged, nameof(callingConventionTypes), nameof(callingConvention))); 4167throw new ArgumentException(string.Format(CSharpResources.CallingConventionTypeIsInvalid, type.ToDisplayString())); 4220throw new ArgumentException(CodeAnalysisResources.TupleUnderlyingTypeMustBeTupleCompatible, nameof(underlyingType)); 4253throw new ArgumentException($"Non-ReadOnly members are not supported in C# anonymous types."); 4289throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name)); 4293throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name)); 4488throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps2, $"{csharpReturnType.ToDisplayString()} operator {name}({csharpLeftType.ToDisplayString()}, {csharpRightType.ToDisplayString()})")); 4515throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name)); 4519throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name)); 4570throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps2, $"{csharpReturnType.ToDisplayString()} operator {name}({csharpOperandType.ToDisplayString()})")); 4637throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4655throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4676throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4702throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
Compilation\CSharpDeterministicKeyBuilder.cs (2)
23throw new ArgumentException(null, nameof(options)); 43throw new ArgumentException(null, nameof(parseOptions));
Compilation\CSharpSemanticModel.cs (9)
1372throw new ArgumentException(CSharpResources.SyntaxNodeIsNotWithinSynt); 1391throw new ArgumentException(CSharpResources.SpeculatedSyntaxNodeCannotBelongToCurrentCompilation); 1605throw new ArgumentException( 5322throw new ArgumentException("firstStatement is not a StatementSyntax."); 5327throw new ArgumentException("firstStatement is a StatementSyntax but lastStatement isn't."); 5342throw new ArgumentException("statement is not a StatementSyntax."); 5362throw new ArgumentException("firstStatement is not a StatementSyntax."); 5367throw new ArgumentException("lastStatement is not a StatementSyntax."); 5388throw new ArgumentException("statementOrExpression is not a StatementSyntax or an ExpressionSyntax or a ConstructorInitializerSyntax or a PrimaryConstructorBaseTypeSyntax.");
Compilation\MemberSemanticModel.cs (1)
2292throw new ArgumentException($"The parent of {nameof(node)} must not be null unless this is a speculative semantic model.", nameof(node));
Compilation\SyntaxTreeSemanticModel.cs (10)
110throw new ArgumentException("span"); 1724throw new ArgumentException(CSharpResources.InvalidGetDeclarationNameMultipleDeclarators); 2199throw new ArgumentException("typeParameter not within tree"); 2268throw new ArgumentException("statements not within tree"); 2275throw new ArgumentException("global statements not within the same compilation unit"); 2281throw new ArgumentException("statements not within the same statement list"); 2286throw new ArgumentException("first statement does not precede last statement"); 2299throw new ArgumentException("expression not within tree"); 2316throw new ArgumentException("node not within tree"); 2333throw new ArgumentException("node not within tree");
CSharpExtensions.cs (4)
797throw new ArgumentException(string.Format(CSharpResources.IConversionExpressionIsNotCSharpConversion, 823throw new ArgumentException(string.Format(CSharpResources.ICompoundAssignmentOperationIsNotCSharpCompoundAssignment, 849throw new ArgumentException(string.Format(CSharpResources.ICompoundAssignmentOperationIsNotCSharpCompoundAssignment, 874throw new ArgumentException(string.Format(CSharpResources.ISpreadOperationIsNotCSharpSpread, nameof(spread)), nameof(spread));
SymbolDisplay\SymbolDisplay.cs (1)
259throw new ArgumentException(CSharpResources.SyntaxTreeSemanticModelMust);
Symbols\MethodSymbol.cs (2)
875throw new ArgumentException(CSharpResources.TypeArgumentCannotBeNull, nameof(typeArguments)); 880throw new ArgumentException(CSharpResources.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\NamedTypeSymbol.cs (2)
1221throw new ArgumentException(CSharpResources.TypeArgumentCannotBeNull, nameof(typeArguments)); 1226throw new ArgumentException(CSharpResources.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\PublicModel\Symbol.cs (3)
35throw new ArgumentException(nameof(typeArguments)); 41throw new ArgumentException(nameof(typeArgumentNullableAnnotations)); 189throw new ArgumentException(CSharpResources.WrongSemanticModelType, LanguageNames.CSharp);
Symbols\ReducedExtensionMethodSymbol.cs (1)
266throw new System.ArgumentException();
Symbols\SymbolExtensions.cs (2)
379throw new ArgumentException(CSharpResources.NotACSharpSymbol, paramName); 538_ => throw new ArgumentException("only methods, properties, fields and events can take a receiver", nameof(symbol)),
Syntax\InternalSyntax\SyntaxToken.cs (2)
76throw new ArgumentException(string.Format(CSharpResources.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind)); 91throw new ArgumentException(string.Format(CSharpResources.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind));
Syntax\ShebangDirectiveTriviaSyntax.cs (1)
47throw new ArgumentException(nameof(content));
Syntax\SyntaxFactory.cs (14)
208throw new ArgumentException("kind"); 253throw new ArgumentException(CSharpResources.UseVerbatimIdentifier, nameof(kind)); 256throw new ArgumentException(CSharpResources.UseLiteralForTokens, nameof(kind)); 259throw new ArgumentException(CSharpResources.UseLiteralForNumeric, nameof(kind)); 264throw new ArgumentException(string.Format(CSharpResources.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind)); 325throw new ArgumentException("text should not start with an @ character."); 1420throw new ArgumentException($"{nameof(nodes)} must not be empty.", nameof(nodes)); 1433throw new ArgumentException($"{nameof(separators)} must have 1 fewer element than {nameof(nodes)}", nameof(separators)); 1442throw new ArgumentException($"When {nameof(nodes)} is null, {nameof(separators)} must also be null.", nameof(separators)); 1468throw new ArgumentException(CodeAnalysisResources.NodeOrTokenOutOfSequence); 1473throw new ArgumentException(CodeAnalysisResources.UnexpectedTypeOfNodeInList); 2334throw new ArgumentException(CSharpResources.SyntaxTreeIsNotASubmission); 2783: throw new ArgumentException(nameof(body)); 2788: throw new ArgumentException(nameof(body));
Utilities\ValueSetFactory.BoolValueSet.cs (1)
41ConstantValue IValueSet.Sample => ConstantValue.Create(_hasTrue ? true : _hasFalse ? false : throw new ArgumentException());
Utilities\ValueSetFactory.ByteTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.CharTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.DecimalTC.cs (2)
104throw new ArgumentException("relation"); 139throw new ArgumentException("scale");
Utilities\ValueSetFactory.DoubleTC.cs (1)
79throw new ArgumentException("relation");
Utilities\ValueSetFactory.EnumeratedValueSet.cs (1)
52if (IsEmpty) throw new ArgumentException();
Utilities\ValueSetFactory.FloatingValueSet.cs (1)
56throw new ArgumentException();
Utilities\ValueSetFactory.IntTC.cs (1)
49throw new ArgumentException("relation");
Utilities\ValueSetFactory.LongTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.NintValueSet.cs (1)
53throw new ArgumentException();
Utilities\ValueSetFactory.NuintValueSet.cs (1)
44throw new ArgumentException();
Utilities\ValueSetFactory.NumericValueSet.cs (1)
61throw new ArgumentException();
Utilities\ValueSetFactory.SByteTC.cs (1)
38throw new ArgumentException("relation");
Utilities\ValueSetFactory.ShortTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.SingleTC.cs (1)
83throw new ArgumentException("relation");
Utilities\ValueSetFactory.UIntTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.ULongTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.UShortTC.cs (1)
39throw new ArgumentException("relation");
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
334throw new ArgumentException(CSharpCompilerExtensionsResources.Expected_string_or_char_literal, nameof(token));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\CSharpStructuredTriviaFormatEngine.cs (1)
22var root = trivia.GetStructure() ?? throw new ArgumentException();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
325throw new ArgumentException("target"); 374throw new ArgumentException("attributeToRemove"); 389throw new ArgumentException("attributeToRemove"); 474throw new ArgumentException("attributeToRemove");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
85throw new ArgumentException(string.Format(WorkspaceExtensionsResources.Cannot_generate_code_for_unsupported_operator_0, method.Name), nameof(method));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
222_ => throw new ArgumentException("Unsupported return type", nameof(returnType)),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Diagnostics\DiagnosticAnalyzerTests.cs (5)
854string message = new ArgumentException(string.Format(CodeAnalysisResources.UnsupportedDiagnosticReported, AnalyzerReportingUnsupportedDiagnostic.UnsupportedDescriptor.Id), "diagnostic").Message; 912string message = new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticIdReported, AnalyzerWithInvalidDiagnosticId.Descriptor.Id), "diagnostic").Message; 952string message = new ArgumentException(string.Format(CodeAnalysisResources.SupportedDiagnosticsHasNullDescriptor, analyzerFullName), "SupportedDiagnostics").Message; 1014string message = new ArgumentException( 1107string message = new ArgumentException(
Semantics\PatternMatchingTests3.cs (1)
4907_ => throw new ArgumentException("unexpected", nameof(kind)),
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.ItemGetter.cs (1)
187_ => throw new ArgumentException("Unexpected interface member symbol kind")
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (3)
156throw new ArgumentException("GroupJoin is not supported"); 216throw new ArgumentException($"Unexpected node kind {node.Kind()}"); 806throw new ArgumentException("Last node must me the select clause");
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IConversionExpression.cs (2)
5407throw new ArgumentException($"Cannot handle syntax of type {syntax.GetType()}"); 5432throw new ArgumentException($"Cannot handle arguments of type {operation.GetType()}");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Extensions.cs (1)
51throw new ArgumentException("Specified value must be greater than zero.", nameof(occurrence));
Microsoft.CodeAnalysis.CSharp.Workspaces (13)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
308throw new ArgumentException("Unknown operator kind."); 355_ => throw new ArgumentException("Unknown operator kind."),
Simplification\CSharpSimplificationService.cs (1)
72throw new ArgumentException(CSharpWorkspaceResources.Only_attributes_constructor_initializers_expressions_or_statements_can_be_made_explicit, nameof(node));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
334throw new ArgumentException(CSharpCompilerExtensionsResources.Expected_string_or_char_literal, nameof(token));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\CSharpStructuredTriviaFormatEngine.cs (1)
22var root = trivia.GetStructure() ?? throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (5)
325throw new ArgumentException("target"); 374throw new ArgumentException("attributeToRemove"); 389throw new ArgumentException("attributeToRemove"); 474throw new ArgumentException("attributeToRemove"); 566throw new ArgumentException(WorkspaceExtensionsResources.No_available_location_found_to_add_statements_to);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (2)
38throw new ArgumentException(WorkspaceExtensionsResources.Namespace_can_not_be_added_in_this_destination); 60throw new ArgumentException(WorkspaceExtensionsResources.Namespace_can_not_be_added_in_this_destination);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
85throw new ArgumentException(string.Format(WorkspaceExtensionsResources.Cannot_generate_code_for_unsupported_operator_0, method.Name), nameof(method));
Microsoft.CodeAnalysis.EditorFeatures (9)
ExternalAccess\IntelliCode\IntentProcessor.cs (1)
42throw new ArgumentException("could not retrieve document for request snapshot");
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
554throw new ArgumentException(WorkspacesResources.The_specified_document_is_not_a_version_of_this_document);
Interactive\InteractiveGlobalUndoServiceFactory.cs (1)
49throw new ArgumentException(EditorFeaturesResources.Given_Workspace_doesn_t_support_Undo);
Lightup\LightupHelpers.cs (4)
192throw new ArgumentException($"Type '{argType}' was expected to match parameter type '{parameters[0].ParameterType}'", nameof(argType)); 379throw new ArgumentException($"Type '{argType}' was expected to match parameter type '{parameters[0].ParameterType}'", nameof(argType)); 460throw new ArgumentException($"Type '{arg0Type}' was expected to match parameter type '{parameters[0].ParameterType}'", nameof(arg0Type)); 464throw new ArgumentException($"Type '{arg1Type}' was expected to match parameter type '{parameters[1].ParameterType}'", nameof(arg1Type));
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (2)
144throw new ArgumentException("SpanTrackingMode.Custom not allowed.", "spanTrackingMode"); 225throw new ArgumentException(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (8)
ChangeSignature\AddedParameterOrExistingIndex.cs (2)
70_ => throw new ArgumentException("Unsupported language") 75throw new ArgumentException($"Could not bind type {_addedParameterFullyQualifiedTypeName}", nameof(_addedParameterFullyQualifiedTypeName));
ExtractInterface\ExtractInterfaceTestState.cs (1)
61throw new ArgumentException("markup does not contain a cursor position", nameof(workspace));
PullMemberUp\TestPullMemberUpService.cs (2)
48throw new ArgumentException($"No target base type for {containingType}"); 72throw new ArgumentException($"No Matching target base type for {DestinationName}");
RefactoringHelpers\RefactoringHelpersTestBase.cs (2)
78throw new ArgumentException("Invalid missing test format: only `[|...|]` (selection) should be present."); 93throw new ArgumentException("Invalid test format: both `[|...|]` (selection) and `{|result:...|}` (retrieved node span) selections are required for a test.");
Utilities\TestEditorOptions.cs (1)
53throw new ArgumentException("key", "unexpected key");
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.cs (1)
18=> TryGetTextBuffer(textContainer) ?? throw new ArgumentException(TextEditorResources.textContainer_is_not_a_SourceTextContainer_that_was_created_from_an_ITextBuffer, nameof(textContainer));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
RenameTracking\RenameTrackingTestState.cs (1)
114throw new ArgumentException("Invalid language name: " + languageName, nameof(languageName));
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.cs (1)
191throw new ArgumentException("Invalid field token.", nameof(fieldToken));
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (6)
Debugger\Engine\DkmClrModuleInstance.cs (1)
53throw new ArgumentException();
Debugger\Engine\DkmClrValue.cs (3)
257throw new ArgumentException(string.Format("Nested braces in '{0}'", formatString)); 265throw new ArgumentException(string.Format("Unmatched closing brace in '{0}'", formatString)); 374throw new ArgumentException(string.Format("Unmatched open brace in '{0}'", formatString));
Debugger\Engine\DkmDataContainer.cs (1)
44throw new ArgumentException("Data item already exists", nameof(item));
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.cs (1)
191throw new ArgumentException("Invalid field token.", nameof(fieldToken));
Microsoft.CodeAnalysis.Extensions.Package (21)
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
Microsoft.CodeAnalysis.ExternalAccess.FSharp (4)
InlineHints\FSharpInlineHint.cs (1)
28throw new ArgumentException($"{nameof(displayParts)} must be non-empty");
SignatureHelp\FSharpSignatureHelpItem.cs (1)
52throw new ArgumentException(FeaturesResources.Variadic_SignatureHelpItem_must_have_at_least_one_parameter);
SignatureHelp\FSharpSignatureHelpItems.cs (2)
73throw new ArgumentException($"{nameof(argumentIndex)} < 0. {argumentIndex} < 0", nameof(argumentIndex)); 78throw new ArgumentException($"{nameof(argumentCount)} < {nameof(argumentIndex)}. {argumentCount} < {argumentIndex}", nameof(argumentIndex));
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
RazorMappedSpanResult.cs (1)
22throw new ArgumentException(nameof(filePath));
Microsoft.CodeAnalysis.Features (22)
BraceMatching\BraceMatchingService.cs (1)
29throw new ArgumentException(nameof(position));
CodeFixes\Suppression\ExportConfigurationFixProviderAttribute.cs (1)
39throw new ArgumentException(nameof(languages));
CodeLens\CodeLensReferencesService.cs (1)
115throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Unsupported language '{0}'", semanticModel.Language), nameof(semanticModel));
CodeRefactorings\CodeRefactoring.cs (1)
42throw new ArgumentException(FeaturesResources.Actions_can_not_be_empty, nameof(actions));
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (3)
119throw new ArgumentException(nameof(container)); 193throw new ArgumentException(nameof(targetNamespace)); 198throw new ArgumentException(nameof(container));
Completion\SharedSyntaxContextsWithSpeculativeModel.cs (1)
36throw new ArgumentException("Don't support getting SyntaxContext for document unrelated to the original document");
Debugging\DebugInformationReaderProvider.cs (1)
133throw new ArgumentException(CompilerExtensionsResources.StreamMustSupportReadAndSeek, nameof(stream));
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (3)
155throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_in_file_1_which_is_not_part_of_the_compilation_being_analyzed, id, location.SourceTree.FilePath), "diagnostic"); 161throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_1_in_file_2_which_is_outside_of_the_given_file, id, location.SourceSpan, location.SourceTree.FilePath), "diagnostic"); 184throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_1_in_file_2_which_is_outside_of_the_given_file, id, location.SourceSpan, filePath), "diagnostic");
FindUsages\DefinitionsAndReferences.cs (1)
43throw new ArgumentException(
InlineHints\InlineHint.cs (1)
47throw new ArgumentException($"{nameof(displayParts)} must be non-empty");
MetadataAsSource\MetadataAsSourceFileService.cs (1)
84throw new ArgumentException(FeaturesResources.symbol_cannot_be_a_namespace, nameof(symbol));
MetadataAsSource\SymbolMappingServiceFactory.cs (1)
35throw new ArgumentException(FeaturesResources.Document_must_be_contained_in_the_workspace_that_created_this_service, nameof(document));
Shared\Extensions\ISymbolExtensions_2.cs (2)
89throw new ArgumentException(FeaturesResources.The_symbol_does_not_have_an_icon, nameof(symbol)); 160throw new ArgumentException(FeaturesResources.The_symbol_does_not_have_an_icon, nameof(symbol));
SignatureHelp\SignatureHelpItem.cs (1)
51throw new ArgumentException(FeaturesResources.Variadic_SignatureHelpItem_must_have_at_least_one_parameter);
SignatureHelp\SignatureHelpItems.cs (1)
74throw new ArgumentException($"{nameof(semanticParameterIndex)} < 0. {semanticParameterIndex} < 0", nameof(semanticParameterIndex));
Snippets\SnippetChange.cs (1)
39throw new ArgumentException($"{nameof(textChanges)} must not be empty.");
Snippets\SnippetPlaceholder.cs (1)
37throw new ArgumentException($"{nameof(text)} must not be an null or empty.");
Microsoft.CodeAnalysis.InteractiveHost (21)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
Microsoft.CodeAnalysis.LanguageServer (3)
CustomExportAssemblyLoader.cs (1)
88throw new ArgumentException($"Code base {codeBaseUriStr} for {assemblyName} is not a file URI.", nameof(codeBaseUriStr));
Services\StarredCompletions\StarredCompletionsAssemblyHelper.cs (2)
128throw new ArgumentException($"{assembly.FullName} assembly did not contain {className} class"); 133throw new ArgumentException($"{className} from {assembly.FullName} assembly did not contain {methodName} method");
Microsoft.CodeAnalysis.LanguageServer.Protocol (9)
Extensions\Extensions.cs (2)
252throw new ArgumentException(string.Format("Document project language {0} is not valid", document.Project.Language)); 464_ => throw new ArgumentException($"Unknown glyph value: {glyph}", nameof(glyph)),
Extensions\ProtocolConversions.cs (1)
326throw new ArgumentException($"Range={RangeToString(range)}. text.Length={text.Length}. text.Lines.Count={text.Lines.Count}", ex);
Handler\InlineCompletions\XmlSnippetParser.cs (1)
89throw new ArgumentException($"Missing file path for snippet {snippetInfo.Title}");
Handler\MapCode\MapCodeHandler.cs (2)
83?? throw new ArgumentException($"mapCode sub-request failed: MapCodeMapping.TextDocument not expected to be null."); 87throw new ArgumentException($"mapCode sub-request for {textDocument.DocumentUri} failed: can't find this document in the workspace.");
Protocol\Converters\SumConverter.cs (1)
60throw new ArgumentException(nameof(sumTypeType), "All constructor parameter types must be represented in the generic type arguments of the SumType");
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\TypeRef.cs (2)
108var typeName = type.FullName ?? throw new ArgumentException($"{nameof(type)} has null {nameof(type.FullName)} property.", nameof(type)); 109var assemblyName = type.Assembly.FullName ?? throw new ArgumentException($"{nameof(type)} has null {nameof(type.Assembly)}.{nameof(type.Assembly.FullName)} property.", nameof(type));
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (1)
320throw new ArgumentException($"{enumType.Name} has only one value.");
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (50)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (8)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException( 239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Microsoft.CodeAnalysis.PublicApiAnalyzers (38)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
Microsoft.CodeAnalysis.Rebuild (2)
CompilationFactory.cs (2)
120throw new ArgumentException(RebuildResources.PDB_stream_must_be_null_because_the_compilation_has_an_embedded_PDB, nameof(rebuildPdbStream)); 130throw new ArgumentException(RebuildResources.A_non_null_PDB_stream_must_be_provided_because_the_compilation_does_not_have_an_embedded_PDB, nameof(rebuildPdbStream));
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RoundTripUtil.cs (1)
159throw new ArgumentException("Unsupported DebugInformationFormat: " + emitOptions.DebugInformationFormat);
Microsoft.CodeAnalysis.ResxSourceGenerator (38)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Verifiers\CSharpSourceGeneratorVerifier`1+Test.cs (1)
135throw new ArgumentException("Syntax tree encoding was not specified");
Verifiers\VisualBasicSourceGeneratorVerifier`1+Test.cs (1)
120throw new ArgumentException("Syntax tree encoding was not specified");
Microsoft.CodeAnalysis.Scripting (12)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (1)
163throw new ArgumentException(ScriptingResources.AbsolutePathExpected, nameof(path));
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (3)
82throw new ArgumentException(e.Message, nameof(directory)); 98throw new ArgumentException(e.Message, nameof(noShadowCopyDirectories)); 118throw new ArgumentException(ScriptingResources.AbsolutePathExpected, argumentName);
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (1)
100throw new ArgumentException(null, nameof(typeArguments));
Script.cs (4)
565throw new ArgumentException(ScriptingResources.StartingStateIncompatible, nameof(previousState)); 592throw new ArgumentException(ScriptingResources.ScriptRequiresGlobalVariables, nameof(globals)); 600throw new ArgumentException(string.Format(ScriptingResources.GlobalsNotAssignable, runtimeType, globalsTypeInfo), nameof(globals)); 605throw new ArgumentException(ScriptingResources.GlobalVariablesWithoutGlobalType, nameof(globals));
src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
166throw new ArgumentException(Microsoft.CodeAnalysis.Scripting.ScriptingResources.InvalidAssemblyName);
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (2)
445throw new ArgumentException(Scripting.ScriptingResources.InvalidCharactersInAssemblyName, nameof(name)); 470throw new ArgumentException(Microsoft.CodeAnalysis.Scripting.ScriptingResources.InvalidCharactersInAssemblyName, nameof(name));
Microsoft.CodeAnalysis.Test.Utilities (16)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
1298Assert.Equal(new ArgumentException(CodeAnalysisResources.InvalidOperationBlockForAnalysisContext, "operationBlock").Message, ex.Message);
Diagnostics\DiagnosticExtensions.cs (1)
70throw new ArgumentException("Must specify expected errors.", nameof(expected));
Diagnostics\OperationTestAnalyzer.cs (1)
1404throw new ArgumentException();
FX\DirectoryHelper.cs (1)
23throw new ArgumentException("Directory '" + path + "' does not exist.", nameof(path));
MarkedSource\MarkupTestFile.cs (5)
126throw new ArgumentException(string.Format("Saw multiple occurrences of {0}", PositionString)); 139throw new ArgumentException(string.Format("Saw {0} without matching {1}", SpanEndString, SpanStartString)); 153throw new ArgumentException(string.Format("Saw {0} without matching {1}", NamedSpanEndString, NamedSpanStartString)); 166throw new ArgumentException(string.Format("Saw {0} without matching {1}", SpanStartString, SpanEndString)); 171throw new ArgumentException(string.Format("Saw {0} without matching {1}", NamedSpanEndString, NamedSpanEndString));
Metadata\IlasmUtilities.cs (1)
127throw new ArgumentException(
Platform\Desktop\TestHelpers.cs (2)
29throw new ArgumentException("interfaceType is not an interface.", nameof(interfaceType)); 50throw new ArgumentException("Invalid arguments");
TestableCompiler.cs (3)
64throw new ArgumentException(null, nameof(fileSystem)); 116throw new ArgumentException(null, nameof(buildPaths)); 163throw new ArgumentException(null, nameof(buildPaths));
TestHelpers.cs (1)
159throw new ArgumentException("Length of the input string must be even", nameof(input));
Microsoft.CodeAnalysis.Threading.Package (20)
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
Microsoft.CodeAnalysis.UnitTests (14)
Collections\ImmutablesTestBase.nonnetstandard.cs (1)
35throw new ArgumentException("Collection must contain at least two elements.", nameof(objectUnderTest));
Collections\List\IEnumerable.Generic.Tests.cs (1)
271throw new ArgumentException(
Collections\List\SegmentedList.Generic.Tests.Misc.cs (2)
496throw new ArgumentException("invalid argument passed to testcase"); 572throw new ArgumentException("invalid argument passed to testcase");
Diagnostics\OperationTests.cs (7)
158Assert.Equal(new ArgumentException(argumentExceptionMessage, "body").Message, ex.Message); 176Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message); 194Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message); 212Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message); 234Assert.Equal(new ArgumentException(argumentExceptionMessage, "constructorBody").Message, ex.Message); 254Assert.Equal(new ArgumentException(argumentExceptionMessage, "methodBody").Message, ex.Message); 315Assert.Equal(ex.Message, new ArgumentException(CodeAnalysisResources.NotARootOperation, "operation").Message);
InternalUtilities\StreamExtensionsTests.cs (1)
55throw new ArgumentException();
SourceFileResolverTest.cs (2)
42Assert.Equal(new ArgumentException(CodeAnalysisResources.NullValueInPathMap, "pathMap").Message, argException.Message); 65Assert.Equal(new ArgumentException(CodeAnalysisResources.AbsolutePathExpected, "baseDirectory").Message, argException.Message);
Microsoft.CodeAnalysis.VisualBasic (5)
Symbols\Retargeting\RetargetingFieldSymbol.vb (1)
51Throw New ArgumentException()
Symbols\Retargeting\RetargetingMethodSymbol.vb (1)
64Throw New ArgumentException()
Symbols\Retargeting\RetargetingNamedTypeSymbol.vb (1)
56Throw New ArgumentException()
Symbols\Retargeting\RetargetingNamespaceSymbol.vb (1)
42Throw New ArgumentException()
Symbols\Retargeting\RetargetingTypeParameterSymbol.vb (1)
40Throw New ArgumentException()
Microsoft.CodeAnalysis.Workspaces (150)
CodeCleanup\Providers\ExportCodeCleanupProvider.cs (1)
26throw new ArgumentException("languages");
CodeFixes\CodeFixContext.cs (3)
242throw new ArgumentException(WorkspacesResources.At_least_one_diagnostic_must_be_supplied, nameof(diagnostics)); 247throw new ArgumentException(WorkspaceExtensionsResources.Supplied_diagnostic_cannot_be_null, nameof(diagnostics)); 252throw new ArgumentException(string.Format(WorkspacesResources.Diagnostic_must_have_span_0, span.ToString()), nameof(diagnostics));
CodeFixes\ExportCodeFixProviderAttribute.cs (1)
57throw new ArgumentException(message);
CodeFixes\FixAllOccurrences\FixAllContext.cs (2)
124throw new ArgumentException(WorkspacesResources.FixAllScope_ContainingType_and_FixAllScope_ContainingMember_are_not_supported_with_this_constructor, 204throw new ArgumentException(WorkspacesResources.FixAllScope_ContainingType_and_FixAllScope_ContainingMember_are_not_supported_with_this_constructor,
CodeFixes\FixAllOccurrences\FixAllProvider.cs (1)
93throw new ArgumentException(WorkspacesResources.FixAllScope_Custom_is_not_supported_with_this_API, nameof(supportedFixAllScopes));
CodeRefactorings\ExportCodeRefactoringProviderAttribute.cs (1)
53throw new ArgumentException(message);
CodeRefactorings\FixAllOccurences\FixAllProvider.cs (1)
91throw new ArgumentException(WorkspacesResources.FixAllScope_Custom_is_not_supported_with_this_API, nameof(supportedFixAllScopes));
Differencing\Match.cs (3)
45throw new ArgumentException(string.Format(WorkspacesResources.Matching_nodes_0_and_1_must_have_the_same_label, knownMatch.Key, knownMatch.Value), nameof(knownMatches)); 50throw new ArgumentException(string.Format(WorkspacesResources.Node_0_must_be_contained_in_the_old_tree, knownMatch.Key), nameof(knownMatches)); 55throw new ArgumentException(string.Format(WorkspacesResources.Node_0_must_be_contained_in_the_new_tree, knownMatch.Value), nameof(knownMatches));
Editing\SymbolEditor.cs (3)
275throw new ArgumentException(string.Format(WorkspacesResources.The_symbol_0_cannot_be_located_within_the_current_solution, argSymbol.Name)); 333throw new ArgumentException("The location specified is not part of the solution.", nameof(location)); 413throw new ArgumentException(string.Format(WorkspacesResources.The_member_0_is_not_declared_within_the_declaration_of_the_symbol, member.Name));
Editing\SyntaxEditor.cs (1)
242throw new ArgumentException(WorkspacesResources.The_node_is_not_part_of_the_tree, nameof(node));
Editing\SyntaxGenerator.cs (4)
281throw new ArgumentException($"Method kind '{method.MethodKind}' is not an operator."); 808throw new ArgumentException("Symbol cannot be converted to a declaration"); 1978throw new ArgumentException("Tuples must have at least two elements.", nameof(elements)); 2006throw new ArgumentException("The number of element names must match the cardinality of the tuple.", nameof(elementNames));
Log\HistogramLogAggregator.cs (1)
25throw new ArgumentException();
Options\OptionKey.cs (1)
28throw new ArgumentException(CompilerExtensionsResources.A_language_name_cannot_be_specified_for_this_option);
Rename\Renamer.cs (2)
51throw new ArgumentException(WorkspacesResources._0_must_be_a_non_null_and_non_empty_string, nameof(newName)); 63throw new ArgumentException(resolution.ErrorMessage);
Rename\Renamer.RenameDocumentActionSet.cs (1)
82throw new ArgumentException(string.Format(WorkspacesResources.Cannot_apply_action_that_is_not_in_0, nameof(ApplicableActions)));
Shared\Utilities\ExtensionOrderer.Node.cs (1)
26throw new ArgumentException(WorkspacesResources.Cycle_detected_in_extensions);
src\Compilers\Core\Portable\CodeAnalysisEventSource.Common.cs (1)
190throw new ArgumentException("Pinned value must match string.");
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (3)
229throw new ArgumentException($"Not a valid assembly: {originalPath}"); 249throw new ArgumentException("Path not registered: " + originalPath, nameof(originalPath)); 268throw new ArgumentException("Path not registered: " + originalPath, nameof(originalPath));
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (2)
78throw new ArgumentException($"Must be a full path: {baseDirectory}", nameof(baseDirectory)); 230throw new ArgumentException($"Shadow copy path '{shadowCopyPath}' must not be the root directory");
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (8)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException( 239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
60throw new ArgumentException($"{nameof(GetRequiredDocument)} was given a source-generated DocumentId, but it will never return a source generated document. The caller needs to be calling some other method.");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Workspace\CommandLineProject.cs (4)
31throw new ArgumentException(WorkspacesResources.Unrecognized_language_name); 69throw new ArgumentException(string.Format(WorkspacesResources.Can_t_resolve_metadata_reference_colon_0, ((UnresolvedMetadataReference)unresolvedMetadataReferences).Reference)); 82throw new ArgumentException(string.Format(WorkspacesResources.Can_t_resolve_analyzer_reference_colon_0, ((UnresolvedAnalyzerReference)unresolvedAnalyzerReferences).Display)); 96throw new ArgumentException(string.Format(WorkspacesResources.An_error_occurred_while_reading_the_specified_configuration_file_colon_0, e.Message));
Workspace\Host\DocumentService\ISpanMappingService.cs (1)
74throw new System.ArgumentException(nameof(filePath));
Workspace\Host\Mef\ExportDynamicFileInfoProviderAttribute.cs (1)
32throw new ArgumentException(nameof(extensions));
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (2)
151throw new ArgumentException("The reference was already disposed at " + previousDisposalLocation); 155throw new ArgumentException("Attempting to stop watching a file that we never started watching. This is a bug.");
Workspace\ProjectSystem\IFileChangeWatcher.cs (1)
41throw new ArgumentException($"{nameof(extensionFilters)} should only contain entries starting with a period.", nameof(extensionFilters));
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (12)
103throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 120throw new ArgumentException($"'{fullPath}' has already been added to this project.", nameof(fullPath)); 172throw new ArgumentException($"{nameof(textContainer)} is already added to this project.", nameof(textContainer)); 179throw new ArgumentException($"'{fullPath}' has already been added to this project."); 218throw new ArgumentException($"'{filePath}' has already been added to this project.", nameof(filePath)); 251throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 257throw new ArgumentException($"'{fullPath}' is not a dynamic file of this project."); 271throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 278throw new ArgumentException($"'{fullPath}' is not a source file of this project."); 333throw new ArgumentException($"{nameof(textContainer)} is not a text container added to this project."); 388throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 529throw new ArgumentException("The specified files do not equal the project document count.", nameof(filePaths));
Workspace\ProjectSystem\ProjectSystemProject.cs (9)
970throw new ArgumentException($"{dynamicFilePath} has already been added to this project."); 1010throw new ArgumentException($"{dynamicFilePath} wasn't added by a previous call to {nameof(AddDynamicSourceFile)}"); 1080throw new ArgumentException($"'{fullPath}' has already been added to this project.", nameof(fullPath)); 1101throw new ArgumentException("message", nameof(fullPath)); 1126throw new ArgumentException($"'{fullPath}' is not an analyzer of this project.", nameof(fullPath)); 1227throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 1273throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 1303throw new ArgumentException("The project reference has already been added to the project."); 1365throw new ArgumentException("The project does not contain that project reference.");
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
774throw new ArgumentException($"Project does not contain output path '{outputPath}'", nameof(outputPath));
Workspace\Solution\Checksum.cs (1)
55throw new ArgumentException($"checksum must be equal or bigger than the hash size: {HashSize}", nameof(checksum));
Workspace\Solution\CompilationOutputInfo.cs (1)
43throw new ArgumentException(WorkspacesResources.AbsolutePathExpected, nameof(path));
Workspace\Solution\Document.cs (2)
63throw new ArgumentException($"{nameof(otherTextDocument)} isn't a regular document.", nameof(otherTextDocument)); 471throw new ArgumentException(WorkspacesResources.The_specified_document_is_not_a_version_of_this_document);
Workspace\Solution\DocumentId.cs (1)
55throw new ArgumentException(nameof(id));
Workspace\Solution\Project.cs (1)
819throw new ArgumentException(string.Format(WorkspacesResources._0_is_in_a_different_project, documentId));
Workspace\Solution\ProjectId.cs (1)
63throw new ArgumentException(nameof(id));
Workspace\Solution\Solution.cs (2)
662throw new ArgumentException(WorkspacesResources.Project_does_not_contain_specified_reference, nameof(projectReference)); 1731_ => throw new ArgumentException(WorkspacesResources.Options_did_not_come_from_specified_Solution, paramName: nameof(options))
Workspace\Solution\SolutionId.cs (1)
48throw new ArgumentException(nameof(id));
Workspace\Solution\SolutionState.cs (2)
391throw new ArgumentException(string.Format(WorkspacesResources.The_language_0_is_not_supported, language)); 838throw new ArgumentException($"The specified documents do not equal the project document count.", nameof(documentIds));
Workspace\Solution\VersionStamp.cs (1)
57throw new ArgumentException(WorkspacesResources.DateTimeKind_must_be_Utc, nameof(utcLastModified));
Workspace\Workspace.cs (20)
578_ => throw new ArgumentException(WorkspacesResources.Options_did_not_come_from_specified_Solution, paramName: nameof(value)) 1308throw new ArgumentException(string.Format( 2354throw new ArgumentException(WorkspacesResources.Workspace_is_not_empty); 2368throw new ArgumentException(string.Format( 2384throw new ArgumentException(string.Format( 2397throw new ArgumentException(string.Format( 2410throw new ArgumentException(string.Format( 2424throw new ArgumentException(string.Format( 2437throw new ArgumentException(WorkspacesResources.Metadata_is_not_referenced); 2448throw new ArgumentException(WorkspacesResources.Metadata_is_already_referenced); 2459throw new ArgumentException(string.Format(WorkspacesResources._0_is_not_present, analyzerReference)); 2470throw new ArgumentException(string.Format(WorkspacesResources._0_is_already_present, analyzerReference)); 2481throw new ArgumentException(string.Format(WorkspacesResources._0_is_not_present, analyzerReference)); 2492throw new ArgumentException(string.Format(WorkspacesResources._0_is_already_present, analyzerReference)); 2506throw new ArgumentException(string.Format( 2522throw new ArgumentException(string.Format( 2538throw new ArgumentException(string.Format( 2551throw new ArgumentException(string.Format( 2567throw new ArgumentException(string.Format( 2583throw new ArgumentException(string.Format(
Workspace\Workspace_Editor.cs (5)
164throw new ArgumentException(string.Format(WorkspacesResources._0_still_contains_open_documents, this.GetProjectName(projectId))); 336throw new ArgumentException( 346throw new ArgumentException(string.Format( 375throw new ArgumentException(string.Format( 663throw new ArgumentException(string.Format(
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\DiagnosticReporter.cs (1)
43throw new ArgumentException(string.Format(WorkspaceMSBuildResources.Invalid_0_specified_1, nameof(DiagnosticReportingMode), nameof(mode)), nameof(mode));
MSBuild\ProjectMap.cs (2)
104throw new ArgumentException(WorkspaceMSBuildResources.Project_does_not_have_a_path); 114throw new ArgumentException(WorkspaceMSBuildResources.Project_already_added);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (24)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
31throw new ArgumentException(WorkspaceMSBuildBuildHostResources.Parameter_cannot_be_null_empty_or_contain_whitespace, nameof(name));
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
124throw new ArgumentException("Key already exists", nameof(key));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (10)
ObjectExtensions.cs (1)
25throw new ArgumentException("Property " + propertyName + " was not found on type " + type.ToString());
Workspaces\TestWorkspace_XmlConsumption.cs (8)
291throw new ArgumentException("Unexpected language '{0}' for generating custom parse options.", language); 366throw new ArgumentException($"{projectElement} is missing a {LanguageAttributeName} attribute."); 373throw new ArgumentException(string.Format("Language should be one of '{0}' and it is {1}", 566throw new ArgumentException($"Linked files must specify either a {LinkAssemblyNameAttributeName} or {LinkProjectNameAttributeName}"); 585throw new ArgumentException($"Linked file's {LinkProjectNameAttributeName} '{originalProjectName}' project not found."); 589throw new ArgumentException($"Linked file's {LinkAssemblyNameAttributeName} '{originalAssemblyName}' project not found."); 597throw new ArgumentException($"Linked files must specify a {LinkFilePathAttributeName}"); 607throw new ArgumentException($"Linked file's LinkFilePath '{originalDocumentPath}' file not found.");
Workspaces\TestWorkspace`1.cs (1)
608throw new ArgumentException();
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\ProjectDependencyGraphTests.cs (1)
692throw new ArgumentException("Invalid project definition: " + projectDefinition);
UtilityTest\AsyncLazyTests.cs (1)
277var exception = new ArgumentException();
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
TypeRef.cs (2)
108var typeName = type.FullName ?? throw new ArgumentException($"{nameof(type)} has null {nameof(type.FullName)} property.", nameof(type)); 109var assemblyName = type.Assembly.FullName ?? throw new ArgumentException($"{nameof(type)} has null {nameof(type.Assembly)}.{nameof(type.Assembly.FullName)} property.", nameof(type));
Microsoft.CSharp (2)
Microsoft\CSharp\RuntimeBinder\Error.cs (2)
31new ArgumentException(SR.TypeArgumentRequiredForStaticCall, paramName); 49new ArgumentException(SR.DynamicArgumentNeedsValue, paramName);
Microsoft.Data.Analysis (107)
DataFrame.BinaryOperations.cs (14)
20throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 59throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 98throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 137throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 176throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 214throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 251throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 288throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 362throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 395throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 428throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 461throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 494throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 527throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
DataFrame.cs (8)
339throw new ArgumentException(string.Format(Strings.ExceedsNumberOfRows, Rows.Count), nameof(numberOfRows)); 371throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName)); 403throw new ArgumentException(String.Format("{0} {1}", Strings.MismatchedRowCount, Columns[i].Name)); 484throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); 566throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.DataType), column.Name); 575throw new ArgumentException(string.Format(Strings.ExceedsNumberOfColumns, Columns.Count), nameof(row)); 631throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName)); 641throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.DataType), column.Name);
DataFrame.IO.cs (6)
156throw new ArgumentException(); 160throw new ArgumentException(); 369throw new ArgumentException(string.Format(Strings.ExpectedEitherGuessRowsOrDataTypes, nameof(guessRows), nameof(dataTypes))); 576throw new ArgumentException(Strings.NonSeekableStream, nameof(csvStream)); 581throw new ArgumentException(string.Format(Strings.ExpectedEitherGuessRowsOrDataTypes, nameof(guessRows), nameof(dataTypes))); 663throw new ArgumentException("Decimal separator cannot match the column separator");
DataFrame.Join.cs (1)
183throw new ArgumentException(Strings.MismatchedArrayLengths, nameof(retainedJoinColumnNames));
DataFrameBuffer.cs (2)
45throw new ArgumentException($"{capacity} exceeds buffer capacity", nameof(capacity)); 77throw new ArgumentException("Current buffer is full", nameof(numberOfValues));
DataFrameColumn.cs (3)
275throw new ArgumentException(String.Format(Strings.MismatchedColumnValueType, this.DataType), nameof(other)); 625throw new ArgumentException("Bad comparer"); 631throw new ArgumentException("Bad comparer");
DataFrameColumnCollection.cs (22)
82throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 87throw new ArgumentException(string.Format(Strings.DuplicateColumnName, column.Name), nameof(column)); 108throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 113throw new ArgumentException(string.Format(Strings.DuplicateColumnName, column.Name), nameof(column)); 188throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName)); 223throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(T)), nameof(T)); 240throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(DateTime))); 257throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string))); 274throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string))); 291throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Boolean))); 308throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Byte))); 325throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Char))); 342throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Double))); 359throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Decimal))); 376throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Single))); 393throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int32))); 410throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int64))); 427throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(SByte))); 444throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int16))); 461throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string))); 478throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(UInt64))); 495throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(UInt16)));
DataFrameColumns\ArrowStringDataFrameColumn.cs (6)
54throw new ArgumentException(nameof(offsetBuffer)); 357throw new ArgumentException(Strings.SpansMultipleBuffers, nameof(numberOfRows)); 400throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices)); 422throw new ArgumentException(Strings.MapIndicesExceedsColumnLength, nameof(boolColumn)); 528throw new ArgumentException(nameof(value)); 554throw new ArgumentException(String.Format(Strings.MismatchedValueType, typeof(string)), nameof(value));
DataFrameColumns\StringDataFrameColumn.cs (5)
60throw new ArgumentException(Strings.CannotResizeDown, nameof(length)); 153throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(string)), nameof(value)); 307throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices)); 329throw new ArgumentException(Strings.MapIndicesExceedsColumnLength, nameof(boolColumn)); 467throw new ArgumentException(String.Format(Strings.MismatchedValueType, typeof(string)), nameof(value));
DataFrameColumns\VBufferDataFrameColumn.cs (4)
62throw new ArgumentException(Strings.CannotResizeDown, nameof(length)); 132throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(VBuffer<T>)), nameof(value)); 215throw new ArgumentException(Strings.MapIndicesExceedsColumnLength, nameof(boolColumn)); 287throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices));
GroupBy.cs (2)
111throw new ArgumentException(nameof(groupByColumnIndex)); 113_keyToRowIndicesMap = keyToRowIndices ?? throw new ArgumentException(nameof(keyToRowIndices));
PrimitiveColumnContainer.cs (2)
92throw new ArgumentException(Strings.InconsistentNullBitMapAndLength, nameof(nullBitMap)); 109throw new ArgumentException(Strings.CannotResizeDown, nameof(length));
PrimitiveDataFrameColumn.BinaryOperationAPIs.ExplodedColumns.cs (3)
8769throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 8793throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 8817throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
PrimitiveDataFrameColumn.BinaryOperationImplementations.Exploded.cs (7)
22throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 52throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 82throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 112throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 142throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 172throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 202throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
PrimitiveDataFrameColumn.cs (15)
136throw new ArgumentException(Strings.SpansMultipleBuffers, nameof(numberOfRows)); 245throw new ArgumentException(string.Format(Strings.MismatchedValueType, DataType), nameof(value)); 430throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices)); 463throw new ArgumentException(Strings.MapIndicesExceedsColumnLength, nameof(boolColumn)); 479throw new ArgumentException(String.Format(Strings.MismatchedValueType, Strings.NumericColumnType), nameof(mapIndices)); 720throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(U)); 750throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(U)); 957throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 987throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); 1022throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column)); 1065throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); 1100throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); 1142throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); 1176throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value)); 1284throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
ReadOnlyDataFrameBuffer.cs (1)
53throw new ArgumentException($"{length} exceeds buffer capacity", nameof(length));
StringDataFrameColumn.BinaryOperations.cs (3)
20throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column)); 80throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(right)); 124throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
TextFieldParser.cs (3)
453throw new ArgumentException(string.Format(Strings.PositiveNumberOfCharacters, nameof(numberOfChars))); 573throw new ArgumentException(Strings.StreamDoesntSupportReading); 978throw new ArgumentException(Strings.InvalidFieldWidths);
Microsoft.Data.Analysis.Tests (3)
src\Microsoft.Data.Analysis\TextFieldParser.cs (3)
453throw new ArgumentException(string.Format(Strings.PositiveNumberOfCharacters, nameof(numberOfChars))); 573throw new ArgumentException(Strings.StreamDoesntSupportReading); 978throw new ArgumentException(Strings.InvalidFieldWidths);
Microsoft.DotNet.Build.Manifest (3)
ArtifactModel.cs (1)
66throw new ArgumentException($"Invalid value for {nameof(Visibility)}: {val}");
XElementParsingExtensions.cs (2)
18throw new ArgumentException( 48throw new ArgumentException(
Microsoft.DotNet.Build.Tasks.Feed (9)
src\ArtifactUrlHelper.cs (2)
45throw new ArgumentException("File name cannot be null or empty.", nameof(fileName)); 75throw new ArgumentException("File name cannot be null or empty.", nameof(fileName));
src\BlobUrlInfo.cs (2)
49throw new ArgumentException(string.Format("Blob URL host name {0} should be of the form <account name>.<endpoint>", hostName)); 62throw new ArgumentException(string.Format("Blob URL path {0} should have a container and blob path", path));
src\common\AzureStorageUtils.cs (1)
170throw new ArgumentException("An attempt to get the MIME mapping of an empty path was made.");
src\common\LatestLinksManager.cs (1)
57throw new ArgumentException("No link prefixes specified.");
src\model\TargetChannelConfig.cs (1)
189throw new ArgumentException($"Target feed specification for {feedUrl} must have a separated asset selection 'ShippingOnly' and 'NonShippingOnly' packages");
src\PushToBuildStorage.cs (2)
510throw new ArgumentException($"Invalid visibility: {item.ItemSpec}"); 550throw new ArgumentException("targetPath is not relative to basePath");
Microsoft.DotNet.Build.Tasks.Installers (5)
src\BuildFPMToolPreReqs.cs (1)
167throw new ArgumentException(
src\CreateRpmPackage.cs (1)
82_ => throw new ArgumentException($"Unknown architecture: {PackageArchitecture}")
src\RpmBuilder.cs (3)
74_ => throw new ArgumentException("Unsupported architecture", nameof(architecture)) 94_ => throw new ArgumentException("Unsupported architecture", nameof(architecture)) 128throw new ArgumentException("Unsupported OS", nameof(os));
Microsoft.DotNet.Build.Tasks.Packaging (2)
GeneratePackageReport.cs (1)
360throw new ArgumentException($"Could not find source item for {targetPath}", nameof(targetPath));
PackageItem.cs (1)
45throw new ArgumentException($"Recursive wildcards \"**\" are not permitted in source paths for packages: {SourcePath}. Recursive directory may impact asset selection and we don't want to attempt to expand the wildcard since the build may not yet be complete.");
Microsoft.DotNet.Build.Tasks.Workloads (8)
Msi\WorkloadPackGroupMsi.wix.cs (1)
171throw new ArgumentException($"ID {id} didn't match existing ID {subdir.Id} for directory {name}.");
Msi\WorkloadPackMsi.wix.cs (1)
96_ => throw new ArgumentException(string.Format(Strings.UnknownWorkloadKind, kind)),
Swix\ComponentSwixProject.cs (1)
36throw new ArgumentException(string.Format(Strings.ComponentMustHaveAtLeastOneDependency, component.Name));
Swix\PackageGroupSwixProject.wix.cs (1)
38throw new ArgumentException(string.Format(Strings.ComponentMustHaveAtLeastOneDependency, packageGroup.Name));
Swix\SwixDependency.cs (2)
60throw new ArgumentException(Strings.SwixDependencyVersionRequired); 65throw new ArgumentException(Strings.SwixDependencyMaxVersionLessThanMinVersion);
Utils.cs (1)
96throw new ArgumentException($"Parameter cannot be empty: ${name}");
WorkloadPackPackage.wix.cs (1)
121_ => throw new ArgumentException(string.Format(Strings.UnknownWorkloadKind, pack.Kind))
Microsoft.DotNet.GenFacades (1)
TypeParser.cs (1)
23throw new ArgumentException($"Invalid C# language version value '{langVersion}'", nameof(langVersion));
Microsoft.DotNet.Git.IssueManager (7)
Clients\AzureDevOpsClient.cs (1)
75throw new ArgumentException(
Helpers\RepositoryHelper.cs (4)
25throw new ArgumentException("A GitHub personal access token is needed for this operation."); 33throw new ArgumentException("An Azure DevOps personal access token is needed for this operation."); 57throw new ArgumentException("A GitHub personal access token is needed for this operation."); 88throw new ArgumentException("A GitHub personal access token is needed for this operation.");
IssueManager.cs (2)
35throw new ArgumentException(nameof(repositoryUrl)); 40throw new ArgumentException(nameof(commit));
Microsoft.DotNet.Helix.Client (5)
generated-code\Job.cs (1)
98throw new ArgumentException("The parameter is not valid", nameof(body));
generated-code\Storage.cs (2)
137throw new ArgumentException("The parameter is not valid", nameof(body)); 223throw new ArgumentException("The parameter is not valid", nameof(body));
generated-code\Telemetry.cs (1)
110throw new ArgumentException("The parameter is not valid", nameof(body));
HelixApi.cs (1)
49throw new ArgumentException(message, ex);
Microsoft.DotNet.Helix.JobSender (3)
JobDefinition.cs (2)
173throw new ArgumentException($"Helix API does not contain an entry for {queueId}"); 299return Environment.GetEnvironmentVariable(name) ?? throw new ArgumentException("Missing required environment variable", name);
Payloads\AdhocPayload.cs (1)
20throw new ArgumentException(
Microsoft.DotNet.Helix.Sdk (3)
FindDotNetCliPackage.cs (3)
201throw new ArgumentException($"'{version}' is not a valid semantic version."); 295throw new ArgumentException($"Invalid value '{Channel}' for parameter {nameof(Channel)}"); 317throw new ArgumentException($"Invalid value '{PackageType}' for parameter {nameof(PackageType)}");
Microsoft.DotNet.Internal.SymbolHelper (3)
SymbolPublisherOptions.cs (1)
39AzdoOrg = azdoOrg is not null and not "" ? azdoOrg : throw new ArgumentException("Organization can't be null or empty", nameof(azdoOrg));
SymbolRequestHelpers.cs (2)
17throw new ArgumentException("Name must be specified", nameof(name)); 25throw new ArgumentException("Request can't contain a '+'", nameof(name));
Microsoft.DotNet.RemoteExecutor (3)
RemoteExecutor.cs (3)
425throw new ArgumentException($"Invalid return type: {method.ReturnType}. Expected void, int, or Task", nameof(method)); 431throw new ArgumentException($"Invalid parameter type: {param.ParameterType}. Expected string", nameof(method)); 603throw new ArgumentException($"Field marshaling is not supported by {nameof(Invoke)}: {fi.Name}");
Microsoft.DotNet.SignCheckLibrary (4)
Utils.cs (1)
59throw new ArgumentException($"Unsupported hash algorithm name '{hashName}'", nameof(hashName));
Verification\Jar\JarFile.cs (1)
91throw new ArgumentException();
Verification\SignatureVerificationManager.cs (1)
232throw new ArgumentException(String.Format(SignCheckResources.ArgumentNullOrEmpty, "path"));
Verification\SignatureVerificationResult.cs (1)
200throw new ArgumentException("path");
Microsoft.DotNet.SourceBuild.Tasks (2)
src\UsageReport\WritePackageUsageData.cs (2)
95throw new ArgumentException( 271throw new ArgumentException($"Path '{path}' is not within RootDir '{RootDir}'");
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (3)
Modeler\EnumOpenApiExtension.cs (1)
31throw new ArgumentException("x-ms-enum extension only accepts an object");
Modeler\PaginatedOpenApiExtension.cs (1)
37throw new ArgumentException("x-ms-paginated extension only accepts an object");
Modeler\ServiceClientModelFactory.cs (1)
397throw new ArgumentException("Schema must be object", nameof(schema));
Microsoft.DotNet.XliffTasks (4)
Model\XamlRuleDocument.cs (2)
128throw new ArgumentException("Attribute must have a parent element", nameof(xObject)); 136throw new ArgumentException("Attribute must have a grandparent element", nameof(xObject));
Tasks\TransformTemplates.cs (1)
57throw new ArgumentException($"Either both '{nameof(language)}' and '{nameof(resourceMap)}' must be specified, or they both must be 'null'.");
Validation.cs (1)
19throw new ArgumentException("Value cannot be empty", parameterName);
Microsoft.DotNet.XUnitAssert.Tests (14)
ExceptionAssertsTests.cs (14)
41 void testCode() => throw new ArgumentException(); 124 object testCode() => throw new ArgumentException(); 197 void testCode() => throw new ArgumentException(); 277 object testCode() => throw new ArgumentException(); 349 void testCode() => throw new ArgumentException("Hello world", "paramName"); 357 void testCode() => throw new ArgumentException("Hello world", "paramName1"); 435 object testCode() => throw new ArgumentException("Hello world", "paramName"); 443 object testCode() => throw new ArgumentException("Hello world", "paramName1"); 524 void testCode() => throw new ArgumentException(); 594 object testCode() => throw new ArgumentException(); 654 Task testCode() => throw new ArgumentException(); 713 Task testCode() => throw new ArgumentException(); 782 Task testCode() => throw new ArgumentException("Hello world", "paramName"); 790 Task testCode() => throw new ArgumentException("Hello world", "paramName1");
Microsoft.Extensions.AI (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Abstractions (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.AzureAIInference (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Evaluation (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Evaluation.Console (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Evaluation.Console.Tests (1)
ExceptionUtilitiesTests.cs (1)
77var exception = new AggregateException(new InvalidOperationException(), new ArgumentException());
Microsoft.Extensions.AI.Evaluation.NLP (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Evaluation.Quality (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Evaluation.Reporting (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Evaluation.Safety (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Integration.Tests (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Ollama (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.OpenAI (4)
src\Shared\ServerSentEvents\ThrowHelper.cs (2)
26throw new ArgumentException("The argument cannot contain line breaks.", parameterName); 31throw new ArgumentException("The argument cannot be a negative value.", parameterName);
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AI.Tests (2)
Functions\AIFunctionFactoryTest.cs (2)
578throw new ArgumentException($"Unable to resolve argument for '{p.Name}'."), 931throw new ArgumentException($"Unable to resolve argument for '{p.Name}'.", "arguments.Services"),
Microsoft.Extensions.AmbientMetadata.Application (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.AsyncState (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Caching.Abstractions (1)
CacheEntryExtensions.cs (1)
196throw new ArgumentException(message, paramName);
Microsoft.Extensions.Caching.Hybrid (4)
Internal\TagSet.cs (2)
235static void ThrowEmpty() => throw new ArgumentException("Tags cannot be empty.", "tags"); 236static void ThrowReserved() => throw new ArgumentException($"The tag '{WildcardTag}' is reserved and cannot be used in this context.", "tags");
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Caching.Hybrid.Tests (1)
DistributedCacheTests.cs (1)
306throw new ArgumentException("small segments not considered"); // a pain to construct
Microsoft.Extensions.Caching.SqlServer (4)
SqlServerCache.cs (1)
47throw new ArgumentException(
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
49throw new ArgumentException("Must not be null or empty", paramName);
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
39throw new ArgumentException("The value cannot be an empty string.", paramName); 68throw new ArgumentException("The value cannot be an empty or whitespace string.", paramName);
Microsoft.Extensions.Caching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
49throw new ArgumentException("Must not be null or empty", paramName);
Microsoft.Extensions.Compliance.Abstractions (3)
Classification\DataClassificationTypeConverter.cs (1)
40throw new ArgumentException("Value must be a string.", nameof(value));
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Compliance.Redaction (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Compliance.Testing (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Configuration (1)
ChainedConfigurationProvider.cs (1)
26_config = source.Configuration ?? throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "source.Configuration"), nameof(source));
Microsoft.Extensions.Configuration.CommandLine (2)
CommandLineConfigurationProvider.cs (2)
146throw new ArgumentException( 153throw new ArgumentException(
Microsoft.Extensions.Configuration.Ini (1)
IniConfigurationExtensions.cs (1)
71throw new ArgumentException(SR.Error_InvalidFilePath, nameof(path));
Microsoft.Extensions.Configuration.Json (1)
JsonConfigurationExtensions.cs (1)
71throw new ArgumentException(SR.Error_InvalidFilePath, nameof(path));
Microsoft.Extensions.Configuration.UserSecrets (2)
PathHelper.cs (1)
45throw new ArgumentException(SR.Common_StringNullOrEmpty, nameof(userSecretsId));
UserSecretsIdAttribute.cs (1)
27throw new ArgumentException(SR.Common_StringNullOrEmpty, nameof(userSecretId));
Microsoft.Extensions.Configuration.Xml (1)
XmlConfigurationExtensions.cs (1)
80throw new ArgumentException(SR.Error_InvalidFilePath, nameof(path));
Microsoft.Extensions.DependencyInjection (8)
ServiceLookup\CallSiteFactory.cs (6)
46throw new ArgumentException( 53throw new ArgumentException( 61throw new ArgumentException( 78throw new ArgumentException( 117throw new ArgumentException(SR.Format(SR.TrimmingAnnotationsDoNotMatch, implementationType.FullName, serviceType.FullName)); 124throw new ArgumentException(SR.Format(SR.TrimmingAnnotationsDoNotMatch_NewConstraint, implementationType.FullName, serviceType.FullName));
ServiceLookup\ConstantCallSite.cs (1)
18throw new ArgumentException(SR.Format(SR.ConstantCantBeConvertedToServiceType, defaultValue.GetType(), serviceType));
ServiceLookup\ConstructorCallSite.cs (1)
22throw new ArgumentException(SR.Format(SR.ImplementationTypeCantBeConvertedToServiceType, constructorInfo.DeclaringType, serviceType));
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Extensions\ServiceCollectionDescriptorExtensions.cs (1)
464throw new ArgumentException(
Microsoft.Extensions.DependencyInjection.AutoActivation (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.DependencyModel (14)
Dependency.cs (2)
16throw new ArgumentException(null, nameof(name)); 20throw new ArgumentException(null, nameof(version));
DependencyContextExtensions.cs (1)
115throw new ArgumentException($"Provided path has empty file name '{assetPath}'", nameof(assetPath));
Library.cs (3)
45throw new ArgumentException(null, nameof(type)); 49throw new ArgumentException(null, nameof(name)); 53throw new ArgumentException(null, nameof(version));
ResourceAssembly.cs (2)
14throw new ArgumentException(null, nameof(path)); 18throw new ArgumentException(null, nameof(locale));
RuntimeAssembly.cs (3)
18throw new ArgumentException(null, nameof(assemblyName)); 22throw new ArgumentException(null, nameof(path)); 37throw new ArgumentException($"Provided path has empty file name '{path}'", nameof(path));
RuntimeFallbacks.cs (1)
20throw new ArgumentException(null, nameof(runtime));
RuntimeFile.cs (1)
14throw new ArgumentException(null, nameof(path));
TargetInfo.cs (1)
16throw new ArgumentException(null, nameof(framework));
Microsoft.Extensions.Diagnostics.ExceptionSummarization (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Diagnostics.HealthChecks (4)
DefaultHealthCheckService.cs (1)
179throw new ArgumentException(builder.ToString(0, builder.Length - 2), nameof(registrations));
HealthCheckPublisherOptions.cs (3)
37throw new ArgumentException($"The {nameof(Delay)} must not be infinite.", nameof(value)); 58throw new ArgumentException($"The {nameof(Period)} must be greater than or equal to one second.", nameof(value)); 63throw new ArgumentException($"The {nameof(Period)} must not be infinite.", nameof(value));
Microsoft.Extensions.Diagnostics.HealthChecks.Common (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Diagnostics.Probes (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Diagnostics.Testing (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFileProvider.cs (1)
58throw new ArgumentException("The path must be absolute.", nameof(root));
Microsoft.Extensions.FileSystemGlobbing (1)
Internal\Patterns\PatternBuilder.cs (1)
82throw new ArgumentException("\"..\" can be only added at the beginning of the pattern.");
Microsoft.Extensions.Hosting (1)
Internal\Host.cs (1)
54throw new ArgumentException(SR.IHostApplicationLifetimeReplacementNotSupported, nameof(applicationLifetime));
Microsoft.Extensions.Hosting.Testing (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Http (2)
DependencyInjection\HttpClientBuilderExtensions.cs (1)
622throw new ArgumentException(SR.HandlerLifetime_InvalidValue, nameof(handlerLifetime));
HttpClientFactoryOptions.cs (1)
66throw new ArgumentException(SR.HandlerLifetime_InvalidValue, nameof(value));
Microsoft.Extensions.Http.Resilience (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Identity.Core (4)
IdentityBuilder.cs (2)
27throw new ArgumentException("User type can't be a value type.", nameof(user)); 44throw new ArgumentException("Role type can't be a value type.", nameof(role));
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
49throw new ArgumentException("Must not be null or empty", paramName);
UserClaimsPrincipalFactory.cs (1)
32throw new ArgumentException($"{nameof(optionsAccessor)} cannot wrap a null value.", nameof(optionsAccessor));
Microsoft.Extensions.Identity.Stores (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
49throw new ArgumentException("Must not be null or empty", paramName);
Microsoft.Extensions.Logging (1)
LoggerFactory.cs (1)
94throw new ArgumentException(SR.Format(SR.InvalidActivityTrackingOptions, _factoryOptions.ActivityTrackingOptions), nameof(options));
Microsoft.Extensions.Logging.Abstractions (1)
LoggerMessage.cs (1)
459throw new ArgumentException(
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Extensions.ML (3)
Builder\PredictionEnginePoolBuilder.cs (1)
25Services = services ?? throw new ArgumentException(nameof(services));
ModelLoaders\FileModelLoader.cs (1)
42throw new ArgumentException($"The provided model file {filePath} doesn't exist.");
PredictionEnginePool.cs (1)
100throw new ArgumentException("You need to configure a default, not named, model before you use this method.");
Microsoft.Extensions.ObjectPool.DependencyInjection (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Options.Contextual (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Extensions.Primitives (3)
StringValues.cs (1)
379throw new ArgumentException(
ThrowHelper.cs (2)
27throw new ArgumentException(GetResourceText(resource)); 56return new ArgumentException(GetResourceText(resource));
Microsoft.Extensions.Resilience (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.ServiceDiscovery (1)
ServiceEndpointWatcherFactory.cs (1)
35throw new ArgumentException("The provided input was not in a valid format. It must be a valid URI.", nameof(serviceName));
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Resolver\DnsResolver.cs (1)
901throw new ArgumentException($"'{name}' is not a valid DNS name.", nameof(name));
Resolver\ResolverOptions.cs (1)
21throw new ArgumentException("At least one DNS server is required.", nameof(servers));
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Resolver\LoopbackDnsServer.cs (1)
132throw new ArgumentException($"Invalid characters in domain name '{name}'");
Microsoft.Extensions.Telemetry (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Telemetry.Abstractions (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.TimeProvider.Testing (2)
src\Shared\Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Microsoft.Extensions.Validation (1)
TypeExtensions.cs (1)
129throw new ArgumentException($"Type {interfaceType.FullName} is not an interface.", nameof(interfaceType));
Microsoft.Gen.Logging (1)
src\Generators\Shared\RoslynExtensions.cs (1)
103? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Gen.Logging.Generated.Tests (8)
LogMethodTests.cs (8)
212CollectionTestExtensions.M9(logger, LogLevel.Critical, 0, new ArgumentException("Foo"), 1); 526ExceptionTestExtensions.M0(logger, new ArgumentException("Foo"), new ArgumentException("Bar")); 533ExceptionTestExtensions.M1(new ArgumentException("Foo"), logger, new ArgumentException("Bar")); 540ExceptionTestExtensions.M2(logger, "One", new ArgumentException("Foo")); 547var exception = new ArgumentException("Foo"); 791AtSymbolsTestExtensions.UseAtSymbol4(logger, LogLevel.Debug, "42", 42, new ArgumentException("Foo"));
Microsoft.Gen.Metrics (1)
src\Generators\Shared\RoslynExtensions.cs (1)
103? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Interop.SourceGeneration (10)
GeneratedStatements.cs (3)
68throw new ArgumentException("Direction must be ManagedToUnmanaged or UnmanagedToManaged"); 95throw new ArgumentException("CurrentStage must be Invoke"); 129throw new ArgumentException("CurrentStage must be Invoke");
Marshalling\MarshallerHelpers.cs (3)
275throw new ArgumentException("Stub context direction must not be bidirectional."); 450_ => throw new ArgumentException("Cannot determine the return position of a bidirectional stub", nameof(direction)), 465_ => throw new ArgumentException("Cannot determine the return position of a bidirectional stub", nameof(direction)),
Marshalling\MarshallingGeneratorExtensions.cs (1)
93throw new ArgumentException("Context direction must be ManagedToUnmanaged or UnmanagedToManaged");
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
TypeNames.cs (1)
154_ => throw new ArgumentException($"Unexpected CallConv: {callConv}")
TypeSymbolExtensions.cs (1)
333throw new ArgumentException($"Cannot handle type name in the format provided: {typeName}", nameof(typeName));
Microsoft.JSInterop (7)
Infrastructure\DotNetDispatcher.cs (5)
173throw new ArgumentException($"For instance method calls, '{nameof(assemblyName)}' should be null. Value received: '{assemblyName}'."); 253throw new ArgumentException($"The call to '{methodIdentifier}' expects '{parameterTypes.Length}' parameters, but received '{index}'."); 363throw new ArgumentException($"The assembly '{assemblyKey.AssemblyName}' does not contain a public invokable method with [{nameof(JSInvokableAttribute)}(\"{methodIdentifier}\")]."); 396throw new ArgumentException($"The type '{type.Name}' does not contain a public invokable method with [{nameof(JSInvokableAttribute)}(\"{methodIdentifier}\")]."); 508?? throw new ArgumentException($"There is no loaded assembly with the name '{assemblyKey.AssemblyName}'.");
Infrastructure\TaskGenericsUtil.cs (1)
47?? throw new ArgumentException($"The type '{taskType.FullName}' is not inherited from '{typeof(Task).FullName}'.");
JSRuntime.cs (1)
369: throw new ArgumentException($"There is no tracked object with id '{dotNetObjectId}'. Perhaps the DotNetObjectReference instance was already disposed.", nameof(dotNetObjectId));
Microsoft.Maui (21)
Animations\Animation.cs (1)
139 throw new ArgumentException($"{nameof(duration)} must be greater than {nameof(beginAt)}");
Handlers\HybridWebView\HybridWebViewHandler.cs (6)
106 throw new ArgumentException($"The raw message cannot be null or empty.", nameof(rawMessage)); 115 throw new ArgumentException($"The raw message must contain a pipe character ('|').", nameof(rawMessage)); 133 throw new ArgumentException($"The '{messageType}' message content must contain a pipe character ('|').", nameof(rawMessage)); 167 throw new ArgumentException($"The message type '{messageType}' is not recognized.", nameof(rawMessage)); 181 throw new ArgumentException("The 'data' query string parameter is required.", nameof(invokeQueryString)); 187 throw new ArgumentException("The invoke data did not provide a method name.", nameof(invokeQueryString));
Hosting\Fonts\FontCollectionExtensions.cs (2)
22 throw new ArgumentException("Filename was not a valid file name.", nameof(filename)); 43 throw new ArgumentException("Filename was not a valid file name.", nameof(filename));
Layouts\Flex.cs (8)
447 throw new ArgumentException("cannot add item into self"); 449 throw new ArgumentException("child already has a parent"); 652 throw new ArgumentException($"{nameof(flex_dim)} must not be negative", nameof(flex_dim)); 685 throw new ArgumentException($"{nameof(Justify)} option not handled", nameof(align)); 692 throw new ArgumentException($"{nameof(flex_dim)} must not be negative", nameof(flex_dim)); 728 throw new ArgumentException($"{nameof(AlignContent)} option not handled", nameof(align)); 735 throw new ArgumentException($"The {children_count} must not be smaller than the requested range between {child_begin} and {child_end}", nameof(children_count)); 960 throw new ArgumentException($"The padding on {nameof(item)} must not be negative", nameof(item));
Layouts\FlexEnums.cs (2)
87 throw new ArgumentException("should be a positive value", nameof(length)); 89 throw new ArgumentException("relative length should be in [0, 1]", nameof(length));
Primitives\GridLength.cs (2)
53 throw new ArgumentException("value is less than 0 or is not a number", nameof(value)); 55 throw new ArgumentException("type is not a valid GridUnitType", nameof(type));
Microsoft.Maui.Controls (58)
AnimatableKey.cs (1)
18 throw new ArgumentException("Argument is null or empty", nameof(handle));
Animation.cs (1)
54 throw new ArgumentException("finishAt must be greater than beginAt");
Application\Application.cs (2)
73 throw new ArgumentException("No IAppIndexingProvider was provided"); 75 throw new ArgumentException("No AppLinks implementation was found, if in Android make sure you installed the Microsoft.Maui.Controls.AppLinks");
BindableObject.cs (1)
828 throw new ArgumentException($"Value is an invalid value for {property.PropertyName}", nameof(currentValue));
BindableProperty.cs (2)
90 throw new ArgumentException($"Not a valid type of BindingMode. Property: {returnType} {declaringType.Name}.{propertyName}. Default binding mode: {defaultBindingMode}", nameof(defaultBindingMode)); 96 throw new ArgumentException($"Default value did not match return type. Property: {returnType} {declaringType.Name}.{propertyName} Default value type: {defaultValue.GetType().Name}, ", nameof(defaultValue));
Binding.cs (1)
34 throw new ArgumentException("path cannot be an empty string", nameof(path));
BindingBase.cs (1)
35 throw new ArgumentException("mode is not a valid BindingMode", "mode");
ExportEffectAttribute.cs (1)
19 throw new ArgumentException("uniqueName must not contain a .");
HybridWebView\HybridWebView.cs (8)
92 throw new ArgumentException($"The method name cannot be null or empty.", nameof(methodName)); 96 throw new ArgumentException($"The parameter values were provided, but the parameter JSON type infos were not.", nameof(paramJsonTypeInfos)); 100 throw new ArgumentException($"The parameter JSON type infos were provided, but the parameter values were not.", nameof(paramValues)); 104 throw new ArgumentException($"The number of parameter values does not match the number of parameter JSON type infos.", nameof(paramValues)); 121 throw new ArgumentException($"The method name cannot be null or empty.", nameof(methodName)); 125 throw new ArgumentException($"The parameter values were provided, but the parameter JSON type infos were not.", nameof(paramJsonTypeInfos)); 129 throw new ArgumentException($"The parameter JSON type infos were provided, but the parameter values were not.", nameof(paramValues)); 133 throw new ArgumentException($"The number of parameter values does not match the number of parameter JSON type infos.", nameof(paramValues));
ImageSource.cs (2)
104 throw new ArgumentException("uri is relative"); 120 throw new ArgumentException("uri is relative");
Internals\NameScope.cs (3)
26 throw new ArgumentException($"An element with the key '{name}' already exists in NameScope", nameof(name)); 53 throw new ArgumentException("name was provided as empty string.", nameof(name)); 56 throw new ArgumentException("name provided had not been registered.", nameof(name));
Items\MarshalingObservableCollection.cs (1)
25 throw new ArgumentException($"{nameof(list)} must implement {nameof(INotifyCollectionChanged)}");
ListView\ListView.cs (2)
390 throw new ArgumentException("position is not a valid ScrollToPosition", nameof(position)); 405 throw new ArgumentException("position is not a valid ScrollToPosition", nameof(position));
NavigationModel.cs (1)
74 throw new ArgumentException("before must be in the current navigation context");
NavigationPage\NavigationPage.cs (3)
744 throw new ArgumentException($"{nameof(before)} must be a child of the NavigationPage", nameof(before)); 747 throw new ArgumentException("Cannot insert page which is already in the navigation stack"); 884 throw new ArgumentException("Page to remove must be contained on this Navigation Page");
NavigationPage\NavigationPage.Legacy.cs (3)
129 throw new ArgumentException($"{nameof(before)} must be a child of the NavigationPage", nameof(before)); 132 throw new ArgumentException("Cannot insert page which is already in the navigation stack"); 247 throw new ArgumentException("Page to remove must be contained on this Navigation Page");
NavigationProxy.cs (1)
177 throw new ArgumentException("before must be in the pushed stack of the current context");
ObservableWrapper.cs (1)
61 throw new ArgumentException("Destination array was not long enough. Check destIndex and length, and the array's lower bounds.");
OrderedDictionary.cs (2)
129 throw new ArgumentException("Not enough space in array to copy"); 396 throw new ArgumentException("Not enough space in array to copy");
PlatformBindingHelpers.cs (1)
171 throw new ArgumentException(Format("No declared or accessible event {0} on {1}", updateSourceEventName, target.GetType()), nameof(updateSourceEventName));
ReferenceTypeConverter.cs (1)
33 throw new ArgumentException("serviceProvider does not provide an IProvideValueTarget");
ResourceDictionary.cs (1)
197 throw new ArgumentException($"A resource with the key '{key}' is already present in the ResourceDictionary.");
Routing.cs (2)
251 throw new ArgumentException($"Route contains invalid characters in \"{part}\""); 256 throw new ArgumentException($"Duplicated Route: \"{route}\"");
ScrollView\ScrollView.cs (2)
265 throw new ArgumentException("position is not a valid ScrollToPosition", nameof(position)); 271 throw new ArgumentException("element does not belong to this ScrollView", nameof(element));
Shapes\MatrixTypeConverter.cs (3)
23 throw new ArgumentException("Argument is null or empty"); 28 throw new ArgumentException("Argument must have six numbers"); 34 throw new ArgumentException("Argument must be numeric values");
Shell\ShellElementCollection.cs (1)
38 throw new ArgumentException("Inner can only be set once");
Shell\ShellSection.cs (2)
743 throw new ArgumentException("Page not found in nav stack"); 1208 throw new ArgumentException("Page not found in nav stack");
Shell\ShellUriHandler.cs (4)
190 throw new ArgumentException($"unable to figure out route for: {uri}", nameof(uri)); 207 throw new ArgumentException($"Ambiguous routes matched for: {uri} matches found: {matchesFound}", nameof(uri)); 941 throw new ArgumentException($"{node}", nameof(node)); 967 throw new ArgumentException($"{node}", nameof(node));
Style.cs (1)
48 throw new ArgumentException("BasedOn.TargetType is not compatible with TargetType");
TemplateBinding.cs (1)
31 throw new ArgumentException("path cannot be an empty string", nameof(path));
TypeTypeConverter.cs (1)
24 throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
ViewExtensions.cs (1)
301 throw new ArgumentException($"Unable to find {nameof(IAnimationManager)} for '{animatable.GetType().FullName}'.", nameof(animatable));
Microsoft.Maui.Controls.BindingSourceGen (2)
BindingCodeWriter.cs (1)
142 _ => throw new ArgumentException(nameof(unsafeAccessor.Kind))
ISymbolExtensions.cs (1)
18 _ => throw new ArgumentException("Symbol is not a field or property.", nameof(symbol))
Microsoft.Maui.Controls.Build.Tasks (3)
ExpandMarkupsVisitor.cs (2)
122 throw new ArgumentException(); 130 throw new ArgumentException();
NodeILExtensions.cs (1)
364 throw new ArgumentException();
Microsoft.Maui.Controls.Maps (1)
Map.cs (1)
231 throw new ArgumentException("Pin must have a Label to be added to a map");
Microsoft.Maui.Controls.Xaml (11)
ExpandMarkupsVisitor.cs (1)
127 throw new ArgumentException();
MarkupExpressionParser.cs (1)
239 throw new ArgumentException();
MarkupExtensions\AppThemeBindingExtension.cs (1)
58 var valueProvider = serviceProvider?.GetService<IProvideValueTarget>() ?? throw new ArgumentException();
MarkupExtensions\DataTemplateExtension.cs (1)
18 throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
MarkupExtensions\OnIdiomExtension.cs (1)
43 var valueProvider = serviceProvider?.GetService<IProvideValueTarget>() ?? throw new ArgumentException();
MarkupExtensions\OnPlatformExtension.cs (1)
55 var valueProvider = serviceProvider?.GetService<IProvideValueTarget>() ?? throw new ArgumentException();
MarkupExtensions\ReferenceExtension.cs (1)
25 ?? throw new ArgumentException("serviceProvider does not provide an IProvideValueTarget");
MarkupExtensions\StaticExtension.cs (1)
22 throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
MarkupExtensions\StaticResourceExtension.cs (1)
22 throw new ArgumentException(null, nameof(serviceProvider));
MarkupExtensions\TypeExtension.cs (1)
17 throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
XamlServiceProvider.cs (1)
155 throw new ArgumentException();
Microsoft.Maui.Essentials (8)
FileSystem\FileSystem.shared.cs (2)
194 throw new ArgumentException("The file path cannot be an empty string.", nameof(fullPath)); 196 throw new ArgumentException("The file path must be a file path.", nameof(fullPath));
Share\Share.shared.cs (4)
113 throw new ArgumentException($"Both the {nameof(request.Text)} and {nameof(request.Uri)} are invalid. Make sure to include at least one of them in the request."); 127 throw new ArgumentException(FileNullException(nameof(request.File))); 141 throw new ArgumentException(FileNullException(nameof(request.Files))); 144 throw new ArgumentException(FileNullException(nameof(request.Files)));
Types\DeviceIdiom.shared.cs (1)
48 throw new ArgumentException(nameof(deviceIdiom));
Types\DevicePlatform.shared.cs (1)
71 throw new ArgumentException(nameof(devicePlatform));
Microsoft.ML.AutoML (34)
API\BinaryClassificationExperiment.cs (1)
445throw new ArgumentException($"The runner metric manager is of type {_metricManager.GetType()} which expected to be of type {typeof(ITrainValidateDatasetManager)} or {typeof(ICrossValidateDatasetManager)}");
API\MulticlassClassificationExperiment.cs (1)
423throw new ArgumentException($"The runner metric manager is of type {_metricManager.GetType()} which expected to be of type {typeof(ITrainValidateDatasetManager)} or {typeof(ICrossValidateDatasetManager)}");
API\RegressionExperiment.cs (1)
450throw new ArgumentException($"The runner metric manager is of type {_metricManager.GetType()} which expected to be of type {typeof(ITrainValidateDatasetManager)} or {typeof(ICrossValidateDatasetManager)}");
AutoMLExperiment\IMonitor.cs (2)
95throw new ArgumentException($"result must be of type {typeof(TrialResult<TMetrics>)}"); 109throw new ArgumentException($"result must be of type {typeof(TrialResult<TMetrics>)}");
AutoMLExperiment\ITrialResultManager.cs (1)
63throw new ArgumentException("can't add or update result that already save to csv");
AutoMLExperiment\Runner\SweepablePipelineRunner.cs (1)
91throw new ArgumentException("IDatasetManager must be either ITrainTestDatasetManager or ICrossValidationDatasetManager");
ColumnInference\ColumnInferenceValidationUtil.cs (1)
22throw new ArgumentException($"Specified column {columnName} " +
ColumnInference\ColumnTypeInference.cs (1)
397throw new ArgumentException($"Specified label column '{args.Label}' was not found.");
ColumnInference\TextFileSample.cs (2)
117throw new ArgumentException("Couldn't identify line breaks. Provided file is not text?"); 206throw new ArgumentException("File is not text, or couldn't detect line breaks");
SweepableEstimator\MultiModelPipeline.cs (1)
167throw new ArgumentException();
SweepableEstimator\SweepablePipeline.cs (1)
227throw new ArgumentException();
Tuner\AutoZeroTuner.cs (1)
57throw new ArgumentException($"Fail to find available configs for given trainers: {string.Join(",", trainerEstimators)}");
Utils\ArrayMath.cs (3)
130throw new ArgumentException($"length doesn't match, {truth.Length} != {pred.Length}"); 145throw new ArgumentException($"length doesn't match, {truth.Length} != {pred.Length}"); 159throw new ArgumentException($"length doesn't match, {truth.Length} != {pred.Length}");
Utils\UserInputValidationUtil.cs (17)
57throw new ArgumentException($"{nameof(numberOfCVFolds)} must be at least 2", nameof(numberOfCVFolds)); 65throw new ArgumentException($"If provided, {nameof(samplingKeyColumnName)} must be the same as {nameof(groupIdColumnName)} for Ranking Experiments", samplingKeyColumnName); 78throw new ArgumentException("Training data has 0 rows", nameof(trainData)); 85throw new ArgumentException($"{DefaultColumnNames.Features} column must be of data type {NumberDataViewType.Single}", nameof(trainData)); 97throw new ArgumentException($"Only supported feature column types are " + 144throw new ArgumentException($"Duplicate column name {duplicateColName} is present in two or more distinct properties of provided column information", nameof(columnInformation)); 152throw new ArgumentException($"Null column string was specified as {columnPurpose} in column information"); 160throw new ArgumentException("Provided label column cannot be null"); 175throw new ArgumentException($"File '{path}' does not exist", nameof(path)); 180throw new ArgumentException($"File at path '{path}' cannot be empty", nameof(path)); 193throw new ArgumentException("Validation data has 0 rows", nameof(validationData)); 200throw new ArgumentException($"{schemaMismatchError} Train data has '{trainData.Schema.Count}' columns," + 217throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' exists in train data, but not in validation data.", nameof(validationData)); 222throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' is of type {trainCol.Type} in train data, and type " + 260throw new ArgumentException(exceptionMessage); 273throw new ArgumentException($"Provided {columnPurpose} column '{columnName}' was of type {itemType}, " + 278throw new ArgumentException($"Provided {columnPurpose} column '{columnName}' was of type {itemType}, " +
Microsoft.ML.AutoML.SourceGenerator (2)
SearchSpaceGenerator.cs (2)
62_ => throw new ArgumentException("unknown type"), 83(_, _) => throw new ArgumentException("unknown"),
Microsoft.ML.AutoML.Tests (3)
Utils\TaskAgnosticAutoFit.cs (2)
119throw new ArgumentException($"Unknown task type {_taskType}.", "TaskType"); 161throw new ArgumentException($"Unknown task type {_taskType}.", "TaskType");
Utils\TaskAgnosticIterationResult.cs (1)
78throw new ArgumentException($"Unsupported metric type {typeof(T).Name}.");
Microsoft.ML.CodeGenerator (5)
CodeGenerator\CSharp\TrainerGeneratorFactory.cs (2)
77throw new ArgumentException($"The trainer '{trainer}' is not handled currently."); 80throw new ArgumentException($"The trainer '{node.Name}' is not handled currently.");
Utils.cs (3)
143case "": throw new ArgumentException($"{nameof(input)} cannot be empty", nameof(input)); 171throw new ArgumentException($"The data type '{labelType}' is not handled currently."); 362throw new ArgumentException($"The data type '{dataKind}' is not handled currently.");
Microsoft.ML.Core (2)
ComponentModel\ComponentCatalog.cs (2)
33throw new ArgumentException("Did not find access modifier", nameof(methodInfo)); 50throw new ArgumentException("Did not find access modifier", nameof(constructorInfo));
Microsoft.ML.DataView (5)
DataViewSchema.cs (4)
224throw new ArgumentException(nameof(column)); 304throw new ArgumentException($"{nameof(type)}.{nameof(type.RawType)} must be of type '{typeof(TValue).FullName}'.", nameof(type)); 345throw new ArgumentException($"{nameof(type)}.{nameof(type.RawType)} must be of type '{typeof(TValue).FullName}'.", nameof(type)); 369throw new ArgumentException($"{nameof(getter)} must be of type '{typeof(ValueGetter<TValue>).FullName}'", nameof(getter));
DataViewType.cs (1)
81throw new ArgumentException("A " + nameof(PrimitiveDataViewType) + " cannot have a disposable " + nameof(RawType), nameof(rawType));
Microsoft.ML.GenAI.Core (10)
Extension\ModuleExtension.cs (1)
245throw new ArgumentException("The layer count is not enough to cover all layers, did you forget to set the last layer count to -1?");
Trainer\CausalLMDataset.cs (3)
34throw new ArgumentException("The length of inputs and outputs should be the same."); 55throw new ArgumentException("The length of inputs and outputs should be the same."); 75throw new ArgumentException("The length of inputIds and labelIds should be the same.");
Utility\AttentionMaskConverter.cs (3)
50throw new ArgumentException("key_value_length should be provided when attention_mask is causal"); 80throw new ArgumentException("This is not a casual mask"); 156throw new ArgumentException("Attention mask should be 2D");
Utils.cs (3)
53throw new ArgumentException("Dimension must be divisible by 2", nameof(headDim)); 128_ => throw new ArgumentException("Invalid activation function", actFn), 173throw new ArgumentException("Resource not found", resourceName);
Microsoft.ML.GenAI.LLaMA (2)
Module\LlamaModel.cs (2)
76throw new ArgumentException("Only one of input_ids or inputs_embeds may be set"); 93throw new ArgumentException("Either input_ids or inputs_embeds must be set");
Microsoft.ML.GenAI.Mistral (2)
MistralModel.cs (2)
70throw new ArgumentException("Only one of input_ids or inputs_embeds may be set"); 87throw new ArgumentException("Either input_ids or inputs_embeds must be set");
Microsoft.ML.GenAI.Phi (6)
Module\Phi2Attention.cs (1)
64this._numKeyValueHeads = config.NumKeyValueHeads ?? throw new ArgumentException("num_key_value_heads must be specified");
Module\Phi3DecoderLayer.cs (2)
149numKeyValueHeads: config.NumKeyValueHeads ?? throw new ArgumentException("num_key_value_heads must be specified"), 150numKeyValueGroups: config.NumAttentionHeads / config.NumKeyValueHeads ?? throw new ArgumentException("num_key_value_heads must be specified"),
Module\Phi3Model.cs (2)
73throw new ArgumentException("Only one of input_ids or inputs_embeds may be set"); 90throw new ArgumentException("Either input_ids or inputs_embeds must be set");
Utils.cs (1)
25throw new ArgumentException("Dimension must be divisible by 2", nameof(headDim));
Microsoft.ML.ImageAnalytics (10)
ImageLoader.cs (1)
114throw new ArgumentException(String.Format("Directory \"{0}\" does not exist.", imageFolder));
MLImage.cs (9)
46throw new ArgumentException($"Invalid input stream contents", nameof(imageStream)); 67throw new ArgumentException($"Invalid path", nameof(imagePath)); 85throw new ArgumentException($"Unsupported pixel format", nameof(pixelFormat)); 90throw new ArgumentException($"Invalid width value.", nameof(width)); 95throw new ArgumentException($"Invalid height value.", nameof(height)); 100throw new ArgumentException($"Invalid {nameof(imagePixelData)} buffer size."); 236throw new ArgumentException($"Path has invalid image file extension.", nameof(imagePath)); 242throw new ArgumentException($"Saving image with the format '{ext}' is not supported. Try save it with `Jpeg`, `Png`, or `Webp` format.", nameof(imagePath)); 297_ => throw new ArgumentException($"Invalid resize mode value.", nameof(mode))
Microsoft.ML.OnnxTransformer (2)
OnnxSessionOptions.cs (2)
26throw new ArgumentException("No Onnx Session Options"); 36throw new ArgumentException("No Onnx Session Options");
Microsoft.ML.SearchSpace (5)
Converter\NumericOptionConverter.cs (2)
46_ => throw new ArgumentException($"unknown schema type: {schema.Type}"), 78_ => throw new ArgumentException("unknown type"),
Converter\OptionConverter.cs (2)
42throw new ArgumentException("unknown option type"); 62throw new ArgumentException("unknown option type");
Converter\ParameterConverter.cs (1)
50throw new ArgumentException($"Unsupported reader type {reader.TokenType}");
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
511throw new ArgumentException($"Unsupported data type of {typeof(T)} to convert to Tensor.");
Microsoft.ML.TestFramework (1)
BaseTestBaseline.cs (1)
623throw new ArgumentException($"Invalid {nameof(NumberParseOption)}", nameof(parseOption));
Microsoft.ML.TestFrameworkCommon (4)
Utility\LibraryLoader.cs (4)
44throw new ArgumentException("Parameter must not be null or empty.", nameof(name)); 68throw new ArgumentException("Parameter must not be null or empty.", nameof(names)); 123throw new ArgumentException("Parameter must not be null or empty.", nameof(functionName)); 137throw new ArgumentException("Parameter must not be zero.", nameof(handle));
Microsoft.ML.TimeSeries (1)
RootCauseAnalyzer.cs (1)
788throw new ArgumentException("Object is not a BestDimension");
Microsoft.ML.Tokenizers (25)
Model\BertTokenizer.cs (2)
780throw new ArgumentException($"The special token '{kvp.Key}' is not in the vocabulary or assigned id value {id} different than the value {kvp.Value} in the special tokens."); 818throw new ArgumentException($"The special token '{token}' is not in the vocabulary.");
Model\CodeGenTokenizer.cs (7)
153throw new ArgumentException($"The Unknown token '{UnknownToken}' is not found in the vocabulary."); 163throw new ArgumentException($"The beginning of sentence token '{BeginningOfSentenceToken}' is not found in the vocabulary."); 173throw new ArgumentException($"The end of sentence token '{EndOfSentenceToken}' is not found in the vocabulary."); 181throw new ArgumentException("The beginning of sentence token must be provided when the flag is set to include it in the encoding."); 186throw new ArgumentException("The end of sentence token must be provided when the flag is set to include it in the encoding."); 1756throw new ArgumentException($"Problems met when parsing JSON vocabulary object.{Environment.NewLine}Error message: {e.Message}"); 1761throw new ArgumentException($"Failed to read the vocabulary file.");
Model\EnglishRobertaTokenizer.cs (4)
188throw new ArgumentException($"Problems met when parsing JSON vocabulary object.{Environment.NewLine}Error message: {e.Message}"); 193throw new ArgumentException($"Failed to read the vocabulary file."); 1262throw new ArgumentException("Incorrect vocabulary format, expected \"<token> <cnt>\""); 1267throw new ArgumentException($"Cannot parse the line: '{line}'.");
Model\LlamaTokenizer.cs (2)
49throw new ArgumentException("The model type is not Bpe.", nameof(modelProto)); 54throw new ArgumentException($"Normalization '{modelProto.NormalizerSpec.Name}' is not supported.", nameof(modelProto));
Model\SentencePieceTokenizer.cs (1)
29_ => throw new ArgumentException($"The model type '{modelProto.TrainerSpec.ModelType}' is not supported.", nameof(modelProto))
Model\SentencePieceUnigramModel.cs (1)
35throw new ArgumentException("The BOS, EOS, or UNK token is not present in the vocabulary.");
Model\TiktokenTokenizer.cs (1)
1491throw new ArgumentException($"The encoding name '{encodingName}' is not supported. The only supported encoding names are: {TiktokenTokenizer.Cl100kBaseEncodingName}, {TiktokenTokenizer.P50kBaseEncodingName}, {TiktokenTokenizer.P50kEditEncodingName}, and {TiktokenTokenizer.R50kBaseEncodingName}.", nameof(encodingName));
Model\WordPieceTokenizer.cs (1)
64throw new ArgumentException($"The unknown token '{options.UnknownToken}' is not in the vocabulary.");
Normalizer\SentencePieceNormalizer.cs (2)
492throw new ArgumentException("Blob for normalization rule is broken."); 507throw new ArgumentException("Trie data size exceeds the input blob size.");
PreTokenizer\CompositePreTokenizer.cs (2)
41throw new ArgumentException($"Too many pre-tokenizers provided. Maximum is {MaxPreTokenizersCount}.", nameof(preTokenizers)); 48throw new ArgumentException("Pre-tokenizer cannot be null.", nameof(preTokenizers));
Utils\DoubleArrayTrie.cs (2)
342throw new ArgumentException("failed to insert key: negative value"); 346throw new ArgumentException("failed to insert key: zero-length key");
Microsoft.ML.Tokenizers.Tests (3)
src\Microsoft.ML.Tokenizers\Utils\DoubleArrayTrie.cs (2)
342throw new ArgumentException("failed to insert key: negative value"); 346throw new ArgumentException("failed to insert key: zero-length key");
TiktokenTests.cs (1)
479_ => throw new ArgumentException("Invalid encoding name"),
Microsoft.ML.TorchSharp (11)
NasBert\Modules\Layers\EncConvLayer.cs (1)
50throw new ArgumentException($"Invalid arguments: {param}.");
NasBert\Modules\Layers\SelfAttentionLayer.cs (1)
61throw new ArgumentException("Invalid arguments.");
NasBert\Modules\MultiHeadAttention.cs (4)
77throw new ArgumentException("EmbeddingDim must be divisible by NumHeads"); 84throw new ArgumentException("Self-attention requires query, key and value to be of the same size"); 164throw new ArgumentException("query must NOT be null and must be 3D in multi-head attention;" + 186throw new ArgumentException(
NasBert\Modules\SearchSpace.cs (1)
35throw new ArgumentException("all non-zero hidden dimensions should be the same.");
Roberta\Modules\AttentionSelf.cs (1)
34throw new ArgumentException($"NumAttentionHeads must be a factor of hiddenSize, got {numAttentionHeads} and {hiddenSize}.");
Utils\DataUtils.cs (2)
56throw new ArgumentException( 62throw new ArgumentException(
Utils\FileUtils.cs (1)
46throw new ArgumentException($"Stream should be non-null and its stream.CanRead property should be true.");
Microsoft.ML.Transforms (1)
PermutationFeatureImportanceExtensions.cs (1)
734throw new ArgumentException($"Type IPredictionTransformer not implemented by provided type, {type}", nameof(type));
Microsoft.Net.Http.Headers (7)
ContentDispositionHeaderValue.cs (1)
338throw new ArgumentException("An empty string is not allowed.", parameterName);
CookieHeaderValue.cs (2)
174throw new ArgumentException("Invalid cookie name: " + name, parameterName); 189throw new ArgumentException("Invalid cookie value: " + value, parameterName);
EntityTagHeaderValue.cs (1)
52throw new ArgumentException("An empty string is not allowed.", nameof(tag));
HeaderUtilities.cs (1)
75throw new ArgumentException("An empty string is not allowed.", parameterName);
MediaTypeHeaderValue.cs (1)
657throw new ArgumentException("An empty string is not allowed.", parameterName);
RangeItemHeaderValue.cs (1)
31throw new ArgumentException("Invalid header range.");
Microsoft.NET.StringTools.net35 (1)
InternableString.Simple.cs (1)
20throw new ArgumentException(nameof(array));
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
227Return New ArgumentException(Description)
Microsoft\VisualBasic\CompilerServices\VBBinder.vb (1)
1969Throw New ArgumentException
Microsoft.VisualBasic.Tests (3)
Microsoft\VisualBasic\Logging\LogTests.cs (3)
28log.WriteException(new ArgumentException()); 29log.WriteException(new ArgumentException(), severity: TraceEventType.Warning, additionalInfo: "AdditionalInfo"); 30log.WriteException(new ArgumentException(), severity: TraceEventType.Warning, additionalInfo: "AdditionalInfo", id: 6);
Microsoft.VisualStudio.LanguageServices (12)
Interop\ComHandle.cs (1)
60throw new ArgumentException("must be null or a Com object", nameof(handle));
LanguageService\AbstractLanguageService`2.IVsImmediateStatementCompletion2.cs (1)
97new ArgumentException($"Expected content type {this.ContentTypeName} " +
NavigationBar\NavigationBarClient.cs (1)
87throw new ArgumentException();
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
306throw new ArgumentException(ServicesVSResources.The_given_DocumentId_did_not_come_from_the_Visual_Studio_workspace, nameof(documentId)); 459throw new ArgumentException(string.Format(ServicesVSResources.Could_not_find_project_0, projectId));
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
124throw new ArgumentException("Key already exists", nameof(key));
TaskList\ProjectExternalErrorReporter.cs (2)
210throw new ArgumentException(ServicesVSResources.End_position_must_be_start_position); 218_ => throw new ArgumentException(ServicesVSResources.Not_a_valid_value, nameof(nPriority))
Utilities\ComEventSink.cs (1)
21throw new ArgumentException("Not an IConnectionPointContainer", nameof(obj));
Utilities\GlyphExtensions.cs (1)
161throw new ArgumentException("glyph");
Venus\ContainedLanguageCodeSupport.cs (1)
406throw new ArgumentException("InvalidValue", nameof(memberType));
Workspace\GlobalUndoServiceFactory.cs (1)
67throw new ArgumentException(ServicesVSResources.given_workspace_doesn_t_support_undo);
Microsoft.VisualStudio.LanguageServices.CSharp (7)
CodeModel\CSharpCodeModelService.cs (3)
853throw new ArgumentException(); 922throw new ArgumentException(); 3057throw new ArgumentException();
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
72throw new ArgumentException("optionID was an unexpected value.", nameof(optionID));
ProjectSystemShim\CSharpProjectShim.ICSharpVenusProjectSite.cs (2)
28throw new ArgumentException($"The project {nameof(project)} is not currently referenced by this project."); 74throw new ArgumentException($"{project} was not properly sited with the language service.", nameof(project));
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
246_ => throw new ArgumentException("fileType was not a valid OutputFileType", nameof(fileType)),
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
CodeModel\AbstractFileCodeElementTests.cs (1)
68throw new ArgumentException("path must be non-empty.", nameof(path));
Microsoft.Web.Xdt.Extensions (4)
InsertOrAppendAttribute.cs (1)
64throw new ArgumentException("Expected two ['] characters");
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
49throw new ArgumentException("Must not be null or empty", paramName);
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
39throw new ArgumentException("The value cannot be an empty string.", paramName); 68throw new ArgumentException("The value cannot be an empty or whitespace string.", paramName);
MSBuild (3)
ErrorUtilities.cs (3)
356throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args), innerException); 532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName)); 622throw new ArgumentException(
MSBuildTaskHost (4)
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (3)
356throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword(resourceName, args), innerException); 532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName)); 622throw new ArgumentException(
Immutable\ImmutableDictionary.cs (1)
122throw new ArgumentException(nameof(arrayIndex));
MyFrontend (1)
Components\NavigationManagerExtensions.cs (1)
17throw new ArgumentException(message);
PresentationBuildTasks (14)
MS\Internal\MarkupCompiler\PathInternal.cs (2)
32throw new ArgumentException(nameof(relativeTo)); 38throw new ArgumentException(nameof(path));
src\Microsoft.DotNet.Wpf\src\PresentationCore\MS\Internal\Media\ParserStreamGeometryContext.cs (1)
715throw new ArgumentException(SR.UnknownPathOperationType);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (4)
245throw new ArgumentException(SR.Format(SR.ParserAttributeArgsHigh, "XmlnsDefinitionAttribute")); 265throw new ArgumentException(SR.Format(SR.ParserAttributeArgsHigh, "XmlnsCompatibleWithAttribute")); 313throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, "XmlnsDefinitionAttribute")); 387throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, "XmlnsCompatibleWithAttribute"));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsDictionary.cs (3)
142throw new ArgumentException(SR.ParserKeysAreStrings); 470throw new ArgumentException(SR.ParserKeysAreStrings); 478throw new ArgumentException(SR.ParserKeysAreStrings);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (3)
347throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 360throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 365throw new ArgumentException(SR.Format(SR.ParserAttributeArgsHigh, attrType.Name));
src\Microsoft.DotNet.Wpf\src\WindowsBase\System\IO\Packaging\CompoundFile\FormatVersion.cs (1)
77throw new ArgumentException(SR.ZeroLengthFeatureID);
PresentationCore (678)
MS\Internal\Automation\EventMap.cs (1)
110throw new ArgumentException(SR.Automation_InvalidEventId, nameof(eventId));
MS\Internal\Automation\SynchronizedInputAdaptor.cs (1)
38throw new ArgumentException(SR.Format(SR.Automation_InvalidSynchronizedInputType, inputType));
MS\Internal\Automation\TextProviderWrapper.cs (1)
56throw new ArgumentException(SR.Format(SR.TextProvider_InvalidChild, "childElement"));
MS\Internal\Automation\TextRangeProviderWrapper.cs (3)
50throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidRangeProvider, "range")); 60throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidRangeProvider, "targetRange")); 123throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidRangeProvider, "targetRange"));
MS\Internal\FontCache\FontCacheUtil.cs (1)
495throw new ArgumentException(SR.FaceIndexMustBePositiveOrZero, nameof(fontUri));
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
720throw new ArgumentException(SR.Collection_BadRank);
MS\Internal\FontFace\CompositeFontInfo.cs (1)
48throw new ArgumentException(SR.FamilyMap_TargetNotSet);
MS\Internal\FontFace\CompositeFontParser.cs (5)
25throw new ArgumentException(SR.Format(SR.PropertyValueCannotBeNaN, propertyName)); 41throw new ArgumentException(SR.Format(SR.PropertyValueCannotBeNaN, propertyName)); 49throw new ArgumentException(SR.Format(SR.PropertyMustBeGreaterThanZero, propertyName)); 57throw new ArgumentException(SR.Format(SR.PropertyValueCannotBeNaN, propertyName)); 65throw new ArgumentException(SR.Format(SR.PropertyCannotBeNegative, propertyName));
MS\Internal\FontFace\TypefaceCollection.cs (1)
61throw new ArgumentException(SR.Collection_BadRank);
MS\Internal\IListConverters.cs (1)
55throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(value));
MS\Internal\Ink\ExtendedProperty.cs (1)
23throw new ArgumentException(SR.InvalidGuid);
MS\Internal\Ink\ExtendedPropertyCollection.cs (3)
150throw new ArgumentException(SR.EPExists, nameof(id)); 168throw new ArgumentException(SR.EPGuidNotFound, nameof(id)); 228throw new ArgumentException(SR.EPNotFound, nameof(attributeId));
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (5)
125throw new ArgumentException(SR.StrokeCollectionCountTooBig, nameof(strokes)); 209throw new ArgumentException(SR.ApplicationGestureArrayLengthIsZero, nameof(applicationGestures)); 218throw new ArgumentException(SR.ApplicationGestureIsInvalid, nameof(applicationGestures)); 230throw new ArgumentException(SR.DuplicateApplicationGestureFound, nameof(applicationGestures)); 240throw new ArgumentException(SR.AllGesturesMustExistAlone, nameof(applicationGestures));
MS\Internal\Ink\InkSerializedFormat\AlgoModule.cs (7)
150throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Input buffer passed was shorter than expected")); 155throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("output buffer length was zero")); 195throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Input buffer was too short (must be at least 3 bytes)")); 235throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid decompression algo byte")); 263throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid compression specified or computed by FindPropAlgoByte")); 310throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("input.Length must be at least 2")); 320throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("bogus isf, we don't decompress property data with lz"));
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (22)
420throw new ArgumentException(SR.InvalidSizeSpecified, nameof(cbSize)); 430throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Custom Attribute tag embedded in ISF stream does not match guid table"), nameof(tag)); 437throw new ArgumentException(SR.InvalidSizeSpecified, nameof(cbSize)); 450throw new ArgumentException(); 457throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), nameof(cbSize)); 478throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), nameof(cbSize)); 773throw new ArgumentException(SR.InvalidGuid); 780throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(System.Windows.Media.Color)), nameof(value)); 788throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(int)), nameof(value)); 796throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(DrawingFlags)), nameof(value)); 807throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(StylusTip), typeof(int)), nameof(value)); 811throw new ArgumentException(SR.Format(SR.InvalidValueOfType, value, typeof(StylusTip)), nameof(value)); 822throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(String), typeof(Matrix)), nameof(value)); 829throw new ArgumentException(SR.MatrixNotInvertible, nameof(value)); 833throw new ArgumentException(SR.InvalidMatrixContainsNaN, nameof(value)); 837throw new ArgumentException(SR.InvalidMatrixContainsInfinity, nameof(value)); 845throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(bool)), nameof(value)); 852throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(double)), nameof(value)); 876throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte)), nameof(value)); 889throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte[])), nameof(value)); 949throw new ArgumentException(SR.InvalidDataInISF, ex); 954throw new ArgumentException(SR.InvalidDataInISF, ex);
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (6)
134throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("ISF size is larger than maximum stream size")); 143throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Drawing Attribute tag embedded in ISF stream does not match guid table")); 154throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid PenTip value found in ISF stream")); 218throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("ISF size if greater then maximum stream size")); 225throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected")); 300throw new ArgumentException ();
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (3)
438throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("bogus GorillaEncodingType passed to compress")); 478throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("bogus GorillaEncodingType passed to GetDataFromReader")); 623throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("bogus GorillaEncodingType passed to Uncompress"));
MS\Internal\Ink\InkSerializedFormat\GuidTagList.cs (2)
113throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Tag is outside of the known guid tag range")); 137throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Tag is outside of the known guid tag range"));
MS\Internal\Ink\InkSerializedFormat\HuffCodec.cs (1)
237throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("invalid huffman encoded data"));
MS\Internal\Ink\InkSerializedFormat\HuffModule.cs (1)
59throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("invalid codec computed"));
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (60)
133throw new ArgumentException(SR.IsfOperationFailed, ex); 138throw new ArgumentException(SR.IsfOperationFailed, ex); 143throw new ArgumentException(SR.IsfOperationFailed, ex); 148throw new ArgumentException(SR.IsfOperationFailed, ex); 153throw new ArgumentException(SR.IsfOperationFailed, ex); 158throw new ArgumentException(SR.IsfOperationFailed, ex); 208throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(isfStream)); 222throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), nameof(isfStream)); 227throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(isfStream)); 342throw new ArgumentException(SR.InvalidStream); 361throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 385throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(inputStream)); 472throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 506throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 569throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 582throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 604throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 618throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 667throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 741throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Global Custom Attribute tag embedded in ISF stream does not match guid table"), "inkdata"); 751throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "inkdata"); 765throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 780throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 798throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "inkdata"); 829throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 834throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 849throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 859throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 891throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 904throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 914throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 931throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 940throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 963throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 993throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 998throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1006throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1016throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1048throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1057throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1065throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1097throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1105throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1133throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1171throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1192throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1210throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid argument passed to ReliableRead")); 1262throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1297throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1331throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1337throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1342throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1348throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1353throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1359throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1364throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1370throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm)); 1587throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Button guid tag embedded in ISF stream does not match guid table"),nameof(strd)); 1603throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF with NoX or NoY specified"), nameof(strd)); 1627throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Packet Description Property tag embedded in ISF stream does not match guid table"), nameof(strd));
MS\Internal\Ink\InkSerializedFormat\MetricEntry.cs (2)
296throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("MetricEntryType was persisted with Never flag which should never happen")); 444throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("MetricEntry cannot be null"));
MS\Internal\Ink\InkSerializedFormat\MultiByteCodec.cs (1)
84throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("invalid input in MultiByteCodec.Decode"));
MS\Internal\Ink\InkSerializedFormat\SerializationHelper.cs (1)
322throw new ArgumentException(SR.InvalidDataTypeForExtendedProperty);
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (18)
76throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Stroke size (" + 156throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Packet buffer overflowed the ISF stream")); 182throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Stroke Custom Attribute tag embedded in ISF stream does not match guid table")); 195throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 230throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 244throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 253throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 262throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 270throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 279throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 286throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected")); 306throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Stroke Custom Attribute tag embedded in ISF stream does not match guid table")); 330throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 365throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 391throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 412throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 486throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Buffer range is smaller than expected expected size")); 518throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Button data length not equal to expected length"));
MS\Internal\Ink\Renderer.cs (3)
436throw new System.ArgumentException(SR.DuplicateStrokeAdded); 464throw new System.ArgumentException(SR.UnknownStroke3); 481throw new System.ArgumentException(SR.UnknownStroke1);
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (7)
57throw new ArgumentException(SR.InvalidTempFileName, nameof(tempFileName)); 404throw new ArgumentException(SR.InvalidScheme, nameof(requestedUri)); 411throw new ArgumentException(SR.InvalidEventHandle, nameof(eventHandle)); 695throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); 702throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); 720throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); 727throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges"));
MS\Internal\IO\Packaging\DeobfuscatingStream.cs (1)
325throw new ArgumentException(SR.InvalidPartName);
MS\Internal\IO\Packaging\NetStream.cs (3)
141throw new ArgumentException(SR.IOBufferOverflow, nameof(buffer)); 256throw new ArgumentException(SR.SeekNegative); 283throw new ArgumentException(SR.SeekNegative);
MS\Internal\IO\Packaging\PreloadedPackages.cs (1)
154throw new ArgumentException(SR.UriMustBeAbsolute, nameof(uri));
MS\Internal\Media\ParserStreamGeometryContext.cs (1)
715throw new ArgumentException(SR.UnknownPathOperationType);
MS\Internal\Media\VisualTreeUtils.cs (1)
219throw new ArgumentException(SR.Visual_NotAVisual);
MS\Internal\Media\XamlSerializationHelper.cs (1)
345throw new ArgumentException(SR.FloatUnknownBamlType);
MS\Internal\PartialArray.cs (3)
128throw new ArgumentException( 137throw new ArgumentException( 147throw new ArgumentException(
MS\Internal\TextFormatting\LineServicesRun.cs (1)
918throw new ArgumentException(SR.CompileFeatureSet_InvalidTypographyProperties);
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
376throw new ArgumentException(SR.OptimalParagraphMustWrap);
MS\Internal\TextFormatting\TextRunCacheImp.cs (5)
115throw new ArgumentException(SR.TextRunPropertiesCannotBeNull); 118throw new ArgumentException(SR.Format(SR.PropertyOfClassMustBeGreaterThanZero, "FontRenderingEmSize", "TextRunProperties")); 123throw new ArgumentException(SR.Format(SR.PropertyOfClassCannotBeGreaterThan, "FontRenderingEmSize", "TextRunProperties", realMaxFontRenderingEmSize)); 128throw new ArgumentException(SR.Format(SR.PropertyOfClassCannotBeNull, "CultureInfo", "TextRunProperties")); 131throw new ArgumentException(SR.Format(SR.PropertyOfClassCannotBeNull, "Typeface", "TextRunProperties"));
MS\Internal\TextFormatting\TextStore.cs (1)
2362throw new ArgumentException(SR.TextObjectMetrics_WidthOutOfRange);
MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (3)
169throw new ArgumentException( 178throw new ArgumentException( 188throw new ArgumentException(
MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (3)
114throw new ArgumentException( 123throw new ArgumentException( 133throw new ArgumentException(
MS\Internal\WpfWebRequestHelper.cs (2)
183throw new ArgumentException(); 200throw new ArgumentException();
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (15)
813return new System.ArgumentException(SR.Image_PropertyNotFound, exceptionForHR); 819return new System.ArgumentException(SR.Image_PropertySize, exceptionForHR); 831return new System.ArgumentException(SR.Image_TooManyScanlines, exceptionForHR); 837return new System.ArgumentException(SR.Image_BadDimensions, exceptionForHR); 851return new System.ArgumentException(SR.Image_FrameMissing, exceptionForHR); 854return new System.ArgumentException(SR.Image_BadMetadataHeader, exceptionForHR); 857return new System.ArgumentException(SR.Image_BadStreamData, exceptionForHR); 869return new System.ArgumentException(SR.Image_SizeOutOfRange, exceptionForHR); 899return new System.ArgumentException(SR.Image_InsufficientBuffer, exceptionForHR); 902return new System.ArgumentException(SR.Format(SR.Media_InvalidArgument, null), exceptionForHR); 945return new System.ArgumentException(SR.D3DImage_InvalidUsage, exceptionForHR); 947return new System.ArgumentException(SR.D3DImage_SurfaceTooBig, exceptionForHR); 949return new System.ArgumentException(SR.D3DImage_InvalidPool, exceptionForHR); 951return new System.ArgumentException(SR.D3DImage_InvalidDevice, exceptionForHR); 953return new System.ArgumentException(SR.D3DImage_AARequires9Ex, exceptionForHR);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SequentialUshortCollection.cs (1)
40throw new ArgumentException(SR.Collection_BadRank);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (1)
248throw new ArgumentException($"{osVer} is not a valid OS!", nameof(osVer));
System\IO\Packaging\PackageStore.cs (2)
95throw new ArgumentException(SR.NotAllowedPackageUri, nameof(uri)); 144throw new ArgumentException(SR.UriMustBeAbsolute, nameof(uri));
System\IO\Packaging\PackWebRequestFactory.cs (2)
55throw new ArgumentException(SR.UriMustBeAbsolute, nameof(uri)); 60throw new ArgumentException(SR.Format(SR.UriSchemeMismatch, PackUriHelper.UriSchemePack), nameof(uri));
System\Windows\DataFormat.cs (1)
22throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed);
System\Windows\DataFormats.cs (1)
29throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed);
System\Windows\DataObjectPastingEventArgs.cs (4)
55throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); 60throw new ArgumentException(SR.Format(SR.DataObject_DataFormatNotPresentOnDataObject, formatToApply)); 128throw new ArgumentException(SR.DataObject_DataObjectMustHaveAtLeastOneFormat); 157throw new ArgumentException(SR.Format(SR.DataObject_DataFormatNotPresentOnDataObject, value));
System\Windows\Documents\DynamicDocumentPaginator.cs (1)
76throw new ArgumentException(SR.PaginatorMissingContentPosition, nameof(contentPosition));
System\Windows\DragDrop.cs (8)
393throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, nameof(dragSource)); 424throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, nameof(dragSource)); 709throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 732throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 766throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 789throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 1168throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 1192throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope");
System\Windows\DragEventArgs.cs (1)
147throw new ArgumentException(SR.Format(SR.DragDrop_DragDropEffectsInvalid, "value"));
System\Windows\Duration.cs (2)
26throw new ArgumentException(SR.Timing_InvalidArgNonNegative, nameof(timeSpan)); 62throw new ArgumentException(SR.Timing_InvalidArgNonNegative, nameof(timeSpan));
System\Windows\EventHandlersStore.cs (2)
147throw new ArgumentException(SR.HandlerTypeIllegal); 181throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\EventManager.cs (3)
70throw new ArgumentException(SR.Format(SR.DuplicateEventName, name, ownerType)); 159throw new ArgumentException(SR.ClassTypeIllegal); 164throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\EventRoute.cs (2)
128throw new ArgumentException(SR.SourceNotSet); 133throw new ArgumentException(SR.Mismatched_RoutedEvent);
System\Windows\FontStretchConverter.cs (1)
65throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(value));
System\Windows\FontStyleConverter.cs (1)
65throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(value));
System\Windows\FontWeightConverter.cs (1)
65throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(value));
System\Windows\FreezableCollection.cs (7)
81throw new System.ArgumentException(SR.Collection_NoNull); 193throw new System.ArgumentException(SR.Collection_NoNull); 310throw new System.ArgumentException(SR.Collection_NoNull); 481throw new ArgumentException(SR.Collection_BadRank); 496throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 639throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "T")); 695throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Generated\ContentElement.cs (8)
71throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 77throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock)); 82throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 136throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 142throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation)); 147throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 521throw new ArgumentException(SR.HandlerTypeIllegal); 576throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\Generated\TextDecorationCollection.cs (8)
119throw new System.ArgumentException(SR.Collection_NoNull); 227throw new System.ArgumentException(SR.Collection_NoNull); 393throw new ArgumentException(SR.Collection_BadRank); 408throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 497throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextDecoration")); 523throw new System.ArgumentException(SR.Collection_NoNull); 923throw new System.ArgumentException(SR.Collection_NoNull); 941throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Generated\UIElement.cs (8)
71throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 77throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock)); 82throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 136throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 142throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation)); 147throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 521throw new ArgumentException(SR.HandlerTypeIllegal); 576throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\Generated\UIElement3D.cs (2)
327throw new ArgumentException(SR.HandlerTypeIllegal); 382throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\Ink\DrawingAttributes.cs (3)
133throw new ArgumentException(SR.InvalidSttValue, nameof(value)); 708throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(Matrix)), nameof(propertyData)); 943throw new ArgumentException(SR.EPGuidNotFound, nameof(id));
System\Windows\Ink\Events.cs (2)
37throw new ArgumentException(SR.Format(SR.CannotBothBeNull, "added", "removed")); 103throw new ArgumentException(SR.Format(SR.CannotBothBeNull, "newValue", "previousValue"));
System\Windows\Ink\GestureRecognizer.cs (1)
164throw new ArgumentException(SR.StrokeCollectionCountTooBig, nameof(strokes));
System\Windows\Ink\IncrementalHitTester.cs (2)
41throw new System.ArgumentException(SR.EmptyArrayNotAllowedAsArgument, nameof(points)); 64throw new System.ArgumentException(SR.EmptyArrayNotAllowedAsArgument, nameof(stylusPoints));
System\Windows\Ink\Stroke.cs (5)
50throw new ArgumentException(SR.InvalidStylusPointCollectionZeroCount, nameof(stylusPoints)); 144throw new ArgumentException(SR.MatrixNotInvertible, nameof(transformMatrix)); 148throw new ArgumentException(SR.InvalidMatrixContainsNaN, nameof(transformMatrix)); 152throw new ArgumentException(SR.InvalidMatrixContainsInfinity, nameof(transformMatrix)); 506throw new ArgumentException(SR.InvalidStylusPointCollectionZeroCount);
System\Windows\Ink\Stroke2.cs (2)
120throw new ArgumentException(SR.EmptyArray); 151throw new ArgumentException(SR.EmptyArray);
System\Windows\Ink\StrokeCollection.cs (13)
47throw new ArgumentException(SR.StrokeIsDuplicated, nameof(strokes)); 60throw new ArgumentException(SR.Image_StreamRead, nameof(stream)); 66throw new ArgumentException(SR.Invalid_isfData_Length, nameof(stream)); 84throw new ArgumentException(SR.Image_StreamWrite, nameof(stream)); 187throw new ArgumentException(SR.InvalidGuid, nameof(propertyDataId)); 225throw new ArgumentException(SR.MatrixNotInvertible, nameof(transformMatrix)); 309throw new ArgumentException(SR.StrokeIsDuplicated, nameof(stroke)); 327throw new ArgumentException(SR.StrokeIsDuplicated, nameof(stroke)); 383ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, nameof(strokes)); 427throw new ArgumentException(SR.StrokeIsDuplicated, nameof(strokes)); 475ArgumentException ae = new ArgumentException(SR.EmptyScToReplace, nameof(strokesToReplace)); 488ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, nameof(strokesToReplace)); 504throw new ArgumentException(SR.StrokeIsDuplicated, nameof(strokesToReplaceWith));
System\Windows\Ink\StrokeCollection2.cs (2)
225throw new ArgumentException(SR.EmptyArray); 275throw new ArgumentException(SR.EmptyArray);
System\Windows\Input\AccessKeyManager.cs (1)
125throw new ArgumentException(SR.Format(SR.AccessKeyManager_NotAUnicodeCharacter, "key"));
System\Windows\Input\Command\KeyBinding.cs (1)
88throw new ArgumentException(SR.Format(SR.InputBinding_ExpectedInputGesture, typeof(KeyGesture)));
System\Windows\Input\Command\MouseBinding.cs (1)
104throw new ArgumentException(SR.Format(SR.InputBinding_ExpectedInputGesture, typeof(MouseGesture)));
System\Windows\Input\Command\RoutedCommand.cs (1)
50throw new ArgumentException(SR.StringEmpty, nameof(name));
System\Windows\Input\Cursor.cs (5)
32throw new ArgumentException(SR.Format(SR.InvalidCursorType, cursorType)); 63throw new ArgumentException(SR.Format(SR.Cursor_UnsupportedFormat , cursorFile)); 198throw new ArgumentException(SR.Format(SR.Cursor_LoadImageFailure, fileName)); 252throw new ArgumentException(SR.Cursor_InvalidStream); 298throw new ArgumentException(SR.Cursor_InvalidStream);
System\Windows\Input\InputMethod.cs (2)
811throw new ArgumentException(SR.Format(SR.InputMethod_InvalidConversionMode, value)); 1062throw new ArgumentException(SR.Format(SR.InputMethod_InvalidSentenceMode, value));
System\Windows\Input\InputScope.cs (1)
171throw new ArgumentException(SR.Format(SR.InputScope_InvalidInputScopeName, "value"));
System\Windows\Input\ManipulationStartingEventArgs.cs (1)
32throw new ArgumentException(SR.Manipulation_InvalidManipulationMode, nameof(value));
System\Windows\Input\Stylus\Common\DynamicRenderer.cs (1)
249throw new ArgumentException(SR.Stylus_MustBeDownToCallReset, nameof(stylusDevice));
System\Windows\Input\Stylus\Common\RawStylusInput.cs (3)
29throw new ArgumentException(SR.Stylus_MatrixNotInvertable, nameof(tabletToElementTransform)); 103throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, nameof(stylusPoints)); 107throw new ArgumentException(SR.Stylus_StylusPointsCantBeEmpty, nameof(stylusPoints));
System\Windows\Input\Stylus\Common\StylusPlugInCollection.cs (2)
43throw new ArgumentException(SR.Stylus_PlugInIsDuplicated, nameof(plugIn)); 176throw new ArgumentException(SR.Stylus_PlugInIsDuplicated, nameof(plugIn));
System\Windows\Input\Stylus\Common\StylusPoint.cs (3)
119throw new ArgumentException(SR.InvalidAdditionalDataForStylusPoint, nameof(additionalValues)); 292throw new ArgumentException(SR.InvalidStylusPointProperty, nameof(stylusPointProperty)); 375throw new ArgumentException(SR.InvalidStylusPointProperty, "propertyId");
System\Windows\Input\Stylus\Common\StylusPointCollection.cs (8)
45throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, nameof(initialCapacity)); 70throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, nameof(initialCapacity)); 88throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, nameof(stylusPoints)); 123throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, nameof(points)); 204throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, nameof(stylusPoints)); 282throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, nameof(stylusPoint)); 300throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, nameof(stylusPoint)); 448throw new ArgumentException(SR.InvalidStylusPointDescriptionSubset, nameof(subsetToReformatTo));
System\Windows\Input\Stylus\Common\StylusPointDescription.cs (5)
55throw new ArgumentException(SR.InvalidStylusPointDescription, nameof(stylusPointPropertyInfos)); 71throw new ArgumentException(SR.InvalidStylusPointDescriptionDuplicatesFound, nameof(stylusPointPropertyInfos)); 82throw new ArgumentException(SR.InvalidStylusPointDescriptionButtonsMustBeLast, nameof(stylusPointPropertyInfos)); 89throw new ArgumentException(SR.InvalidStylusPointDescriptionTooManyButtons, nameof(stylusPointPropertyInfos)); 151throw new ArgumentException("stylusPointProperty");
System\Windows\Input\Stylus\Common\StylusPointProperty.cs (2)
55throw new ArgumentException(SR.InvalidIsButtonForId, nameof(isButton)); 63throw new ArgumentException(SR.InvalidIsButtonForId2, nameof(isButton));
System\Windows\Input\Stylus\Common\StylusPointPropertyInfo.cs (2)
56throw new ArgumentException(SR.Stylus_InvalidMax, nameof(maximum)); 62throw new ArgumentException(SR.InvalidStylusPointPropertyInfoResolution, nameof(resolution));
System\Windows\Input\Stylus\Common\TabletDeviceCollection.cs (1)
73throw new ArgumentException(SR.Format(SR.Stylus_IndexOutOfRange, index.ToString(System.Globalization.CultureInfo.InvariantCulture)), nameof(index));
System\Windows\Input\TextComposition.cs (1)
103throw new ArgumentException(SR.TextComposition_NullResultText);
System\Windows\Input\TextCompositionManager.cs (8)
314throw new ArgumentException(SR.Format(SR.TextCompositionManager_NoInputManager, "composition")); 319throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionHasStarted, "composition")); 337throw new ArgumentException(SR.Format(SR.TextCompositionManager_NoInputManager, "composition")); 342throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionNotStarted, "composition")); 347throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionHasDone, "composition")); 364throw new ArgumentException(SR.Format(SR.TextCompositionManager_NoInputManager, "composition")); 369throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionNotStarted, "composition")); 374throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionHasDone, "composition"));
System\Windows\Input\TouchDevice.cs (1)
331throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), nameof(element));
System\Windows\InterOp\HwndKeyboardInputProvider.cs (1)
694throw new ArgumentException(SR.OnlyAcceptsKeyMessages);
System\Windows\InterOp\HwndSource.cs (4)
673throw new ArgumentException(SR.NullHwnd); 1913throw new ArgumentException(SR.KeyboardSinkAlreadyOwned); 2092throw new ArgumentException(SR.OnlyAcceptsKeyMessages); 2280throw new ArgumentException(SR.OnlyAcceptsKeyMessages);
System\Windows\InterOp\HwndSourceKeyboardInputSite.cs (1)
16throw new ArgumentException(SR.KeyboardSinkMustBeAnElement, nameof(sink));
System\Windows\InterOp\HwndTarget.cs (3)
524throw new ArgumentException( 531throw new ArgumentException( 538throw new ArgumentException(
System\Windows\Markup\XamlSerializerUtil.cs (1)
56throw new ArgumentException(SR.Format(SR.NonWhiteSpaceInAddText, s));
System\Windows\Markup\XmlLanguage.cs (1)
792throw new ArgumentException(SR.Format(SR.XmlLangMalformed, ietfLanguageTag), nameof(ietfLanguageTag));
System\Windows\Media\Animation\ClockController.cs (1)
279throw new ArgumentException(SR.Timing_InvalidArgFinitePositive, nameof(value));
System\Windows\Media\Animation\Generated\Animatable.cs (6)
70throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 76throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock)); 81throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 135throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 141throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation)); 146throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\TimelineCollection.cs (8)
118throw new System.ArgumentException(SR.Collection_NoNull); 226throw new System.ArgumentException(SR.Collection_NoNull); 392throw new ArgumentException(SR.Collection_BadRank); 407throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 496throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Timeline")); 522throw new System.ArgumentException(SR.Collection_NoNull); 922throw new System.ArgumentException(SR.Collection_NoNull); 940throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\KeySpline.cs (4)
57throw new ArgumentException(SR.Format( 65throw new ArgumentException(SR.Format( 167throw new ArgumentException(SR.Format( 199throw new ArgumentException(SR.Format(
System\Windows\Media\Animation\Timeline.cs (2)
212throw new ArgumentException(SR.Timing_InvalidArgAccelAndDecel, nameof(value)); 601throw new ArgumentException(SR.Timing_InvalidArgFinitePositive, nameof(value));
System\Windows\Media\Animation\TimelineGroup.cs (1)
145throw new ArgumentException(SR.Timing_ChildMustBeTimeline, nameof(child));
System\Windows\Media\CharacterMetrics.cs (6)
104throw new ArgumentException(SR.CharacterMetrics_NegativeHorizontalAdvance); 110throw new ArgumentException(SR.CharacterMetrics_NegativeVerticalAdvance); 165throw new ArgumentException(SR.Format(SR.CannotConvertStringToType, field.ToString(), "double")); 171throw new ArgumentException(SR.CharacterMetrics_MissingRequiredField); 180throw new ArgumentException(SR.CharacterMetrics_TooManyFields); 190throw new ArgumentException(SR.CharacterMetrics_MissingRequiredField);
System\Windows\Media\CharacterMetricsDictionary.cs (11)
121throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 139throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 178throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 181throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 196throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); 201throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(SC.DictionaryEntry), elementType)); 363throw new ArgumentException(SR.Format(SR.CollectionDuplicateKey, key)); 492throw new ArgumentException(SR.Format(SR.CannotConvertStringToType, s, "int"), nameof(key)); 500throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), "int"), nameof(key)); 504throw new ArgumentException(SR.Format(SR.CodePointOutOfRange, value), nameof(key)); 517throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(CharacterMetrics), value.GetType()));
System\Windows\Media\Color.cs (5)
70throw new ArgumentException(SR.Format(SR.Color_DimensionMismatch, null)); 75throw new ArgumentException(SR.Format(SR.Color_DimensionMismatch, null)); 488throw new ArgumentException(SR.Format(SR.Color_ColorContextTypeMismatch, null)); 522throw new ArgumentException(SR.Format(SR.Color_ColorContextTypeMismatch, null)); 605throw new ArgumentException(SR.Format(SR.Color_ColorContextTypeMismatch, null));
System\Windows\Media\ColorContext.cs (2)
487throw new ArgumentException(SR.UriNotAbsolute, nameof(profileUri)); 613throw new ArgumentException(SR.ColorContext_FileTooLarge, filename);
System\Windows\Media\ColorConverter.cs (1)
79throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(value));
System\Windows\Media\CompositionTarget.cs (1)
461throw new System.ArgumentException(SR.CompositionTarget_RootVisual_HasParent);
System\Windows\Media\CultureSpecificStringDictionary.cs (8)
113throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 116throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 147throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 150throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 165throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); 170throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(SC.DictionaryEntry), elementType)); 312throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(string)), nameof(value)); 325throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), typeof(XmlLanguage)), nameof(key));
System\Windows\Media\Effects\BitmapEffect.cs (1)
97throw new ArgumentException(SR.Effect_No_InputSource, nameof(input));
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (8)
121throw new System.ArgumentException(SR.Collection_NoNull); 229throw new System.ArgumentException(SR.Collection_NoNull); 395throw new ArgumentException(SR.Collection_BadRank); 410throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 499throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "BitmapEffect")); 525throw new System.ArgumentException(SR.Collection_NoNull); 925throw new System.ArgumentException(SR.Collection_NoNull); 943throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Effects\PixelShader.cs (1)
90throw new ArgumentException(SR.Effect_SourceUriMustBeFileOrPack);
System\Windows\Media\Effects\ShaderEffect.cs (3)
378throw new ArgumentException(SR.GetResourceString(srid), nameof(dp)); 429throw new ArgumentException(SR.Effect_ShaderSamplerType, nameof(dp)); 447throw new ArgumentException(SR.GetResourceString(srid));
System\Windows\Media\EllipseGeometry.cs (1)
30throw new System.ArgumentException(SR.Format(SR.Rect_Empty, "rect"));
System\Windows\Media\FamilyMapCollection.cs (7)
77throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 80throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 91throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); 95throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(FamilyTypeface), elementType)); 98throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 101throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 367throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FontFamilyMap)));
System\Windows\Media\FamilyTypefaceCollection.cs (6)
241throw new ArgumentException(SR.CompositeFont_DuplicateTypeface); 359throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FamilyTypeface))); 369throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); 373throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(FamilyTypeface[]), elementType)); 376throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 379throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array"));
System\Windows\Media\FontEmbeddingManager.cs (1)
87throw new ArgumentException(SR.GlyphTypefaceNotRecorded, nameof(glyphTypeface));
System\Windows\Media\FontFamily.cs (1)
71throw new ArgumentException(SR.UriNotAbsolute, nameof(baseUri));
System\Windows\Media\FontFamilyConverter.cs (1)
120throw new ArgumentException(SR.Format(SR.General_Expected_Type, "FontFamily"), nameof(value));
System\Windows\Media\Fonts.cs (3)
84throw new ArgumentException(SR.UriNotAbsolute, nameof(baseUri)); 92throw new ArgumentException(SR.InvalidAbsoluteUriInFontFamilyName, nameof(location)); 315throw new ArgumentException(SR.Collection_BadRank);
System\Windows\Media\Generated\BrushConverter.cs (1)
67throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Brush"), nameof(context));
System\Windows\Media\Generated\CacheModeConverter.cs (1)
67throw new ArgumentException(SR.Format(SR.General_Expected_Type, "CacheMode"), nameof(context));
System\Windows\Media\Generated\DoubleCollection.cs (3)
367throw new ArgumentException(SR.Collection_BadRank); 382throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "double"));
System\Windows\Media\Generated\DrawingCollection.cs (8)
140throw new System.ArgumentException(SR.Collection_NoNull); 248throw new System.ArgumentException(SR.Collection_NoNull); 414throw new ArgumentException(SR.Collection_BadRank); 429throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 518throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Drawing")); 544throw new System.ArgumentException(SR.Collection_NoNull); 967throw new System.ArgumentException(SR.Collection_NoNull); 985throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\GeneralTransformCollection.cs (8)
128throw new System.ArgumentException(SR.Collection_NoNull); 236throw new System.ArgumentException(SR.Collection_NoNull); 402throw new ArgumentException(SR.Collection_BadRank); 417throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform")); 532throw new System.ArgumentException(SR.Collection_NoNull); 932throw new System.ArgumentException(SR.Collection_NoNull); 950throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\GeometryCollection.cs (8)
140throw new System.ArgumentException(SR.Collection_NoNull); 248throw new System.ArgumentException(SR.Collection_NoNull); 414throw new ArgumentException(SR.Collection_BadRank); 429throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 518throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Geometry")); 544throw new System.ArgumentException(SR.Collection_NoNull); 967throw new System.ArgumentException(SR.Collection_NoNull); 985throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\GeometryConverter.cs (1)
67throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Geometry"), nameof(context));
System\Windows\Media\Generated\GradientStopCollection.cs (8)
128throw new System.ArgumentException(SR.Collection_NoNull); 236throw new System.ArgumentException(SR.Collection_NoNull); 402throw new ArgumentException(SR.Collection_BadRank); 417throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GradientStop")); 532throw new System.ArgumentException(SR.Collection_NoNull); 1035throw new System.ArgumentException(SR.Collection_NoNull); 1053throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\Int32Collection.cs (3)
367throw new ArgumentException(SR.Collection_BadRank); 382throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "int"));
System\Windows\Media\Generated\PathFigureCollection.cs (8)
129throw new System.ArgumentException(SR.Collection_NoNull); 237throw new System.ArgumentException(SR.Collection_NoNull); 403throw new ArgumentException(SR.Collection_BadRank); 418throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 507throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathFigure")); 533throw new System.ArgumentException(SR.Collection_NoNull); 1022throw new System.ArgumentException(SR.Collection_NoNull); 1040throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\PathFigureCollectionConverter.cs (1)
67throw new ArgumentException(SR.Format(SR.General_Expected_Type, "PathFigureCollection"), nameof(context));
System\Windows\Media\Generated\PathSegmentCollection.cs (8)
128throw new System.ArgumentException(SR.Collection_NoNull); 236throw new System.ArgumentException(SR.Collection_NoNull); 402throw new ArgumentException(SR.Collection_BadRank); 417throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathSegment")); 532throw new System.ArgumentException(SR.Collection_NoNull); 932throw new System.ArgumentException(SR.Collection_NoNull); 950throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\PointCollection.cs (3)
367throw new ArgumentException(SR.Collection_BadRank); 382throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point"));
System\Windows\Media\Generated\TextEffectCollection.cs (8)
128throw new System.ArgumentException(SR.Collection_NoNull); 236throw new System.ArgumentException(SR.Collection_NoNull); 402throw new ArgumentException(SR.Collection_BadRank); 417throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextEffect")); 532throw new System.ArgumentException(SR.Collection_NoNull); 932throw new System.ArgumentException(SR.Collection_NoNull); 950throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\TransformCollection.cs (8)
140throw new System.ArgumentException(SR.Collection_NoNull); 248throw new System.ArgumentException(SR.Collection_NoNull); 414throw new ArgumentException(SR.Collection_BadRank); 429throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 518throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform")); 544throw new System.ArgumentException(SR.Collection_NoNull); 967throw new System.ArgumentException(SR.Collection_NoNull); 985throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\TransformConverter.cs (1)
67throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Transform"), nameof(context));
System\Windows\Media\Generated\VectorCollection.cs (3)
367throw new ArgumentException(SR.Collection_BadRank); 382throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector"));
System\Windows\Media\GlyphRun.cs (13)
384throw new ArgumentException(SR.ClusterMapEntriesShouldNotDecrease, nameof(clusterMap)); 387throw new ArgumentException(SR.ClusterMapEntryShouldPointWithinGlyphIndices, nameof(clusterMap)); 393throw new ArgumentException(SR.ClusterMapFirstEntryMustBeZero, nameof(clusterMap)); 398throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, characters.Count), nameof(clusterMap)); 404throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, GlyphCount), nameof(clusterMap)); 411throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, CodepointCount + 1), nameof(caretStops)); 415throw new ArgumentException(SR.SidewaysRTLTextIsNotSupported); 433throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(glyphIndices)); 437throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsMustBeLessOrEqualTo, MaxGlyphCount), nameof(glyphIndices)); 443throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), nameof(advanceWidths)); 446throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), nameof(glyphOffsets)); 1084throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(value)); 1114throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(value));
System\Windows\Media\GlyphTypeface.cs (6)
116throw new ArgumentException(SR.UriNotAbsolute, nameof(typefaceSource)); 228throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(glyphs)); 231throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsMustBeLessOrEqualTo, ushort.MaxValue), nameof(glyphs)); 293throw new ArgumentException(SR.UriNotAbsolute, nameof(value)); 1813throw new ArgumentException(SR.Collection_BadRank); 1898throw new ArgumentException(SR.Collection_BadRank);
System\Windows\Media\ImageSourceConverter.cs (1)
55throw new ArgumentException(SR.Format(SR.General_Expected_Type, "ImageSource"), nameof(context));
System\Windows\Media\Imaging\BitmapEncoder.cs (1)
75throw new ArgumentException(
System\Windows\Media\Imaging\BitmapFrame.cs (2)
63throw new System.ArgumentException(SR.Image_NoDecodeFrames, nameof(uri)); 80throw new System.ArgumentException(SR.Image_NoDecodeFrames, nameof(stream));
System\Windows\Media\Imaging\BitmapImage.cs (1)
368throw new System.ArgumentException(SR.Image_NoDecodeFrames);
System\Windows\Media\Imaging\BitmapPalette.cs (1)
115throw new System.ArgumentException(SR.Format(SR.Image_PaletteFixedType, paletteType));
System\Windows\Media\Imaging\BitmapSizeOptions.cs (1)
176throw new ArgumentException(SR.Image_SizeOptionsAngle, nameof(rotation));
System\Windows\Media\Imaging\BitmapSource.cs (2)
643throw new ArgumentException(SR.Collection_BadRank, nameof(pixels)); 662throw new ArgumentException(SR.Image_InvalidArrayForPixel);
System\Windows\Media\Imaging\BitmapVisualManager.cs (2)
32throw new ArgumentException(SR.Format(SR.Image_CantBeFrozen, null)); 69throw new ArgumentException(SR.Image_CantBeFrozen);
System\Windows\Media\Imaging\CachedBitmap.cs (3)
116throw new ArgumentException(SR.Collection_BadRank, nameof(pixels)); 130throw new ArgumentException(SR.Image_InvalidArrayForPixel); 348throw new System.ArgumentException(
System\Windows\Media\Imaging\FormatConvertedBitmap.cs (1)
37throw new ArgumentException(SR.Image_AlphaThresholdOutOfRange);
System\Windows\Media\Imaging\RenderTargetBitmap.cs (1)
38throw new System.ArgumentException(
System\Windows\Media\Imaging\WriteableBitmap.cs (7)
77throw new ArgumentException(SR.Effect_PixelFormat, nameof(pixelFormat)); 392throw new ArgumentException(SR.Image_InvalidArrayForPixel); 488throw new ArgumentException(SR.Image_InvalidArrayForPixel); 860throw new ArgumentException(SR.Image_InsufficientBufferSize, nameof(sourceBufferSize)); 1064throw new ArgumentException(SR.Image_InsufficientBuffer, nameof(sourceBuffer)); 1092throw new ArgumentException(SR.Image_InsufficientBuffer, nameof(sourceBuffer)); 1108throw new ArgumentException(SR.Collection_BadRank, backwardsCompat ? "pixels" : "sourceBuffer");
System\Windows\Media\MediaSystem.cs (1)
279throw new ArgumentException(SR.MediaSystem_ApiInvalidContext);
System\Windows\Media\PixelFormat.cs (2)
223_ => throw new ArgumentException(SR.Format(SR.Image_BadPixelFormat, pixelFormatString), nameof(pixelFormatString)), 259_ => throw new ArgumentException(SR.Format(SR.Image_BadPixelFormat, format), nameof(format))
System\Windows\Media\PixelFormatConverter.cs (1)
78throw new ArgumentException(SR.Format(SR.General_Expected_Type, nameof(PixelFormat)));
System\Windows\Media\RequestCachePolicyConverter.cs (1)
72throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(value));
System\Windows\Media\textformatting\NumberSubstitution.cs (1)
83throw new ArgumentException(SR.SpecificNumberCultureRequired);
System\Windows\Media\textformatting\TextFormatter.cs (1)
122throw new ArgumentException(SR.CurrentDispatcherNotFound);
System\Windows\Media\textformatting\TextSimpleMarkerProperties.cs (1)
48throw new ArgumentException(SR.Format(SR.Enum_Invalid, typeof(TextMarkerStyle)), nameof(style));
System\Windows\Media\Visual.cs (2)
2579throw new ArgumentException(SR.Visual_HasParent); 2648throw new ArgumentException(SR.Visual_NotChild);
System\Windows\Media\VisualCollection.cs (5)
174throw new ArgumentException(SR.Collection_BadRank); 337throw new System.ArgumentException(SR.VisualCollection_EntryInUse); 342throw new System.ArgumentException(SR.VisualCollection_VisualHasParent); 443throw new System.ArgumentException(SR.VisualCollection_VisualHasParent); 687throw new System.ArgumentException(SR.VisualCollection_VisualHasParent);
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (8)
126throw new System.ArgumentException(SR.Collection_NoNull); 234throw new System.ArgumentException(SR.Collection_NoNull); 400throw new ArgumentException(SR.Collection_BadRank); 415throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 504throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform3D")); 530throw new System.ArgumentException(SR.Collection_NoNull); 930throw new System.ArgumentException(SR.Collection_NoNull); 948throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media3D\Generated\MaterialCollection.cs (8)
138throw new System.ArgumentException(SR.Collection_NoNull); 246throw new System.ArgumentException(SR.Collection_NoNull); 412throw new ArgumentException(SR.Collection_BadRank); 427throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 516throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Material")); 542throw new System.ArgumentException(SR.Collection_NoNull); 965throw new System.ArgumentException(SR.Collection_NoNull); 983throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media3D\Generated\Model3DCollection.cs (8)
138throw new System.ArgumentException(SR.Collection_NoNull); 246throw new System.ArgumentException(SR.Collection_NoNull); 412throw new ArgumentException(SR.Collection_BadRank); 427throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 516throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Model3D")); 542throw new System.ArgumentException(SR.Collection_NoNull); 965throw new System.ArgumentException(SR.Collection_NoNull); 983throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media3D\Generated\Point3DCollection.cs (3)
365throw new ArgumentException(SR.Collection_BadRank); 380throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 453throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point3D"));
System\Windows\Media3D\Generated\Transform3DCollection.cs (8)
138throw new System.ArgumentException(SR.Collection_NoNull); 246throw new System.ArgumentException(SR.Collection_NoNull); 412throw new ArgumentException(SR.Collection_BadRank); 427throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 516throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform3D")); 542throw new System.ArgumentException(SR.Collection_NoNull); 965throw new System.ArgumentException(SR.Collection_NoNull); 983throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media3D\Generated\Vector3DCollection.cs (3)
365throw new ArgumentException(SR.Collection_BadRank); 380throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, this.GetType().Name), e); 453throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector3D"));
System\Windows\Media3D\Generated\Visual3D.cs (6)
70throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 76throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock)); 81throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 135throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp)); 141throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation)); 146throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
System\Windows\Media3D\ModelVisual3D.cs (1)
79throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, nameof(Visual3D)));
System\Windows\Media3D\Rect3D.cs (4)
58throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 202throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 227throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 252throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative);
System\Windows\Media3D\Size3D.cs (4)
24throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 85throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 110throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 136throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative);
System\Windows\Media3D\Viewport2DVisual3D.cs (4)
364throw new ArgumentException(SR.Visual_HasParent); 395throw new ArgumentException(SR.Visual_NotChild); 504throw new ArgumentException(SR.Viewport2DVisual3D_MaterialGroupIsInteractiveMaterial, nameof(material)); 528throw new ArgumentException(SR.Viewport2DVisual3D_MultipleInteractiveMaterials, nameof(material));
System\Windows\Media3D\Visual3DCollection.cs (5)
159throw new ArgumentException(SR.Collection_BadRank); 174throw new ArgumentException(SR.Format(SR.Collection_BadDestArray, "Visual3DCollection"), e); 450throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Visual3D")); 460throw new System.ArgumentException(SR.Collection_NoNull); 467throw new System.ArgumentException(SR.VisualCollection_VisualHasParent);
System\Windows\PresentationSource.cs (2)
119throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), nameof(element)); 185throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, e.GetType()), nameof(e));
System\Windows\QueryContinueDragEventArgs.cs (1)
81throw new ArgumentException(SR.Format(SR.DragDrop_DragActionInvalid, "value"));
System\Windows\TextDecorationCollectionConverter.cs (2)
59throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(input)); 118throw new ArgumentException(SR.Format(SR.InvalidTextDecorationCollectionString, text));
System\Windows\UIElement.cs (4)
1644throw new ArgumentException(SR.SourceNotSet); 1649throw new ArgumentException(SR.Mismatched_RoutedEvent); 1901throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType())); 1937throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType()));
PresentationFramework (486)
Microsoft\Win32\FileDialog.cs (1)
327throw new ArgumentException(SR.FileDialogInvalidFilter);
MS\Internal\Annotations\Anchoring\DataIdProcessor.cs (2)
181throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), nameof(locatorPart)); 190throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), nameof(locatorPart));
MS\Internal\Annotations\Anchoring\FixedPageProcessor.cs (2)
170throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), nameof(locatorPart)); 181throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), nameof(locatorPart));
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (11)
99throw new ArgumentException(SR.Format(SR.SelectionDoesNotResolveToAPage, "start"), nameof(selection)); 106throw new ArgumentException(SR.Format(SR.SelectionDoesNotResolveToAPage, "end"), nameof(selection)); 193throw new ArgumentException(SR.StartNodeMustBeFixedPageProxy, nameof(startNode)); 281throw new ArgumentException(SR.StartNodeMustBeDocumentPageViewOrFixedPage, nameof(startNode)); 303throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.CountAttribute)); 449throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 455throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 475throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 493throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), nameof(locatorPart)); 497throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo))); 503throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)));
MS\Internal\Annotations\Anchoring\LocatorManager.cs (2)
133throw new ArgumentException(SR.Format(SR.InvalidSubTreeProcessor, processorString)); 348throw new ArgumentException("Unsupported Selection", nameof(selection));
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (4)
72throw new ArgumentException(SR.WrongSelectionType, $"anchor1: type = {anchor1.GetType()}"); 75throw new ArgumentException(SR.WrongSelectionType, $"Anchor2: type = {anchor2.GetType()}"); 228throw new ArgumentException(SR.WrongSelectionType, nameof(selection)); 370throw new ArgumentException(SR.WrongSelectionType, nameof(selection));
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (9)
135throw new ArgumentException(SR.WrongSelectionType, nameof(selection)); 145throw new ArgumentException(SR.InvalidStartNodeForTextSelection, nameof(startNode)); 148throw new ArgumentException(SR.InvalidStartNodeForTextSelection, nameof(startNode)); 192throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), nameof(locatorPart)); 201throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.CountAttribute)); 242throw new ArgumentException(SR.IncorrectAnchorLength, nameof(locatorPart)); 357throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.CountAttribute)); 434throw new ArgumentException(nameof(segmentNumber)); 441throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)));
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (1)
264throw new ArgumentException(SR.SelectionMustBeServiceProvider, nameof(selection));
MS\Internal\Annotations\Anchoring\TreeNodeSelectionProcessor.cs (2)
97throw new ArgumentException(SR.WrongSelectionType, nameof(selection)); 117throw new ArgumentException(SR.WrongSelectionType, nameof(selection));
MS\Internal\Annotations\AnnotationObservableCollection.cs (2)
110throw new ArgumentException(SR.AlreadyHasParent); 124throw new ArgumentException(SR.AlreadyHasParent);
MS\Internal\Annotations\Component\AnnotationAdorner.cs (1)
43throw new ArgumentException(SR.AnnotationAdorner_NotUIElement, nameof(component));
MS\Internal\Annotations\Component\HighlightComponent.cs (5)
217throw new ArgumentException(SR.MoreThanOneAttachedAnnotation); 267throw new ArgumentException(SR.InvalidAttachedAnnotation, nameof(attachedAnnotation)); 512throw new ArgumentException(SR.InvalidAttachedAnchor, nameof(attachedAnnotation)); 522throw new ArgumentException(SR.AnnotationIsNull, nameof(attachedAnnotation)); 528throw new ArgumentException(SR.Format(SR.NotHighlightAnnotationType, attachedAnnotation.Annotation.AnnotationType.ToString()), nameof(attachedAnnotation));
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (3)
203throw new ArgumentException(SR.MoreThanOneAttachedAnnotation); 235throw new ArgumentException(SR.InvalidAttachedAnnotation, nameof(attachedAnnotation)); 471throw new ArgumentException(SR.InvalidAttachedAnchor);
MS\Internal\Annotations\TextAnchor.cs (1)
105throw new ArgumentException(SR.Format(SR.NotInAssociatedTree, "textPointer"));
MS\Internal\Annotations\XmlElementCollection.cs (2)
93throw new ArgumentException(SR.Format(SR.XmlNodeAlreadyOwned, "change", "change"), nameof(item)); 109throw new ArgumentException(SR.Format(SR.XmlNodeAlreadyOwned, "change", "change"), nameof(item));
MS\Internal\Controls\ConnectionPointCookie.cs (2)
43ex = new ArgumentException(SR.Format(SR.AxNoEventInterface, eventInterface.Name)); 78throw new ArgumentException(SR.Format(SR.AxNoConnectionPoint, eventInterface.Name));
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (2)
945throw new ArgumentException(SR.InvalidValueSpecified, nameof(attachedAnnotation)); 1289throw new ArgumentException(SR.InvalidStickyNoteAnnotation, nameof(attachedAnnotation));
MS\Internal\Data\IndexedEnumerable.cs (1)
320throw new ArgumentException(SR.CopyToNotEnoughSpace, nameof(index));
MS\Internal\Data\RBTree.cs (1)
570throw new ArgumentException(SR.Argument_InvalidOffLen);
MS\Internal\Data\ViewManager.cs (3)
579throw new ArgumentException(SR.Format(SR.CollectionView_WrongType, collectionViewType.Name)); 592throw new ArgumentException(SR.Format(SR.CollectionView_ViewTypeInsufficient, 837throw new ArgumentException(SR.Format(SR.CollectionView_NameTypeDuplicity, collectionViewType, cachedViewType));
MS\Internal\Documents\ContentElementCollection.cs (5)
69throw new ArgumentException(SR.TableCollectionRankMultiDimNotSupported); 77throw new ArgumentException(SR.TableCollectionInvalidOffLen); 109throw new ArgumentException(SR.TableCollectionInvalidOffLen); 455throw new ArgumentException(SR.Format(SR.TableCollectionElementTypeExpected, typeof(TItem).Name), nameof(value)); 509throw new ArgumentException(SR.Format(SR.TableCollectionElementTypeExpected, typeof(TItem).Name), nameof(value));
MS\Internal\Documents\DocumentPageHost.cs (2)
55throw new ArgumentException(SR.DocumentPageView_ParentNotDocumentPageHost, nameof(pageVisual)); 58throw new ArgumentException(SR.DocumentPageView_ParentNotDocumentPageHost, nameof(pageVisual));
MS\Internal\Documents\FlowDocumentPaginator.cs (5)
219throw new ArgumentException(SR.IDPInvalidContentPosition, nameof(contentPosition)); 227throw new ArgumentException(SR.IDPInvalidContentPosition, nameof(contentPosition)); 231throw new ArgumentException(SR.IDPInvalidContentPosition, nameof(contentPosition)); 284throw new ArgumentException(SR.IDPInvalidContentPosition, nameof(contentPosition)); 288throw new ArgumentException(SR.IDPInvalidContentPosition, nameof(contentPosition));
MS\Internal\Documents\ParentUndoUnit.cs (1)
130throw new ArgumentException(SR.UndoUnitNotFound, nameof(unit));
MS\Internal\Documents\TableColumnCollectionInternal.cs (3)
143throw new System.ArgumentException(SR.TableCollectionWrongProxyParent); 150throw new System.ArgumentException(SR.TableCollectionInOtherCollection); 279throw new ArgumentException(SR.TableCollectionRangeOutOfRange);
MS\Internal\Documents\TableTextElementCollectionInternal.cs (5)
45throw new System.ArgumentException(SR.TableCollectionInOtherCollection); 110throw new System.ArgumentException(SR.TableCollectionInOtherCollection); 229throw new ArgumentException(SR.TableCollectionRangeOutOfRange); 265throw new System.ArgumentException(SR.TableCollectionWrongProxyParent); 420throw new System.ArgumentException(SR.TableCollectionInOtherCollection);
MS\Internal\Documents\UndoManager.cs (1)
339throw new ArgumentException(SR.UndoUnitNotFound, nameof(unit));
MS\Internal\Ink\ClipboardProcessor.cs (1)
283throw new ArgumentException(SR.InvalidClipboardFormat, nameof(value));
MS\Internal\IO\Packaging\ByteStream.cs (1)
279throw new ArgumentException(SR.BufferTooSmall, nameof(buffer));
MS\Internal\IO\Packaging\ManagedFilter.cs (1)
125throw new ArgumentException(SR.FilterPropSpecUnknownUnionSelector, nameof(propSpec));
MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (1)
240throw new ArgumentException(SR.CannotSetNegativePosition);
MS\Internal\IO\Packaging\XmlFixedPageInfo.cs (1)
37throw new ArgumentException(SR.Format(SR.UnexpectedXmlNodeInXmlFixedPageInfoConstructor,
MS\Internal\IO\Packaging\XpsFilter.cs (3)
359throw new ArgumentException(SR.FileNameNullOrEmpty, nameof(pszFileName)); 366throw new ArgumentException(SR.FilterLoadInvalidModeFlag, nameof(dwMode)); 382throw new ArgumentException(SR.FilterLoadInvalidModeFlag, nameof(dwMode));
MS\Internal\KnownBoxes.cs (3)
14throw new System.ArgumentException(SR.Rect_WidthAndHeightCannotBeNegative); 33throw new System.ArgumentException(SR.Rect_WidthAndHeightCannotBeNegative); 50throw new System.ArgumentException(SR.Rect_WidthAndHeightCannotBeNegative);
MS\Internal\Markup\StaticExtension.cs (3)
65throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, Member)); 73throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, Member)); 83throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlTypeResolver"));
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (2)
141throw new ArgumentException(nameof(type)); 194throw new ArgumentException($"The provided type '{runtimeClass.FullName}' is not a WinRT projected runtime class.", nameof(runtimeClass));
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (1)
248throw new ArgumentException($"{osVer} is not a valid OS!", nameof(osVer));
System\Windows\Annotations\Annotation.cs (6)
91throw new ArgumentException(SR.TypeNameMustBeSpecified, "annotationType.Name");// needs better message 95throw new ArgumentException(SR.TypeNameMustBeSpecified, "annotationType.Namespace");//needs better message 127throw new ArgumentException(SR.TypeNameMustBeSpecified, "annotationType.Name");//needs better message 131throw new ArgumentException(SR.TypeNameMustBeSpecified, "annotationType.Namespace");//needs better message 136throw new ArgumentException(SR.InvalidGuid, nameof(id)); 140throw new ArgumentException(SR.ModificationEarlierThanCreation, nameof(lastModificationTime));
System\Windows\Annotations\AnnotationDocumentPaginator.cs (1)
71throw new ArgumentException(SR.OnlyFlowAndFixedSupported);
System\Windows\Annotations\AnnotationHelper.cs (3)
597throw new ArgumentException(SR.InvalidSelectionPages); 928throw new ArgumentException(SR.InvalidHighlightColor, nameof(highlightBrush)); 1084throw new ArgumentException(SR.AnnotationServiceNotEnabled, nameof(service));
System\Windows\Annotations\AnnotationResource.cs (1)
76throw new ArgumentException(SR.InvalidGuid, nameof(id));
System\Windows\Annotations\AnnotationService.cs (3)
134throw new ArgumentException(SR.ParameterMustBeLogicalNode, nameof(root)); 353throw new ArgumentException(SR.ParameterMustBeLogicalNode, nameof(element)); 388throw new ArgumentException(SR.ParameterMustBeLogicalNode, nameof(element));
System\Windows\Annotations\LocatorPart.cs (2)
48throw new ArgumentException(SR.TypeNameMustBeSpecified, "partType.Name"); 52throw new ArgumentException(SR.TypeNameMustBeSpecified, "partType.Namespace");
System\Windows\Annotations\Storage\XmlStreamStore.cs (8)
67throw new ArgumentException(SR.StreamDoesNotSupportSeek); 134throw new ArgumentException(SR.AnnotationAlreadyExists, nameof(newAnnotation)); 138throw new ArgumentException(SR.AnnotationAlreadyExists, nameof(newAnnotation)); 782throw new ArgumentException(SR.NullUri, nameof(knownNamespaces)); 786throw new ArgumentException(SR.DuplicatedUri, nameof(knownNamespaces)); 800throw new ArgumentException(SR.NullUri, nameof(knownNamespaces)); 805throw new ArgumentException(SR.DuplicatedCompatibleUri, nameof(knownNamespaces)); 879throw new ArgumentException(SR.Format(SR.InvalidNamespace, xmlNamespace), nameof(xmlNamespace));
System\Windows\Application.cs (12)
352throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull,"resourceLocator", "OriginalString")); 355throw new ArgumentException(SR.AbsoluteUriNotAllowed); 442throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull,"resourceLocator", "OriginalString")); 445throw new ArgumentException(SR.AbsoluteUriNotAllowed); 579throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull, "uriResource", "OriginalString")); 583throw new ArgumentException(SR.NonPackAppAbsoluteUriNotAllowed); 611throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull, "uriContent", "OriginalString")); 615throw new ArgumentException(SR.NonPackAppAbsoluteUriNotAllowed); 640throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull, "uriRemote", "OriginalString")); 646throw new ArgumentException(SR.NonPackSooAbsoluteUriNotAllowed); 971throw new ArgumentException(string.Format("ThemeMode value {0} is invalid. Use None, System, Light or Dark", value)); 1687throw new ArgumentException(SR.Format(SR.WindowPassedShouldBeOnApplicationThread, window.GetType().FullName, this.GetType().FullName));
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (1)
528throw new ArgumentException(SR.PropertyNotSupported);
System\Windows\Automation\Peers\DataGridColumnHeadersPresenterAutomationPeer.cs (1)
158throw new ArgumentException(SR.PropertyNotSupported);
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (1)
135throw new ArgumentException(SR.PropertyNotSupported);
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (1)
235throw new ArgumentException(SR.PropertyNotSupported);
System\Windows\ComponentResourceKeyConverter.cs (1)
100throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "ComponentResourceKey"));
System\Windows\Condition.cs (3)
51throw new ArgumentException(SR.Format(SR.InvalidPropertyValue, conditionValue, conditionProperty.Name)); 134throw new ArgumentException(SR.Format(SR.ConditionValueOfMarkupExtensionNotSupported, 140throw new ArgumentException(SR.ConditionValueOfExpressionNotSupported);
System\Windows\ConditionCollection.cs (1)
112throw new ArgumentException(SR.MustBeCondition);
System\Windows\Controls\AdornedElementPlaceholder.cs (2)
59throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value)); 62throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\AVElementHelper.cs (1)
99throw new ArgumentException(SR.AudioVideo_InvalidDependencyObject);
System\Windows\Controls\ColumnDefinition.cs (9)
78throw new ArgumentException(SR.GridCollection_DestArrayInvalidRank); 86throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array")); 108throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array")); 313throw new ArgumentException(SR.TableCollectionRangeOutOfRange); 516throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(Grid), nameof(ColumnDefinitionCollection))); 540throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(ColumnDefinitionCollection), nameof(Grid))); 593throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "ColumnDefinitionCollection", "ColumnDefinition")); 598throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, "value", "ColumnDefinitionCollection")); 614throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "ColumnDefinitionCollection", "ColumnDefinition"));
System\Windows\Controls\ContextMenuService.cs (1)
43throw new ArgumentException(SR.ContextMenuInDifferentDispatcher);
System\Windows\Controls\CustomDictionarySources.cs (2)
92throw new ArgumentException(SR.CustomDictionaryItemAlreadyExists, nameof(item)); 338throw new ArgumentException(SR.CustomDictionaryNullItem);
System\Windows\Controls\DataGridColumnCollection.cs (3)
45throw new ArgumentException(SR.Format(SR.DataGrid_InvalidColumnReuse, item.Header), nameof(item)); 71throw new ArgumentException(SR.Format(SR.DataGrid_InvalidColumnReuse, item.Header), nameof(item)); 497throw new ArgumentException(SR.DataGrid_DuplicateDisplayIndex);
System\Windows\Controls\DataGridLength.cs (4)
77throw new ArgumentException( 88throw new ArgumentException( 95throw new ArgumentException( 102throw new ArgumentException(
System\Windows\Controls\Decorator.cs (2)
65throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value)); 70throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\DocumentViewer.cs (2)
1927throw new ArgumentException(SR.DocumentViewerArgumentMustBeInteger, nameof(data)); 1960throw new ArgumentException(SR.DocumentViewerArgumentMustBePercentage, nameof(data));
System\Windows\Controls\FlowDocumentReader.cs (6)
747throw new ArgumentException(SR.FlowDocumentReaderViewingModeEnabledConflict); 1616throw new ArgumentException(SR.FlowDocumentReaderViewingModeEnabledConflict); 1648throw new ArgumentException(SR.FlowDocumentReaderCannotDisableAllViewingModes); 1654throw new ArgumentException(SR.FlowDocumentReaderViewingModeEnabledConflict); 1917throw new ArgumentException(SR.FlowDocumentReaderCanHaveOnlyOneChild); 1921throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), nameof(value));
System\Windows\Controls\FlowDocumentScrollViewer.cs (3)
1184throw new ArgumentException(SR.FlowDocumentScrollViewerDocumentBelongsToAnotherFlowDocumentScrollViewerAlready); 1800throw new ArgumentException(SR.FlowDocumentScrollViewerCanHaveOnlyOneChild); 1804throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), nameof(value));
System\Windows\Controls\Grid.cs (3)
77throw (new ArgumentException(SR.Format(SR.Grid_UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value))); 283throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(value), nameof(ColumnDefinitionCollection))); 325throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(value), nameof(RowDefinitionCollection)));
System\Windows\Controls\GridViewHeaderRowPresenter.cs (1)
1187throw new ArgumentException(SR.Format(SR.ListView_MissingParameterlessConstructor, headerType), e);
System\Windows\Controls\InkCanvas.cs (1)
1842throw new ArgumentException(SR.InvalidPoint, nameof(point));
System\Windows\Controls\ItemCollection.cs (1)
286throw new ArgumentException(SR.BadTargetArray, nameof(array)); // array is multidimensional.
System\Windows\Controls\ItemContainerGenerator.cs (3)
168throw new ArgumentException(SR.PanelIsNotItemsHost, nameof(panel)); 272throw new ArgumentException(SR.Format(SR.RemoveRequiresOffsetZero, position.Index, position.Offset), nameof(position)); 274throw new ArgumentException(SR.Format(SR.RemoveRequiresPositiveCount, count), nameof(count));
System\Windows\Controls\ItemsPanelTemplate.cs (1)
155throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ItemsPresenter", templatedParent.GetType().Name));
System\Windows\Controls\Panel.cs (1)
91throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value));
System\Windows\Controls\Primitives\DocumentViewerBase.cs (3)
864throw new ArgumentException(SR.DocumentViewerPageViewsCollectionEmpty); 874throw new ArgumentException(SR.DocumentViewerOneMasterPage); 1707throw new ArgumentException(SR.DocumentViewerChildMustImplementIDocumentPaginatorSource, nameof(value));
System\Windows\Controls\Primitives\Popup.cs (1)
1297throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value));
System\Windows\Controls\PrintDialog.cs (3)
83throw new System.ArgumentException(SR.PrintDialogInvalidPageRange, "PageRange"); 161throw new System.ArgumentException(SR.Format(SR.PrintDialogZeroNotAllowed, "MinPage")); 181throw new System.ArgumentException(SR.Format(SR.PrintDialogZeroNotAllowed, "MaxPage"));
System\Windows\Controls\RichTextBox.cs (4)
153throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), nameof(value)); 158throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType())); 360throw new ArgumentException(SR.RichTextBox_DocumentBelongsToAnotherRichTextBoxAlready); 576throw new ArgumentException(SR.RichTextBox_PointerNotInSameDocument, nameof(value));
System\Windows\Controls\RowDefinition.cs (9)
73throw new ArgumentException(SR.GridCollection_DestArrayInvalidRank); 81throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array")); 103throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array")); 308throw new ArgumentException(SR.TableCollectionRangeOutOfRange); 511throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(Grid), nameof(RowDefinitionCollection))); 535throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(RowDefinitionCollection), nameof(Grid))); 588throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "RowDefinitionCollection", "RowDefinition")); 593throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, "value", "RowDefinitionCollection")); 609throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "RowDefinitionCollection", "RowDefinition"));
System\Windows\Controls\Stack.cs (1)
852throw new ArgumentException(SR.Stack_VisualInDifferentSubTree,nameof(child));
System\Windows\Controls\StickyNote.cs (1)
1741throw new ArgumentException(SR.InvalidInkForeground);
System\Windows\Controls\TextAdaptor.cs (1)
670throw new ArgumentException(SR.TextProvider_InvalidPoint);
System\Windows\Controls\TextBlock.cs (2)
127throw new ArgumentException(SR.Format(SR.TextPanelIllegalParaTypeForIAddChild, "value", value.GetType())); 145throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parentType.Name, valueType.Name));
System\Windows\Controls\TextRangeAdaptor.cs (3)
510throw new ArgumentException(SR.TextRangeProvider_WrongTextRange); 1751throw new ArgumentException(SR.Format(SR.TextRangeProvider_EmptyStringParameter, "text")); 1854throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidParameterValue, maxLength, "maxLength"));
System\Windows\Controls\ToolBarTray.cs (1)
272throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ToolBar)), nameof(value));
System\Windows\Controls\UIElementCollection.cs (2)
386throw new System.ArgumentException(SR.Format(SR.Collection_NoNull, "UIElementCollection")); 391throw new System.ArgumentException(SR.Format(SR.Collection_BadType, "UIElementCollection", value.GetType().Name, "UIElement"));
System\Windows\Controls\ViewPort3D.cs (1)
232throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Visual3D)), nameof(value));
System\Windows\Controls\VirtualizationCacheLength.cs (2)
68throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoNaN, "cacheBeforeViewport")); 73throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoNaN, "cacheAfterViewport"));
System\Windows\Controls\VirtualizedCellInfoCollection.cs (3)
69throw new ArgumentException(SR.SelectedCellsCollection_InvalidItem, nameof(cell)); 74throw new ArgumentException(SR.SelectedCellsCollection_DuplicateItem, nameof(cell)); 125throw new ArgumentException(SR.SelectedCellsCollection_InvalidItem, nameof(cell));
System\Windows\Controls\WebBrowser.cs (2)
432throw new ArgumentException(SR.NeedToBeComVisible); 873throw new ArgumentException(SR.AbsoluteUriOnly, nameof(source));
System\Windows\ControlTemplate.cs (3)
67throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, _targetType.Name, templatedParent.GetType().Name)); 73throw new ArgumentException(SR.MustNotTemplateUnassociatedControl); 138throw new ArgumentException(SR.Format(SR.InvalidControlTemplateTargetType, targetType.Name));
System\Windows\CornerRadiusConverter.cs (2)
123throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(CornerRadius)), nameof(value)); 134throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(CornerRadius), destinationType.FullName));
System\Windows\Data\BindingExpression.cs (1)
394throw new ArgumentException(SR.Format(SR.PropertyNotBindable, dp.Name), nameof(dp));
System\Windows\Data\BindingListCollectionView.cs (3)
955throw new ArgumentException(SR.CannotEditPlaceholder, nameof(item)); 2196throw new ArgumentException(SR.CannotDetermineSortByPropertiesForCollection); 2205throw new ArgumentException(SR.Format(SR.PropertyToSortByNotFoundOnType, typeName, sorts[i].PropertyName));
System\Windows\Data\CompositeCollection.cs (1)
475throw new ArgumentException(SR.CollectionContainerMustBeUniqueForComposite, nameof(cc));
System\Windows\Data\ListCollectionView.cs (1)
1152throw new ArgumentException(SR.CannotEditPlaceholder, nameof(item));
System\Windows\Data\MultiBinding.cs (1)
56throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), nameof(value));
System\Windows\Data\MultiBindingExpression.cs (1)
159throw new ArgumentException(SR.Format(SR.PropertyNotBindable, dp.Name), nameof(dp));
System\Windows\Data\PriorityBinding.cs (1)
53throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), nameof(value));
System\Windows\Data\PriorityBindingExpression.cs (1)
140throw new ArgumentException(SR.Format(SR.PropertyNotBindable, dp.Name), nameof(dp));
System\Windows\Data\RelativeSource.cs (1)
289throw new ArgumentException(SR.RelativeSourceModeInvalid, nameof(mode));
System\Windows\Data\XmlNamespaceMappingCollection.cs (5)
50throw new ArgumentException(SR.Format(SR.RequiresXmlNamespaceMapping, value.GetType().FullName), nameof(value)); 88throw new ArgumentException(SR.RequiresXmlNamespaceMappingUri, nameof(mapping)); 122throw new ArgumentException(SR.RequiresXmlNamespaceMappingUri, nameof(mapping)); 139throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, nameof(arrayIndex), nameof(array))); 157throw new ArgumentException(SR.RequiresXmlNamespaceMappingUri, nameof(mapping));
System\Windows\DataTemplate.cs (1)
192throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ContentPresenter", templatedParent.GetType().Name));
System\Windows\DataTrigger.cs (2)
77throw new ArgumentException(SR.Format(SR.ConditionValueOfMarkupExtensionNotSupported, 83throw new ArgumentException(SR.ConditionValueOfExpressionNotSupported);
System\Windows\DependencyPropertyHelper.cs (1)
203throw new ArgumentException(SR.ElementMustBelongToTemplate, nameof(elementInTemplate));
System\Windows\Documents\DocumentSequence.cs (2)
101throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(DocumentReference)), nameof(value)); 324throw new ArgumentException(SR.IDPInvalidContentPosition);
System\Windows\Documents\DocumentSequenceTextContainer.cs (2)
346throw new ArgumentException(SR.Format(SR.NotInAssociatedContainer, "position")); 352throw new ArgumentException(SR.Format(SR.BadFixedTextPosition, "position"));
System\Windows\Documents\DocumentSequenceTextPointer.cs (5)
658throw new ArgumentException(SR.Format(SR.NegativeValue, "startIndex")); 662throw new ArgumentException(SR.Format(SR.StartIndexExceedsBufferSize, startIndex, textBuffer.Length)); 666throw new ArgumentException(SR.Format(SR.NegativeValue, "count")); 670throw new ArgumentException(SR.Format(SR.MaxLengthExceedsBufferSize, count, textBuffer.Length, startIndex)); 785throw new ArgumentException(SR.BadDistance, nameof(distance));
System\Windows\Documents\DocumentStructures\SemanticBasicElement.cs (9)
69throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 114throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType1, value.GetType(), 152throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(NamedElement)), nameof(value)); 201throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ListItemStructure)), nameof(value)); 243throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 296throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroupStructure)), nameof(value)); 338throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowStructure)), nameof(value)); 381throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCellStructure)), nameof(value)); 425throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
System\Windows\Documents\DocumentStructures\StoryFragments.cs (2)
46throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(StoryFragment)), nameof(value)); 106throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType6, value.GetType(),
System\Windows\Documents\FixedDocument.cs (3)
136throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PageContent)), nameof(value)); 404throw new ArgumentException(SR.IDPInvalidContentPosition); 444throw new ArgumentException(SR.FixedDocumentExpectsDependencyObject);
System\Windows\Documents\FixedLineResult.cs (1)
46throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedLineResult)), nameof(o));
System\Windows\Documents\FixedNode.cs (1)
151throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedNode)), nameof(o));
System\Windows\Documents\FixedPage.cs (1)
187throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value));
System\Windows\Documents\FixedSOMContainer.cs (1)
37throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMContainer)), nameof(comparedObj));
System\Windows\Documents\FixedSOMGroup.cs (1)
39throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMGroup)), nameof(comparedObj));
System\Windows\Documents\FixedSOMSemanticBox.cs (1)
94throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedSOMSemanticBox)), nameof(o));
System\Windows\Documents\FixedTextContainer.cs (2)
313throw new ArgumentException(SR.Format(SR.NotInAssociatedContainer, "position")); 320throw new ArgumentException(SR.Format(SR.BadFixedTextPosition, "position"));
System\Windows\Documents\FixedTextPointer.cs (3)
128throw new ArgumentException(SR.Format(SR.NegativeValue, "count")); 275throw new ArgumentException(SR.BadDistance, nameof(distance)); 395throw new ArgumentException(SR.BadDistance, nameof(offset));
System\Windows\Documents\FlowDocument.cs (2)
1629throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, _typeofThis.Name, value.GetType().Name)); 1635throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, value.GetType().Name));
System\Windows\Documents\FlowNode.cs (1)
113throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowNode)), nameof(o));
System\Windows\Documents\FlowPosition.cs (1)
69throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowPosition)), nameof(o));
System\Windows\Documents\Glyphs.cs (17)
248throw new ArgumentException(SR.GlyphsCaretStopsContainsHexDigits, "CaretStops"); 255throw new ArgumentException(SR.GlyphsCaretStopsLengthCorrespondsToUnicodeString, "CaretStops"); 262throw new ArgumentException(SR.GlyphsCaretStopsLengthCorrespondsToUnicodeString, "CaretStops"); 269throw new ArgumentException(SR.GlyphsCaretStopsLengthCorrespondsToUnicodeString, "CaretStops"); 276throw new ArgumentException(SR.GlyphsCaretStopsLengthCorrespondsToUnicodeString, "CaretStops"); 300throw new ArgumentException(SR.GlyphsUnicodeStringAndIndicesCannotBothBeEmpty); 401throw new ArgumentException(SR.GlyphsClusterBadCharactersBeforeBracket); 405throw new ArgumentException(SR.GlyphsClusterNoNestedClusters); 409throw new ArgumentException(SR.GlyphsClusterNoMatchingBracket); 423throw new ArgumentException(SR.GlyphsClusterMisplacedSeparator); 460throw new ArgumentException(SR.GlyphsUnicodeStringIsTooShort); 560throw new ArgumentException(SR.GlyphsIndexRequiredIfNoUnicode); 563throw new ArgumentException(SR.GlyphsUnicodeStringIsTooShort); 592throw new ArgumentException(SR.GlyphsAdvanceWidthCannotBeNegative); 610throw new ArgumentException(SR.GlyphsTooManyCommas); 655throw new ArgumentException(SR.GlyphsIndexRequiredWithinCluster); 658throw new ArgumentException(SR.GlyphsUnicodeStringIsTooShort);
System\Windows\Documents\NLGSpellerInterop.cs (1)
977throw new ArgumentException(SR.Format(SR.CustomDictionaryFailedToLoadDictionaryUri, lexiconFilePath), e);
System\Windows\Documents\PageContent.cs (1)
173throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FixedPage)), nameof(value));
System\Windows\Documents\Serialization\SerializerDescriptor.cs (4)
66throw new ArgumentException(SR.SerializerProviderDisplayNameNull); 70throw new ArgumentException(SR.SerializerProviderManufacturerNameNull); 74throw new ArgumentException(SR.SerializerProviderManufacturerWebsiteNull); 78throw new ArgumentException(SR.SerializerProviderDefaultFileExtensionNull);
System\Windows\Documents\Serialization\SerializerProvider.cs (8)
79throw new ArgumentException(SR.SerializerProviderAlreadyRegistered, serializerKey); 105throw new ArgumentException(SR.SerializerProviderNotRegistered, serializerKey); 131throw new ArgumentException(SR.SerializerProviderWrongVersion, serializerKey); 147throw new ArgumentException(SR.SerializerProviderUnknownSerializer, serializerKey); 158throw new ArgumentException(SR.SerializerProviderCannotLoad, serializerDescriptor.DisplayName); 162throw new ArgumentException(SR.SerializerProviderCannotLoad, serializerDescriptor.DisplayName); 166throw new ArgumentException(SR.SerializerProviderCannotLoad, serializerDescriptor.DisplayName); 170throw new ArgumentException(SR.SerializerProviderCannotLoad, serializerDescriptor.DisplayName);
System\Windows\Documents\Span.cs (3)
92throw new ArgumentException(SR.Format(SR.InDifferentTextContainers, "start", "end")); 96throw new ArgumentException(SR.Format(SR.BadTextPositionOrder, "start", "end")); 109throw new ArgumentException(SR.Format(SR.InDifferentParagraphs, "start", "end"));
System\Windows\Documents\Table.cs (1)
67throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroup)), nameof(value)));
System\Windows\Documents\TableColumnCollection.cs (1)
278throw new ArgumentException(SR.Format(SR.TableCollectionElementTypeExpected, nameof(TableColumn)), nameof(value));
System\Windows\Documents\TableRow.cs (1)
65throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCell)), nameof(value)));
System\Windows\Documents\TableRowGroup.cs (1)
67throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRow)), nameof(value)));
System\Windows\Documents\TextElement.cs (6)
100throw new ArgumentException(SR.TextElement_UnmatchedEndPointer); 123throw new ArgumentException(SR.Format(SR.InDifferentScope, "start", "end")); 808throw new ArgumentException(SR.Format(SR.TextSchema_ThisInlineUIContainerHasAChildUIElementAlready, this.GetType().Name, ((InlineUIContainer)this).Child.GetType().Name, value.GetType().Name)); 820throw new ArgumentException(SR.Format(SR.TextSchema_ThisBlockUIContainerHasAChildUIElementAlready, this.GetType().Name, ((BlockUIContainer)this).Child.GetType().Name, value.GetType().Name)); 836throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name)); 843throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name));
System\Windows\Documents\TextElementCollection.cs (11)
253throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 292throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 321throw new ArgumentException(SR.TextElementCollection_NoEnumerator, nameof(range)); 335throw new ArgumentException(SR.Format(SR.TextElementCollection_ItemHasUnexpectedType, "range", typeof(TextElementType).Name, typeof(TextElementType).Name), "value"); 398throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value)); 453throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value)); 463throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 564throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value)); 602throw new ArgumentException("array"); 609throw new ArgumentException("arrayIndex"); 614throw new ArgumentException(SR.Format(SR.TextElementCollection_CannotCopyToArrayNotSufficientMemory, count, arrayIndex, array.Length));
System\Windows\Documents\TextPointer.cs (6)
289throw new ArgumentException(SR.BadDistance); 1752throw new ArgumentException(SR.Format(SR.NegativeValue, "startIndex")); 1756throw new ArgumentException(SR.Format(SR.StartIndexExceedsBufferSize, startIndex, textBuffer.Length)); 1760throw new ArgumentException(SR.Format(SR.NegativeValue, "count")); 1764throw new ArgumentException(SR.Format(SR.MaxLengthExceedsBufferSize, count, textBuffer.Length, startIndex)); 3905throw new ArgumentException(SR.BadDistance);
System\Windows\Documents\TextRange.cs (5)
784throw new ArgumentException(SR.Format(SR.TextEditorPropertyIsNotApplicableForTextFormatting, formattingProperty.Name)); 801throw new ArgumentException(SR.Format(SR.TextEditorTypeOfParameterIsNotAppropriateForFormattingProperty, value == null ? "null" : value.GetType().Name, formattingProperty.Name), nameof(value)); 811throw new ArgumentException(SR.TextRange_InvalidParameterValue, nameof(propertyValueAction)); 817throw new ArgumentException(SR.Format(SR.TextRange_PropertyCannotBeIncrementedOrDecremented, formattingProperty.Name), nameof(propertyValueAction)); 852throw new ArgumentException(SR.Format(SR.TextEditorPropertyIsNotApplicableForTextFormatting, formattingProperty.Name));
System\Windows\Documents\TextRangeBase.cs (6)
65throw new ArgumentException(SR.NotInAssociatedTree, nameof(textPointer)); 1538throw new ArgumentException(SR.Format(SR.TextRange_UnsupportedDataFormat, dataFormat), nameof(dataFormat)); 1572throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), nameof(stream)); 1584throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), nameof(stream)); 1589throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), nameof(stream)); 1596throw new ArgumentException(SR.Format(SR.TextRange_UnsupportedDataFormat, dataFormat), nameof(dataFormat));
System\Windows\Documents\TextStore.cs (1)
3332throw new ArgumentException(SR.Format(SR.TextStore_BadIMECharOffset, offset, this.TextContainer.IMECharCount));
System\Windows\Documents\ValidationHelper.cs (5)
44throw new ArgumentException(SR.Format(SR.NotInAssociatedTree, paramName)); 59throw new ArgumentException(SR.Format(SR.InDifferentTextContainers, "startPosition", "endPosition")); 63throw new ArgumentException(SR.Format(SR.BadTextPositionOrder, "startPosition", "endPosition")); 107throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, position.Parent.GetType().Name, child.GetType().Name)); 115throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, child.GetType().Name));
System\Windows\Documents\WinRTSpellerInterop.cs (2)
430throw new ArgumentException(SR.Format(SR.CustomDictionaryFailedToLoadDictionaryUri, lexiconFilePath)); 488throw new ArgumentException(SR.Format(SR.CustomDictionaryFailedToLoadDictionaryUri, lexiconFilePath), e);
System\Windows\Documents\WpfPayload.cs (1)
489throw new ArgumentException(SR.WpfPayload_InvalidImageSource);
System\Windows\DynamicResourceExtensionConverter.cs (1)
47throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "DynamicResourceExtension"), nameof(value));
System\Windows\EventSetter.cs (3)
95throw new ArgumentException(SR.Format(SR.NullPropertyIllegal, "EventSetter.Event")); 99throw new ArgumentException(SR.Format(SR.NullPropertyIllegal, "EventSetter.Handler")); 103throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\EventSetterHandlerConverter.cs (1)
62throw new ArgumentException(SR.TextRange_InvalidParameterValue, nameof(typeDescriptorContext));
System\Windows\EventTrigger.cs (1)
57throw new ArgumentException(SR.Format(SR.EventTriggerBadAction, value.GetType().Name));
System\Windows\FigureLength.cs (3)
103throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoNaN, "value")); 107throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoInfinity, "value")); 119throw new ArgumentException(SR.Format(SR.InvalidCtorParameterUnknownFigureUnitType, "type"));
System\Windows\FrameworkElement.cs (1)
477throw new ArgumentException( SR.Format(SR.TargetNameNotFound, targetName));
System\Windows\FrameworkElementFactory.cs (7)
87throw new ArgumentException(SR.Format(SR.MustBeFrameworkOr3DDerived, value.Name)); 144throw new ArgumentException(SR.NameNotEmptyString); 167throw new ArgumentException(SR.FrameworkElementFactoryAlreadyParented); 209throw new ArgumentException(SR.Format(SR.InvalidPropertyValue, value, dp.Name)); 222throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, dp.Name, GetType().Name)); 310throw new ArgumentException(SR.HandlerTypeIllegal); 346throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\FrameworkPropertyMetadata.cs (2)
224throw new ArgumentException(SR.NoDefaultUpdateSourceTrigger, nameof(defaultUpdateSourceTrigger)); 483throw new ArgumentException(SR.NoDefaultUpdateSourceTrigger, nameof(value));
System\Windows\FrameworkTemplate.cs (2)
374throw new ArgumentException(SR.Format(SR.VisualTreeRootIsFrameworkElement, nameof(FrameworkElement), templateRoot.Type.Name)); 835throw new ArgumentException(SR.Format(SR.InvalidPropertyValue, value, dependencyProperty.Name));
System\Windows\GridLength.cs (3)
92throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoNaN, "value")); 96throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoInfinity, "value")); 102throw new ArgumentException(SR.Format(SR.InvalidCtorParameterUnknownGridUnitType, "type"));
System\Windows\Ink\Events.cs (2)
305throw new ArgumentException(SR.InvalidEmptyStrokeCollection, nameof(strokes)); 312throw new ArgumentException(SR.InvalidEmptyArray, nameof(gestureRecognitionResults));
System\Windows\Markup\Baml2006\Baml2006Reader.cs (3)
1436throw new ArgumentException(SR.Format(SR.IntegerCollectionLengthLessThanZero, Array.Empty<object>())); 2084throw new ArgumentException(SR.Format(SR.MissingTagInNamespace, "=", uriInput)); 2089throw new ArgumentException(SR.Format(SR.AssemblyTagMissing, "assembly", uriInput));
System\Windows\Markup\Baml2006\SharedStream.cs (1)
47throw new ArgumentException("can\u2019t seek on baseStream");
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (3)
83throw new ArgumentException(SR.AssemblyIdNegative); 122throw new ArgumentException(SR.KnownTypeIdNegative); 151throw new ArgumentException(SR.KnownTypeIdNegative);
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (1)
49throw new ArgumentException(SR.Format(SR.RuntimeTypeRequired, type), nameof(type));
System\Windows\Markup\BamlWriter.cs (2)
31throw new ArgumentException(SR.BamlWriterBadStream); 1068throw new ArgumentException(SR.Format(SR.BamlWriterBadAssembly,
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (3)
300throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "arrayIndex", "array"), nameof(arrayIndex)); 305throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, "arrayIndex", "array")); 358throw new ArgumentException(SR.Format(SR.Collection_CopyTo_ArrayCannotBeMultidimensional), nameof(array));
System\Windows\Markup\RoutedEventConverter.cs (1)
165throw new ArgumentException(SR.Format(SR.ParserPrefixNSProperty, nsPrefix, nameString));
System\Windows\Markup\XamlInt32CollectionSerializer.cs (2)
275throw new ArgumentException(SR.IntegerCollectionLengthLessThanZero); 324throw new ArgumentException(SR.UnknownIndexType);
System\Windows\Markup\XamlSerializerUtil.cs (1)
39throw new ArgumentException(SR.Format(SR.NonWhiteSpaceInAddText, s));
System\Windows\Markup\XamlStream.cs (2)
155throw new ArgumentException(SR.ParserWriterUnknownOrigin); 299throw new ArgumentException(SR.ParserWriterUnknownOrigin);
System\Windows\Markup\XmlnsCache.cs (2)
352throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, "XmlnsDefinitionAttribute")); 387throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, "XmlnsCompatibleWithAttribute"));
System\Windows\Markup\XmlnsDictionary.cs (3)
142throw new ArgumentException(SR.ParserKeysAreStrings); 470throw new ArgumentException(SR.ParserKeysAreStrings); 478throw new ArgumentException(SR.ParserKeysAreStrings);
System\Windows\Media\Animation\BeginStoryboard.cs (2)
80throw new ArgumentException(SR.Storyboard_UnrecognizedHandoffBehavior); 105throw new ArgumentException(SR.Format(SR.InvalidPropertyValue, value, "Name"));
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\Media\Animation\SeekStoryboard.cs (1)
81throw new ArgumentException(SR.Storyboard_UnrecognizedTimeSeekOrigin);
System\Windows\Media\Animation\Storyboard.cs (1)
1215throw new ArgumentException(SR.Storyboard_UnrecognizedHandoffBehavior);
System\Windows\MessageBox.cs (1)
397throw new ArgumentException(SR.CantShowMBServiceWithOwner);
System\Windows\Navigation\NavigationService.cs (1)
192throw new System.ArgumentException(SR.HyperLinkTargetNotFound);
System\Windows\PropertyPath.cs (1)
845throw new ArgumentException(SR.Format(SR.ParserPrefixNSProperty, nsPrefix, name));
System\Windows\PropertyPathConverter.cs (3)
102throw new ArgumentException(SR.Format(SR.CannotConvertType, source.GetType().FullName, typeof(PropertyPath))); 133throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(PropertyPath), destinationType.FullName)); 139throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PropertyPath)), nameof(value));
System\Windows\ResourceDictionary.cs (2)
136throw new ArgumentException(SR.Format(SR.ResourceDictionaryLoadFromFailure, value == null ? "''" : value.ToString())); 1292throw new ArgumentException(SR.KeyCollectionHasInvalidKey);
System\Windows\ResourceReferenceExpressionConverter.cs (1)
116throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "ResourceReferenceExpression"));
System\Windows\Setter.cs (8)
49throw new ArgumentException(SR.SetterValueCannotBeUnset); 68throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, property.Name, GetType().Name)); 90throw new ArgumentException(SR.Format(SR.NullPropertyIllegal, "Setter.Property")); 98throw new ArgumentException(SR.StylePropertyInStyleNotAllowed); 112throw new ArgumentException(SR.Format(SR.SetterValueOfMarkupExtensionNotSupported, 119throw new ArgumentException(SR.Format(SR.InvalidSetterValue, value, dp.OwnerType, dp.Name)); 172throw new ArgumentException(SR.SetterValueCannotBeUnset); 180throw new ArgumentException(SR.StyleValueOfExpressionNotSupported);
System\Windows\Shell\JumpList.cs (1)
62throw new ArgumentException(SR.JumpItemsRejectedEventArgs_CountMismatch);
System\Windows\Shell\WindowChrome.cs (4)
118throw new ArgumentException("The element must be a DependencyObject", nameof(inputElement)); 131throw new ArgumentException("The element must be a DependencyObject", nameof(inputElement)); 150throw new ArgumentException("The element must be a DependencyObject", nameof(inputElement)); 163throw new ArgumentException("The element must be a DependencyObject", nameof(inputElement));
System\Windows\Standard\Verify.cs (16)
66throw new ArgumentException(errorMessage, name); 90throw new ArgumentException(errorMessage, name); 103throw new ArgumentException("The parameter must not be the default value.", name); 129throw new ArgumentException("The parameter must be null.", name); 161throw new ArgumentException("", name); 176throw new ArgumentException(message, name); 188throw new ArgumentException(message, parameterName); 193throw new ArgumentException(message, parameterName); 205throw new ArgumentException(message, parameterName); 210throw new ArgumentException(message, parameterName); 220throw new ArgumentException("The URI must be absolute.", parameterName); 235throw new ArgumentException(string.Create(CultureInfo.InvariantCulture, $"The integer value must be bounded with [{lowerBoundInclusive}, {upperBoundExclusive})"), parameterName); 244throw new ArgumentException(message, parameter); 257throw new ArgumentException("The type of this parameter does not support a required interface", parameterName); 267throw new ArgumentException($"No file exists at \"{filePath}\"", parameterName); 290throw new ArgumentException($"The parameter must implement interface {interfaceType}.", parameterName);
System\Windows\Style.cs (3)
167throw new ArgumentException(SR.Format(SR.MustBeFrameworkDerived, value.Name)); 205throw new ArgumentException(SR.StyleCannotBeBasedOnSelf); 394throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(SetterBase)), nameof(value));
System\Windows\StyleHelper.cs (1)
5316throw new ArgumentException(SR.Format(SR.NameScopeDuplicateNamesNotAllowed, childName));
System\Windows\SystemKeyConverter.cs (1)
132throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "SystemResourceKey or SystemThemeKey"));
System\Windows\TemplateBindingExpressionConverter.cs (1)
45throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "TemplateBindingExpression"));
System\Windows\TemplateBindingExtensionConverter.cs (1)
51throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "TemplateBindingExtension"), nameof(value));
System\Windows\TemplateKey.cs (2)
163result = new ArgumentException(SR.Format(SR.MustBeTypeOrString, dataType.GetType().Name), argName); 167result = new ArgumentException(SR.DataTypeCannotBeObject, argName);
System\Windows\ThicknessConverter.cs (2)
124throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Thickness)), nameof(value)); 134throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(Thickness), destinationType.FullName));
System\Windows\Trigger.cs (3)
79throw new ArgumentException(SR.Format(SR.ConditionValueOfMarkupExtensionNotSupported, 85throw new ArgumentException(SR.ConditionValueOfExpressionNotSupported); 181throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(Setter)), nameof(o));
System\Windows\TriggerActionCollection.cs (1)
305throw new ArgumentException(SR.MustBeTriggerAction);
System\Windows\TriggerBase.cs (2)
177throw new ArgumentException(SR.StylePropertyInStyleNotAllowed); 191throw new ArgumentException(SR.ChildNameMustBeNonEmpty);
System\Windows\Window.cs (6)
586throw new ArgumentException(string.Format("ThemeMode value {0} is invalid. Use None, System, Light or Dark", value)); 1234throw new ArgumentException(SR.CannotSetOwnerToItself); 1268throw new ArgumentException(SR.Format(SR.CircularOwnerChild, value, this)); 5686throw new ArgumentException(SR.Format(SR.ValueNotBetweenInt32MinMax, l)); 5697throw new ArgumentException(SR.Format(SR.InvalidValueForTopLeft, length)); 5703throw new ArgumentException(SR.Format(SR.ValueNotBetweenInt32MinMax, length));
PresentationFramework.Fluent.Tests (1)
ResourceTests\FluentResourceDictionaryTests.cs (1)
74throw new ArgumentException($"The source : {source} can not be loaded.");
PresentationUI (3)
MS\Internal\Documents\Application\RestrictedTransactionalPackage.cs (1)
88throw new ArgumentException(SR.PackagePartTypeNotWritable, nameof(contentType));
MS\Internal\Documents\Application\TransactionalPackage.cs (1)
82throw new ArgumentException(
MS\Internal\Documents\DigitalSignatureProvider.cs (1)
39throw new ArgumentException(SR.DigitalSignatureNoFixedDocumentSequence);
ReachFramework (20)
Packaging\XpsFixedPageReaderWriter.cs (2)
1225throw new ArgumentException(SR.ReachPackaging_InvalidType); 1245throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, mimeType.ToString()));
Packaging\XpsManager.cs (4)
300throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, contentType), nameof(contentType)); 350throw new ArgumentException(SR.ReachPackaging_InvalidType); 1180throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, contentType), nameof(contentType)); 1475throw new ArgumentException(SR.ReachPackaging_PartFromDifferentContainer);
PrintConfig\FallbackPTProvider.cs (1)
108throw new ArgumentException(
PrintConfig\PTProvider.cs (3)
231throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 336throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 497throw new ArgumentException(String.Format(CultureInfo.CurrentCulture,
Serialization\FontTypeConverter.cs (1)
157throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "GlyphRun"));
Serialization\ImageSourceTypeConverter.cs (1)
162throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "BitmapSource"));
Serialization\Manager\NGCSerializer.cs (3)
87throw new ArgumentException(SR.ReachSerialization_ExpectedFixedDocument); 156throw new ArgumentException(SR.ReachSerialization_ExpectedFixedPage); 470throw new ArgumentException(SR.ReachSerialization_ExpectedFixedDocumentSequence);
Serialization\Manager\ReachVisualSerializer.cs (2)
43throw new ArgumentException(SR.Format(SR.MustBeOfType, "serializedObject", typeof(Visual))); 179throw new ArgumentException(SR.Format(SR.MustBeOfType, "serializedObject", typeof(Visual)));
Serialization\Manager\ReachVisualSerializerAsync.cs (2)
76throw new ArgumentException(SR.Format(SR.MustBeOfType, "serializedObject", typeof(Visual))); 229throw new ArgumentException(SR.Format(SR.MustBeOfType, "serializedObject", typeof(Visual)));
Serialization\Manager\XpsOMPackagingPolicy.cs (1)
572throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, contentType.ToString()));
Replay (1)
src\Compilers\Shared\BuildProtocol.cs (1)
134throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
ResultsOfTGenerator (1)
Program.cs (1)
24throw new ArgumentException("Invalid number of args specified. Must specify both class file path and test file path if args are passed.");
Roslyn.Diagnostics.Analyzers (50)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (8)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException( 239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Roslyn.Diagnostics.Analyzers.UnitTests (4)
RunIterationsTests.cs (4)
37_ => throw new ArgumentException("Unexpected argument", nameof(attributeName)), 88_ => throw new ArgumentException("Unexpected argument", nameof(attributeName)), 133_ => throw new ArgumentException("Unexpected argument", nameof(attributeName)), 184_ => throw new ArgumentException("Unexpected argument", nameof(attributeName)),
Roslyn.Diagnostics.CSharp.Analyzers (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
334throw new ArgumentException(CSharpCompilerExtensionsResources.Expected_string_or_char_literal, nameof(token));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\CSharpStructuredTriviaFormatEngine.cs (1)
22var root = trivia.GetStructure() ?? throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
325throw new ArgumentException("target"); 374throw new ArgumentException("attributeToRemove"); 389throw new ArgumentException("attributeToRemove"); 474throw new ArgumentException("attributeToRemove");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
85throw new ArgumentException(string.Format(WorkspaceExtensionsResources.Cannot_generate_code_for_unsupported_operator_0, method.Name), nameof(method));
Roslyn.Test.PdbUtilities (5)
Reader\Token2SourceLineExporter.cs (5)
360throw new ArgumentException("Arg_HTCapacityOverflow"); 370throw new ArgumentException("Arg_HTCapacityOverflow"); 449throw new ArgumentException("Argument_KeyLessThanZero"); 529throw new ArgumentException("Argument_KeyLessThanZero"); 589throw new ArgumentException("Argument_AddingDuplicate__" + _buckets[bucketNumber].key);
RunTests (1)
AssemblyScheduler.cs (1)
254throw new ArgumentException($"{testListPath} does not exist");
ScenarioTests.Common.Tests (1)
ScenarioTestTypes.cs (1)
719throw new FaultException<ArgumentException>(new ArgumentException());
Shared (4)
ServerSentEvents\ThrowHelper.cs (2)
26throw new ArgumentException("The argument cannot contain line breaks.", parameterName); 31throw new ArgumentException("The argument cannot be a negative value.", parameterName);
Throw\Throw.cs (2)
370=> throw new ArgumentException(message, paramName); 387=> throw new ArgumentException(message, paramName, innerException);
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\TestConnection.cs (1)
62throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TestConnection.cs (1)
62throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
Swaggatherer (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
System.CodeDom (23)
Microsoft\CSharp\CSharpCodeGenerator.cs (5)
613throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 750throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e)); 914throw new ArgumentException(SR.Format(SR.Argument_NullComment, nameof(e)), nameof(e)); 1234throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 2683throw new ArgumentException(SR.Format(SR.InvalidIdentifier, value), nameof(value));
src\libraries\Common\src\System\IO\TempFileCollection.cs (3)
73throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(fileExtension)), nameof(fileExtension)); 85throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(fileName)), nameof(fileName)); 90throw new ArgumentException(SR.Format(SR.DuplicateFileName, fileName), nameof(fileName));
System\CodeDom\Compiler\CodeGenerator.cs (5)
608throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 938throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 1426throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e)); 1471throw new ArgumentException(SR.Format(SR.Argument_NullComment, nameof(e)), nameof(e)); 1549throw new ArgumentException(SR.Format(SR.InvalidIdentifier, value), nameof(value));
System\CodeDom\Compiler\CodeValidator.cs (10)
59throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 94throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 455throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 641throw new ArgumentException(SR.Format(SR.ArityDoesntMatch, baseType, e.TypeArguments.Count), nameof(e)); 650throw new ArgumentException(message, nameof(e)); 659throw new ArgumentException(message, nameof(e)); 768throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 938throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 945throw new ArgumentException(SR.Format(SR.InvalidPathCharsInChecksum, e.FileName), nameof(e)); 951throw new ArgumentException(SR.Format(SR.InvalidRegion, e.RegionText), nameof(e));
System.Collections (84)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (5)
20throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 25throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 40throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 62throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 74throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\LinkedList.cs (6)
207throw new ArgumentException(SR.Arg_InsufficientSpace); 453throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 458throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 465throw new ArgumentException(SR.Arg_InsufficientSpace); 480throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 496throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\OrderedDictionary.cs (25)
299throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 330throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 338throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 1215throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1242throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 1255throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 1290throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1295throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 1302throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1315throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1325throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1335throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 1364throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 1515throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array)); 1533throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1538throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 1545throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1558throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1568throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1704throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array)); 1842throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1847throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 1854throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1867throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1877throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\PriorityQueue.cs (4)
960throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 965throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 975throw new ArgumentException(SR.Argument_InvalidOffLen); 984throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\SortedDictionary.cs (15)
328throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 333throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 357throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 362throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 544throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 556throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 561throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 568throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 584throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 705throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 717throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 722throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 729throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 745throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 898throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, item));
System\Collections\Generic\SortedList.cs (15)
167throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, keys[i])); 185throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, key), nameof(key)); 273throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 276throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 442throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 458throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 463throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 473throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 488throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 500throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 627throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 1055throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1064throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1169throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1178throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\SortedSet.cs (7)
523throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 546throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 551throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 558throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 571throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 584throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1515throw new ArgumentException(SR.SortedSet_LowerValueGreaterThanUpperValue, nameof(lowerValue));
System\Collections\Generic\Stack.cs (5)
108throw new ArgumentException(SR.Argument_InvalidOffLen); 126throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 131throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 141throw new ArgumentException(SR.Argument_InvalidOffLen); 151throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\ThrowHelper.cs (1)
20throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, key), nameof(key));
System.Collections.Concurrent (21)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
System\Collections\Concurrent\BlockingCollection.cs (10)
184throw new ArgumentException(SR.BlockingCollection_ctor_CountMoreThanCapacity); 994throw new ArgumentException(SR.BlockingCollection_CantAddAnyWhenCompleted, nameof(collections)); //case#4 1378throw new ArgumentException(SR.BlockingCollection_CantTakeAnyWhenAllDone, nameof(collections)); 1578throw new ArgumentException(SR.Collection_CopyTo_TooManyElems, nameof(index)); 1582throw new ArgumentException(SR.BlockingCollection_CopyTo_MultiDim, nameof(array)); 1586throw new ArgumentException(SR.BlockingCollection_CopyTo_IncorrectType, nameof(array)); 1590throw new ArgumentException(SR.BlockingCollection_CopyTo_IncorrectType, nameof(array)); 1659throw new ArgumentException( 1674throw new ArgumentException( 1684throw new ArgumentException(
System\Collections\Concurrent\ConcurrentBag.cs (1)
297throw new ArgumentException(SR.Collection_CopyTo_TooManyElems, nameof(index));
System\Collections\Concurrent\ConcurrentDictionary.cs (7)
345throw new ArgumentException(SR.ConcurrentDictionary_SourceContainsDuplicateKeys); 765throw new ArgumentException(SR.ConcurrentDictionary_ArrayNotLargeEnough); 1549throw new ArgumentException(SR.ConcurrentDictionary_KeyAlreadyExisted); 1685throw new ArgumentException(SR.ConcurrentDictionary_TypeOfKeyIncorrect); 1818throw new ArgumentException(SR.ConcurrentDictionary_TypeOfKeyIncorrect); 1878throw new ArgumentException(SR.ConcurrentDictionary_ArrayNotLargeEnough); 1905throw new ArgumentException(SR.ConcurrentDictionary_ArrayIncorrectType, nameof(array));
System\Collections\Concurrent\ConcurrentStack.cs (1)
402throw new ArgumentException(SR.ConcurrentStack_PushPopRange_InvalidCount);
System\ThrowHelper.cs (1)
20internal static void ThrowValueNullException() => throw new ArgumentException(SR.ConcurrentDictionary_TypeOfValueIncorrect);
System.Collections.Immutable (24)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
System\Collections\Frozen\FrozenDictionary.cs (5)
406throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 411throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 421throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array)); 442throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 454throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Frozen\FrozenSet.cs (1)
288throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
60throw new ArgumentException(SR.CapacityMustBeGreaterThanOrEqualToCount, paramName: nameof(value));
System\Collections\Immutable\ImmutableArray_1.cs (4)
595throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 1450throw new ArgumentException(SR.ArrayInitializedStateNotEqual, nameof(other)); 1460throw new ArgumentException(SR.ArrayInitializedStateNotEqual, nameof(other)); 1466throw new ArgumentException(SR.ArrayLengthsNotEqual, nameof(other));
System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs (4)
162throw new ArgumentException(SR.Format(SR.DuplicateKey, key)); 168throw new ArgumentException(SR.Format(SR.DuplicateKey, key)); 194throw new ArgumentException(SR.Format(SR.DuplicateKey, key)); 200throw new ArgumentException(SR.Format(SR.DuplicateKey, key));
System\Collections\Immutable\ImmutableList_1.Builder.cs (1)
837throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
System\Collections\Immutable\ImmutableList_1.cs (1)
404throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
865throw new ArgumentException(SR.Format(SR.DuplicateKey, item.Key));
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (1)
665throw new ArgumentException(SR.Format(SR.DuplicateKey, key));
System\Collections\Immutable\SortedInt32KeyNode.cs (1)
448throw new ArgumentException(SR.Format(SR.DuplicateKey, key));
System\Collections\ThrowHelper.cs (1)
14throw new ArgumentException(SR.CapacityMustBeGreaterThanOrEqualToCount, "destination");
Validation\Requires.cs (2)
117throw new ArgumentException(message, parameterName); 129throw new ArgumentException();
System.Collections.NonGeneric (10)
System\Collections\CollectionBase.cs (1)
170if (index < 0) throw new ArgumentException(SR.Arg_RemoveArgNotFound);
System\Collections\Queue.cs (2)
133throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 138throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Collections\SortedList.cs (5)
179throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate_OldAndNewKeys, GetKey(i), key)); 339throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 342throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 941throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1044throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
System\Collections\Stack.cs (2)
119throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 122throw new ArgumentException(SR.Argument_InvalidOffLen);
System.Collections.Specialized (9)
src\libraries\System.Private.CoreLib\src\System\Collections\CompatibleComparer.cs (1)
44throw new ArgumentException(SR.Argument_ImplementIComparable);
System\Collections\Specialized\ListDictionary.cs (2)
163throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, key)); 211throw new ArgumentException(SR.Arg_InsufficientSpace);
System\Collections\Specialized\NameObjectCollectionBase.cs (4)
377throw new ArgumentException(SR.Arg_MultiRank, nameof(array)); 384throw new ArgumentException(SR.Arg_InsufficientSpace); 601throw new ArgumentException(SR.Arg_MultiRank, nameof(array)); 608throw new ArgumentException(SR.Arg_InsufficientSpace);
System\Collections\Specialized\NameValueCollection.cs (2)
202throw new ArgumentException(SR.Arg_MultiRank, nameof(dest)); 209throw new ArgumentException(SR.Arg_InsufficientSpace);
System.ComponentModel.Annotations (5)
System\ComponentModel\DataAnnotations\CompareAttribute.cs (1)
45throw new ArgumentException(SR.Format(SR.Common_PropertyNotFound, validationContext.ObjectType.FullName, OtherProperty));
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
184throw new ArgumentException(SR.Format(SR.AttributeStore_Unknown_Property, _type.Name, propertyName),
System\ComponentModel\DataAnnotations\Validator.cs (3)
140throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 284throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 380throw new ArgumentException(SR.Format(SR.Validator_Property_Value_Wrong_Type, propertyName, propertyType),
System.ComponentModel.Composition (35)
Microsoft\Internal\Requires.cs (2)
100throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_InvalidEnumInSet, parameterName, value, enumFlagSet.ToString()), parameterName); 119throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, parameterName), parameterName);
System\ComponentModel\Composition\AttributedModel\AttributedModelDiscovery.cs (1)
55throw new ArgumentException(SR.Format(SR.Argument_ReflectionContextReturnsReflectionOnlyType, nameof(reflectionContext)), nameof(reflectionContext));
System\ComponentModel\Composition\ConstraintServices.cs (7)
121throw new ArgumentException(nameof(parameter)); 126throw new ArgumentException(nameof(constantKey)); 140throw new ArgumentException(nameof(parameter)); 145throw new ArgumentException(nameof(constantKey)); 150throw new ArgumentException(nameof(constantType)); 168throw new ArgumentException(nameof(parameter)); 173throw new ArgumentException(nameof(constantValue));
System\ComponentModel\Composition\ExceptionBuilder.cs (10)
25return new ArgumentException(message, parameterName); 41throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(memberName)), nameof(memberName)); 55throw new ArgumentException(SR.ArgumentException_EmptyString); 61return new ArgumentException(message, parameterName); 70throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName)); 75return new ArgumentException(message, parameterName); 94throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName)); 99return new ArgumentException(SR.Format(SR.ReflectionModel_InvalidPartDefinition, partDefinitionType), parameterName); 108throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(typeName)), nameof(typeName)); 113return new ArgumentException(message, typeName);
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (1)
394throw new ArgumentException(SR.Format(SR.Argument_AssemblyReflectionOnly, nameof(assembly)), nameof(assembly));
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (3)
185throw new ArgumentException(SR.Format(SR.Argument_ElementReflectionOnlyType, nameof(types)), nameof(types)); 196throw new ArgumentException(SR.Format(SR.Argument_ReflectionContextReturnsReflectionOnlyType, nameof(reflectionContext)), nameof(reflectionContext)); 216throw new ArgumentException(SR.Format(SR.Argument_ElementReflectionOnlyType, nameof(types)), nameof(types));
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (1)
105throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_InvalidEnum, nameof(cardinality), cardinality, nameof(ImportCardinality)), nameof(cardinality));
System\ComponentModel\Composition\ReflectionModel\LazyMemberInfo.cs (1)
53throw new ArgumentException(errorMessage, nameof(accessors));
System\ComponentModel\Composition\ReflectionModel\ReflectionComposablePart.cs (3)
43throw new ArgumentException(SR.ArgumentValueType, nameof(attributedPart)); 401throw new ArgumentException(SR.Argument_ExportsEmpty, nameof(exports)); 404throw new ArgumentException(SR.Argument_ExportsTooMany, nameof(exports));
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (5)
50throw new ArgumentException( 65throw new ArgumentException( 80throw new ArgumentException( 96throw new ArgumentException( 118throw new ArgumentException(
System\Composition\Diagnostics\CompositionTrace.cs (1)
49throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(fileName)), nameof(fileName));
System.ComponentModel.Composition.Registration (2)
System\ComponentModel\Composition\Registration\PartBuilderOfT.cs (2)
57throw new ArgumentException(SR.Format(SR.Argument_ExpressionMustBePropertyMember, nameof(propertyFilter)), nameof(propertyFilter)); 101throw new ArgumentException(SR.Format(SR.Argument_ExpressionMustBePropertyMember, nameof(constructorFilter)), nameof(constructorFilter));
System.ComponentModel.TypeConverter (73)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (2)
67_ => throw new ArgumentException(SR.Format(SR.InvalidColor, text)), 112throw new ArgumentException(SR.Format(SR.ConvertInvalidPrimitive, text.ToString(), nameof(Int32)), e);
System\ComponentModel\AmbientValueAttribute.cs (1)
149throw new ArgumentException(SR.RuntimeInstanceNotAllowed);
System\ComponentModel\BaseNumberConverter.cs (1)
80throw new ArgumentException(SR.Format(SR.ConvertInvalidPrimitive, text, TargetType.Name), nameof(value), e);
System\ComponentModel\Container.cs (1)
237throw new ArgumentException(SR.Format(SR.DuplicateComponentName, name));
System\ComponentModel\CultureInfoConverter.cs (1)
127throw new ArgumentException(SR.Format(SR.CultureInfoConverterInvalidCulture, (string)value), nameof(value));
System\ComponentModel\Design\DesignerOptionService.cs (1)
42throw new ArgumentException(SR.Format(SR.InvalidArgumentValue, "name.Length"), nameof(name));
System\ComponentModel\Design\PropertyTabAttribute.cs (6)
58throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope, nameof(tabScope)); 75throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope, nameof(tabScope)); 198throw new ArgumentException(SR.PropertyTabAttributeArrayLengthMismatch); 206throw new ArgumentException(SR.PropertyTabAttributeArrayLengthMismatch); 213throw new ArgumentException(SR.PropertyTabAttributeParamsBothNull); 222throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope);
System\ComponentModel\Design\Serialization\InstanceDescriptor.cs (8)
46throw new ArgumentException(SR.InstanceDescriptorMustBeStatic); 50throw new ArgumentException(SR.InstanceDescriptorLengthMismatch); 57throw new ArgumentException(SR.InstanceDescriptorCannotBeStatic); 61throw new ArgumentException(SR.InstanceDescriptorLengthMismatch); 68throw new ArgumentException(SR.InstanceDescriptorMustBeStatic); 72throw new ArgumentException(SR.InstanceDescriptorLengthMismatch); 79throw new ArgumentException(SR.InstanceDescriptorMustBeReadable); 84throw new ArgumentException(SR.InstanceDescriptorMustBeStatic);
System\ComponentModel\Design\Serialization\MemberRelationshipService.cs (3)
46throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "source.Owner"), nameof(source)); 59throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "source.Owner"), nameof(source)); 125throw new ArgumentException(SR.Format(SR.MemberRelationshipService_RelationshipNotSupported, sourceName, source.Member.Name, relName, relationship.Member.Name));
System\ComponentModel\Design\ServiceContainer.cs (3)
85throw new ArgumentException(SR.Format(SR.ErrorInvalidServiceInstance, serviceType.FullName)); 90throw new ArgumentException(SR.Format(SR.ErrorServiceExists, serviceType.FullName), nameof(serviceType)); 127throw new ArgumentException(SR.Format(SR.ErrorServiceExists, serviceType.FullName), nameof(serviceType));
System\ComponentModel\EnumConverter.cs (2)
28throw new ArgumentException(SR.EnumInvalidValue); 133throw new ArgumentException(SR.Format(SR.EnumConverterInvalidValue, value, EnumType.Name));
System\ComponentModel\LicenseManager.cs (1)
249throw new ArgumentException(SR.LicMgrDifferentUser);
System\ComponentModel\MaskedTextProvider.cs (3)
227throw new ArgumentException(SR.MaskedTextProviderMaskInvalidChar); 674throw new ArgumentException(SR.MaskedTextProviderInvalidCharError); 705throw new ArgumentException(SR.MaskedTextProviderInvalidCharError);
System\ComponentModel\MemberDescriptor.cs (1)
47throw new ArgumentException(SR.InvalidMemberName, nameof(name));
System\ComponentModel\NullableConverter.cs (1)
31throw new ArgumentException(SR.NullableConverterBadCtorArg, nameof(type));
System\ComponentModel\PropertyDescriptorCollection.cs (4)
420throw new ArgumentException(nameof(value)); 460throw new ArgumentException(nameof(value)); 487throw new ArgumentException(nameof(key)); 581throw new ArgumentException(nameof(value));
System\ComponentModel\ReflectEventDescriptor.cs (5)
83throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 87throw new ArgumentException(SR.Format(SR.ErrorInvalidEventType, name)); 101_componentClass = componentClass ?? throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 195throw new ArgumentException(SR.Format(SR.ErrorInvalidEventHandler, Name)); 369throw new ArgumentException(SR.Format(SR.ErrorMissingEventAccessors, Name));
System\ComponentModel\ReflectPropertyDescriptor.cs (4)
95throw new ArgumentException(SR.Format(SR.ErrorInvalidPropertyType, name)); 100throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 171throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 351throw new ArgumentException(SR.Format(SR.ErrorMissingPropertyAccessors, Name));
System\ComponentModel\ToolboxItemAttribute.cs (1)
93throw new ArgumentException(SR.Format(SR.ToolboxItemAttributeFailedGetType, _toolboxItemTypeName), ex);
System\ComponentModel\TypeDescriptor.cs (13)
422throw new ArgumentException(SR.TypeDescriptorSameAssociation); 447throw new ArgumentException(SR.TypeDescriptorAlreadyAssociated); 501throw new ArgumentException(SR.TypeDescriptorArgsCountMismatch); 1013throw new ArgumentException(nameof(component)); 1046throw new ArgumentException(nameof(component)); 1056throw new ArgumentException(nameof(component)); 2105throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(Attribute).FullName)); 2118throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(PropertyDescriptor).FullName)); 2131throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(EventDescriptor).FullName)); 2799throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()), nameof(instance)); 3272throw new ArgumentException(SR.TypeDescriptorArgsCountMismatch); 3375throw new ArgumentException(nameof(instance)); 3391throw new ArgumentException(nameof(instance));
System\Drawing\PointConverter.cs (2)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"x{sep} y")); 97throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Drawing\RectangleConverter.cs (2)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"x{sep} y{sep} width{sep} height")); 107throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Drawing\SizeConverter.cs (2)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"Width{sep} Height")); 97throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Drawing\SizeFConverter.cs (2)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"Width{sep} Height")); 95throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Timers\Timer.cs (3)
53throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(interval), interval)); 59throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(interval), interval)); 171throw new ArgumentException(SR.Format(SR.TimerInvalidInterval, value, 0));
System.Composition.Convention (12)
System\Composition\Convention\ExportConventionBuilder.cs (3)
60throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(contractName)), nameof(contractName)); 91throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name)); 112throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name));
System\Composition\Convention\ImportConventionBuilder.cs (3)
37throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(contractName)), nameof(contractName)); 99throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name)); 120throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name));
System\Composition\Convention\PartConventionBuilder.cs (3)
345throw new ArgumentException(SR.ArgumentException_EmptyString); 370throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name)); 391throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name));
System\Composition\Convention\PartConventionBuilderOfT.cs (3)
45throw new ArgumentException(SR.Format(SR.Argument_ExpressionMustBeVoidMethodWithNoArguments, nameof(methodSelector)), nameof(methodSelector)); 113throw new ArgumentException(SR.Format(SR.Argument_ExpressionMustBePropertyMember, nameof(propertySelector)), nameof(propertySelector)); 161throw new ArgumentException(SR.Format(SR.Argument_ExpressionMustBeNew, nameof(constructorSelector)), nameof(constructorSelector));
System.Composition.Hosting (2)
System\Composition\Hosting\Util\SmallSparseInitonlyArray.cs (2)
36throw new ArgumentException(SR.Format(SR.Key_Already_Exist, index), nameof(index)); 51throw new ArgumentException(SR.Format(SR.Key_Already_Exist, index), nameof(index));
System.Configuration.ConfigurationManager (48)
src\libraries\Common\src\System\IO\TempFileCollection.cs (3)
73throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(fileExtension)), nameof(fileExtension)); 85throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(fileName)), nameof(fileName)); 90throw new ArgumentException(SR.Format(SR.DuplicateFileName, fileName), nameof(fileName));
System\Configuration\CallbackValidatorAttribute.cs (1)
39throw new ArgumentException(SR.Format(SR.Validator_method_not_found, _callbackMethodName));
System\Configuration\ClientSettingsStore.cs (1)
265_ => throw new ArgumentException(SR.UnknownUserLevel),
System\Configuration\ConfigurationConverterBase.cs (1)
23throw new ArgumentException(SR.Format(SR.Converter_unsupported_value_type, expected.Name));
System\Configuration\ConfigurationElementCollection.cs (7)
48throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultAddItemName, value)); 58throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultRemoveItemName, value)); 69throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultClearItemsName, value)); 625throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, ElementName)); 1061throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, 1138throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, elementName)); 1150throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, elementName));
System\Configuration\ConfigurationFileMap.cs (1)
31throw new ArgumentException(SR.Format(SR.Machine_config_file_not_found, machineConfigFilename),
System\Configuration\ConfigurationManager.cs (1)
211throw new ArgumentException(SR.Config_configmanager_open_noexe);
System\Configuration\ConfigurationProperty.cs (2)
266throw new ArgumentException(SR.String_null_or_empty, nameof(name)); 269throw new ArgumentException(SR.Format(SR.Property_name_reserved, name));
System\Configuration\ConfigurationValidatorAttribute.cs (1)
21throw new ArgumentException(SR.Format(SR.Validator_Attribute_param_not_validator,
System\Configuration\ExceptionUtil.cs (4)
15return new ArgumentException(SR.Format(SR.Parameter_Invalid, parameter), parameter); 20return new ArgumentException(SR.Format(SR.Parameter_NullOrEmpty, parameter), parameter); 25return new ArgumentException(SR.Format(SR.Property_Invalid, property), property); 30return new ArgumentException(SR.Format(SR.Property_NullOrEmpty, property), property);
System\Configuration\GenericEnumConverter.cs (1)
52return new ArgumentException(SR.Format(SR.Invalid_enum_value, names));
System\Configuration\Internal\InternalConfigHost.cs (1)
207throw new ArgumentException(SR.Format(SR.Config_source_not_under_config_dir, configSource));
System\Configuration\MgmtConfigurationRecord.cs (3)
673throw new ArgumentException(SR.Config_add_configurationsection_already_exists); 834throw new ArgumentException(SR.Config_add_configurationsectiongroup_already_exists); 973throw new ArgumentException(SR.Format(SR.Filename_in_SaveAs_is_used_already, filename));
System\Configuration\PositiveTimeSpanValidator.cs (1)
18throw new ArgumentException(SR.Validator_timespan_value_must_be_positive);
System\Configuration\ProtectedConfigurationProviderCollection.cs (1)
18throw new ArgumentException(
System\Configuration\ProtectedConfigurationSection.cs (2)
51throw new ArgumentException(SR.Format(SR.ProtectedConfigurationProvider_not_found, providerName), nameof(providerName)); 81throw new ArgumentException(SR.WrongType_of_Protected_provider, nameof(pn));
System\Configuration\Provider\ProviderBase.cs (1)
31throw new ArgumentException(SR.Config_provider_name_null_or_empty, nameof(name));
System\Configuration\Provider\ProviderCollection.cs (1)
45throw new ArgumentException(SR.Config_provider_name_null_or_empty);
System\Configuration\RegexStringValidator.cs (1)
32throw new ArgumentException(SR.Format(SR.Regex_validator_error, _expression));
System\Configuration\SettingsPropertyValue.cs (4)
145throw new ArgumentException(SR.Format(SR.Could_not_create_from_default_value, Property.Name, e.Message)); 150throw new ArgumentException(SR.Format(SR.Could_not_create_from_default_value_2, Property.Name)); 211throw new ArgumentException(SR.Format(SR.Unable_to_convert_type_from_string, type), nameof(type)); 264throw new ArgumentException(SR.Format(SR.Unable_to_convert_type_to_string, type), nameof(type));
System\Configuration\SettingsProviderCollection.cs (1)
16throw new ArgumentException(SR.Format(SR.Config_provider_must_implement_type, typeof(SettingsProvider)), nameof(provider));
System\Configuration\StringValidator.cs (3)
40throw new ArgumentException(SR.Format(SR.Validator_string_min_length, _minLength)); 42throw new ArgumentException(SR.Format(SR.Validator_string_max_length, _maxLength)); 52throw new ArgumentException(SR.Format(SR.Validator_string_invalid_chars, _invalidChars));
System\Configuration\SubclassTypeValidator.cs (1)
33throw new ArgumentException(SR.Format(SR.Subclass_validator_error, ((Type)value).FullName,
System\Configuration\TimeSpanSecondsConverter.cs (1)
29throw new ArgumentException(SR.Converter_timespan_not_in_second);
System\Configuration\TypeNameConverter.cs (1)
27if (result == null) throw new ArgumentException(SR.Format(SR.Type_cannot_be_resolved, (string)data));
System\Configuration\ValidatorUtils.cs (3)
16throw new ArgumentException(SR.Validator_value_type_invalid, string.Empty); 61throw new ArgumentException(SR.Format(CultureInfo.InvariantCulture, 72throw new ArgumentException(SR.Format(SR.Validator_scalar_resolution_violation, resolutionAsString));
System.Console (3)
System\ConsolePal.Unix.cs (1)
753throw new ArgumentException(SR.Arg_InvalidConsoleColor);
System\IO\SyncTextReader.cs (2)
125throw new ArgumentException(SR.Argument_InvalidOffLen); 137throw new ArgumentException(SR.Argument_InvalidOffLen);
System.Data.Common (16)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (6)
46ArgumentException e = new ArgumentException(error); 53ArgumentException e = new ArgumentException(error, inner); 60ArgumentException e = new ArgumentException(error, parameter); 205ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartName, property, value)); 212ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameQuoteUsage, property, value)); 219ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameToManyParts, property, value, limit));
System\Data\Common\DbConnectionStringBuilder.cs (1)
354throw new ArgumentException("not a string", nameof(keyword));
System\Data\DataException.cs (3)
338internal static Exception _Argument(string error) => TraceExceptionAsReturnValue(new ArgumentException(error)); 339internal static Exception _Argument(string error, Exception? innerException) => TraceExceptionAsReturnValue(new ArgumentException(error, innerException)); 373public static Exception ArgumentContainsNull(string paramName) => TraceExceptionAsReturnValue(new ArgumentException(SR.Data_ArgumentContainsNull, paramName));
System\Data\DataSetUtil.cs (1)
20return new ArgumentException(message);
System\Data\SQLTypes\SQLDecimal.cs (1)
589throw new ArgumentException(SQLResource.InvalidArraySizeMessage, nameof(bits));
System\Data\SQLTypes\SQLGuid.cs (1)
34throw new ArgumentException(SQLResource.InvalidArraySizeMessage);
System\Xml\XmlDataDocument.cs (3)
105throw new ArgumentException(SR.DataDom_MultipleDataSet); 2624throw new ArgumentException(SR.DataDom_DataSetNull); 2627throw new ArgumentException(SR.DataDom_MultipleDataSet);
System.Data.Odbc (7)
Common\System\Data\Common\AdapterUtil.Odbc.cs (1)
398e = new ArgumentException(message, inner);
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (6)
46ArgumentException e = new ArgumentException(error); 53ArgumentException e = new ArgumentException(error, inner); 60ArgumentException e = new ArgumentException(error, parameter); 205ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartName, property, value)); 212ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameQuoteUsage, property, value)); 219ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameToManyParts, property, value, limit));
System.Diagnostics.DiagnosticSource (7)
System\Diagnostics\Activity.cs (3)
462NotifyError(new ArgumentException(SR.OperationNameInvalid)); 693NotifyError(new ArgumentException(SR.ParentIdInvalid)); 1037throw new ArgumentException(SR.ActivityIdFormatInvalid);
System\Diagnostics\ActivityContext.cs (1)
103throw new ArgumentException(SR.InvalidTraceParent);
System\Diagnostics\Metrics\ExponentialHistogramAggregator.cs (1)
73throw new ArgumentException();
System\Diagnostics\Metrics\InstrumentAdvice.cs (1)
47throw new ArgumentException(SR.InvalidHistogramExplicitBucketBoundaries, nameof(value));
System\Diagnostics\Metrics\TagList.netcore.cs (1)
145throw new ArgumentException(SR.Arg_BufferTooSmall);
System.Diagnostics.Process (2)
System\Collections\Specialized\StringDictionaryWrapper.cs (1)
39throw new ArgumentException();
System\Diagnostics\Process.cs (1)
1039throw new ArgumentException(SR.Format(SR.MissingProcess, processId.ToString()));
System.Diagnostics.TraceSource (5)
System\Diagnostics\TraceListeners.cs (3)
221throw new ArgumentException(SR.MustAddListener, nameof(value)); 250throw new ArgumentException(SR.MustAddListener, nameof(value)); 277throw new ArgumentException(SR.MustAddListener, nameof(value));
System\Diagnostics\TraceSwitch.cs (1)
40throw new ArgumentException(SR.TraceSwitchInvalidLevel);
System\Diagnostics\TraceUtils.cs (1)
24throw new ArgumentException(SR.Format(SR.AttributeNotSupported, key, parent.GetType().FullName));
System.Drawing.Primitives (4)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (2)
67_ => throw new ArgumentException(SR.Format(SR.InvalidColor, text)), 112throw new ArgumentException(SR.Format(SR.ConvertInvalidPrimitive, text.ToString(), nameof(Int32)), e);
System\Drawing\Color.cs (1)
435throw new ArgumentException(SR.Format(SR.InvalidEx2BoundArgument, n, v, byte.MinValue, byte.MaxValue));
System\Drawing\ColorTranslator.cs (1)
278throw new ArgumentException(ex.Message, nameof(htmlColor), ex);
System.Formats.Asn1 (27)
System\Formats\Asn1\Asn1Tag.cs (1)
369throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Formats\Asn1\AsnDecoder.BitString.cs (1)
167throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.cs (1)
712throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.Enumerated.cs (1)
208throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (1)
193throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.OctetString.cs (1)
71throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.Text.cs (3)
78throw new ArgumentException(SR.Argument_Tag_NotCharacterString, nameof(expectedTag)); 155throw new ArgumentException( 171throw new ArgumentException(SR.Argument_Tag_NotCharacterString, nameof(expectedTag));
System\Formats\Asn1\AsnWriter.BitString.cs (2)
59throw new ArgumentException(SR.Argument_UnusedBitCountMustBeZero, nameof(unusedBitCount)); 71throw new ArgumentException(SR.Argument_UnusedBitWasSet, nameof(unusedBitCount));
System\Formats\Asn1\AsnWriter.cs (3)
178throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 583throw new ArgumentException( 789throw new ArgumentException(
System\Formats\Asn1\AsnWriter.Enumerated.cs (1)
78throw new ArgumentException(
System\Formats\Asn1\AsnWriter.Integer.cs (4)
223throw new ArgumentException(SR.Argument_IntegerCannotBeEmpty, nameof(value)); 229throw new ArgumentException(SR.Argument_IntegerRedundantByte, nameof(value)); 254throw new ArgumentException(SR.Argument_IntegerCannotBeEmpty, nameof(value)); 266throw new ArgumentException(SR.Argument_IntegerRedundantByte, nameof(value));
System\Formats\Asn1\AsnWriter.NamedBitList.cs (1)
109throw new ArgumentException(
System\Formats\Asn1\AsnWriter.Oid.cs (7)
82throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 84throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 99_ => throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)), 120throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 157throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 167throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 184throw new ArgumentException(SR.Argument_InvalidOidValue, "oidValue");
System.Formats.Cbor (5)
System\Formats\Cbor\Writer\CborWriter.cs (3)
166throw new ArgumentException(SR.Cbor_Writer_PayloadIsNotValidCbor, e); 171throw new ArgumentException(SR.Cbor_Writer_PayloadIsNotValidCbor); 194throw new ArgumentException(SR.Argument_EncodeDestinationTooSmall, nameof(destination));
System\Formats\Cbor\Writer\CborWriter.String.cs (1)
132throw new ArgumentException(SR.Cbor_Writer_InvalidUtf8String, e);
System\Formats\Cbor\Writer\CborWriter.Tag.cs (1)
78throw new ArgumentException(SR.Cbor_Writer_ValueCannotBeInfiniteOrNaN, nameof(seconds));
System.Formats.Nrbf (1)
System\Formats\Nrbf\NrbfDecoder.cs (1)
62throw new ArgumentException(SR.Argument_NonSeekableStream, nameof(stream));
System.Formats.Tar (22)
System\Formats\Tar\SeekableSubReadStream.cs (1)
21throw new ArgumentException(SR.IO_NotSupported_UnseekableStream, nameof(superStream));
System\Formats\Tar\SubReadStream.cs (1)
28throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(superStream));
System\Formats\Tar\TarEntry.cs (2)
57throw new ArgumentException(SR.TarCannotConvertPaxGlobalExtendedAttributesEntry, nameof(other)); 265throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(value));
System\Formats\Tar\TarFile.cs (4)
38throw new ArgumentException(SR.IO_NotSupported_UnwritableStream, nameof(destination)); 77return Task.FromException(new ArgumentException(SR.IO_NotSupported_UnwritableStream, nameof(destination))); 178throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(source)); 223return Task.FromException(new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(source)));
System\Formats\Tar\TarHeader.cs (2)
124throw new ArgumentException(SR.Format(SR.TarExtAttrDisallowedKeyChar, kvp.Key, kvp.Key[index] == '\n' ? "\\n" : kvp.Key[index])); 128throw new ArgumentException(SR.Format(SR.TarExtAttrDisallowedValueChar, kvp.Key, "\\n"));
System\Formats\Tar\TarHeader.Write.cs (8)
567throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 588throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 641throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 687throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.LinkName)), ArgNameEntry); 745throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.UserName)), ArgNameEntry); 763throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.GroupName)), ArgNameEntry); 1120throw new ArgumentException(SR.Format(SR.TarFieldTooLargeForEntryFormat, _format)); 1145throw new ArgumentException(SR.Format(SR.TarFieldTooLargeForEntryFormat, _format));
System\Formats\Tar\TarHelpers.cs (1)
409throw new ArgumentException(SR.Format(SR.TarEntryTypeNotSupportedInFormat, entryType, archiveFormat), paramName);
System\Formats\Tar\TarReader.cs (1)
39throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(archiveStream));
System\Formats\Tar\TarWriter.cs (2)
68throw new ArgumentException(SR.IO_NotSupported_UnwritableStream); 408throw new ArgumentException(SR.TarEntryHardLinkOrSymlinkLinkNameEmpty, "entry");
System.IO.Compression (9)
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (1)
28throw new ArgumentException(SR.NotSupported_UnreadableStream, nameof(stream));
System\IO\Compression\DeflateZLib\DeflateStream.cs (3)
80throw new ArgumentException(SR.NotSupported_UnreadableStream, nameof(stream)); 93throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode)); 115throw new ArgumentException(SR.NotSupported_UnwritableStream, nameof(stream));
System\IO\Compression\ZipArchive.cs (4)
371throw new ArgumentException(SR.EntryNameAndCommentEncodingNotSupported, nameof(EntryNameAndCommentEncoding)); 894throw new ArgumentException(SR.CreateModeCapabilities); 898throw new ArgumentException(SR.ReadModeCapabilities); 906throw new ArgumentException(SR.UpdateModeCapabilities);
System\IO\Compression\ZipArchiveEntry.cs (1)
152throw new ArgumentException(SR.EntryNamesTooLong);
System.IO.Compression.Brotli (4)
System\IO\Compression\BrotliStream.cs (3)
38throw new ArgumentException(SR.Stream_FalseCanWrite, nameof(stream)); 48throw new ArgumentException(SR.Stream_FalseCanRead, nameof(stream)); 53throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode));
System\IO\Compression\BrotliUtils.cs (1)
22_ => throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(compressionLevel))
System.IO.Compression.ZipFile (3)
System\IO\Compression\ZipFile.Create.cs (1)
494throw new ArgumentException(SR.UnwritableStream, nameof(destination));
System\IO\Compression\ZipFile.Extract.Async.cs (1)
348throw new ArgumentException(SR.UnreadableStream, nameof(source));
System\IO\Compression\ZipFile.Extract.cs (1)
325throw new ArgumentException(SR.UnreadableStream, nameof(source));
System.IO.FileSystem.DriveInfo (2)
System\IO\DriveInfo.UnixOrDefault.cs (2)
29throw new ArgumentException(SR.Format(SR.Arg_InvalidDriveChars, driveName), nameof(driveName)); 33throw new ArgumentException(SR.Arg_MustBeNonEmptyDriveName, nameof(driveName));
System.IO.FileSystem.Watcher (5)
System\IO\FileSystemWatcher.cs (5)
116throw new ArgumentException(SR.Format(SR.InvalidEnumArgument, nameof(value), (int)value, nameof(NotifyFilters))); 243throw new ArgumentException(SR.Format(SR.InvalidDirName, value), nameof(Path)); 246throw new ArgumentException(SR.Format(SR.InvalidDirName_NotExists, value), nameof(Path)); 365throw new ArgumentException(SR.Format(SR.InvalidDirName, path), nameof(path)); 368throw new ArgumentException(SR.Format(SR.InvalidDirName_NotExists, path), nameof(path));
System.IO.Hashing (1)
System\IO\Hashing\NonCryptographicHashAlgorithm.cs (1)
308throw new ArgumentException(SR.Argument_DestinationTooShort, "destination");
System.IO.IsolatedStorage (4)
System\IO\IsolatedStorage\IsolatedStorage.cs (1)
182throw new ArgumentException(SR.IsolatedStorage_Scope_Invalid);
System\IO\IsolatedStorage\IsolatedStorageFile.cs (1)
675throw new ArgumentException(SR.IsolatedStorage_Scope_U_R_M);
System\IO\IsolatedStorage\IsolatedStorageFileStream.cs (2)
89throw new ArgumentException( 113throw new ArgumentException(SR.IsolatedStorage_FileOpenMode);
System.IO.MemoryMappedFiles (11)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (9)
114throw new ArgumentException(SR.Argument_NewMMFAppendModeNotAllowed, nameof(mode)); 118throw new ArgumentException(SR.Argument_NewMMFTruncateModeNotAllowed, nameof(mode)); 145throw new ArgumentException(SR.Argument_EmptyFile); 218throw new ArgumentException(SR.Argument_EmptyFile); 247throw new ArgumentException(SR.Argument_EmptyFile); 290throw new ArgumentException(SR.Argument_MapNameEmptyString); 308throw new ArgumentException(SR.Argument_NewMMFWriteAccessNotAllowed, nameof(access)); 519throw new ArgumentException(SR.Argument_MapNameEmptyString); 535throw new ArgumentException(SR.Argument_NewMMFWriteAccessNotAllowed, nameof(access));
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (2)
22throw new ArgumentException(SR.Argument_ReadAccessWithLargeCapacity); 33throw new ArgumentException(SR.Argument_NewMMFWriteAccessNotAllowed, nameof(access));
System.IO.Packaging (39)
System\IO\Packaging\ContentType.cs (12)
84throw new ArgumentException(SR.ContentTypeCannotHaveLeadingTrailingLWS); 270throw new ArgumentException(SR.InvalidLinearWhiteSpaceCharacter); 290throw new ArgumentException(SR.InvalidTypeSubType); 310throw new ArgumentException(SR.ExpectingSemicolon); 316throw new ArgumentException(SR.ExpectingParameterValuePairs); 328throw new ArgumentException(SR.InvalidParameterValuePair); 387throw new ArgumentException(SR.InvalidParameterValue); 413throw new ArgumentException(SR.InvalidToken_ContentType); 419throw new ArgumentException(SR.InvalidToken_ContentType); 436throw new ArgumentException(SR.InvalidParameterValue); 466throw new ArgumentException(SR.InvalidParameterValue); 469throw new ArgumentException(SR.InvalidParameterValue);
System\IO\Packaging\InterleavedZipPackagePartStream.cs (1)
217throw new ArgumentException(SR.SeekNegative);
System\IO\Packaging\InterleavedZipPackagePartStream.PieceDirectory.cs (1)
334throw new ArgumentException(SR.PieceDoesNotExist);
System\IO\Packaging\InternalRelationshipCollection.cs (3)
146throw new ArgumentException(SR.InvalidRelationshipType); 403throw new ArgumentException(SR.RelationshipTargetMustBeRelative, nameof(targetUri)); 421throw new ArgumentException(SR.RelationshipToRelationshipIllegal, nameof(targetUri));
System\IO\Packaging\Package.cs (3)
863throw new ArgumentException(SR.UnsupportedCombinationOfModeAccess); 865throw new ArgumentException(SR.UnsupportedCombinationOfModeAccess); 867throw new ArgumentException(SR.UnsupportedCombinationOfModeAccess);
System\IO\Packaging\PackagePart.cs (2)
317throw new ArgumentException(SR.CreateNewNotSupported); 319throw new ArgumentException(SR.TruncateNotSupported);
System\IO\Packaging\PackUriHelper.cs (12)
52throw new ArgumentException(SR.PartUriIsEmpty); 201throw new ArgumentException(SR.RelationshipPartUriNotExpected); 250throw new ArgumentException(SR.RelationshipPartUriExpected); 385return new ArgumentException(SR.PartUriIsEmpty); 388return new ArgumentException(SR.PartUriShouldStartWithForwardSlash); 420return new ArgumentException(SR.InvalidPartUri); 427return new ArgumentException(SR.UnexpectedPartPieceUri); 445return new ArgumentException(SR.URIShouldNotBeAbsolute); 460return new ArgumentException(SR.PartUriCannotHaveAFragment); 477return new ArgumentException(SR.PartUriShouldNotEndWithForwardSlash); 500return new ArgumentException(SR.PartUriShouldNotStartWithTwoForwardSlashes); 805throw new ArgumentException(SR.NotAValidRelationshipPartUri);
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (5)
81throw new ArgumentException(SR.Format(SR.FragmentMustStartWithHash, nameof(fragment))); 255throw new ArgumentException(SR.UriShouldBeAbsolute, nameof(packageUri)); 267throw new ArgumentException(SR.UriShouldBeAbsolute, nameof(packUri)); 270throw new ArgumentException(SR.UriShouldBePackScheme, nameof(packUri)); 316throw new ArgumentException(SR.InnerPackageUriHasFragment);
System.IO.Pipes (8)
System\IO\Pipes\AnonymousPipeClientStream.cs (3)
33throw new ArgumentException(SR.Argument_InvalidHandle, nameof(pipeHandleAsString)); 41throw new ArgumentException(SR.Argument_InvalidHandle, nameof(pipeHandleAsString)); 57throw new ArgumentException(SR.Argument_InvalidHandle, nameof(safePipeHandle));
System\IO\Pipes\AnonymousPipeServerStream.cs (2)
45throw new ArgumentException(SR.Argument_InvalidHandle, nameof(serverSafePipeHandle)); 49throw new ArgumentException(SR.Argument_InvalidHandle, nameof(clientSafePipeHandle));
System\IO\Pipes\NamedPipeClientStream.cs (2)
64throw new ArgumentException(SR.Argument_EmptyServerName); 99throw new ArgumentException(SR.Argument_InvalidHandle, nameof(safePipeHandle));
System\IO\Pipes\NamedPipeServerStream.cs (1)
140throw new ArgumentException(SR.Argument_InvalidHandle, nameof(safePipeHandle));
System.IO.Ports (17)
System\IO\Ports\InternalResources.cs (3)
34throw new ArgumentException(SR.Arg_WrongAsyncResult); 40throw new ArgumentException(SR.InvalidOperation_EndReadCalledMultiple); 46throw new ArgumentException(SR.InvalidOperation_EndWriteCalledMultiple);
System\IO\Ports\SerialPort.cs (8)
309throw new ArgumentException(SR.Format(SR.NotSupportedEncoding, value.WebName), nameof(Encoding)); 352throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(NewLine)), nameof(NewLine)); 399throw new ArgumentException(SR.PortNameEmpty_String, nameof(PortName)); 669throw new ArgumentException(SR.Argument_InvalidOffLen); 810throw new ArgumentException(SR.Argument_InvalidOffLen); 1063throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(value)), nameof(value)); 1201throw new ArgumentException(SR.Argument_InvalidOffLen); 1221throw new ArgumentException(SR.Argument_InvalidOffLen);
System\IO\Ports\SerialStream.cs (1)
100throw new ArgumentException(SR.Argument_InvalidOffLen);
System\IO\Ports\SerialStream.Unix.cs (5)
285throw new ArgumentException(); 302throw new ArgumentException(); 320throw new ArgumentException(); 337throw new ArgumentException(); 624throw new ArgumentException();
System.Linq.Expressions (118)
System\Dynamic\Utils\ListArgumentProvider.cs (1)
100throw new ArgumentException();
System\Linq\Expressions\BlockExpression.cs (1)
773throw new ArgumentException();
System\Linq\Expressions\Error.cs (115)
19return new ArgumentException(Strings.ReducibleMustOverrideReduce); 26return new ArgumentException(Strings.ArgCntMustBeGreaterThanNameCnt); 47return new ArgumentException(Strings.SameKeyExistsInExpando(key), nameof(key)); 75return new ArgumentException(Strings.MustReduceToDifferent); 117return new ArgumentException(Strings.ReducedNotCompatible); 124return new ArgumentException(Strings.SetterHasNoParams, paramName); 131return new ArgumentException(Strings.PropertyCannotHaveRefType, paramName); 138return new ArgumentException(Strings.IndexesOfSetGetMustMatch, paramName); 152return new ArgumentException(Strings.FirstArgumentMustBeCallSite); 159return new ArgumentException(Strings.AccessorsCannotHaveVarArgs, paramName); 166return new ArgumentException(Strings.AccessorsCannotHaveByRefArgs, paramName); 180return new ArgumentException(Strings.TypeMustBeDerivedFromSystemDelegate); 194return new ArgumentException(Strings.BoundsCannotBeLessThanOne, paramName); 201return new ArgumentException(Strings.TypeMustNotBeByRef, paramName); 209return new ArgumentException(Strings.TypeMustNotBePointer, paramName); 217return new ArgumentException(Strings.SetterMustBeVoid, paramName); 225return new ArgumentException(Strings.PropertyTypeMustMatchGetter, paramName); 233return new ArgumentException(Strings.PropertyTypeMustMatchSetter, paramName); 240return new ArgumentException(Strings.BothAccessorsMustBeStatic, paramName); 247return new ArgumentException(Strings.OnlyStaticFieldsHaveNullInstance, paramName); 254return new ArgumentException(Strings.OnlyStaticPropertiesHaveNullInstance, paramName); 261return new ArgumentException(Strings.OnlyStaticMethodsHaveNullInstance); 268return new ArgumentException(Strings.PropertyTypeCannotBeVoid, paramName); 275return new ArgumentException(Strings.InvalidUnboxType, paramName); 282return new ArgumentException(Strings.ExpressionMustBeWriteable, paramName); 289return new ArgumentException(Strings.ArgumentMustNotHaveValueType, paramName); 296return new ArgumentException(Strings.MustBeReducible); 303return new ArgumentException(Strings.AllTestValuesMustHaveSameType, paramName); 310return new ArgumentException(Strings.AllCaseBodiesMustHaveSameType, paramName); 317return new ArgumentException(Strings.DefaultBodyMustBeSupplied, paramName); 324return new ArgumentException(Strings.LabelMustBeVoidOrHaveExpression, paramName); 331return new ArgumentException(Strings.LabelTypeMustBeVoid, paramName); 338return new ArgumentException(Strings.QuotedExpressionMustBeLambda, paramName); 345return new ArgumentException(Strings.VariableMustNotBeByRef(p0, p1), paramName); 359return new ArgumentException(Strings.DuplicateVariable(p0), paramName); 373return new ArgumentException(Strings.StartEndMustBeOrdered); 380return new ArgumentException(Strings.FaultCannotHaveCatchOrFinally, paramName); 387return new ArgumentException(Strings.TryMustHaveCatchFinallyOrFault); 394return new ArgumentException(Strings.BodyOfCatchMustHaveSameTypeAsBodyOfTry); 408return new ArgumentException(Strings.UserDefinedOperatorMustBeStatic(p0), paramName); 415return new ArgumentException(Strings.UserDefinedOperatorMustNotBeVoid(p0), paramName); 471return new ArgumentException(Strings.ArgumentTypeCannotBeVoid); 478return new ArgumentException(Strings.ArgumentMustBeArray, paramName); 485return new ArgumentException(Strings.ArgumentMustBeBoolean, paramName); 492return new ArgumentException(Strings.EqualityMustReturnBoolean(p0), paramName); 499return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertyInfo, paramName); 506return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertyInfoOrMethod, paramName); 521return new ArgumentException(Strings.ArgumentMustBeInstanceMember, paramName); 535return new ArgumentException(Strings.ArgumentMustBeInteger, paramName); 549return new ArgumentException(Strings.ArgumentMustBeArrayIndexType, paramName); 563return new ArgumentException(Strings.ArgumentMustBeSingleDimensionalArrayType, paramName); 570return new ArgumentException(Strings.ArgumentTypesMustMatch); 577return new ArgumentException(Strings.ArgumentTypesMustMatch, paramName); 598return new ArgumentException(Strings.IncorrectTypeForTypeAs(p0), paramName); 620return new ArgumentException(Strings.ArgumentTypeDoesNotMatchMember(p0, p1), paramName); 634return new ArgumentException(Strings.ArgumentMemberNotDeclOnType(p0, p1), paramName); 649return new ArgumentException(Strings.ExpressionTypeDoesNotMatchReturn(p0, p1)); 656return new ArgumentException(Strings.ExpressionTypeDoesNotMatchAssignment(p0, p1)); 663return new ArgumentException(Strings.ExpressionTypeDoesNotMatchLabel(p0, p1)); 670return new ArgumentException(Strings.ExpressionTypeNotInvocable(p0), paramName); 677return new ArgumentException(Strings.FieldNotDefinedForType(p0, p1)); 684return new ArgumentException(Strings.InstanceFieldNotDefinedForType(p0, p1)); 691return new ArgumentException(Strings.FieldInfoNotDefinedForType(p0, p1, p2)); 698return new ArgumentException(Strings.IncorrectNumberOfIndexes); 705return new ArgumentException(Strings.IncorrectNumberOfLambdaDeclarationParameters); 713return new ArgumentException(Strings.IncorrectNumberOfMembersForGivenConstructor); 720return new ArgumentException(Strings.IncorrectNumberOfArgumentsForMembers); 727return new ArgumentException(Strings.LambdaTypeMustBeDerivedFromSystemDelegate, paramName); 734return new ArgumentException(Strings.MemberNotFieldOrProperty(p0), paramName); 741return new ArgumentException(Strings.MethodContainsGenericParameters(p0), paramName); 748return new ArgumentException(Strings.MethodIsGeneric(p0), paramName); 755return new ArgumentException(Strings.MethodNotPropertyAccessor(p0, p1), paramName); 769return new ArgumentException(Strings.PropertyDoesNotHaveGetter(p0), paramName); 783return new ArgumentException(Strings.PropertyDoesNotHaveSetter(p0), paramName); 790return new ArgumentException(Strings.PropertyDoesNotHaveAccessor(p0), paramName); 797return new ArgumentException(Strings.NotAMemberOfType(p0, p1), paramName); 812return new ArgumentException(Strings.NotAMemberOfAnyType(p0), paramName); 820return new ArgumentException(Strings.ParameterExpressionNotValidAsDelegate(p0, p1)); 827return new ArgumentException(Strings.PropertyNotDefinedForType(p0, p1), paramName); 834return new ArgumentException(Strings.InstancePropertyNotDefinedForType(p0, p1), paramName); 841return new ArgumentException(Strings.InstancePropertyWithoutParameterNotDefinedForType(p0, p1)); 848return new ArgumentException(Strings.InstancePropertyWithSpecifiedParametersNotDefinedForType(p0, p1, p2), paramName); 855return new ArgumentException(Strings.InstanceAndMethodTypeMismatch(p0, p1, p2)); 863return new ArgumentException(Strings.TypeMissingDefaultConstructor(p0), paramName); 871return new ArgumentException(Strings.ElementInitializerMethodNotAdd, paramName); 878return new ArgumentException(Strings.ElementInitializerMethodNoRefOutParam(p0, p1), paramName); 885return new ArgumentException(Strings.ElementInitializerMethodWithZeroArgs, paramName); 892return new ArgumentException(Strings.ElementInitializerMethodStatic, paramName); 899return new ArgumentException(Strings.TypeNotIEnumerable(p0), paramName); 907return new ArgumentException(Strings.UnhandledBinary(p0), paramName); 914return new ArgumentException(Strings.UnhandledBinding); 921return new ArgumentException(Strings.UnhandledBindingType(p0)); 929return new ArgumentException(Strings.UnhandledUnary(p0), paramName); 936return new ArgumentException(Strings.UnknownBindingType, $"bindings[{index}]"); 943return new ArgumentException(Strings.UserDefinedOpMustHaveConsistentTypes(p0, p1)); 950return new ArgumentException(Strings.UserDefinedOpMustHaveValidReturnType(p0, p1)); 957return new ArgumentException(Strings.LogicalOperatorMustHaveBooleanOperators(p0, p1)); 992return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForFunc, paramName); 999return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForAction, paramName); 1006return new ArgumentException(Strings.ArgumentCannotBeOfTypeVoid, paramName); 1172return new ArgumentException(Strings.TestValueTypeDoesNotMatchComparisonMethodParameter(p0, p1)); 1179return new ArgumentException(Strings.SwitchValueTypeDoesNotMatchComparisonMethodParameter(p0, p1)); 1213return new ArgumentException(Strings.NonStaticConstructorRequired, paramName); 1245return new ArgumentException(Strings.TypeContainsGenericParameters(p0), paramName); 1261return new ArgumentException(Strings.TypeIsGeneric(p0), paramName); 1277return new ArgumentException(Strings.IncorrectNumberOfConstructorArguments); 1285return new ArgumentException(Strings.ExpressionTypeDoesNotMatchMethodParameter(p0, p1, p2), paramName); 1301return new ArgumentException(Strings.ExpressionTypeDoesNotMatchParameter(p0, p1), paramName); 1325return new ArgumentException(Strings.IncorrectNumberOfMethodCallArguments(p0), paramName); 1333return new ArgumentException(Strings.ExpressionTypeDoesNotMatchConstructorParameter(p0, p1), paramName); 1350return new ArgumentException(Strings.ExpressionMustBeReadable, paramName); 1363return new ArgumentException(Strings.InvalidArgumentValue_ParamName, paramName); 1368return new ArgumentException(Strings.NonEmptyCollectionRequired, paramName); 1373return new ArgumentException(Strings.InvalidNullValue(type), paramName); 1378return new ArgumentException(Strings.InvalidObjectType(value?.GetType() as object ?? "null", type), paramName);
System\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (1)
356throw new ArgumentException(nameof(array));
System.Linq.Parallel (2)
System\Linq\ParallelEnumerable.cs (2)
355throw new ArgumentException(SR.ParallelEnumerable_WithQueryExecutionMode_InvalidMode); 391throw new ArgumentException(SR.ParallelEnumerable_WithMergeOptions_InvalidOptions);
System.Linq.Queryable (2)
System\Linq\Error.cs (2)
9new ArgumentException(Strings.ArgumentNotIEnumerableGeneric(message)); 12new ArgumentException(Strings.ArgumentNotValid(message));
System.Memory (3)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (3)
49throw new ArgumentException(null, nameof(initialCapacity)); 129throw new ArgumentException(null, nameof(count)); 202throw new ArgumentException(nameof(sizeHint));
System.Net.Http (7)
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (1)
406throw new ArgumentException(SR.Format(CultureInfo.InvariantCulture,
System\Net\Http\Headers\HttpHeaderValueCollection.cs (2)
105throw new ArgumentException(SR.net_http_copyto_array_too_small); 119throw new ArgumentException(SR.net_http_copyto_array_too_small);
System\Net\Http\Headers\RangeItemHeaderValue.cs (1)
25throw new ArgumentException(SR.net_http_headers_invalid_range);
System\Net\Http\HttpClient.cs (1)
89throw new ArgumentException(SR.net_http_client_absolute_baseaddress_required, nameof(value));
System\Net\Http\MultipartContent.cs (2)
82throw new ArgumentException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, boundary), nameof(boundary)); 87throw new ArgumentException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, boundary), nameof(boundary));
System.Net.Http.Json (1)
System\Net\Http\Json\JsonContent.cs (1)
169throw new ArgumentException(SR.Format(SR.SerializeWrongType, inputType, inputValue.GetType()));
System.Net.HttpListener (16)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (4)
53throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCharInProtocolString, subProtocol, invalidCharDescription), nameof(subProtocol)); 61throw new ArgumentException(SR.Format(SR.net_WebSockets_ReasonNotNull, 79throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusCode, 88throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusDescription,
System\Net\HttpListener.cs (4)
89throw new ArgumentException(SR.net_listener_cannot_set_custom_cbt, nameof(value)); 126throw new ArgumentException(SR.net_listener_scheme, nameof(uriPrefix)); 149throw new ArgumentException(SR.net_listener_host, nameof(uriPrefix)); 153throw new ArgumentException(SR.net_listener_slash, nameof(uriPrefix));
System\Net\HttpListenerResponse.cs (2)
165throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 262throw new ArgumentException(SR.net_cookie_exists, nameof(cookie));
System\Net\Managed\ChunkedInputStream.cs (1)
159throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\Managed\HttpListener.Managed.cs (1)
310throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\Managed\HttpListenerRequest.Managed.cs (1)
363throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\Managed\HttpListenerResponse.Managed.cs (1)
67throw new ArgumentException(SR.net_wrongversion, nameof(value));
System\Net\Managed\HttpRequestStream.Managed.cs (1)
172throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\Managed\ListenerPrefix.cs (1)
110throw new ArgumentException(SR.net_listener_host);
System.Net.Mail (5)
System\Net\Mail\Attachment.cs (4)
138throw new ArgumentException(SR.MediaTypeInvalid, nameof(mediaType)); 142throw new ArgumentException(SR.MediaTypeInvalid, nameof(mediaType)); 147throw new ArgumentException(SR.MediaTypeInvalid, nameof(mediaType)); 224throw new ArgumentException(SR.MailHeaderInvalidCID, nameof(value));
System\Net\Mail\MailPriority.cs (1)
162throw new ArgumentException(SR.MailSubjectInvalidFormat);
System.Net.NameResolution (5)
System\Net\Dns.cs (5)
49throw new ArgumentException(SR.net_invalid_ip_addr, nameof(address)); 80throw new ArgumentException(SR.net_invalid_ip_addr, nameof(hostNameOrAddress)); 161throw new ArgumentException(SR.net_invalid_ip_addr, nameof(address)); 210throw new ArgumentException(SR.net_invalid_ip_addr, nameof(hostNameOrAddress)); 577throw new ArgumentException(SR.net_invalid_ip_addr, nameof(hostName));
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.cs (2)
52throw new ArgumentException(SR.net_invalidPingBufferSize, nameof(buffer)); 69throw new ArgumentException(SR.net_invalid_ip_addr, nameof(address));
System.Net.Primitives (9)
System\Net\CookieContainer.cs (1)
187throw new ArgumentException(
System\Net\CredentialCache.cs (2)
35throw new ArgumentException(SR.Format(SR.net_nodefaultcreds, authType), nameof(authType)); 61throw new ArgumentException(SR.Format(SR.net_nodefaultcreds, authenticationType), nameof(authenticationType));
System\Net\DnsEndPoint.cs (1)
28throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(addressFamily));
System\Net\IPAddress.cs (2)
144throw new ArgumentException(SR.dns_bad_ip_address, nameof(address)); 194throw new ArgumentException(SR.dns_bad_ip_address, nameof(address));
System\Net\IPEndPoint.cs (2)
160throw new ArgumentException(SR.Format(SR.net_InvalidAddressFamily, socketAddress.Family.ToString(), GetType().FullName), nameof(socketAddress)); 166throw new ArgumentException(SR.Format(SR.net_InvalidSocketAddressSize, socketAddress.GetType().FullName, GetType().FullName), nameof(socketAddress));
System\Net\IPNetwork.cs (1)
65static void ThrowInvalidBaseAddressException() => throw new ArgumentException(SR.net_bad_ip_network_invalid_baseaddress, nameof(baseAddress));
System.Net.Quic (5)
System\Net\Quic\Internal\MsQuicConfiguration.cs (3)
118throw new ArgumentException(SR.Format(SR.net_quic_not_null_ceritifcate, nameof(SslServerAuthenticationOptions.ServerCertificate), nameof(SslServerAuthenticationOptions.ServerCertificateContext), nameof(SslServerAuthenticationOptions.ServerCertificateSelectionCallback)), nameof(options)); 129throw new ArgumentException(SR.Format(SR.net_quic_not_null_not_empty_connection, nameof(SslApplicationProtocol)), nameof(options)); 339throw new ArgumentException(SR.net_quic_empty_cipher_suite, nameof(SslClientAuthenticationOptions.CipherSuitesPolicy));
System\Net\Quic\Internal\MsQuicSafeHandle.cs (1)
54_ => throw new ArgumentException($"Unexpected value: {safeHandleType}", nameof(safeHandleType))
System\Net\Quic\QuicConnection.cs (1)
385throw new ArgumentException(SR.Format(SR.net_quic_unsupported_endpoint_type, options.RemoteEndPoint.GetType()), nameof(options));
System.Net.Requests (23)
src\libraries\Common\src\System\Net\HttpValidationHelpers.cs (6)
13throw new ArgumentException(SR.Format(SR.net_WebHeaderInvalidHeaderChars, name), nameof(name)); 19throw new ArgumentException(SR.Format(SR.net_WebHeaderInvalidHeaderChars, name), nameof(name)); 71throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 81throw new ArgumentException(SR.net_WebHeaderInvalidCRLFChars, nameof(value)); 89throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 95throw new ArgumentException(SR.net_WebHeaderInvalidCRLFChars, nameof(value));
System\Net\Cache\HttpRequestCachePolicy.cs (2)
38throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(HttpCacheAgeControl)), nameof(cacheAgeControl)); 64throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(HttpCacheAgeControl)), nameof(cacheAgeControl));
System\Net\FtpWebRequest.cs (5)
104throw new ArgumentException(SR.net_ftp_unsupported_method, nameof(method)); 279throw new ArgumentException(SR.net_ftp_unsupported_method, nameof(value)); 329throw new ArgumentException(SR.net_ftp_no_defaultcreds, nameof(value)); 689throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 812throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\HttpWebRequest.cs (10)
383throw new ArgumentException(SR.net_invalid_host, nameof(value)); 477throw new ArgumentException(SR.net_nochunked, nameof(value)); 615throw new ArgumentException(SR.net_connarg, nameof(value)); 664throw new ArgumentException(SR.net_no100, nameof(value)); 836throw new ArgumentException(SR.net_wrongversion, nameof(value)); 937throw new ArgumentException(SR.net_badmethod, nameof(value)); 1171throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 1444throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 1532throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier)); 1551throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier));
System.Net.Security (14)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (1)
244throw new ArgumentException(SR.net_ssl_app_protocols_invalid, nameof(applicationProtocols));
System\Net\Security\AuthenticatedStream.cs (1)
24throw new ArgumentException(SR.net_io_must_be_rw_stream, nameof(innerStream));
System\Net\Security\NegotiateStream.cs (1)
608throw new ArgumentException(SR.net_auth_must_specify_extended_protection_scheme, nameof(policy));
System\Net\Security\Pal.Managed\EndpointChannelBindingToken.cs (1)
56throw new ArgumentException(signatureAlgorithm.Value);
System\Net\Security\SslApplicationProtocol.cs (1)
34throw new ArgumentException(SR.net_ssl_app_protocol_invalid, nameof(protocol));
System\Net\Security\SslClientAuthenticationOptions.cs (2)
57throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(X509RevocationMode)), nameof(value)); 72throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(EncryptionPolicy)), nameof(value));
System\Net\Security\SslServerAuthenticationOptions.cs (2)
59throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(X509RevocationMode)), nameof(value)); 74throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(EncryptionPolicy)), nameof(value));
System\Net\Security\SslStream.cs (1)
211throw new ArgumentException(SR.Format(SR.net_invalid_enum, "EncryptionPolicy"), nameof(encryptionPolicy));
System\Net\StreamFramer.cs (1)
108throw new ArgumentException(SR.Format(SR.net_frame_max_size, MaxMessageSize, value), nameof(PayloadSize));
System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicy.cs (3)
29throw new ArgumentException(SR.security_ExtendedProtectionPolicy_UseDifferentConstructorForNever, nameof(policyEnforcement)); 34throw new ArgumentException(SR.security_ExtendedProtectionPolicy_NoEmptyServiceNameCollection, nameof(customServiceNames)); 55throw new ArgumentException(SR.security_ExtendedProtectionPolicy_UseDifferentConstructorForNever, nameof(policyEnforcement));
System.Net.ServerSentEvents (2)
System\Net\ServerSentEvents\ThrowHelper.cs (2)
18throw new ArgumentException(SR.ArgumentException_CannotContainLineBreaks, parameterName); 23throw new ArgumentException(SR.ArgumentException_CannotBeNegative, parameterName);
System.Net.Sockets (43)
System\Net\Sockets\SendPacketsElement.cs (1)
54throw new ArgumentException(SR.net_sockets_sendpackelement_FileStreamMustBeAsync, nameof(fileStream));
System\Net\Sockets\Socket.cs (28)
243throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 939throw new ArgumentException(SR.net_sockets_invalid_ipaddress_length, nameof(addresses)); 977throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses)); 1146throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 1633throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 1751throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEP.AddressFamily, _addressFamily), nameof(remoteEP)); 2123throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "LingerOption"), nameof(optionValue)); 2127throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper_Named, 0, (int)ushort.MaxValue, "optionValue.LingerTime"), nameof(optionValue)); 2136throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "MulticastOption"), nameof(optionValue)); 2146throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "IPv6MulticastOption"), nameof(optionValue)); 2152throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(optionValue)); 2309throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(level)); 2691throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2731throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2840throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 2889throw new ArgumentException(SR.net_multibuffernotsupported, "BufferList"); 2986throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 2990throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3094throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, "e.RemoteEndPoint"), nameof(e)); 3099throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3103throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPointSnapshot.AddressFamily, _addressFamily), nameof(e)); 3148throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3152throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, e.RemoteEndPoint.AddressFamily, _addressFamily), nameof(e)); 3220throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.SendPacketsElements"), nameof(e)); 3258throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3340throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, nameof(remoteEP)), nameof(remoteEP)); 3955throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, remoteEndPointArgumentName), remoteEndPointArgumentName); 3960throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEndPoint.AddressFamily, _addressFamily), remoteEndPointArgumentName);
System\Net\Sockets\Socket.Tasks.cs (2)
169throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses)); 841throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
System\Net\Sockets\SocketAsyncEventArgs.cs (4)
160throw new ArgumentException(SR.net_ambiguousbuffers); 388throw new ArgumentException(SR.net_ambiguousbuffers); 415throw new ArgumentException(SR.net_ambiguousbuffers); 588throw new ArgumentException(SR.net_buffercounttoosmall, nameof(Count));
System\Net\Sockets\SocketPal.Unix.cs (2)
1900throw new ArgumentException(SR.Format(SR.net_sockets_select, socket?.GetType().FullName ?? "null", typeof(Socket).FullName), nameof(socketList)); 2007throw new ArgumentException(SR.Format(SR.net_sockets_select, socket?.GetType().FullName ?? "null", typeof(Socket).FullName), nameof(socketList));
System\Net\Sockets\TCPClient.cs (1)
37throw new ArgumentException(SR.Format(SR.net_protocol_invalid_family, "TCP"), nameof(family));
System\Net\Sockets\UDPClient.cs (5)
33throw new ArgumentException(SR.Format(SR.net_protocol_invalid_family, "UDP"), nameof(family)); 61throw new ArgumentException(SR.Format(SR.net_protocol_invalid_family, "UDP"), nameof(family)); 349throw new ArgumentException(SR.net_invalidAddressList, nameof(hostname)); 402throw new ArgumentException(SR.Format(SR.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr)); 486throw new ArgumentException(SR.Format(SR.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr));
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
170throw new ArgumentException(SR.net_webclient_invalid_baseaddress, nameof(value), e);
System.Net.WebHeaderCollection (7)
src\libraries\Common\src\System\Net\HttpValidationHelpers.cs (6)
13throw new ArgumentException(SR.Format(SR.net_WebHeaderInvalidHeaderChars, name), nameof(name)); 19throw new ArgumentException(SR.Format(SR.net_WebHeaderInvalidHeaderChars, name), nameof(name)); 71throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 81throw new ArgumentException(SR.net_WebHeaderInvalidCRLFChars, nameof(value)); 89throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 95throw new ArgumentException(SR.net_WebHeaderInvalidCRLFChars, nameof(value));
System\Net\WebHeaderCollection.cs (1)
317throw new ArgumentException(SR.net_WebHeaderMissingColon, nameof(header));
System.Net.WebSockets (9)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (4)
53throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCharInProtocolString, subProtocol, invalidCharDescription), nameof(subProtocol)); 61throw new ArgumentException(SR.Format(SR.net_WebSockets_ReasonNotNull, 79throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusCode, 88throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusDescription,
System\Net\WebSockets\ManagedWebSocket.cs (2)
335throw new ArgumentException(SR.net_WebSockets_Argument_MessageFlagsHasDifferentCompressionOptions, nameof(messageFlags)); 1900throw new ArgumentException(SR.Format(
System\Net\WebSockets\WebSocket.cs (3)
138throw new ArgumentException(!stream.CanRead ? SR.NotReadableStream : SR.NotWriteableStream, nameof(stream)); 165throw new ArgumentException(!stream.CanRead ? SR.NotReadableStream : SR.NotWriteableStream, nameof(stream)); 192throw new ArgumentException(!innerStream.CanRead ? SR.NotReadableStream : SR.NotWriteableStream, nameof(innerStream));
System.Net.WebSockets.Client (9)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (4)
53throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCharInProtocolString, subProtocol, invalidCharDescription), nameof(subProtocol)); 61throw new ArgumentException(SR.Format(SR.net_WebSockets_ReasonNotNull, 79throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusCode, 88throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusDescription,
System\Net\WebSockets\ClientWebSocket.cs (2)
100throw new ArgumentException(SR.net_uri_NotAbsolute, nameof(uri)); 104throw new ArgumentException(SR.net_WebSockets_Scheme, nameof(uri));
System\Net\WebSockets\ClientWebSocketOptions.cs (1)
169throw new ArgumentException(SR.Format(SR.net_WebSockets_NoDuplicateProtocol, subProtocol), nameof(subProtocol));
System\Net\WebSockets\WebSocketHandle.Managed.cs (2)
56throw new ArgumentException(SR.net_WebSockets_CustomInvokerRequiredForHttp2, nameof(options)); 64throw new ArgumentException(SR.net_WebSockets_OptionsIncompatibleWithCustomInvoker, nameof(options));
System.Numerics.Tensors (38)
System\Numerics\Tensors\netcore\Tensor_1.cs (1)
347void ITensor.Fill(object value) => Fill(value is T t ? t : throw new ArgumentException($"Cannot convert {value} to {typeof(T)}"));
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (3)
77throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode)); 133throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode)); 169throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode));
System\Numerics\Tensors\netcore\TensorSpan_1.cs (1)
380void ITensor.Fill(object value) => Fill(value is T t ? t : throw new ArgumentException($"Cannot convert {value} to {typeof(T)}"));
System\ThrowHelper.cs (33)
18throw new ArgumentException(SR.Argument_DestinationTooShort, destinationName); 22throw new ArgumentException(SR.Argument_SpansMustHaveSameLength); 26throw new ArgumentException(SR.Argument_SpansMustBeNonEmpty); 30throw new ArgumentException(SR.Argument_InputAndDestinationSpanMustNotOverlap, "destination"); 50throw new ArgumentException(SR.Argument_DestinationSpansMustNotOverlap); 67throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType)); 96throw new ArgumentException(SR.ThrowArgument_IndicesLengthMustEqualRank); 100return new ArgumentException(message); 112throw new ArgumentException(SR.ThrowArgument_FilterTensorMustEqualTensorLength); 118throw new ArgumentException(SR.ThrowArgument_SetSliceNoRange, paramNames); 124throw new ArgumentException(SR.ThrowArgument_SetSliceInvalidShapes, paramNames); 130throw new ArgumentException(SR.ThrowArgument_LengthsNotCompatible); 136throw new ArgumentException(SR.ThrowArgument_SplitNotSplitEvenly); 142throw new ArgumentException(SR.ThrowArgument_DimensionsNotSame, paramNames); 148throw new ArgumentException(SR.ThrowArgument_1DTensorRequired, paramNames); 154throw new ArgumentException(SR.Argument_2DTensorRequired, paramNames); 160throw new ArgumentException(SR.ThrowArgument_IncorrectNumberOfFilterItems, paramNames); 166throw new ArgumentException(SR.ThrowArgument_StackTooFewTensors); 172throw new ArgumentException(SR.ThrowArgument_OnlyOneWildcard); 178throw new ArgumentException(SR.ThrowArgument_InvalidReshapeDimensions); 184throw new ArgumentException(SR.ThrowArgument_AxisLargerThanRank); 190throw new ArgumentException(SR.ThrowArgument_InvalidSqueezeAxis); 196throw new ArgumentException(SR.ThrowArgument_ConcatenateTooFewTensors); 202throw new ArgumentException(SR.ThrowArgument_InvalidDimension); 208throw new ArgumentException(SR.ThrowArgument_InvalidConcatenateShape); 214throw new ArgumentException(SR.ThrowArgument_TransposeTooFewDimensions); 220throw new ArgumentException(SR.ThrowArgument_PermuteAxisOrder); 226throw new ArgumentException(SR.ThrowArgument_InPlaceInvalidShape); 232throw new ArgumentException(SR.ThrowArgument_InvalidStridesAndLengths); 250throw new ArgumentException(SR.Format(SR.Argument_IncompatibleDimensions, leftDim, rightDim)); 256throw new ArgumentException(SR.ThrowArgument_StackShapesNotSame); 262throw new ArgumentException(SR.Argument_CannotReshapeNonContiguousOrDense); 268throw new ArgumentException(SR.Argument_MinGreaterThanMax);
System.ObjectModel (16)
System\Collections\CollectionHelpers.cs (3)
16throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 21throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 29throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System\Collections\ObjectModel\KeyedCollection.cs (2)
160throw new ArgumentException(SR.Argument_ItemNotExist, nameof(item)); 251throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, key), nameof(key));
System\Collections\Specialized\NotifyCollectionChangedEventArgs.cs (11)
30throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Reset), nameof(action)); 59throw new ArgumentException(SR.ResetActionRequiresNullItem, nameof(action)); 63throw new ArgumentException(SR.ResetActionRequiresIndexMinus1, nameof(action)); 78throw new ArgumentException(SR.MustBeResetAddOrRemoveActionForCtor, nameof(action)); 107throw new ArgumentException(SR.ResetActionRequiresNullItem, nameof(action)); 111throw new ArgumentException(SR.ResetActionRequiresIndexMinus1, nameof(action)); 133throw new ArgumentException(SR.MustBeResetAddOrRemoveActionForCtor, nameof(action)); 161throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Replace), nameof(action)); 192throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Replace), nameof(action)); 214throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Move), nameof(action)); 235throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Move), nameof(action));
System.Private.CoreLib (891)
src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (1)
72throw new ArgumentException();
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
64throw new ArgumentException(SR.Format_StringZeroLength);
src\libraries\Common\src\System\Threading\Tasks\TaskToAsyncResult.cs (2)
74throw new ArgumentException(null, nameof(asyncResult)); 96throw new ArgumentException(null, nameof(asyncResult));
src\libraries\System.Private.CoreLib\src\Internal\Runtime\CompilerHelpers\ThrowHelpers.cs (1)
25throw new ArgumentException();
src\libraries\System.Private.CoreLib\src\System\Activator.RuntimeType.cs (2)
37throw new ArgumentException(SR.Arg_MustBeType, nameof(type)); 98throw new ArgumentException(SR.Arg_MustBeType, nameof(type));
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
133throw new ArgumentException(SR.AggregateException_ctor_InnerExceptionNull);
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (2)
100throw new ArgumentException(SR.Argument_EmptyString, nameof(assemblyName)); 201throw new ArgumentException(SR.Arg_MustBeTrue);
src\libraries\System.Private.CoreLib\src\System\ArgumentException.cs (2)
129throw new ArgumentException(SR.Argument_EmptyString, paramName); 136throw new ArgumentException(SR.Argument_EmptyOrWhiteSpaceString, paramName);
src\libraries\System.Private.CoreLib\src\System\Array.cs (2)
446throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 452throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
151throw new ArgumentException(SR.Arg_MustBeBoolean);
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (4)
26throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(src)); 37throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(dst)); 51throw new ArgumentException(SR.Argument_InvalidOffLen); 62throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (1)
408throw new ArgumentException(SR.Arg_BufferTooSmall, "destination");
src\libraries\System.Private.CoreLib\src\System\Buffers\ConfigurableArrayPool.cs (1)
236throw new ArgumentException(SR.ArgumentException_BufferNotFromPool, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
153throw new ArgumentException(SR.ArgumentException_BufferNotFromPool, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (2)
126throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 343throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (2)
77throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 128throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
63throw new ArgumentException(SR.Arg_MustBeByte);
src\libraries\System.Private.CoreLib\src\System\Char.cs (2)
146throw new ArgumentException(SR.Arg_MustBeChar); 1166throw new ArgumentException(SR.Format(invalidIsLow ? SR.Argument_InvalidLowSurrogate : SR.Argument_InvalidHighSurrogate, index), nameof(s));
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (31)
195throw new ArgumentException(SR.Argument_InvalidOffLen); 252throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 265throw new ArgumentException(SR.Argument_InvalidOffLen); 267throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 330throw new ArgumentException(SR.Argument_InvalidOffLen); 534throw new ArgumentException(SR.Argument_InvalidOffLen); 580throw new ArgumentException(SR.Argument_InvalidOffLen); 608throw new ArgumentException(SR.Argument_InvalidOffLen); 639throw new ArgumentException(SR.Argument_InvalidOffLen); 765throw new ArgumentException(SR.Argument_InvalidOffLen); 826throw new ArgumentException(SR.Argument_InvalidOffLen); 828throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 831throw new ArgumentException(SR.Argument_InvalidOffLen); 848throw new ArgumentException(SR.Argument_InvalidOffLen); 972throw new ArgumentException(SR.Argument_InvalidOffLen); 990throw new ArgumentException(SR.Argument_InvalidOffLen); 1028throw new ArgumentException(SR.Argument_InvalidOffLen); 1037throw new ArgumentException(SR.Argument_InvalidOffLen); 1813throw new ArgumentException(SR.Argument_InvalidOffLen); 2067throw new ArgumentException(SR.Argument_InvalidOffLen); 2219throw new ArgumentException(SR.Argument_InvalidOffLen); 2282throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2285throw new ArgumentException(SR.Argument_InvalidOffLen); 2296throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2300throw new ArgumentException(SR.Argument_InvalidOffLen); 2302throw new ArgumentException(SR.Argument_InvalidOffLen); 2333throw new ArgumentException(SR.Argument_InvalidOffLen); 2344throw new ArgumentException(SR.Argument_InvalidOffLen); 2457throw new ArgumentException(SR.Argument_InvalidOffLen); 2475throw new ArgumentException(SR.Argument_InvalidOffLen); 2498throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (8)
136throw new ArgumentException(SR.Format(SR.Argument_ArrayTooLarge, BitsPerByte), nameof(bytes)); 240throw new ArgumentException(SR.Format(SR.Argument_ArrayTooLarge, BitsPerInt32), nameof(values)); 418throw new ArgumentException(SR.Arg_ArrayLengthsDiffer); 666throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 675throw new ArgumentException(SR.Argument_InvalidOffLen); 703throw new ArgumentException(SR.Argument_InvalidOffLen); 722throw new ArgumentException(SR.Argument_InvalidOffLen); 861throw new ArgumentException(SR.Arg_BitArrayTypeUnsupported, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\Comparer.cs (1)
67throw new ArgumentException(SR.Argument_ImplementIComparable);
src\libraries\System.Private.CoreLib\src\System\Collections\CompatibleComparer.cs (1)
44throw new ArgumentException(SR.Argument_ImplementIComparable);
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (12)
170throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 185throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 205throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 220throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 272throw new ArgumentException(SR.Arg_HTCapacityOverflow, nameof(capacity)); 577throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 580throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 891throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, _buckets[bucketNumber].key, key)); 1194throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1197throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1229throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1232throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (5)
107throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, node.key, key)); 153throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 158throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index)); 308throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 311throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index));
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (5)
20throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 25throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 40throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 62throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 74throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (2)
194object[] objects = array as object[] ?? throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 204throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
src\libraries\System.Private.CoreLib\src\System\ComponentModel\DefaultValueAttribute.cs (1)
245throw new ArgumentException(SR.RuntimeInstanceNotAllowed);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (5)
164_ => throw new ArgumentException(SR.Arg_UnknownTypeCode), 2296private static void ThrowInvalidBase() => throw new ArgumentException(SR.Arg_InvalidBase); 2347throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 2394throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 2433throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options));
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (2)
251throw new ArgumentException(SR.Arg_MustBeDateOnly); 695case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style");
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (6)
206private static void ThrowInvalidKind() => throw new ArgumentException(SR.Argument_InvalidDateTimeKind, "kind"); 1069throw new ArgumentException(SR.Arg_MustBeDateTime); 1164throw new ArgumentException(SR.Arg_OleAutDateInvalid); 1178if (millis < 0 || millis > MaxMillis) throw new ArgumentException(SR.Arg_OleAutDateScale); 1244throw new ArgumentException(SR.Argument_DateTimeBadBinaryData, nameof(dateData)); 1251throw new ArgumentException(SR.Argument_DateTimeBadBinaryData, nameof(dateData));
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (6)
114throw new ArgumentException(SR.Argument_OffsetLocalMismatch, nameof(offset)); 121throw new ArgumentException(SR.Argument_OffsetUtcMismatch, nameof(offset)); 551throw new ArgumentException(SR.Arg_MustBeDateTimeOffset); 784throw new ArgumentException(SR.Arg_ArgumentOutOfRangeException); 922static void ThrowOffsetPrecision() => throw new ArgumentException(SR.Argument_OffsetPrecision, nameof(offset)); 970throw new ArgumentException(message, nameof(styles));
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (4)
304throw new ArgumentException(SR.Arg_DecBitCtor); 337throw new ArgumentException(SR.Arg_DecBitCtor); 424throw new ArgumentException(SR.Arg_MustBeDecimal); 688throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, nameof(MidpointRounding)), nameof(mode));
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (4)
36throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 550throw new ArgumentException(SR.Arg_MustBeType, nameof(types)); 556throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 646throw new ArgumentException(SR.Arg_EmptyArray, nameof(match));
src\libraries\System.Private.CoreLib\src\System\Delegate.cs (1)
167throw new ArgumentException(SR.Arg_DlgtTypeMis);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (3)
519throw new ArgumentException(SR.Argument_ToExclusiveLessThanFromExclusive); 566throw new ArgumentException(SR.Argument_ToExclusiveLessThanFromExclusive); 654throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (12)
387throw new ArgumentException(SR.Argument_InvalidTypeName, nameof(eventSourceType)); 507throw new ArgumentException(SR.EventSource_InvalidCommand, nameof(command)); 1643throw new ArgumentException(SR.EventSource_TraitEven, nameof(traits)); 1648throw new ArgumentException(SR.EventSource_NeedGuid); 1653throw new ArgumentException(SR.EventSource_NeedName); 1995throw new ArgumentException(SR.EventSource_NoRelatedActivityId); 2675throw new ArgumentException(SR.EventSource_ListenerNotFound); 2888throw new ArgumentException(SR.Format(SR.EventSource_EventSourceGuidInUse, m_guid)); 3351throw new ArgumentException(SR.EventSource_StopsFollowStarts); 3451throw new ArgumentException(msg, exception); 3840throw new ArgumentException(SR.EventSource_InvalidEventFormat, nameof(settings)); 5627throw new ArgumentException(msg);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (1)
585throw new ArgumentException(SR.Format(SR.EventSource_NonCompliantTypeError, dataType.Name));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (4)
759throw new ArgumentException(SR.Format(SR.EventSource_UnknownEtwTrait, etwTrait.ToString()), "traits"); 815throw new ArgumentException(SR.EventSource_EvenHexDigits, "traits"); 828throw new ArgumentException(SR.Format(SR.EventSource_IllegalValue, value), "traits"); 852throw new ArgumentException(SR.Format(SR.EventSource_BadHexDigit, c), "traits");
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
267return (value is null) ? 1 : throw new ArgumentException(SR.Arg_MustBeDouble);
src\libraries\System.Private.CoreLib\src\System\Enum.cs (9)
404throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType())); 887throw new ArgumentException(SR.Arg_MustBeEnum, nameof(TEnum)); 1121throw new ArgumentException(SR.Format(SR.Arg_EnumValueNotFound, originalValue.ToString())); 1289throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType())); 1636throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, rtType)); 1649throw new ArgumentException(SR.Format(SR.Arg_EnumFormatUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType)); 2147throw new ArgumentException(enumType is not RuntimeType ? SR.Arg_MustBeType : SR.Arg_MustBeEnum, nameof(enumType)); 2150throw new ArgumentException(SR.Arg_MustContainEnumInfo, "value"); 2220throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value));
src\libraries\System.Private.CoreLib\src\System\Environment.cs (2)
274throw new ArgumentException(SR.Argument_StringFirstCharIsZero, nameof(variable)); 277throw new ArgumentException(SR.Argument_IllegalEnvVarName, nameof(variable));
src\libraries\System.Private.CoreLib\src\System\Environment.Variables.Windows.cs (2)
57throw new ArgumentException(SR.Argument_LongEnvVarValue); 64throw new ArgumentException(Marshal.GetPInvokeErrorMessage(errorCode));
src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (1)
114throw new ArgumentException(SR.Format(SR.Argument_ResultCalendarRange, minValue, maxValue));
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (5)
71throw new ArgumentException(SR.Argument_OnlyMscorlib, nameof(assembly)); 89throw new ArgumentException(SR.Argument_OnlyMscorlib, nameof(assembly)); 103throw new ArgumentException(SR.Argument_CustomCultureCannotBePassedByNumber, nameof(culture)); 483throw new ArgumentException( 1359throw new ArgumentException(paramName: nameof(options), message: SR.Argument_InvalidFlag);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (4)
691throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); 732throw new ArgumentException(SR.Arg_ExternalException); 783throw new ArgumentException(SR.Arg_ExternalException); 913throw new ArgumentException(SR.Arg_ExternalException);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Invariant.cs (2)
18throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); 123throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (9)
147throw new ArgumentException(SR.Arg_ExternalException); 168throw new ArgumentException(SR.Arg_ExternalException); 202throw new ArgumentException(SR.Arg_ExternalException); 250throw new ArgumentException(SR.Arg_ExternalException); 378throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); 402throw new ArgumentException(SR.Arg_ExternalException); 415throw new ArgumentException(SR.Arg_ExternalException); 515throw new ArgumentException(SR.Arg_ExternalException); 560throw new ArgumentException(SR.Arg_ExternalException);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (1)
735throw new ArgumentException(SR.Format(SR.Argument_InvalidId, nameof(name)));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (1)
329throw new ArgumentException(SR.Format(SR.Argument_InvalidResourceCultureName, cultureName));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (11)
1071throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1096throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1116throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1138throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1159throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1327_ => throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)), 1603throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(patterns)); 1649throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); 1665throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1686throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1747throw new ArgumentException(message, styles ? nameof(styles) : nameof(style));
src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendarHelper.cs (2)
374throw new ArgumentException(SR.Argument_NoEra); 395throw new ArgumentException(SR.Argument_NoEra);
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (37)
79throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 83throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode)); 128throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 204throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode)); 222throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 232throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i), nameof(unicode)); 244throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 248throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 268throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 272throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 311throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 333throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 362throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 381throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 388throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 414throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(unicode)); 499throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 511throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 538throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c)); 553throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 583throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 587throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 610throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 618throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 638throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 653throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 688throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 695throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 703throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 714throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 720throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 735throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 779throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii)); 786throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii)); 792throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 804throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[^1]) ? 0 : 1)), nameof(ascii)); 827throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(cp));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (5)
39throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(unicode)); 48throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(unicode)); 89throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 104throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 137throw new ArgumentException(SR.Argument_IdnIllegalName, paramName);
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Nls.cs (1)
122throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.cs (1)
90throw new ArgumentException(SR.Argument_InvalidNormalizationForm, nameof(normalizationForm));
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Icu.cs (6)
41throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(source)); 84throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 111throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 155throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(source)); 194throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(source)); 210throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, paramName);
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Nls.cs (4)
95throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 154throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(source)); 191throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(source)); 213throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, inputName);
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (9)
110throw new ArgumentException(SR.Argument_InvalidNativeDigitCount, propertyName); 125throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 130throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 139throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 155throw new ArgumentException(SR.Argument_InvalidDigitSubstitution, propertyName); 294throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 298throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 822throw new ArgumentException( 837throw new ArgumentException((value & InvalidNumberStyles) != 0 ? SR.Argument_InvalidNumberStyles : SR.Arg_HexBinaryStylesNotSupported, nameof(style));
src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (7)
33throw new ArgumentException(SR.Argument_NoRegionInvariantCulture, nameof(name)); 38throw new ArgumentException(SR.Format(SR.Argument_InvalidCultureName, name), nameof(name)); 43throw new ArgumentException(SR.Format(SR.Argument_InvalidNeutralRegionName, name), nameof(name)); 54throw new ArgumentException(SR.Argument_NoRegionInvariantCulture); 60throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture)); 66throw new ArgumentException(SR.Format(SR.Argument_CustomCultureCannotBePassedByNumber, culture), nameof(culture)); 75throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
src\libraries\System.Private.CoreLib\src\System\Guid.cs (3)
103throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "16"), "b"); 129throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "8"), nameof(d)); 1105throw new ArgumentException(SR.Arg_MustBeGuid, nameof(value));
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
434return (obj is null) ? 1 : throw new ArgumentException(SR.Arg_MustBeHalf);
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
61throw new ArgumentException(SR.Arg_MustBeInt128);
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
68throw new ArgumentException(SR.Arg_MustBeInt16);
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
81throw new ArgumentException(SR.Arg_MustBeInt32);
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
78throw new ArgumentException(SR.Arg_MustBeInt64);
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
193throw new ArgumentException(SR.Arg_MustBeIntPtr);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (3)
46throw new ArgumentException(SR.Argument_StreamNotReadable); 302throw new ArgumentException(SR.Argument_InvalidOffLen); 421throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryWriter.cs (2)
51throw new ArgumentException(SR.Argument_StreamNotWritable); 181throw new ArgumentException(SR.Arg_SurrogatesNotAllowedAsSingleChar);
src\libraries\System.Private.CoreLib\src\System\IO\Directory.cs (1)
75throw new ArgumentException(SR.Argument_DirectorySeparatorInvalid, paramName);
src\libraries\System.Private.CoreLib\src\System\IO\Directory.Unix.cs (1)
17throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(unixCreateMode));
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (4)
79throw new ArgumentException(SR.Argument_PathEmpty, nameof(path)); 81throw new ArgumentException(SR.Arg_Path2IsRooted, nameof(path)); 98throw new ArgumentException(SR.Format(SR.Argument_InvalidSubPath, path, FullPath), nameof(path)); 200_ => throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(searchTarget)),
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerableFactory.cs (3)
30throw new ArgumentException(SR.Arg_Path2IsRooted, nameof(expression)); 33throw new ArgumentException(SR.Argument_NullCharInPath, expression); 36throw new ArgumentException(SR.Argument_NullCharInPath, directory);
src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (2)
238throw new ArgumentException(SR.Arg_InvalidFileAttrs, "Attributes"); 481throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(UnixFileMode));
src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (5)
71throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 188throw new ArgumentException(SR.Argument_InvalidAppendMode, nameof(options)); 194throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, options.Mode, options.Access), nameof(options)); 208throw new ArgumentException(SR.Argument_InvalidUnixCreateMode, nameof(options)); 598throw new ArgumentException(SR.Argument_InvalidSeekOrigin, nameof(origin));
src\libraries\System.Private.CoreLib\src\System\IO\FileStreamOptions.cs (1)
144throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(UnixCreateMode));
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.cs (1)
27throw new ArgumentException(SR.Argument_NullCharInPath, argName);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (2)
88throw new ArgumentException(SR.Argument_InvalidOffLen); 520_ => throw new ArgumentException(SR.Argument_InvalidSeekOrigin)
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (2)
865throw new ArgumentException(SR.Arg_PathEmpty, nameof(relativeTo)); 867throw new ArgumentException(SR.Arg_PathEmpty, nameof(path));
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (3)
31throw new ArgumentException(SR.Argument_NullCharInPath, nameof(path)); 42throw new ArgumentException(SR.Arg_BasePathNotFullyQualified, nameof(basePath)); 45throw new ArgumentException(SR.Argument_NullCharInPath);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (4)
105throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, mode, access), nameof(access)); 111throw new ArgumentException(SR.Argument_InvalidAppendMode, nameof(access)); 127throw new ArgumentException(SR.Argument_InvalidPreallocateAccess, nameof(access)); 135throw new ArgumentException(SR.Argument_InvalidPreallocateMode, nameof(mode));
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (6)
148throw new ArgumentException(SR.Argument_StreamNotReadable); 221throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(options)); 354throw new ArgumentException(SR.Argument_InvalidOffLen); 433throw new ArgumentException(SR.Argument_InvalidOffLen); 1055throw new ArgumentException(SR.Argument_InvalidOffLen); 1266throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (5)
104throw new ArgumentException(SR.Argument_StreamNotWritable); 178throw new ArgumentException(SR.Argument_StreamNotWritable, nameof(options)); 377throw new ArgumentException(SR.Argument_InvalidOffLen); 737throw new ArgumentException(SR.Argument_InvalidOffLen); 889throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (3)
94throw new ArgumentException(SR.Argument_InvalidOffLen); 295throw new ArgumentException(SR.Argument_InvalidOffLen); 313throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\StringWriter.cs (1)
96throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (5)
78throw new ArgumentException(SR.Argument_InvalidOffLen); 268throw new ArgumentException(SR.Argument_InvalidOffLen); 298throw new ArgumentException(SR.Argument_InvalidOffLen); 397throw new ArgumentException(SR.Argument_InvalidOffLen); 410throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (1)
152throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (9)
48throw new ArgumentException(SR.Argument_OffsetAndCapacityOutOfBounds); 69throw new ArgumentException(SR.Argument_UnmanagedMemAccessorWrapAround); 249throw new ArgumentException(SR.Arg_BadDecimal); // Throw same Exception type as Decimal(int[]) ctor for compat 303throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position)); 321throw new ArgumentException(SR.Argument_InvalidOffLen); 531throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position)); 547throw new ArgumentException(SR.Argument_InvalidOffLen); 586throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position)); 610throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position));
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (4)
88throw new ArgumentException(SR.Argument_InvalidSafeBufferOffLen); 109throw new ArgumentException(SR.ArgumentOutOfRange_UnmanagedMemStreamWrapAround); 558throw new ArgumentException(SR.Argument_InvalidSeekOrigin); 665throw new ArgumentException(SR.Arg_BufferTooSmall);
src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
1499throw new ArgumentException(SR.Format(SR.Argument_MinMaxValue, min, max));
src\libraries\System.Private.CoreLib\src\System\ParseNumbers.cs (4)
33throw new ArgumentException(SR.Arg_InvalidBase, nameof(radix)); 53throw new ArgumentException(SR.Arg_CannotHaveNegativeValue); 121throw new ArgumentException(SR.Arg_InvalidBase, nameof(radix)); 141throw new ArgumentException(SR.Arg_CannotHaveNegativeValue);
src\libraries\System.Private.CoreLib\src\System\Random.cs (2)
197throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 392throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices));
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (2)
237throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 278throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, path), nameof(path));
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyName.cs (1)
37throw new ArgumentException(SR.Format_StringZeroLength);
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (1)
55throw new ArgumentException(SR.Argument_MustBeRuntimeConstructorInfo, nameof(constructor));
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeNamedArgument.cs (1)
24_ => throw new ArgumentException(SR.Argument_InvalidMemberForNamedArgument)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (4)
237throw new ArgumentException(SR.Arg_InvalidTypeInSignature); 240throw new ArgumentException(SR.Arg_InvalidTypeInSignature); 273throw new ArgumentException(SR.Argument_InvalidTypeForDynamicMethod); 351throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (5)
96throw new ArgumentException(SR.Argument_NotExceptionType, nameof(excType)); 98ConstructorInfo con = excType.GetConstructor(Type.EmptyTypes) ?? throw new ArgumentException(SR.Arg_NoDefCTorWithoutTypeName, nameof(excType)); 128throw new ArgumentException(SR.NotSupported_OutputStreamUsingTypeBuilder); 132throw new ArgumentException(SR.Argument_EmitWriteLineType, nameof(localBuilder)); 164throw new ArgumentException(SR.Argument_EmitWriteLineType, nameof(fld));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilder.cs (1)
27throw new ArgumentException(SR.Arg_EmptyArray, nameof(names));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (5)
76throw new ArgumentException(SR.Argument_BadSigFormat); 137throw new ArgumentException(SR.Argument_BadSigFormat); 167throw new ArgumentException(SR.Argument_BadSigFormat); 185throw new ArgumentException(SR.Argument_BadSigFormat); 301throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (16)
90throw new ArgumentException(SR.Arg_EmptyArray, nameof(names)); 128throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeOptionalCustomModifiers), nameof(parameterTypes))); 131throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeRequiredCustomModifiers), nameof(parameterTypes))); 331throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 343throw new ArgumentException(SR.Argument_NeedGenericMethodDefinition, nameof(method)); 348throw new ArgumentException(SR.Argument_MethodNeedGenericDeclaringType, nameof(method)); 353throw new ArgumentException(SR.Argument_InvalidMethodDeclaringType, nameof(type)); 366throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 378throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 383throw new ArgumentException(SR.Argument_ConstructorNeedGenericDeclaringType, nameof(constructor)); 388throw new ArgumentException(SR.Argument_InvalidConstructorDeclaringType, nameof(type)); 399throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 411throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 416throw new ArgumentException(SR.Argument_FieldNeedGenericDeclaringType, nameof(field)); 421throw new ArgumentException(SR.Argument_InvalidFieldDeclaringType, nameof(type)); 432throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (1)
486throw new ArgumentException(SR.Format(SR.Arg_FieldDeclTarget, fieldInfo.Name, fieldInfo.DeclaringType, target.GetType()));
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
146throw new ArgumentException(SR.Arg_VarMissNull, "parameters");
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (1)
77throw new ArgumentException(SR.Argument_MustBeRuntimeMethod, nameof(method));
src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterModifier.cs (1)
13throw new ArgumentException(SR.Arg_ParmArraySize);
src\libraries\System.Private.CoreLib\src\System\Reflection\Pointer.cs (3)
28throw new ArgumentException(SR.Arg_MustBePointer, nameof(ptr)); 30throw new ArgumentException(SR.Arg_MustBeType, nameof(type)); 40throw new ArgumentException(SR.Arg_MustBePointer, nameof(ptr));
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureByRefType.cs (1)
20public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureConstructedGenericType.cs (1)
58public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureGenericParameterType.cs (1)
33public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignaturePointerType.cs (1)
20public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (2)
140throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_FallbackLoc, fallbackLocation)); 158throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_Asm_Culture, a, attr.CultureName), e);
src\libraries\System.Private.CoreLib\src\System\Resources\NeutralResourcesLanguageAttribute.cs (1)
25throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_FallbackLoc, location));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (5)
192throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 208throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 214throw new ArgumentException(SR.Arg_ResMgrNotResSet, nameof(usingResourceSet)); 225throw new ArgumentException(SR.Argument_MustBeRuntimeType); 540throw new ArgumentException(SR.Format(SR.Arg_InvalidSatelliteContract_Asm_Ver, a, v));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (1)
136throw new ArgumentException(SR.Format(SR.Arg_ResourceNameNotExist, resourceName));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (3)
129throw new ArgumentException(SR.Argument_StreamNotReadable); 808throw new ArgumentException(SR.Resources_StreamNotValid); 846throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ContractHelper.cs (1)
36throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ArrayWithOffset.cs (2)
25throw new ArgumentException(SR.ArgumentException_NotIsomorphic); 31throw new ArgumentException(SR.Argument_StructArrayTooLarge);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (1)
823throw new ArgumentException();
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CurrencyWrapper.cs (1)
21throw new ArgumentException(SR.Arg_MustBeDecimal, nameof(obj));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ErrorWrapper.cs (1)
20throw new ArgumentException(SR.Arg_MustBeInt32, nameof(errorCode));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (2)
44throw new ArgumentException(SR.ArgumentException_NotIsomorphic, nameof(value)); 100throw new ArgumentException(SR.ArgumentException_NotIsomorphic, nameof(value));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (14)
112throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t)); 116throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t)); 127throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T)); 569throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structureType)); 573throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structureType)); 617throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T)); 1055throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 1073throw new ArgumentException(SR.Argument_TypeMustNotBeComImport, nameof(type)); 1077throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 1099throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t)); 1103throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t)); 1111throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(t)); 1124throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(TDelegate)); 1132throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(TDelegate));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (6)
360throw new ArgumentException(SR.UnsupportedType, nameof(T)); 387throw new ArgumentException(SR.ComVariant_VT_DECIMAL_NotSupported_CreateRaw, nameof(vt)); 391throw new ArgumentException(SR.ComVariant_VT_VARIANT_In_Variant, nameof(vt)); 418_ => throw new ArgumentException(SR.Format(SR.ComVariant_SizeMustMatchVariantSize, nameof(T), nameof(vt))) 553throw new ArgumentException(SR.UnsupportedType, nameof(T)); 579throw new ArgumentException(SR.ComVariant_VT_DECIMAL_NotSupported_RawDataRef, nameof(T));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (3)
90throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 125throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 207throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
790throw new ArgumentException(SR.Arg_MustBeNFloat);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (4)
220throw new ArgumentException(SR.Argument_InvalidOffLen); 308throw new ArgumentException(SR.Argument_InvalidOffLen); 376throw new ArgumentException(SR.Arg_BufferTooSmall); 406throw new ArgumentException(SR.Argument_NeedStructWithNoRefs);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\TypeMapLazyDictionary.cs (1)
373throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(key));
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (5)
340throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 358throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, nativeImagePath), nameof(nativeImagePath)); 363throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 444throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, unmanagedDllPath), nameof(unmanagedDllPath)); 566throw new ArgumentException(SR.Arg_MustBeRuntimeAssembly, nameof(activating));
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\OptionalFieldAttribute.cs (1)
18throw new ArgumentException(SR.Serialization_OptionalFieldVersionValue);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (1)
340throw new ArgumentException(SR.Argument_MustBeRuntimeType);
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\FrameworkName.cs (6)
120throw new ArgumentException(SR.Argument_FrameworkNameTooShort, nameof(frameworkName)); 131throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 148throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 173throw new ArgumentException(SR.Argument_FrameworkNameInvalidVersion, nameof(frameworkName), e); 188throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 194throw new ArgumentException(SR.Argument_FrameworkNameMissingVersion, nameof(frameworkName));
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (5)
37throw new ArgumentException(SR.Format(SR.Argument_ResourceScopeWrongDirection, fromResType, toResType), nameof(from)); 112throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, consumeAsScope), nameof(consumeAsScope)); 126throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, calleeScope), nameof(calleeScope)); 147throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, consumeAsScope), nameof(consumeAsScope)); 161throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, calleeScope), nameof(calleeScope));
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (25)
46throw new ArgumentException(SR.Argument_HasToBeArrayClass); 63throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 105throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value)); 114throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 196throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 214throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this)); 229throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType)); 319throw new ArgumentException(SR.Arg_NoAccessSpec, nameof(bindingFlags)); 336throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 341throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 394throw new ArgumentException(SR.Arg_NamedParamNull, nameof(namedParams)); 405throw new ArgumentException(SR.Arg_CreatInstAccess, nameof(bindingFlags)); 430throw new ArgumentException(SR.Arg_FldSetGet, nameof(bindingFlags)); 433throw new ArgumentException(SR.Arg_FldGetPropSet, nameof(bindingFlags)); 442throw new ArgumentException(SR.Arg_FldSetPropGet, nameof(bindingFlags)); 445throw new ArgumentException(SR.Arg_FldSetInvoke, nameof(bindingFlags)); 496throw new ArgumentException(SR.Arg_IndexMustBeInt); 519throw new ArgumentException(SR.Arg_FldGetArgErr, nameof(bindingFlags)); 526throw new ArgumentException(SR.Arg_FldSetArgErr, nameof(bindingFlags)); 548throw new ArgumentException(SR.Arg_PropSetGet, nameof(bindingFlags)); 557throw new ArgumentException(SR.Arg_PropSetInvoke, nameof(bindingFlags)); 739throw new ArgumentException( 754throw new ArgumentException( 822throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this)); 893throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this));
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
67throw new ArgumentException(SR.Arg_MustBeSByte);
src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.cs (1)
238throw new ArgumentException(SR.Argument_SearchValues_UnsupportedStringComparison, nameof(comparisonType));
src\libraries\System.Private.CoreLib\src\System\Security\SecurityElement.cs (11)
39throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, tag)); 49throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, tag)); 52throw new ArgumentException(SR.Format(SR.Argument_InvalidElementText, text)); 68throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, value)); 115throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, attrName)); 118throw new ArgumentException(SR.Format(SR.Argument_InvalidElementValue, attrValue)); 141throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, value)); 159throw new ArgumentException(SR.ArgumentNull_Child); 183throw new ArgumentException(SR.Argument_AttributeNamesMustBeUnique); 197throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, name)); 200throw new ArgumentException(SR.Format(SR.Argument_InvalidElementValue, value));
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
266return (value is null) ? 1 : throw new ArgumentException(SR.Arg_MustBeSingle);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (1)
448throw new ArgumentException(SR.Arg_MustBeNullTerminatedString);
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (5)
115throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart)); 121throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart)); 131throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart), assemblyNameException); 163throw new ArgumentException( 201throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSignature,
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (6)
261throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 514throw new ArgumentException(SR.Arg_MustBeString); 575throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 684throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 742throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 1153throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType));
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
1203_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)),
src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (3)
63_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)), 261_ => throw (value is null ? new ArgumentNullException(nameof(value)) : new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType))), 386_ => throw (value is null ? new ArgumentNullException(nameof(value)) : new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType))),
src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (3)
42_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)), 177throw new ArgumentException(SR.Argument_ImplementIComparable); 235throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (3)
40throw new ArgumentException( 257throw new ArgumentException(SR.Argument_ConversionOverflow); 299throw new ArgumentException(SR.Argument_ConversionOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\DecoderFallback.cs (8)
127throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 134throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 150throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 182throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 189throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 199throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 241throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 311throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\DecoderReplacementFallback.cs (1)
59throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(replacement));
src\libraries\System.Private.CoreLib\src\System\Text\Encoder.cs (3)
40throw new ArgumentException( 257throw new ArgumentException(SR.Argument_ConversionOverflow); 298throw new ArgumentException(SR.Argument_ConversionOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\EncoderFallback.cs (2)
285throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 357throw new ArgumentException(SR.Format(SR.Argument_RecursiveFallback, charRecursive), "chars");
src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (1)
242throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, Encoding.EncodingName, _fallbackBuffer.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\EncoderReplacementFallback.cs (1)
59throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(replacement));
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (5)
222throw new ArgumentException(SR.Format(SR.Argument_CodepageNotSupported, codepage), nameof(codepage)); 1098throw new ArgumentException( 1119throw new ArgumentException(SR.Argument_ConversionOverflow); 1126throw new ArgumentException( 1438throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty,
src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
99throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (1)
1530throw new ArgumentException();
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (3)
878throw new ArgumentException(SR.ArgumentOutOfRange_OffsetOut); 895throw new ArgumentException(SR.Arg_LongerThanSrcString); 2093throw new ArgumentException(SR.Arg_EmptySpan, nameof(oldValue));
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (4)
382throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 599throw new ArgumentException( 665throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 937throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (2)
375throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType().ToString() ?? string.Empty)); 510throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\UTF7Encoding.cs (1)
905throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
8880 => throw new ArgumentException(SR.CancellationToken_CreateLinkedToken_TokensIsEmpty),
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.cs (1)
71throw new ArgumentException(SR.Argument_InvalidFlag, nameof(mode));
src\libraries\System.Private.CoreLib\src\System\Threading\NamedWaitHandleOptions.cs (1)
140throw new ArgumentException(SR.Format(SR.NamedWaitHandles_IncompatibleNamePrefix, name), nameof(name));
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.cs (1)
84throw new ArgumentException(SR.Argument_SemaphoreInitialMaximum);
src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (1)
281throw new ArgumentException(SR.SpinLock_TryReliableEnter_ArgumentException);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (1)
327throw new ArgumentException(SR.Task_MustBeCompleted, nameof(completedTask));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (1)
329throw new ArgumentException(SR.Task_MustBeCompleted, nameof(completedTask));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (1)
199throw new ArgumentException(SR.TaskExceptionHolder_UnknownExceptionType, nameof(exceptionObject));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (5)
2349Task task = tasks[i] ?? throw new ArgumentException(SR.Task_MultiTaskContinuation_NullTask, nameof(tasks)); 2971throw new ArgumentException(SR.Task_MultiTaskContinuation_EmptyTaskList, nameof(tasks)); 2979throw new ArgumentException(SR.Task_MultiTaskContinuation_NullTask, nameof(tasks)); 2990throw new ArgumentException(SR.Task_MultiTaskContinuation_EmptyTaskList, nameof(tasks)); 2998throw new ArgumentException(SR.Task_MultiTaskContinuation_NullTask, nameof(tasks));
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Portable.cs (3)
46throw new ArgumentException(SR.Argument_PreAllocatedAlreadyAllocated, nameof(preAllocated)); 68throw new ArgumentException(SR.Argument_NativeOverlappedWrongBoundHandle, nameof(overlapped)); 94throw new ArgumentException(SR.Argument_NativeOverlappedAlreadyFree, nameof(overlapped), ex);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Unix.cs (1)
79throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle));
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
301throw new ArgumentException(SR.Argument_EmptyWaithandleArray, nameof(waitHandles));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (19)
83throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType)); 101throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 107throw new ArgumentException(SR.Argument_InvalidTimeSpanStyles, "styles"); 113throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, value, typeof(TEnum).Name), argumentName); 119throw new ArgumentException(SR.Argument_OverlapAlignmentMismatch); 137throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other"); 157throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer)); 284throw new ArgumentException(SR.Arg_CannotBeNaN); 290throw new ArgumentException(SR.Arg_CannotBeNaN, GetArgumentName(argument)); 309return new ArgumentException(SR.Format(SR.Argument_AddingDuplicateWithKey, key)); 341throw new ArgumentException(SR.Arg_HandleNotSync, paramName); 347throw new ArgumentException(SR.Arg_HandleNotAsync, paramName); 524throw new ArgumentException(SR.Argument_IncompatibleArrayType); 530throw new ArgumentException(SR.Arg_InvalidHandle, paramName); 715return new ArgumentException(SR.Argument_InvalidOffLen); 720return new ArgumentException(GetResourceString(resource)); 730return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 735return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value)); 750return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (2)
415throw new ArgumentException(SR.Arg_MustBeTimeOnly); 865case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style");
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
415throw new ArgumentException(SR.Arg_MustBeTimeSpan);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.AdjustmentRule.cs (7)
184throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecifiedOrUtc, nameof(dateStart)); 189throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecifiedOrUtc, nameof(dateEnd)); 194throw new ArgumentException(SR.Argument_TransitionTimesAreIdentical, nameof(daylightTransitionEnd)); 199throw new ArgumentException(SR.Argument_OutOfOrderDateTimes, nameof(dateStart)); 213throw new ArgumentException(SR.Argument_TimeSpanHasSeconds, nameof(daylightDelta)); 218throw new ArgumentException(SR.Argument_DateTimeHasTimeOfDay, nameof(dateStart)); 223throw new ArgumentException(SR.Argument_DateTimeHasTimeOfDay, nameof(dateEnd));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (8)
198throw new ArgumentException(SR.Argument_DateTimeOffsetIsNotAmbiguous, nameof(dateTimeOffset)); 213throw new ArgumentException(SR.Argument_DateTimeOffsetIsNotAmbiguous, nameof(dateTimeOffset)); 243throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime)); 272throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime)); 759throw new ArgumentException(SR.Argument_ConvertMismatch, nameof(sourceTimeZone)); 784throw new ArgumentException(SR.Argument_DateTimeIsInvalid, nameof(dateTime)); 870throw new ArgumentException(SR.Format(SR.Argument_InvalidSerializedString, source), nameof(source)); 2168throw new ArgumentException(SR.Argument_TimeSpanHasSeconds, nameof(baseUtcOffset));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.TransitionTime.cs (2)
75throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecified, nameof(timeOfDay)); 104throw new ArgumentException(SR.Argument_DateTimeHasTicks, nameof(timeOfDay));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (3)
1304throw new ArgumentException(SR.Argument_TimeZoneInfoInvalidTZif, nameof(data)); 1330throw new ArgumentException("bad data", nameof(data)); 1338throw new ArgumentException(SR.Argument_TimeZoneInfoBadTZif, nameof(data));
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (9)
154throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 274throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 399throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 534throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 679throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 834throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 999throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 1128throw new ArgumentException(SR.ArgumentException_TupleLastArgumentNotATuple); 1179throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
src\libraries\System.Private.CoreLib\src\System\Type.cs (6)
289new ArgumentException(SR.Format(SR.Arg_MemberInfoNotFound, member.Name), nameof(member)); 488throw new ArgumentException(SR.ArgumentNull_ArrayValue, nameof(args)); 611throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 615throw new ArgumentException(SR.Argument_InvalidEnum, "enumType"); 624throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 660throw new ArgumentException(SR.Format(SR.Arg_NotGenericTypeDefinition, genericTypeDefinition), nameof(genericTypeDefinition));
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (6)
25throw new ArgumentException(SR.Arg_MustBeEnum, nameof(value)); 34throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this)); 55throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType)); 71throw new ArgumentException(SR.Arg_MustBeEnum, nameof(value)); 76throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value)); 93throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (3)
23throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(flds)); 33RuntimeFieldInfo field = flds[i] as RuntimeFieldInfo ?? throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo); 36throw new ArgumentException(SR.Format(SR.Argument_TypedReferenceInvalidField, field.Name));
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
63throw new ArgumentException(SR.Arg_MustBeUInt128);
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
63throw new ArgumentException(SR.Arg_MustBeUInt16);
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
75throw new ArgumentException(SR.Arg_MustBeUInt32);
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
75throw new ArgumentException(SR.Arg_MustBeUInt64);
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
189throw new ArgumentException(SR.Arg_MustBeUIntPtr);
src\libraries\System.Private.CoreLib\src\System\UnitySerializationHolder.cs (1)
52throw new ArgumentException(SR.Format(SR.Argument_InvalidUnity, _data ?? "UnityType"));
src\libraries\System.Private.CoreLib\src\System\ValueTuple.cs (1)
1856throw new ArgumentException(SR.ArgumentException_ValueTupleLastArgumentNotAValueTuple);
src\libraries\System.Private.CoreLib\src\System\Version.cs (4)
123throw new ArgumentException(SR.Arg_MustBeVersion, nameof(version)); 222throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, "0", failureUpperBound), nameof(fieldCount)); 364if (throwOnFailure) throw new ArgumentException(SR.Arg_VersionString, nameof(input)); 381if (throwOnFailure) throw new ArgumentException(SR.Arg_VersionString, nameof(input));
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\AssemblyNameInfo.cs (1)
207: throw new ArgumentException(SR.InvalidAssemblyName, nameof(assemblyName));
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParser.cs (1)
199throw new ArgumentException(SR.Argument_AssemblyGetTypeCannotSpecifyAssembly);
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
359throw new ArgumentException(SR.Argument_InvalidTypeName, $"typeName@{errorIndex}");
src\System\Array.CoreCLR.cs (1)
271throw new ArgumentException(SR.Arg_PrimWiden);
src\System\Attribute.CoreCLR.cs (11)
456throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 495throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 543throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 546throw new ArgumentException(SR.Argument_InvalidParameterInfo, nameof(element)); 560throw new ArgumentException(SR.Argument_InvalidParameterInfo, nameof(element)); 582throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 599throw new ArgumentException(SR.Argument_InvalidParamInfo); 650throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 668throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 708throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 738throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
src\System\Collections\EmptyReadOnlyDictionaryInternal.cs (2)
41throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 46throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index));
src\System\Delegate.CoreCLR.cs (22)
51throw new ArgumentException(SR.Arg_DlgtTargMeth); 63throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target)); 65throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target)); 232throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 234throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 251throw new ArgumentException(SR.Arg_DlgtTargMeth); 267throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target)); 269throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 271throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target)); 274throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 287throw new ArgumentException(SR.Arg_DlgtTargMeth); 302throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 305throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method)); 308throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 325throw new ArgumentException(SR.Arg_DlgtTargMeth); 337throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 340throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method)); 343throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 357throw new ArgumentException(SR.Arg_DlgtTargMeth); 375throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 378throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 391throw new ArgumentException(SR.Arg_DlgtTargMeth);
src\System\GC.CoreCLR.cs (3)
216throw new ArgumentException(SR.Argument_AggressiveGCRequiresMaxGeneration, nameof(generation)); 220throw new ArgumentException(SR.Argument_AggressiveGCRequiresBlocking, nameof(blocking)); 224throw new ArgumentException(SR.Argument_AggressiveGCRequiresCompacting, nameof(compacting));
src\System\MulticastDelegate.CoreCLR.cs (2)
218throw new ArgumentException(SR.Arg_DlgtTypeMis); 546throw new ArgumentException(SR.Arg_DlgtNullInst);
src\System\Reflection\Assembly.CoreCLR.cs (1)
32throw new ArgumentException(SR.Format_StringZeroLength, nameof(partialName));
src\System\Reflection\Emit\CustomAttributeBuilder.cs (16)
68throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedProperties, propertyValues"); 70throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedFields, fieldValues"); 75throw new ArgumentException(SR.Argument_BadConstructor); 78throw new ArgumentException(SR.Argument_BadConstructorCallConv); 93throw new ArgumentException(SR.Argument_BadParameterCountsForConstructor); 98throw new ArgumentException(SR.Argument_BadTypeInCustomAttribute); 143throw new ArgumentException(SR.Argument_BadTypeInCustomAttribute); 147throw new ArgumentException(SR.Argument_NotAWritableProperty); 165throw new ArgumentException(SR.Argument_BadPropertyForConstructorBuilder); 199throw new ArgumentException(SR.Argument_BadTypeInCustomAttribute); 217throw new ArgumentException(SR.Argument_BadFieldForConstructorBuilder); 271throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 275throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, passedType), paramName); 420throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeForCA, value.GetType())); 493throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, ot)); 505throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, typename));
src\System\Reflection\Emit\DynamicILGenerator.cs (15)
40throw new ArgumentException(SR.Argument_MustBeRuntimeType); 65throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(meth)); 79throw new ArgumentException(SR.Argument_InvalidOpCodeOnDynamicMethod); 114throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(con)); 133RuntimeType rtType = type as RuntimeType ?? throw new ArgumentException(SR.Argument_MustBeRuntimeType); 145throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(field)); 252throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 255throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo)); 258throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo)); 347throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType); 360throw new ArgumentException(SR.Argument_MustBeRuntimeType); 409throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(methodInfo)); 476throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(parameterTypes))); 479throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(parameterTypes))); 1024throw new ArgumentException(SR.Format(SR.Argument_MethodDeclaringTypeGenericLcg, m, t));
src\System\Reflection\Emit\RuntimeAssemblyBuilder.cs (2)
45throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)access), nameof(access)); 185throw new ArgumentException(SR.Argument_InvalidName, nameof(name));
src\System\Reflection\Emit\RuntimeEnumBuilder.cs (1)
307throw new ArgumentException(SR.Argument_ShouldOnlySetVisibilityFlags, nameof(name));
src\System\Reflection\Emit\RuntimeFieldBuilder.cs (3)
24throw new ArgumentException(SR.Argument_IllegalName, nameof(fieldName)); 27throw new ArgumentException(SR.Argument_BadFieldType); 147throw new ArgumentException(SR.Argument_ConstantNull);
src\System\Reflection\Emit\RuntimeILGenerator.cs (11)
190throw new ArgumentException(SR.Argument_UnclosedExceptionBlock); 281throw new ArgumentException(SR.Argument_BadLabel); 285throw new ArgumentException(SR.Argument_BadLabelContent); 313throw new ArgumentException(SR.Argument_BadLabel); 610throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 831throw new ArgumentException(SR.Argument_UnmatchedMethodForLocal, nameof(local)); 1023throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType); 1129throw new ArgumentException(SR.Argument_InvalidLabel); 1134throw new ArgumentException(SR.Argument_RedefinedLabel); 1368throw new ArgumentException(SR.Argument_TooManyFinallyClause); 1549throw new ArgumentException(SR.Argument_UnmatchingSymScope);
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (2)
67throw new ArgumentException(SR.Argument_IllegalName, nameof(name)); 93throw new ArgumentException(SR.Arg_NoStaticVirtual);
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (6)
85throw new ArgumentException(SR.Argument_DuplicateTypeName); 256throw new ArgumentException(SR.Argument_InvalidConstructorInfo); 266throw new ArgumentException(SR.Argument_InvalidConstructorInfo); 784throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 814throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 1136throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\System\Reflection\Emit\RuntimePropertyBuilder.cs (1)
38throw new ArgumentException(SR.Argument_IllegalName, nameof(name));
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (21)
221throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 230throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 240throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 249throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 286throw new ArgumentException(SR.Format(SR.Argument_ConstantNotSupported, type)); 384throw new ArgumentException(SR.Argument_IllegalName, nameof(name)); 387throw new ArgumentException(SR.Argument_TypeNameTooLong, nameof(name)); 402throw new ArgumentException(SR.Argument_BadNestedTypeFlags, nameof(attr)); 475throw new ArgumentException(SR.Argument_BadSizeForData); 510throw new ArgumentException(SR.Argument_BadTypeAttrNestedVisibilityOnNonNestedType); 518throw new ArgumentException(SR.Argument_BadTypeAttrNonNestedVisibilityNestedType); 525throw new ArgumentException(SR.Argument_BadTypeAttrInvalidLayout); 531throw new ArgumentException(SR.Argument_BadTypeAttrReservedBitsSet); 997throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 1010throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 1074throw new ArgumentException(SR.ArgumentException_BadMethodImplBody); 1126throw new ArgumentException(SR.Argument_BadPInvokeMethod); 1129throw new ArgumentException(SR.Argument_BadPInvokeOnInterface); 1145throw new ArgumentException(SR.Argument_MethodRedefined); 1435throw new ArgumentException(SR.Argument_IllegalName, nameof(name)); 1678throw new ArgumentException(SR.Argument_CannotSetParentToInterface);
src\System\Reflection\Emit\SignatureHelper.cs (19)
102throw new ArgumentException(SR.Argument_UnknownUnmanagedCallConv, nameof(unmanagedCallConv)); 198throw new ArgumentException(SR.Argument_BadFieldSig); 227throw new ArgumentException(SR.NotSupported_MustBeModuleBuilder); 285throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers)); 288throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers)); 307throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers)); 310throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers)); 487throw new ArgumentException(SR.Argument_LargeInteger); 512throw new ArgumentException(SR.Argument_LargeInteger); 723throw new ArgumentException(SR.Argument_LargeInteger); 745throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(optionalCustomModifiers)); 748throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers)); 751throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers)); 768throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(requiredCustomModifiers)); 771throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers)); 774throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers)); 806throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(arguments))); 809throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(arguments))); 823throw new ArgumentException(SR.Argument_SigIsFinalized);
src\System\Reflection\FieldInfo.CoreCLR.cs (3)
11throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle)); 17throw new ArgumentException(SR.Format( 27throw new ArgumentException(SR.Argument_InvalidHandle);
src\System\Reflection\Metadata\MetadataUpdater.cs (1)
42throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
src\System\Reflection\MethodBase.CoreCLR.cs (3)
18throw new ArgumentException(SR.Argument_InvalidHandle); 24throw new ArgumentException(SR.Format( 34throw new ArgumentException(SR.Argument_InvalidHandle);
src\System\Reflection\RtFieldInfo.cs (2)
93throw new ArgumentException(SR.Arg_TypedReference_Null); 109throw new ArgumentException(SR.Arg_TypedReference_Null);
src\System\Reflection\RuntimeAssembly.cs (2)
334throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 344throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (2)
139throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 149throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeCustomAttributeData.cs (4)
179throw new ArgumentException(SR.Argument_InvalidKindOfTypeForCA, nameof(type)); 520_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)encodedType), nameof(encodedType)), 540_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, val.Byte8), nameof(val)) 556throw new ArgumentException(null, nameof(encodedArg));
src\System\Reflection\RuntimeEventInfo.cs (2)
99throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 109throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeFieldInfo.cs (2)
70throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 80throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (5)
182throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 192throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 384throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(delegateType)); 387throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(delegateType)); 390throw new ArgumentException(SR.Arg_DlgtTargMeth);
src\System\Reflection\RuntimeModule.cs (19)
39throw new ArgumentException(SR.Argument_InvalidGenericInstArray); 56throw new ArgumentException(SR.Format(SR.Argument_InvalidToken, tk, this), 82throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this), 90throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this), 125throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e); 153throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), nameof(metadataToken)); 183throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), 191throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), 214throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e); 226throw new ArgumentException(SR.Format(SR.Argument_ResolveModuleType, tk), nameof(metadataToken)); 229throw new ArgumentException(SR.Format(SR.Argument_ResolveType, tk, this), nameof(metadataToken)); 246throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e); 256throw new ArgumentException(SR.InvalidOperation_PropertyInfoNotAvailable); 259throw new ArgumentException(SR.InvalidOperation_EventInfoNotAvailable); 291throw new ArgumentException(SR.Format(SR.Argument_ResolveMember, tk, this), 300throw new ArgumentException( 308throw new ArgumentException(SR.Format(SR.Argument_ResolveString, metadataToken, this)); 363throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 373throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeParameterInfo.cs (2)
468throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 484throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimePropertyInfo.cs (4)
147throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 157throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 336RuntimeMethodInfo m = GetGetMethod(true) ?? throw new ArgumentException(SR.Arg_GetMethNotFnd); 356RuntimeMethodInfo m = GetSetMethod(true) ?? throw new ArgumentException(SR.Arg_SetMethNotFnd);
src\System\Reflection\TypeNameResolver.CoreCLR.cs (1)
95return throwOnError ? throw new ArgumentException(SR.Argument_AssemblyGetTypeCannotSpecifyAssembly) : null;
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (13)
24throw new ArgumentException(SR.Argument_InvalidHandle); 29throw new ArgumentException(SR.Argument_BadFieldForInitializeArray); 40throw new ArgumentException(SR.Argument_BadArrayForInitializeArray); 46throw new ArgumentException(SR.Argument_BadFieldForInitializeArray); 94throw new ArgumentException(SR.Argument_InvalidHandle); 99throw new ArgumentException(SR.Argument_BadFieldForInitializeArray); 106throw new ArgumentException(SR.Argument_BadArrayForInitializeArray); 112throw new ArgumentException(SR.Argument_BadFieldForInitializeArray); 172throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(type)); 191throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(module)); 207throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(method)); 480throw new ArgumentException(SR.Arg_MustBeType, nameof(type)); 586throw new ArgumentException(SR.Arg_TypeNotSupported);
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (10)
46throw new ArgumentException(SR.Format(SR.Argument_OffsetOfFieldNotFound, t.FullName), nameof(fieldName)); 50throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(fieldName)); 219throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(m)); 252throw new ArgumentException(SR.Argument_NeedNonGenericObject, nameof(structure)); 257throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure)); 282throw new ArgumentException(SR.Argument_StructMustNotBeValueClass, nameof(structure)); 287throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure)); 311throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structuretype)); 314throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structuretype)); 319throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structuretype));
src\System\RuntimeHandles.cs (3)
468throw new ArgumentException(SR.Arg_InvalidHandle); 473throw new ArgumentException(SR.Arg_ArgumentOutOfRangeException); 672throw new ArgumentException(SR.Arg_InvalidHandle);
src\System\RuntimeType.ActivatorCache.cs (1)
65case ArgumentException: throw new ArgumentException(friendlyMessage);
src\System\RuntimeType.BoxCache.cs (2)
43throw new ArgumentException(SR.Arg_TypeNotSupported); 50throw new ArgumentException(SR.Arg_TypeNotSupported);
src\System\RuntimeType.CoreCLR.cs (9)
1837throw new ArgumentException(SR.Format( 1865throw new ArgumentException(SR.Format( 1887throw new ArgumentException(SR.Format( 1962throw new ArgumentException(SR.Format( 2020throw new ArgumentException( 2718throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(interfaceType)); 2729throw new ArgumentException(SR.Argument_ArrayGetInterfaceMap); 3580throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(typeArguments)); 3835throw new ArgumentException(SR.Format(SR.Acc_CreateGenericEx, this));
src\System\StubHelpers.cs (5)
173throw new ArgumentException(SR.Interop_Marshal_Unmappable_Char); 698throw new ArgumentException(SR.Argument_WrongSizeArrayInNativeStruct); 947throw new ArgumentException(SR.Arg_NDirectBadObject); 1125throw new ArgumentException(SR.Arg_MarshalAsAnyRestriction); 1154throw new ArgumentException(SR.Arg_NDirectBadObject);
src\System\Threading\Monitor.CoreCLR.cs (1)
130throw new ArgumentException(SR.Argument_MustBeFalse, "lockTaken");
src\System\Threading\Mutex.CoreCLR.Unix.cs (2)
56throw new ArgumentException(SR.Argument_WaitHandleNameTooLong, nameof(name)); 95throw new ArgumentException(SR.Argument_WaitHandleNameTooLong, nameof(name));
System.Private.DataContractSerialization (58)
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
272throw new ArgumentException(SR.Format(SR.JsonTypeNotSupportedByDataContractJsonSerializer, traditionalDataContract.UnderlyingType), nameof(traditionalDataContract));
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (1)
35throw new ArgumentException(nameof(xmlWriter));
System\Runtime\Serialization\Json\XmlJsonWriter.cs (13)
511throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, _attributeText)); 661throw new ArgumentException(SR.JsonXmlProcessingInstructionNotSupported, nameof(name)); 676throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName)); 714throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns)); 719throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix)); 742throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns)); 748throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName)); 804throw new ArgumentException(SR.Format(SR.JsonUnexpectedAttributeLocalName, localName), nameof(localName)); 833throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName)); 839throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix)); 846throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns)); 1061throw new ArgumentException(SR.Format(SR.JsonOnlyWhitespace, ws[pos].ToString(), "WriteWhitespace"), nameof(ws)); 1432throw new ArgumentException(SR.JsonNestedArraysNotSupported, nameof(value));
System\Runtime\Serialization\SchemaImporter.cs (3)
66throw new ArgumentException(SR.Format(SR.CannotImportInvalidSchemas), ex); 75throw new ArgumentException(SR.Format(SR.CannotImportNullSchema)); 98throw new ArgumentException(SR.Format(SR.CannotImportNullDataContractName));
System\Runtime\Serialization\XmlObjectSerializerContext.cs (1)
199throw new ArgumentException(SR.Format(SR.NullKnownType, "knownTypes"));
System\Runtime\Serialization\XsdDataContractExporter.cs (5)
114throw new ArgumentException(SR.Format(SR.CannotExportNullAssembly, nameof(assemblies))); 146throw new ArgumentException(SR.Format(SR.CannotExportNullType, nameof(types))); 293throw new ArgumentException(SR.CannotExportNullKnownType); 317throw new ArgumentException(SR.Format(SR.CannotExportNullAssembly, nameof(assemblies))); 355throw new ArgumentException(SR.Format(SR.CannotExportNullType, nameof(types)));
System\Text\Base64Encoding.cs (4)
154throw new ArgumentException(SR.XmlArrayTooSmall, nameof(bytes)); 226throw new ArgumentException(SR.XmlArrayTooSmall, nameof(bytes)); 273throw new ArgumentException(SR.XmlArrayTooSmall, nameof(chars)); 358throw new ArgumentException(SR.XmlArrayTooSmall, nameof(chars));
System\Text\BinHexEncoding.cs (2)
39throw new ArgumentException(SR.XmlArrayTooSmall, nameof(bytes)); 78throw new ArgumentException(SR.XmlArrayTooSmall, nameof(chars));
System\Text\SurrogateChar.cs (3)
26throw new ArgumentException(SR.Format(SR.XmlInvalidSurrogate, ch.ToString("X", CultureInfo.InvariantCulture)), nameof(ch)); 37throw new ArgumentException(SR.Format(SR.XmlInvalidLowSurrogate, ((int)lowChar).ToString("X", CultureInfo.InvariantCulture)), nameof(lowChar)); 40throw new ArgumentException(SR.Format(SR.XmlInvalidHighSurrogate, ((int)highChar).ToString("X", CultureInfo.InvariantCulture)), nameof(highChar));
System\Xml\UniqueId.cs (1)
73throw new ArgumentException(SR.Format(SR.XmlArrayTooSmallInput, guidLength), nameof(guid));
System\Xml\XmlBaseWriter.cs (23)
231throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xml", xmlNamespace, ns), nameof(ns)); 239throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns)); 253throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix)); 260throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix)); 272throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xmlns", ns)); 274throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xml", ns)); 334throw new ArgumentException(SR.Format(SR.XmlInvalidXmlSpace, _attributeValue)); 398throw new ArgumentException(SR.Format(SR.XmlInvalidXmlSpace, _attributeValue)); 442throw new ArgumentException(SR.XmlInvalidCommentChars, nameof(text)); 499throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName)); 513throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix)); 563throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix)); 819throw new ArgumentException(SR.Format(SR.XmlNamespaceNotFound, namespaceUri), nameof(namespaceUri)); 847throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName)); 891throw new ArgumentException(SR.XmlProcessingInstructionNotSupported, nameof(name)); 967throw new ArgumentException(SR.XmlOnlyWhitespace, nameof(whitespace)); 1106throw new ArgumentException(SR.XmlMissingLowSurrogate, nameof(ch)); 1227throw new ArgumentException(SR.XmlNestedArraysNotSupported, nameof(value)); 2150throw new ArgumentException(SR.XmlReservedPrefix, nameof(prefix)); 2163throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, prefix, nameSpace.Uri, uri), nameof(prefix)); 2167throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix)); 2169throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xmlns", uri)); 2172throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xml", uri));
System\Xml\XmlCanonicalWriter.cs (1)
98throw new ArgumentException(SR.InvalidInclusivePrefixListCollection);
System.Private.Uri (7)
System\Uri.cs (3)
468throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "RelativeUri"), nameof(serializationInfo)); 1372throw new ArgumentException(SR.Format(SR.Argument_InvalidUriSubcomponent, part), nameof(part)); 1512throw new ArgumentException(null, nameof(digit));
System\UriBuilder.cs (2)
92throw new ArgumentException(SR.Argument_ExtraNotValid, nameof(extraValue)); 127throw new ArgumentException(SR.net_uri_BadScheme, nameof(value));
System\UriExt.cs (2)
26throw new ArgumentException(SR.Format(SR.net_uri_InvalidUriKind, uriKind)); 758throw new ArgumentException(SR.Format(SR.net_uri_InvalidUriKind, uriKind));
System.Private.Windows.Core (41)
System\IO\BinaryReaderExtensions.cs (2)
99throw new ArgumentException($"Cannot read primitives of {typeof(T).Name}.", nameof(T)); 228throw new ArgumentException($"Cannot write primitives of {typeof(T).Name}.", nameof(T));
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (2)
310throw new ArgumentException($"{nameof(primitive)} is not primitive."); 593throw new ArgumentException("Hashtable has custom Comparer or HashCodeProvider.", nameof(hashtable));
System\Private\Windows\BinaryFormat\Serializer\ArrayRecord.cs (1)
66throw new ArgumentException($"{nameof(arrayInfo)} doesn't match count of {nameof(arrayObjects)}");
System\Private\Windows\BinaryFormat\Serializer\ClassRecord.cs (1)
95throw new ArgumentException("Invalid binary type.", nameof(memberTypeInfo));
System\Private\Windows\BinaryFormat\Serializer\MemberPrimitiveTyped.cs (1)
36throw new ArgumentException($"{nameof(value)} is not primitive.");
System\Private\Windows\BinaryFormat\Serializer\Record.cs (2)
76throw new ArgumentException("Invalid primitive type.", nameof(primitiveType)); 113throw new ArgumentException("Invalid record.", nameof(objects));
System\Private\Windows\Ole\DataObjectCore.cs (2)
24throw new ArgumentException(SR.ClipboardOrDragDrop_CannotJsonSerializePredefinedFormat, nameof(format)); 29throw new ArgumentException(SR.ClipboardOrDragDrop_CannotJsonSerializeDataObject, nameof(data));
System\Private\Windows\Ole\DataObjectExtensions.cs (2)
14throw new ArgumentException(SR.CollectionEmptyException); 26throw new ArgumentException(string.Format(SR.Clipboard_InvalidPath, path ?? "<null>", nameof(filePaths)));
System\SpanReader.cs (2)
135throw new ArgumentException($"The size of {nameof(TValue)} must be evenly divisible by the size of {nameof(T)}."); 169throw new ArgumentException($"The size of {nameof(TValue)} must be evenly divisible by the size of {nameof(T)}.");
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (7)
28return new ArgumentException(SR.GdiplusInvalidParameter); 57return new ArgumentException(SR.GdiplusUnknownImageFormat); 59return new ArgumentException(SR.GdiplusPropertyNotFoundError); 61return new ArgumentException(SR.GdiplusPropertyNotSupportedError); 65return new ArgumentException(string.Format(SR.GdiplusFontFamilyNotFound, "?")); 69return new ArgumentException(string.Format(SR.GdiplusFontStyleNotFound, "?", "?")); 73return new ArgumentException(SR.GdiplusNotTrueTypeFont_NoName);
Windows\Win32\System\Com\SafeArrayScope.cs (9)
43throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 50throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 57throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 64throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 69throw new ArgumentException("Use ComSafeArrayScope instead"); 75throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 83throw new ArgumentException("Unknown type"); 107throw new ArgumentException("Use ComSafeArrayScope instead"); 118throw new ArgumentException("Unknown type");
Windows\Win32\System\Variant\VARIANT.cs (10)
89throw new ArgumentException("Invalid Variant"); 215throw new ArgumentException("Specified OLE variant is invalid."); 226throw new ArgumentException("Record marshalling doesn't actually work in .NET Core. Matching that behaviour."); 230throw new ArgumentException(string.Format(SR.COM2UnhandledVT, type)); 241throw new ArgumentException("The specified record cannot be mapped to a managed value class."); 259throw new ArgumentException(string.Format(SR.COM2UnhandledVT, arrayType)); 412throw new ArgumentException(string.Format(SR.COM2UnhandledVT, vt)); 617throw new ArgumentException(string.Format(SR.COM2UnhandledVT, arrayType)); 668_ => throw new ArgumentException(string.Format(SR.COM2UnhandledVT, vt)), 863throw new ArgumentException(string.Format(SR.COM2UnhandledVT, vt));
System.Private.Windows.Core.Tests (2)
System\Private\Windows\Ole\BinaryFormatUtilitiesTests.cs (2)
200NotSupportedException value = new("Error message", new ArgumentException()); 208NotSupportedException value = new("Error message", new ArgumentException());
System.Private.Windows.Core.TestUtilities (2)
TestAccessor.cs (1)
77modifiers: null) ?? throw new ArgumentException($"Could not find non public method {methodName}.");
TestAccessors.cs (1)
61?? throw new ArgumentException("Cannot create TestAccessor for Nullable<T> instances with no value.");
System.Private.Xml (180)
System\Xml\Core\XmlCharCheckingWriter.cs (5)
229throw new ArgumentException(SR.Format(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(ws, i))); 339throw new ArgumentException(SR.Xml_EmptyName); 344throw new ArgumentException(SR.Format(len == 0 ? SR.Xml_BadStartNameChar : SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(ncname, len))); 352throw new ArgumentException(SR.Xml_EmptyName); 360throw new ArgumentException(string.Format(res, XmlException.BuildCharExceptionArgs(name, len)));
System\Xml\Core\XmlCharCheckingWriterAsync.cs (1)
175throw new ArgumentException(SR.Format(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(ws, i)));
System\Xml\Core\XmlEncodedRawTextWriter.cs (3)
1629throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 1852throw new ArgumentException(SR.Format(SR.Xml_IndentCharsNotWhitespace, propertyName)); 1899throw new ArgumentException(SR.Format(SR.Xml_InvalidCharsInIndent, new string[] { propertyName, error }));
System\Xml\Core\XmlReader.cs (1)
1720throw new ArgumentException(SR.XmlBinary_NoParserContext, nameof(inputContext));
System\Xml\Core\XmlTextEncoder.cs (3)
199throw new ArgumentException(SR.Xml_SurrogatePairSplit); 420throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 459throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar);
System\Xml\Core\XmlTextReaderImpl.cs (1)
8155throw new ArgumentException((_incReadDecoder is IncrementalReadCharsDecoder) ? nameof(count) : "len");
System\Xml\Core\XmlTextWriter.cs (22)
390throw new ArgumentException(SR.Xml_InvalidQuote); 422throw new ArgumentException(SR.Xml_ClosedOrError); 426throw new ArgumentException(SR.Xml_NoRoot); 500throw new ArgumentException(SR.Xml_UndefPrefix); 544throw new ArgumentException(SR.Xml_NoNamespaces); 610throw new ArgumentException(SR.Xml_XmlnsBelongsToReservedNs); 631throw new ArgumentException(SR.Xml_XmlnsBelongsToReservedNs); 644throw new ArgumentException(SR.Xml_UndefPrefix); 684throw new ArgumentException(SR.Xml_NoNamespaces); 738throw new ArgumentException(SR.Xml_InvalidCDataChars); 764throw new ArgumentException(SR.Xml_InvalidCommentChars); 788throw new ArgumentException(SR.Xml_InvalidPiChars); 793throw new ArgumentException(SR.Xml_DupXmlDecl); 849throw new ArgumentException(SR.Xml_NonWhitespace); 1068throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns)); 1084throw new ArgumentException(SR.Xml_NoNamespaces); 1153throw new ArgumentException(SR.Format(SR.Xml_InvalidNameChars, name)); 1463throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace); 1491throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 1738throw new ArgumentException(SR.Format(SR.Xml_InvalidNameChars, name)); 1760throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value)); 1777throw new ArgumentException(SR.Xml_InvalidPrefix);
System\Xml\Core\XmlUtf8RawTextWriter.cs (3)
1456throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 1714throw new ArgumentException(SR.Format(SR.Xml_IndentCharsNotWhitespace, propertyName)); 1761throw new ArgumentException(SR.Format(SR.Xml_InvalidCharsInIndent, new string[] { propertyName, error }));
System\Xml\Core\XmlValidatingReaderImpl.cs (2)
141throw new ArgumentException(SR.Arg_ExpectingXmlTextReader, nameof(reader)); 221throw new ArgumentException(SR.Arg_ExpectingXmlTextReader, nameof(reader));
System\Xml\Core\XmlWellFormedWriter.cs (23)
345throw new ArgumentException(SR.Xml_NoRoot); 393throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid)); 400throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid)); 407throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset)); 448throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 613throw new ArgumentException(SR.Xml_EmptyLocalName); 648throw new ArgumentException(SR.Xml_XmlnsPrefix); 671throw new ArgumentException(SR.Xml_XmlnsPrefix); 681throw new ArgumentException(SR.Xml_XmlPrefix); 778throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 782throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace); 825throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value)); 900throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? SR.Xml_DupXmlDecl : SR.Xml_CannotWriteXmlDecl); 960throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 1013throw new ArgumentException(SR.Xml_NonWhitespace); 1294throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns)); 1616throw new ArgumentException(SR.Xml_XmlPrefix); 1626throw new ArgumentException(SR.Xml_XmlnsPrefix); 1643throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix)); 1727throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix)); 1735throw new ArgumentException(SR.Xml_XmlPrefix); 1740throw new ArgumentException(SR.Xml_XmlnsPrefix); 2067return new ArgumentException(SR.Format(SR.Xml_InvalidNameCharsDetail, args));
System\Xml\Core\XmlWellFormedWriterAsync.cs (16)
45throw new ArgumentException(SR.Xml_NoRoot); 94throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid)); 101throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid)); 108throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset)); 221throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 453throw new ArgumentException(SR.Xml_EmptyLocalName); 506throw new ArgumentException(SR.Xml_XmlnsPrefix); 529throw new ArgumentException(SR.Xml_XmlnsPrefix); 539throw new ArgumentException(SR.Xml_XmlPrefix); 683throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 687throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace); 729throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value)); 801throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? SR.Xml_DupXmlDecl : SR.Xml_CannotWriteXmlDecl); 861throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 915throw new ArgumentException(SR.Xml_NonWhitespace); 1145throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Core\XmlWriter.cs (1)
234throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Core\XmlWriterAsync.cs (1)
220throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Dom\DocumentXPathNavigator.cs (1)
1257throw new ArgumentException(SR.Format(SR.XPathDocument_SchemaSetNotAllowed, null));
System\Xml\Dom\XmlAttribute.cs (1)
30throw new ArgumentException(SR.Xdom_Attr_Name);
System\Xml\Dom\XmlAttributeCollection.cs (7)
121throw new ArgumentException(SR.Xdom_AttrCol_Object); 140throw new ArgumentException(SR.Xdom_NamedNode_Context); 159throw new ArgumentException(SR.Xdom_NamedNode_Context); 185throw new ArgumentException(SR.Xdom_AttrCol_Insert); 188throw new ArgumentException(SR.Xdom_NamedNode_Context); 214throw new ArgumentException(SR.Xdom_AttrCol_Insert); 217throw new ArgumentException(SR.Xdom_NamedNode_Context);
System\Xml\Dom\XmlDeclaration.cs (4)
24throw new ArgumentException(SR.Xdom_Version); 27throw new ArgumentException(SR.Format(SR.Xdom_standalone, standalone)); 65throw new ArgumentException(SR.Format(SR.Xdom_standalone, value)); 116throw new ArgumentException(SR.Xdom_Version);
System\Xml\Dom\XmlDocument.cs (4)
246throw new ArgumentException(SR.Format(SR.Xdom_Attr_Reserved_XmlNS, namespaceURI)); 1161throw new ArgumentException(SR.Format(SR.Arg_CannotCreateNode, type)); 1256throw new ArgumentException(SR.Format(SR.Xdom_Invalid_NT_String, nodeTypeString)); 1496throw new ArgumentException(SR.Format(SR.XmlDocument_NodeNotFromDocument, nameof(nodeToValidate)));
System\Xml\Dom\XmlDocumentFragment.cs (1)
51throw new ArgumentException(SR.Xdom_Node_Null_Doc);
System\Xml\Dom\XmlElement.cs (1)
31throw new ArgumentException(SR.Xdom_Empty_LocalName);
System\Xml\Dom\XmlEntityReference.cs (1)
41throw new ArgumentException(SR.Xdom_InvalidCharacter_EntityReference);
System\Xml\Dom\XmlLoader.cs (4)
37throw new ArgumentException(SR.Xdom_Load_NoDocument); 39throw new ArgumentException(SR.Xdom_Load_NoReader); 75throw new ArgumentException(SR.Xdom_Load_NoDocument); 77throw new ArgumentException(SR.Xdom_Load_NoReader);
System\Xml\Dom\XmlNode.cs (10)
30throw new ArgumentException(SR.Xdom_Node_Null_Doc); 251throw new ArgumentException(SR.Xdom_Node_Insert_Child); 260throw new ArgumentException(SR.Xdom_Node_Insert_Path); 268throw new ArgumentException(SR.Xdom_Node_Insert_Context); 365throw new ArgumentException(SR.Xdom_Node_Insert_Child); 374throw new ArgumentException(SR.Xdom_Node_Insert_Path); 382throw new ArgumentException(SR.Xdom_Node_Insert_Context); 494throw new ArgumentException(SR.Xdom_Node_Remove_Child); 587throw new ArgumentException(SR.Xdom_Node_Insert_Child); 593throw new ArgumentException(SR.Xdom_Node_Insert_Context);
System\Xml\Dom\XmlSignificantWhiteSpace.cs (2)
15throw new ArgumentException(SR.Xdom_WS_Char); 88throw new ArgumentException(SR.Xdom_WS_Char);
System\Xml\Dom\XmlWhitespace.cs (2)
16throw new ArgumentException(SR.Xdom_WS_Char); 81throw new ArgumentException(SR.Xdom_WS_Char);
System\Xml\Schema\XmlSchemaSet.cs (1)
586throw new ArgumentException(SR.Sch_SchemaDoesNotExist, nameof(schema));
System\Xml\Schema\XmlSchemaValidator.cs (1)
382throw new ArgumentException(SR.Sch_InvalidPartialValidationType);
System\Xml\Serialization\CodeIdentifier.cs (3)
111if (!IsValid(c)) throw new ArgumentException(SR.Format(SR.XmlInternalErrorDetails, "Invalid identifier character " + ((short)c).ToString(CultureInfo.InvariantCulture)), nameof(c)); 162throw new ArgumentException(SR.Format(SR.XmlInternalErrorDetails, "Unhandled category " + uc), nameof(c)); 173throw new ArgumentException(SR.Format(SR.XmlInvalidIdentifier, ident), nameof(ident));
System\Xml\Serialization\CodeIdentifiers.cs (1)
27throw new ArgumentException(null, nameof(obj));
System\Xml\Serialization\Mappings.cs (1)
120throw new ArgumentException(SR.Format(SR.Xml_InvalidNameChars, name), nameof(name));
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (2)
62throw new ArgumentException(SR.Format(SR.XmlInternalError, "xmlMapping")); 74throw new ArgumentException(SR.Format(SR.XmlInternalError, "xmlMapping"));
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (2)
27throw new ArgumentException(SR.Format(SR.XmlInternalError, nameof(xmlMapping))); 36throw new ArgumentException(SR.Format(SR.XmlInternalError, nameof(xmlMapping)));
System\Xml\Serialization\XmlAnyElementAttribute.cs (1)
78throw new ArgumentException(SR.XmlDisallowNegativeValues, "Order");
System\Xml\Serialization\XmlArrayAttribute.cs (1)
83throw new ArgumentException(SR.XmlDisallowNegativeValues, "Order");
System\Xml\Serialization\XmlElementAttribute.cs (1)
136throw new ArgumentException(SR.XmlDisallowNegativeValues, "Order");
System\Xml\Serialization\XmlReflectionImporter.cs (4)
303throw new ArgumentException(SR.XmlInternalError, nameof(mapping)); 496throw new ArgumentException(SR.Format(SR.XmlGetSchemaMethodName, provider.MethodName), nameof(provider.MethodName)); 620_ => throw new ArgumentException(SR.XmlInternalError, nameof(context)), 1159throw new ArgumentException(SR.XmlInternalError, nameof(context));
System\Xml\Serialization\XmlSchemaExporter.cs (3)
364throw new ArgumentException(SR.XmlInternalError, nameof(mapping)); 395throw new ArgumentException(SR.XmlInternalError, nameof(mapping)); 537throw new ArgumentException(SR.XmlInternalError, nameof(mapping));
System\Xml\Serialization\XmlSchemaImporter.cs (1)
474throw new ArgumentException(SR.XmlInternalError, nameof(desiredMappingType));
System\Xml\Serialization\XmlSerializationReader.cs (11)
972throw new ArgumentException(SR.Format(SR.XmlEmptyArrayType, CurrentTag()), nameof(value)); 985throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value)); 993throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value)); 998throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value)); 1006throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, new string(lengthStringSpan)), nameof(value)); 1020throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value)); 1022throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value)); 1024throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value)); 1074throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, dimensions[i]), "value"); 2332throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 2338throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (2)
270throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 276throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializationWriter.cs (2)
2319throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 2325throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
77throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 83throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializer.cs (1)
696throw new ArgumentException(SR.Format(SR.XmlPregenOrphanType, type.FullName, nameOrLocation), nameof(types));
System\Xml\ValidateNames.cs (1)
609throw new ArgumentException(SR.Format(SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(':', '\0')), nameof(name));
System\Xml\XmlConvert.cs (6)
722throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption))); 1233throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption))); 1534return new ArgumentException(res); 1551return new ArgumentException(string.Format(res, arg)); 1568return new ArgumentException(string.Format(res, args)); 1784throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption)));
System\Xml\XmlEncoding.cs (5)
32throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, -1), (string?)null); 524throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null); 565throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null); 607throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null); 649throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
System\Xml\XmlNamespacemanager.cs (2)
133throw new ArgumentException(SR.Xml_XmlPrefix); 137throw new ArgumentException(SR.Xml_XmlnsPrefix);
System\Xml\XPath\XPathNavigator.cs (1)
2031throw new ArgumentException(SR.Xml_InvalidOperation, nameof(reader));
System\Xml\Xsl\ListBase.cs (3)
137throw new ArgumentException(SR.Arg_IncompatibleParamType, nameof(value)); 146throw new ArgumentException(SR.Arg_IncompatibleParamType, nameof(value)); 176throw new ArgumentException(SR.Arg_IncompatibleParamType, nameof(value));
System\Xml\Xslt\XslCompiledTransform.cs (2)
192throw new ArgumentException(SR.Format(SR.Xslt_IncompatibleCompiledStylesheetVersion, generatedCodeAttr.Version, s_version), nameof(compiledStylesheet)); 219throw new ArgumentException(SR.Format(SR.Xslt_NotCompiledStylesheet, compiledStylesheet.FullName), nameof(compiledStylesheet));
System.Private.Xml.Linq (26)
System\Xml\Linq\XAttribute.cs (7)
710throw new ArgumentException(SR.Format(SR.Argument_NamespaceDeclarationPrefixed, name.LocalName)); 716if (name.LocalName != "xml") throw new ArgumentException(SR.Argument_NamespaceDeclarationXml); 722throw new ArgumentException(SR.Argument_NamespaceDeclarationXmlns); 731throw new ArgumentException(SR.Argument_NamespaceDeclarationXml); 736throw new ArgumentException(SR.Argument_NamespaceDeclarationXmlns); 746throw new ArgumentException(SR.Argument_NamespaceDeclarationXml); 752throw new ArgumentException(SR.Argument_NamespaceDeclarationXmlns);
System\Xml\Linq\XContainer.cs (2)
823XObject => throw new ArgumentException(SR.Argument_XObjectValue), 827if (s == null) throw new ArgumentException(SR.Argument_ConvertToString);
System\Xml\Linq\XDocument.cs (5)
857throw new ArgumentException(SR.Argument_AddAttribute); 862throw new ArgumentException(SR.Argument_AddAttribute); 910throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.CDATA)); 912throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.Document)); 940throw new ArgumentException(SR.Argument_AddNonWhitespace);
System\Xml\Linq\XElement.cs (2)
2125if (node is XDocument) throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.Document)); 2126if (node is XDocumentType) throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.DocumentType));
System\Xml\Linq\XLinq.cs (1)
110if (content is XAttribute) throw new ArgumentException(SR.Argument_AddAttribute);
System\Xml\Linq\XName.cs (1)
78if (i <= 1 || i == expandedName.Length - 1) throw new ArgumentException(SR.Format(SR.Argument_InvalidExpandedName, expandedName));
System\Xml\Linq\XNodeDocumentOrderComparer.cs (2)
55if (n1 == null && x != null) throw new ArgumentException(SR.Format(SR.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(x)); 57if (n2 == null && y != null) throw new ArgumentException(SR.Format(SR.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(y));
System\Xml\Linq\XNodeEqualityComparer.cs (3)
79if (n1 == null && x != null) throw new ArgumentException(SR.Format(SR.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(x)); 81if (n2 == null && y != null) throw new ArgumentException(SR.Format(SR.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(y)); 98if (n == null && obj != null) throw new ArgumentException(SR.Format(SR.Argument_MustBeDerivedFrom, typeof(XNode)), nameof(obj));
System\Xml\Linq\XProcessingInstruction.cs (1)
162if (string.Equals(name, "xml", StringComparison.OrdinalIgnoreCase)) throw new ArgumentException(SR.Format(SR.Argument_InvalidPIName, name));
System\Xml\XPath\XNodeNavigator.cs (2)
927if (node is XDocumentType) throw new ArgumentException(SR.Format(SR.Argument_CreateNavigator, XmlNodeType.DocumentType)); 931if (text.GetParent() is XDocument) throw new ArgumentException(SR.Format(SR.Argument_CreateNavigator, XmlNodeType.Whitespace));
System.Reflection.Context (7)
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (3)
23throw new ArgumentException("", nameof(name)); 106throw new ArgumentException(SR.Argument_GetMethNotFnd); 115throw new ArgumentException(SR.Argument_GetMethNotFnd);
System\Reflection\Context\Virtual\VirtualPropertyInfo.cs (2)
29throw new ArgumentException(SR.ArgumentNull_GetterOrSetterMustBeSpecified); 33throw new ArgumentException(SR.Argument_PropertyTypeFromDifferentContext);
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertyGetter.cs (1)
35throw new ArgumentException();
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertySetter.cs (1)
50throw new ArgumentException(SR.Format(SR.Argument_ObjectArgumentMismatch, value.GetType(), ReturnType));
System.Reflection.DispatchProxy (5)
System\Reflection\DispatchProxy.cs (1)
65throw new ArgumentException(SR.Format(SR.ProxyType_Must_Be_Derived_From_DispatchProxy, proxyType.Name), nameof(proxyType));
System\Reflection\DispatchProxyGenerator.cs (4)
178throw new ArgumentException(SR.Format(SR.InterfaceType_Must_Be_Interface, interfaceType.FullName), interfaceParameter); 184throw new ArgumentException(SR.Format(SR.BaseType_Cannot_Be_Sealed, baseType.FullName), proxyParameter); 190throw new ArgumentException(SR.Format(SR.BaseType_Cannot_Be_Abstract, baseType.FullName), proxyParameter); 196throw new ArgumentException(SR.Format(SR.BaseType_Must_Have_Default_Ctor, baseType.FullName), proxyParameter);
System.Reflection.Emit (44)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (5)
76throw new ArgumentException(SR.Argument_BadSigFormat); 137throw new ArgumentException(SR.Argument_BadSigFormat); 167throw new ArgumentException(SR.Argument_BadSigFormat); 185throw new ArgumentException(SR.Argument_BadSigFormat); 301throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\Emit\CustomAttributeWrapper.cs (4)
44throw new ArgumentException(SR.Format(SR.Argument_InvalidCustomAttributeLength, ctor.DeclaringType, binaryAttribute.Length), nameof(binaryAttribute)); 48throw new ArgumentException(SR.Format(SR.Argument_InvalidProlog, ctor.DeclaringType), nameof(binaryAttribute)); 88throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, ctor.DeclaringType, namedType), nameof(binaryAttribute)); 174_ => throw new ArgumentException(SR.Argument_InvalidTypeCodeForTypeArgument, "binaryAttribute"),
System\Reflection\Emit\EnumBuilderImpl.cs (1)
17throw new ArgumentException(SR.Argument_ShouldOnlySetVisibilityFlags, nameof(name));
System\Reflection\Emit\ILGeneratorImpl.cs (9)
99throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType); 427throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 518throw new ArgumentException(SR.Argument_InvalidLabel); 528throw new ArgumentException(SR.Argument_MustBeSwitchOpCode, nameof(opcode)); 548throw new ArgumentException(SR.Argument_UnmatchedMethodForLocal, nameof(local)); 627throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 790throw new ArgumentException(SR.Argument_RedefinedLabel); 823throw new ArgumentException(SR.Argument_InvalidLabel); 843throw new ArgumentException(SR.InvalidOperation_InvalidDocument, nameof(document));
System\Reflection\Emit\MethodBuilderImpl.cs (1)
54throw new ArgumentException(SR.Argument_NoStaticVirtual);
System\Reflection\Emit\ModuleBuilderImpl.cs (3)
1266throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 1295throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 1329throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\Emit\PseudoCustomAttributesData.cs (8)
34throw new ArgumentException(SR.Argument_DllNameCannotBeEmpty); 100throw new ArgumentException(SR.Argument_DllNameCannotBeEmpty); 346throw new ArgumentException(SR.Argument_InvalidArgumentForAttribute, nameof(con)); 372throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType, paramNames[i], "ByValTStr"), "binaryAttribute"); 380throw new ArgumentException(SR.Argument_SizeConstMustBeSpecified, "binaryAttribute"); 406throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType, paramNames[i], "SafeArray"), "binaryAttribute"); 422throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType, elementType, "SafeArray"), "binaryAttribute"); 459throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType,
System\Reflection\Emit\TypeBuilderImpl.cs (13)
282throw new ArgumentException(SR.Argument_BadSizeForData, nameof(data.Length)); 309throw new ArgumentException(SR.ArgumentException_BadMethodImplBody); 318throw new ArgumentException(SR.Format(SR.Argument_MethodOverridden, methodInfoBody.Name, FullName), nameof(methodInfoDeclaration)); 359new ArgumentException(SR.Format(SR.Argument_InvalidMethodOverride, FullName, methodName), "methodInfoBody"); 374throw new ArgumentException(SR.Argument_BadPInvokeMethod); 379throw new ArgumentException(SR.Argument_BadPInvokeOnInterface); 391throw new ArgumentException(SR.Argument_MethodRedefined); 421throw new ArgumentException(SR.Argument_BadSizeForData, nameof(size)); 541throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, con.DeclaringType, name), nameof(binaryAttribute)); 556throw new ArgumentException(SR.Argument_CannotSetParentToInterface); 622throw new ArgumentException(SR.Argument_MustBeEnum); 1310throw new ArgumentException(SR.Argument_MustBeInterface, nameof(interfaceType)); 1315throw new ArgumentException(SR.Argument_InterfaceNotFound, nameof(interfaceType));
System.Reflection.Metadata (39)
src\libraries\Common\src\System\Reflection\AssemblyNameFormatter.cs (1)
72throw new ArgumentException();
System\Reflection\Internal\Utilities\StreamExtensions.cs (1)
94throw new ArgumentException(SR.StreamTooLarge, streamParameterName);
System\Reflection\Metadata\AssemblyNameInfo.cs (1)
207: throw new ArgumentException(SR.InvalidAssemblyName, nameof(assemblyName));
System\Reflection\Metadata\BlobContentId.cs (2)
51throw new ArgumentException(SR.Format(SR.UnexpectedArrayLength, Size), nameof(id)); 90throw new ArgumentException(SR.Format(SR.HashTooShort, minHashSize), nameof(hashCode));
System\Reflection\Metadata\BlobWriterImpl.cs (2)
216throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, type)); 289throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, type));
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (1)
1096throw new ArgumentException(SR.InvalidSignature, nameof(attributes));
System\Reflection\Metadata\Ecma335\Encoding\MethodBodyStreamEncoder.cs (1)
23throw new ArgumentException(SR.BuilderMustAligned, nameof(builder));
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (7)
63throw new ArgumentException(SR.BaseReaderMustBeFullMetadataReader, nameof(baseReader)); 73throw new ArgumentException(SR.Format(SR.ExpectedListOfSize, MetadataTokens.TableCount), nameof(baseTableRowCounts)); 83throw new ArgumentException(SR.Format(SR.ExpectedListOfSize, MetadataTokens.HeapCount), nameof(baseTableRowCounts)); 89throw new ArgumentException(SR.ExpectedNonEmptyList, nameof(deltaReaders)); 96throw new ArgumentException(SR.ReadersMustBeDeltaReaders, nameof(deltaReaders)); 287throw new ArgumentException(SR.HandleBelongsToFutureGeneration, nameof(handle)); 320throw new ArgumentException(SR.HandleBelongsToFutureGeneration, nameof(handle));
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
109throw new ArgumentException(SR.Format(SR.ValueMustBeMultiple, BlobUtilities.SizeOfGuid), nameof(guidHeapStartOffset));
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (2)
78throw new ArgumentException(SR.Format(SR.ExpectedArrayOfSize, MetadataTokens.TableCount), nameof(typeSystemRowCounts)); 95throw new ArgumentException(SR.Format(SR.RowCountMustBeZero, i), nameof(typeSystemRowCounts));
System\Reflection\Metadata\IL\ILOpCodeExtensions.cs (3)
92throw new ArgumentException(SR.Format(SR.UnexpectedOpCode, opCode), nameof(opCode)); 164throw new ArgumentException(SR.Format(SR.UnexpectedOpCode, opCode), nameof(opCode)); 236throw new ArgumentException(SR.Format(SR.UnexpectedOpCode, opCode), nameof(opCode));
System\Reflection\Metadata\Internal\MetadataWriterUtilities.cs (1)
89throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, value.GetType()), nameof(value));
System\Reflection\Metadata\MetadataReaderProvider.cs (1)
172throw new ArgumentException(SR.StreamMustSupportReadAndSeek, nameof(stream));
System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
359throw new ArgumentException(SR.Argument_InvalidTypeName, $"typeName@{errorIndex}");
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (1)
118_ => throw new ArgumentException(SR.Format(SR.UnknownSectionName, name), nameof(name)),
System\Reflection\PortableExecutable\PEHeaders.cs (1)
83throw new ArgumentException(SR.StreamMustSupportReadAndSeek, nameof(peStream));
System\Reflection\PortableExecutable\PEReader.cs (2)
165throw new ArgumentException(SR.StreamMustSupportReadAndSeek, nameof(peStream)); 731throw new ArgumentException(e.Message, nameof(peImagePath), e);
System\Reflection\Throw.cs (10)
23throw new ArgumentException(message, parameterName); 29throw new ArgumentException(SR.CantGetOffsetForVirtualHeapHandle, "handle"); 35throw new ArgumentException(SR.Format(SR.UnexpectedHandleKind, kind)); 41throw new ArgumentException(SR.InvalidHandle, parameterName); 77throw new ArgumentException(SR.LabelDoesntBelongToBuilder, parameterName); 83throw new ArgumentException(SR.NotMetadataHeapHandle, "handle"); 89throw new ArgumentException(SR.NotMetadataTableOrUserStringHandle, "handle"); 95throw new ArgumentException(SR.InvalidToken, "token"); 107throw new ArgumentException(SR.ExpectedNonEmptyString, parameterName); 113throw new ArgumentException(SR.ExpectedNonEmptyArray, parameterName);
System.Reflection.MetadataLoadContext (28)
System\Reflection\DefaultBinder.cs (3)
57throw new ArgumentException(SR.Arg_MustBeType, nameof(types)); 63throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 161throw new ArgumentException(SR.Arg_EmptyArray, nameof(match));
System\Reflection\PathAssemblyResolver.cs (2)
39throw new ArgumentException(SR.Format(SR.Arg_InvalidPath, path), nameof(assemblyPaths)); 43throw new ArgumentException(SR.Format(SR.Arg_InvalidPath, path), nameof(assemblyPaths));
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.ManifestResources.cs (2)
19throw new ArgumentException(null, nameof(resourceName)); 65throw new ArgumentException(null, nameof(name));
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (1)
213public sealed override object CreateInstance(string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture, object?[]? activationAttributes) => throw new ArgumentException(SR.Arg_ReflectionOnlyInvoke);
System\Reflection\TypeLoading\Assemblies\RoAssembly.Modules.cs (1)
106throw new ArgumentException(SR.Format(SR.SpecifiedFileNameInvalid, moduleName)); // Name not in manifest.
System\Reflection\TypeLoading\General\HashHelpers.cs (1)
50throw new ArgumentException(SR.Arg_HTCapacityOverflow);
System\Reflection\TypeLoading\General\Helpers.cs (1)
358throw new ArgumentException();
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs (2)
117throw new ArgumentException(SR.Format(SR.MakeGenericType_NotLoadedByMetadataLoadContext, typeArgument)); 123throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(typeArguments));
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.cs (3)
107throw new ArgumentException(SR.Arg_MustBeEnum); 118throw new ArgumentException(SR.Argument_InvalidEnum); 123throw new ArgumentException(SR.Argument_InvalidEnum);
System\Reflection\TypeLoading\Types\RoByRefType.cs (1)
26public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (1)
132public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (3)
99throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(typeArguments)); 115throw new ArgumentException(SR.Format(SR.MakeGenericType_NotLoadedByMetadataLoadContext, typeArgument)); 223public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (2)
170public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass); 196protected internal sealed override RoType ComputeEnumUnderlyingType() => throw new ArgumentException(SR.Arg_MustBeEnum);
System\Reflection\TypeLoading\Types\RoGenericParameterType.cs (2)
42public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass); 64protected internal sealed override RoType ComputeEnumUnderlyingType() => throw new ArgumentException(SR.Arg_MustBeEnum);
System\Reflection\TypeLoading\Types\RoHasElementType.cs (1)
77protected internal sealed override RoType ComputeEnumUnderlyingType() => throw new ArgumentException(SR.Arg_MustBeEnum);
System\Reflection\TypeLoading\Types\RoPointerType.cs (1)
26public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\TypeLoading\Types\RoType.cs (1)
340throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
System.Resources.Extensions (11)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (4)
69throw new ArgumentException(SR.Argument_StreamNotWritable); 149throw new ArgumentException(SR.NotSupported_UnseekableStream); 588throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength); 598throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (3)
129throw new ArgumentException(SR.Argument_StreamNotReadable); 808throw new ArgumentException(SR.Resources_StreamNotValid); 846throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version));
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (1)
198throw new ArgumentException(SR.Format(SR.NotSupported_WrongResourceReader_Type, reader.GetType()), nameof(reader));
System\Resources\Extensions\PreserializedResourceWriter.cs (3)
172throw new ArgumentException(SR.NotSupported_UnseekableStream); 228throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength); 253throw new ArgumentException(nameof(ResourceDataRecord.Format));
System.Resources.Writer (4)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (4)
69throw new ArgumentException(SR.Argument_StreamNotWritable); 149throw new ArgumentException(SR.NotSupported_UnseekableStream); 588throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength); 598throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength);
System.Runtime.Caching (19)
System\Runtime\Caching\Configuration\ConfigUtil.cs (5)
37throw new ArgumentException(RH.Format(SR.Value_must_be_non_negative_integer, valueName, sValue), nameof(config)); 40throw new ArgumentException(RH.Format(SR.Value_must_be_positive_integer, valueName, sValue), nameof(config)); 45throw new ArgumentException(RH.Format(SR.Value_too_big, 71throw new ArgumentException(RH.Format(SR.TimeSpan_invalid_format, valueName, sValue), nameof(config)); 91throw new ArgumentException(RH.Format(SR.Value_must_be_boolean, valueName, sValue), nameof(config));
System\Runtime\Caching\FileChangeNotificationSystem.cs (1)
149throw new ArgumentException(SR.Invalid_state, nameof(state));
System\Runtime\Caching\HostFileChangeMonitor.cs (2)
166throw new ArgumentException(RH.Format(SR.Empty_collection, nameof(filePaths))); 183throw new ArgumentException(RH.Format(SR.Collection_contains_null_or_empty_string, nameof(filePaths)));
System\Runtime\Caching\MemoryCache.cs (11)
233throw new ArgumentException(SR.Invalid_expiration_combination, nameof(policy)); 242throw new ArgumentException(SR.Invalid_callback_combination, nameof(policy)); 328throw new ArgumentException(SR.Empty_string_invalid, nameof(name)); 332throw new ArgumentException(SR.Default_is_reserved, nameof(name)); 346throw new ArgumentException(SR.Empty_string_invalid, nameof(name)); 350throw new ArgumentException(SR.Default_is_reserved, nameof(name)); 383throw new ArgumentException(SR.Update_callback_must_be_null, nameof(policy)); 421throw new ArgumentException(RH.Format(SR.Empty_collection, nameof(keys))); 428throw new ArgumentException(RH.Format(SR.Collection_contains_null_element, nameof(keys))); 673throw new ArgumentException(SR.Invalid_argument_combination); 789throw new ArgumentException(RH.Format(SR.Collection_contains_null_element, nameof(keys)));
System.Runtime.InteropServices (4)
System\Runtime\InteropServices\HandleCollector.cs (1)
35throw new ArgumentException(SR.Arg_InvalidThreshold, nameof(initialThreshold));
System\Runtime\InteropServices\Marshalling\ComVariantMarshaller.cs (3)
86throw new ArgumentException(SR.ComVariantMarshaller_ManagedTypeNotSupported, nameof(managed)); 205throw new ArgumentException(SR.ComVariantMarshaller_UnmanagedTypeNotSupported, nameof(unmanaged)); 330throw new ArgumentException("Invalid combination of unmanaged variant type and managed object type.", nameof(_managed));
System.Runtime.Numerics (6)
System\Number.BigInteger.cs (2)
45e = new ArgumentException(SR.Argument_InvalidNumberStyles, nameof(style)); 52e = new ArgumentException(SR.Argument_InvalidHexStyle, nameof(style));
System\Numerics\BigInteger.cs (2)
1209throw new ArgumentException(SR.Argument_MustBeBigInt, nameof(obj)); 3969throw new ArgumentException(SR.Format(SR.Argument_MinMaxValue, min, max));
System\Numerics\Complex.cs (2)
2158throw new ArgumentException(SR.Argument_InvalidNumberStyles, nameof(style)); 2161throw new ArgumentException(SR.Arg_HexStyleNotSupported);
System.Runtime.Serialization.Formatters (11)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
System\Runtime\Serialization\FormatterServices.cs (2)
213throw new ArgumentException(SR.Argument_InvalidFieldInfo); 224throw new ArgumentException(SR.Argument_DataLengthDifferent);
System\Runtime\Serialization\ObjectManager.cs (1)
779throw new ArgumentException(SR.Serialization_NotISer);
System\Runtime\Serialization\SurrogateSelector.cs (4)
67throw new ArgumentException(SR.Serialization_SurrogateCycleInArgument, nameof(selector)); 81throw new ArgumentException(SR.Serialization_SurrogateCycle, nameof(selector)); 103throw new ArgumentException(SR.Serialization_SurrogateCycle, nameof(selector)); 127throw new ArgumentException(SR.Serialization_SurrogateCycle, nameof(selector));
System\Runtime\Serialization\ValueTypeFixupInfo.cs (3)
37throw new ArgumentException(SR.Argument_MustSupplyParent); 53throw new ArgumentException(SR.Argument_MemberAndArray); 58throw new ArgumentException(SR.Argument_MustSupplyContainer);
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\DiagnosticUtility.cs (1)
87return new ArgumentException(message);
System.Security.Claims (1)
System\Security\Claims\ClaimsIdentity.cs (1)
1046throw new ArgumentException(
System.Security.Cryptography (379)
src\libraries\Common\src\System\Security\Cryptography\AesGcm.cs (5)
78throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tagSizeInBytes)); 296throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch); 299throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 308throw new ArgumentException(SR.Format(SR.Cryptography_IncorrectTagLength, tagSizeInBytes), nameof(tag)); 313throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag));
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (1)
40throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(values));
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (3)
138throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 142throw new ArgumentException(SR.Argument_InvalidOffLen); 158throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\Common\src\System\Security\Cryptography\DSAOpenSsl.cs (4)
102throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MissingFields); 107throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedPJ); 113throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedPGY); 116throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedQX);
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (1)
137throw new ArgumentException(SR.Cryptography_ArgECDHKeySizeMismatch, nameof(otherPartyPublicKey));
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSslPublicKey.cs (1)
18throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle));
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (7)
116throw new ArgumentException( 823throw new ArgumentException( 873throw new ArgumentException( 920throw new ArgumentException( 1443throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source)); 1493throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source)); 1543throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source));
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (11)
115throw new ArgumentException( 122throw new ArgumentException( 199throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 204throw new ArgumentException( 237throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 279throw new ArgumentException( 341throw new ArgumentException(SR.Argument_KemInvalidSeedLength, nameof(source)); 400throw new ArgumentException(SR.Argument_KemInvalidDecapsulationKeyLength, nameof(source)); 457throw new ArgumentException(SR.Argument_KemInvalidEncapsulationKeyLength, nameof(source)); 510throw new ArgumentException( 564throw new ArgumentException(
src\libraries\Common\src\System\Security\Cryptography\PemKeyHelpers.Factory.cs (8)
33throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(source)); 44throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(source)); 59throw new ArgumentException(SR.Argument_PemImport_EncryptedPem, nameof(source)); 65throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(source)); 81throw new ArgumentException(); 116throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(source)); 130throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(source)); 146throw new ArgumentException();
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (2)
49throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents)); 93throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents));
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (1)
105throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents));
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (4)
40throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "asnEncodedData.Oid"), nameof(asnEncodedData)); 43throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "oid.Value"), nameof(asnEncodedData)); 45throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "oid.Value"), nameof(asnEncodedData)); 79throw new ArgumentException(SR.Cryptography_Pkcs9_AttributeMismatch);
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (6)
134throw new ArgumentException( 318throw new ArgumentException( 1079throw new ArgumentException( 1130throw new ArgumentException( 1685throw new ArgumentException(SR.Argument_PublicKeyWrongSizeForAlgorithm, nameof(source)); 1735throw new ArgumentException(SR.Argument_SecretKeyWrongSizeForAlgorithm, nameof(source));
src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (1)
539throw new ArgumentException(SR.Argument_EmptyString, nameof(hashAlgorithm));
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
731throw new ArgumentException(SR.Argument_EmptyString, paramName);
System\Security\Cryptography\Aes.cs (8)
89throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(plaintext)); 104throw new ArgumentException(SR.Arg_EmptySpan, nameof(plaintext)); 132throw new ArgumentException(SR.Arg_EmptySpan, nameof(plaintext)); 138throw new ArgumentException( 182throw new ArgumentException(SR.Cryptography_KeyWrap_InvalidLength, nameof(ciphertext)); 219throw new ArgumentException(SR.Cryptography_KeyWrap_InvalidLength, nameof(ciphertext)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 257throw new ArgumentException(SR.Cryptography_KeyWrap_InvalidLength, nameof(ciphertext));
System\Security\Cryptography\AesCcm.cs (3)
84throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch); 87throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 90throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag));
System\Security\Cryptography\AesImplementation.cs (2)
260throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 266throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV));
System\Security\Cryptography\AsnEncodedDataCollection.cs (2)
71throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 75throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\Base64Transforms.cs (1)
388public static void ThrowInvalidOffLen() => throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\CapiHelper.Unix.cs (3)
18_ => throw new ArgumentException(SR.Argument_InvalidValue), 48_ => throw new ArgumentException(SR.Argument_InvalidValue), 80throw new ArgumentException(SR.Argument_InvalidValue);
System\Security\Cryptography\ChaCha20Poly1305.cs (3)
99throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch); 102throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 105throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag));
System\Security\Cryptography\CryptoConfig.cs (1)
315throw new ArgumentException(SR.Cryptography_AlgorithmTypesMustBeVisible, nameof(algorithm));
System\Security\Cryptography\CryptographicOperations.cs (4)
153throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 462throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 765throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 817throw new ArgumentException(SR.Argument_DestinationTooShort, "destination");
System\Security\Cryptography\CryptoStream.cs (3)
51throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(stream)); 59throw new ArgumentException(SR.Argument_StreamNotWritable, nameof(stream)); 65throw new ArgumentException(SR.Argument_InvalidValue, nameof(mode));
System\Security\Cryptography\CspParameters.cs (1)
43throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value)));
System\Security\Cryptography\DES.cs (1)
54throw new ArgumentException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\DesImplementation.cs (2)
66throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 77throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV));
System\Security\Cryptography\DSAOpenSsl.cs (2)
44throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 76throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle));
System\Security\Cryptography\ECCurve.cs (1)
81throw new ArgumentException(SR.Format(SR.Cryptography_InvalidCurveOid, value.Value));
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (2)
30throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 61throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle));
System\Security\Cryptography\ECDsa.cs (4)
374throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 407throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 671throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 716throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Security\Cryptography\ECDsaOpenSsl.cs (2)
30throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 61throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle));
System\Security\Cryptography\HashAlgorithm.cs (4)
82throw new ArgumentException(SR.Argument_InvalidValue); 84throw new ArgumentException(SR.Argument_InvalidOffLen); 240throw new ArgumentException(SR.Argument_InvalidValue); 242throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\HashProvider.cs (1)
27throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\Helpers.cs (1)
455throw new ArgumentException(SR.Argument_PasswordNullChars, nameof(password));
System\Security\Cryptography\HKDF.cs (7)
57throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 92throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 123throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output)); 126throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 131throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output)); 180throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output)); 185throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output));
System\Security\Cryptography\HMACMD5.cs (7)
130throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 190throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 193throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 216throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 263throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 326throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 329throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA1.cs (7)
133throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 191throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 194throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 216throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 261throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 322throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 325throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA256.cs (7)
125throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 183throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 186throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 208throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 253throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 314throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 317throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA3_256.cs (7)
161throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 221throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 224throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 293throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 355throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 358throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA3_384.cs (7)
161throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 221throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 224throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 293throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 355throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 358throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA3_512.cs (7)
161throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 221throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 224throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 293throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 355throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 358throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA384.cs (7)
142throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 200throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 203throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 225throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 270throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 331throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 334throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA512.cs (7)
139throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 197throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 200throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 222throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 267throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 328throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 331throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\IncrementalHash.cs (3)
94throw new ArgumentException(SR.Argument_InvalidOffLen); 154throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Security\Cryptography\Kmac128.cs (1)
548throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Kmac256.cs (1)
548throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof128.cs (1)
548throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof256.cs (1)
548throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\MD5.cs (7)
90throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 147throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 150throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 172throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 198throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 235throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 238throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\MLDsaOpenSsl.OpenSsl.cs (1)
29throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle));
System\Security\Cryptography\MLKemOpenSsl.OpenSsl.cs (1)
28throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle));
System\Security\Cryptography\OidCollection.cs (2)
77throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 81throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\PemEncoding.cs (10)
43throw new ArgumentException(SR.Argument_PemEncoding_NoPemFound, nameof(pemData)); 73throw new ArgumentException(SR.Argument_PemEncoding_NoPemFound, nameof(pemData)); 412throw new ArgumentException(SR.Argument_PemEncoding_EncodedSizeTooLarge); 461throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(label)); 524throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(utf8Label)); 578throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(utf8Label)); 662throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(label)); 705throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(label)); 758throw new ArgumentException(null, nameof(destination)); 789throw new ArgumentException(null, nameof(destination));
System\Security\Cryptography\PemKeyHelpers.cs (8)
118throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 132throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(input)); 147throw new ArgumentException(); 186throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 197throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 212throw new ArgumentException(SR.Argument_PemImport_EncryptedPem, nameof(input)); 218throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(input)); 233throw new ArgumentException();
System\Security\Cryptography\RandomNumberGenerator.cs (5)
106throw new ArgumentException(SR.Argument_InvalidRandomRange); 182throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 205throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 232throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 445throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\RC2Implementation.cs (2)
64throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 70throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV));
System\Security\Cryptography\RSA.cs (4)
220throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 303throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 529throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 631throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Security\Cryptography\RSAOpenSsl.cs (2)
44throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle)); 73throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle));
System\Security\Cryptography\SHA1.cs (7)
86throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 141throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 144throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 165throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 190throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 229throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA256.cs (7)
85throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 141throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 144throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 165throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 190throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 229throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA3_256.cs (7)
114throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 177throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 180throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 205throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 234throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 274throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 277throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA3_384.cs (7)
114throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 178throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 181throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 206throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 235throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 275throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 278throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA3_512.cs (7)
114throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 177throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 180throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 205throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 234throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 274throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 277throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA384.cs (7)
85throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 140throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 143throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 164throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 189throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 225throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 228throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA512.cs (7)
85throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 140throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 143throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 164throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 189throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 225throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 228throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Shake128.cs (4)
357throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 385throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 421throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 463throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Shake256.cs (4)
357throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 385throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 421throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 463throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SlhDsaOpenSsl.OpenSsl.cs (1)
26throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle));
System\Security\Cryptography\SymmetricAlgorithm.cs (11)
377throw new ArgumentException(SR.Cryptography_MatchBlockSize, nameof(plaintextLength)); 448throw new ArgumentException(SR.Argument_BitsMustBeWholeBytes, nameof(feedbackSizeInBits)); 456throw new ArgumentException(SR.Cryptography_MatchFeedbackSize, nameof(plaintextLength)); 564throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 682throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 826throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 979throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1200throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1432throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1674throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(iv)); 1681throw new ArgumentException(SR.Cryptography_InvalidFeedbackSize, nameof(feedbackSizeInBits));
System\Security\Cryptography\SymmetricPadding.cs (5)
50throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 65throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 82throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 99throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 120throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Security\Cryptography\TripleDES.cs (1)
54throw new ArgumentException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\TripleDesImplementation.cs (2)
58throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 64throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV));
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (13)
634throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 781throw new ArgumentException(SR.Cryptography_CertReq_IssuerRequiresPrivateKey, nameof(issuerCertificate)); 783throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 785throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 789throw new ArgumentException( 800throw new ArgumentException( 820throw new ArgumentException( 837throw new ArgumentException(SR.Cryptography_CertReq_BasicConstraintsRequired, nameof(issuerCertificate)); 839throw new ArgumentException(SR.Cryptography_CertReq_IssuerBasicConstraintsInvalid, nameof(issuerCertificate)); 841throw new ArgumentException(SR.Cryptography_CertReq_IssuerKeyUsageInvalid, nameof(issuerCertificate)); 867throw new ArgumentException( 969throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 971throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (8)
137throw new ArgumentException( 142throw new ArgumentException(SR.Cryptography_CRLBuilder_DatesReversed); 159throw new ArgumentException( 166throw new ArgumentException( 173throw new ArgumentException( 189throw new ArgumentException(SR.Cryptography_CertReq_RSAPaddingRequired); 214throw new ArgumentException( 340throw new ArgumentException(SR.Cryptography_CRLBuilder_DatesReversed);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.CdpExtension.cs (2)
67throw new ArgumentException(SR.Cryptography_X509_CDP_NullValue, nameof(uris)); 105throw new ArgumentException(SR.Cryptography_X509_CDP_MustNotBuildEmpty, nameof(uris));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.cs (2)
138throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 145throw new ArgumentException(
System\Security\Cryptography\X509Certificates\DSACertificateExtensions.cs (2)
44throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 54throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (2)
41throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 45throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\FindPal.cs (5)
178throw new ArgumentException(SR.Argument_InvalidOidValue); 222throw new ArgumentException(SR.Argument_InvalidOidValue); 227throw new ArgumentException(SR.Argument_InvalidOidValue); 229throw new ArgumentException(SR.Argument_InvalidOidValue); 239throw new ArgumentException(SR.Argument_InvalidOidValue);
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (1)
28throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle));
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (2)
41throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 49throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\X500DistinguishedName.cs (1)
103throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, "flag"));
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (4)
137throw new ArgumentException(SR.Argument_X500_EmailTooLong, nameof(emailAddress)); 226throw new ArgumentException(SR.Argument_X500_InvalidCountryOrRegion, nameof(twoLetterCode)); 375throw new ArgumentException(SR.Format(SR.Argument_Asn1_InvalidStringContents, stringEncodingType), paramName); 397throw new ArgumentException(SR.Argument_Asn1_InvalidCharacterString, nameof(stringEncodingType));
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (2)
285throw new ArgumentException(SR.Cryptography_X509_AIA_NullValue); 330throw new ArgumentException(SR.Cryptography_X509_AIA_MustNotBuildEmpty);
System\Security\Cryptography\X509Certificates\X509AuthorityKeyIdentifierExtension.cs (2)
327throw new ArgumentException(SR.Argument_InvalidSerialNumberBytes, nameof(serialNumber)); 428throw new ArgumentException(SR.Argument_InvalidSerialNumberBytes, nameof(serialNumber));
System\Security\Cryptography\X509Certificates\X509Certificate.cs (3)
95throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 111throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 124throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData));
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (14)
395throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 413throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 769throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 774throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 860throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 865throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 873throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 961throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 966throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 974throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1053throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 1058throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1066throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1630throw new ArgumentException(
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (1)
742throw new ArgumentException(SR.Argument_Thumbprint_Invalid, nameof(thumbprintHex));
System\Security\Cryptography\X509Certificates\X509CertificateCollection.cs (1)
112throw new ArgumentException(SR.Arg_InvalidType, nameof(value));
System\Security\Cryptography\X509Certificates\X509CertificateLoader.netcore.cs (2)
101throw new ArgumentException(SR.Argument_InvalidFlag, nameof(keyStorageFlags)); 111throw new ArgumentException(
System\Security\Cryptography\X509Certificates\X509Chain.cs (1)
99throw new ArgumentException(SR.Cryptography_InvalidContextHandle, nameof(certificate));
System\Security\Cryptography\X509Certificates\X509ChainElementCollection.cs (2)
63throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 67throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\X509Certificates\X509ChainPolicy.cs (4)
62throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 76throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 90throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 104throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value)));
System\Security\Cryptography\X509Certificates\X509Extension.cs (1)
84throw new ArgumentException(SR.Cryptography_X509_ExtensionMismatch);
System\Security\Cryptography\X509Certificates\X509ExtensionCollection.cs (2)
82throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 86throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\X509Certificates\X509SignatureGenerator.cs (1)
35throw new ArgumentException(SR.Cryptography_InvalidPaddingMode);
System\Security\Cryptography\X509Certificates\X509Store.cs (3)
40throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeLocation))); 52_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeName))), 66throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeLocation)));
System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierExtension.cs (2)
128throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(subjectKeyIdentifier)); 202throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, algorithm), nameof(algorithm));
System.Security.Cryptography.Cose (48)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (6)
264throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 290throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 297throw new ArgumentException(SR.CriticalHeadersMustBeArrayOfAtLeastOne, nameof(value)); 304throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 311throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value)); 328throw new ArgumentException(SR.Format(SR.CoseHeaderMapArgumentCoseHeaderValueIncorrect, label.LabelName), nameof(value), ex);
System\Security\Cryptography\Cose\CoseHeaderValue.cs (1)
218throw new ArgumentException(SR.Argument_DestinationTooSmall, nameof(destination));
System\Security\Cryptography\Cose\CoseKey.cs (6)
111throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key)); 263throw new ArgumentException(SR.Sign1UnsupportedKey, KeyType.ToString()); 279_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm)) 290_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm)) 301_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm)) 322throw new ArgumentException(SR.Format(SR.Sign1UnknownCoseAlgorithm, algorithm.Name), "key");
System\Security\Cryptography\Cose\CoseMessage.cs (1)
615throw new ArgumentException(SR.Argument_EncodeDestinationTooSmall, nameof(destination));
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (8)
190throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 193throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 260throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 263throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 418throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels, nameof(signer)); 423throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels); 428throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer)); 433throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(protectedHeaders));
System\Security\Cryptography\Cose\CoseSign1Message.cs (14)
159throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 162throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 210throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 213throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 297throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels, nameof(signer)); 302throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer)); 693throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 698throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 755throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 760throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 860throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 865throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 922throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 927throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
System\Security\Cryptography\Cose\CoseSignature.cs (8)
411throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 416throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 473throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 478throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 534throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 539throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 598throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 603throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
System\Security\Cryptography\Cose\CoseSigner.cs (4)
76throw new ArgumentException(SR.CoseSignerRSAKeyNeedsPadding, nameof(key)); 79throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key)); 167throw new ArgumentException(SR.Sign1SignAlgMustBeProtected, "unprotectedHeaders"); 196throw new ArgumentException(exMsg, "protectedHeaders");
System.Security.Cryptography.Pkcs (22)
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (1)
40throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(values));
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (3)
138throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 142throw new ArgumentException(SR.Argument_InvalidOffLen); 158throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (2)
49throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents)); 93throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents));
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (1)
105throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents));
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (4)
40throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "asnEncodedData.Oid"), nameof(asnEncodedData)); 43throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "oid.Value"), nameof(asnEncodedData)); 45throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "oid.Value"), nameof(asnEncodedData)); 79throw new ArgumentException(SR.Cryptography_Pkcs9_AttributeMismatch);
System\Security\Cryptography\Pkcs\CmsRecipientCollection.cs (3)
87throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 91throw new ArgumentException(SR.Argument_InvalidOffLen); 107throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\Pkcs\CmsSigner.cs (3)
60throw new ArgumentException(SR.Argument_InvalidRsaSignaturePadding, nameof(value)); 73throw new ArgumentException(SR.Format(SR.Cryptography_Cms_Invalid_Subject_Identifier_Type, value)); 166throw new ArgumentException(SR.Argument_InvalidRsaSignaturePadding, nameof(signaturePadding));
System\Security\Cryptography\Pkcs\RecipientInfoCollection.cs (2)
62throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 66throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\Pkcs\SignedCms.cs (1)
49throw new ArgumentException(SR.Format(SR.Arg_EmptyOrNullString_Named, "contentInfo.Content"), nameof(contentInfo));
System\Security\Cryptography\Pkcs\SignerInfoCollection.cs (2)
60throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 64throw new ArgumentException(SR.Argument_InvalidOffLen);
System.Security.Cryptography.ProtectedData (2)
System\Security\Cryptography\ProtectedData.cs (2)
160throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 313throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System.Security.Cryptography.Xml (34)
System\Security\Cryptography\Xml\AttributeSortOrder.cs (1)
19throw new ArgumentException();
System\Security\Cryptography\Xml\CanonicalXml.cs (1)
42throw new ArgumentException(nameof(nodeList));
System\Security\Cryptography\Xml\CanonicalXmlNodeList.cs (3)
37throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, "node"); 59throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value)); 89throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value));
System\Security\Cryptography\Xml\EncryptionPropertyCollection.cs (6)
31throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value)); 50throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value)); 64throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value)); 78throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value)); 92throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value)); 142throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value));
System\Security\Cryptography\Xml\ExcCanonicalXml.cs (1)
41throw new ArgumentException(nameof(nodeList));
System\Security\Cryptography\Xml\KeyInfoX509Data.cs (3)
156throw new ArgumentException(SR.Arg_EmptyOrNullString, nameof(issuerName)); 159throw new ArgumentException(SR.Arg_EmptyOrNullString, nameof(serialNumber)); 163throw new ArgumentException(SR.Cryptography_Xml_InvalidX509IssuerSerialNumber, nameof(serialNumber));
System\Security\Cryptography\Xml\NamespaceSortOrder.cs (1)
18throw new ArgumentException();
System\Security\Cryptography\Xml\ReferenceList.cs (3)
33throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value)); 59throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value)); 103throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(value));
System\Security\Cryptography\Xml\TransformChain.cs (1)
55throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLess, nameof(index));
System\Security\Cryptography\Xml\Utils.cs (2)
613throw new ArgumentException(SR.Arg_EmptyOrNullString, nameof(issuerName)); 615throw new ArgumentException(SR.Arg_EmptyOrNullString, nameof(serialNumber));
System\Security\Cryptography\Xml\XmlDecryptionTransform.cs (1)
272throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
System\Security\Cryptography\Xml\XmlDsigBase64Transform.cs (2)
62if (inputStream == null) throw new ArgumentException("obj"); 127throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
System\Security\Cryptography\Xml\XmlDsigC14NTransform.cs (2)
67throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(obj)); 79throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
System\Security\Cryptography\Xml\XmlDsigEnvelopedSignatureTransform.cs (2)
181if (_inputNodeList != null) throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type)); 186throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
System\Security\Cryptography\Xml\XmlDsigExcC14NTransform.cs (2)
91throw new ArgumentException(SR.Cryptography_Xml_IncorrectObjectType, nameof(obj)); 116throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
System\Security\Cryptography\Xml\XmlDsigXPathTransform.cs (1)
194throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
System\Security\Cryptography\Xml\XmlDsigXsltTransform.cs (1)
146throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
System\Security\Cryptography\Xml\XmlLicenseTransform.cs (1)
117throw new ArgumentException(SR.Cryptography_Xml_TransformIncorrectInputType, nameof(type));
System.Security.Permissions (6)
System\Security\Permissions\PrincipalPermission.cs (6)
30throw new ArgumentException(SR.Argument_InvalidPermissionState); 83throw new ArgumentException(SR.Format(SR.Argument_WrongType, GetType().FullName), nameof(target)); 126throw new ArgumentException(SR.Format(SR.Argument_WrongType, GetType().FullName), nameof(target)); 182throw new ArgumentException(SR.Format(SR.Argument_WrongType, GetType().FullName), nameof(other)); 275throw new ArgumentException(SR.Argument_NotAPermissionElement); 280throw new ArgumentException(SR.Argument_InvalidXMLBadVersion);
System.ServiceModel.Federation (2)
System\Runtime\OperationWithTimeoutAsyncResult.cs (1)
366throw new ArgumentException(InternalSR.InvalidAsyncResult, nameof(result));
System\ServiceModel\Federation\WSTrustChannelSecurityTokenProvider.cs (1)
62throw new ArgumentException(SR.Format(SR.IssuedSecurityTokenParametersIncorrectType, issuedSecurityTokenParameters), nameof(tokenRequirement));
System.ServiceModel.NetFramingBase (2)
System\ServiceModel\Channels\AddressingVersionExtensions.cs (2)
23_ => throw new ArgumentException($"Invalid AddressingVersion:\"{thisPtr}\"", nameof(AddressingVersion)) 36_ => throw new ArgumentException($"Invalid AddressingVersion:\"{thisPtr}\"", nameof(AddressingVersion))
System.ServiceModel.Primitives.Tests (1)
ServiceModel\ThrowingChannelBase.cs (1)
19throw new ArgumentException("ThrowingChannelBase requires a non-null inner channel.", "innerChannel");
System.ServiceModel.Syndication (10)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (1)
44throw new ArgumentException(SR.Format(SR.InvalidObjectTypePassed, nameof(feedTypeToCreate), nameof(SyndicationFeed)), nameof(feedTypeToCreate));
System\ServiceModel\Syndication\Atom10ItemFormatter.cs (1)
28throw new ArgumentException(SR.Format(SR.InvalidObjectTypePassed, nameof(itemTypeToCreate), nameof(SyndicationItem)), nameof(itemTypeToCreate));
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (2)
27throw new ArgumentException(SR.Format(SR.InvalidObjectTypePassed, nameof(inlineDocumentType), nameof(InlineCategoriesDocument)), nameof(inlineDocumentType)); 32throw new ArgumentException(SR.Format(SR.InvalidObjectTypePassed, nameof(referencedDocumentType), nameof(ReferencedCategoriesDocument)), nameof(referencedDocumentType));
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (1)
31throw new ArgumentException(SR.Format(SR.InvalidObjectTypePassed, nameof(documentTypeToCreate), nameof(ServiceDocument)), nameof(documentTypeToCreate));
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (1)
37throw new ArgumentException(SR.Format(SR.InvalidObjectTypePassed, nameof(feedTypeToCreate), nameof(SyndicationFeed)), nameof(feedTypeToCreate));
System\ServiceModel\Syndication\Rss20ItemFormatter.cs (1)
29throw new ArgumentException(SR.Format(SR.InvalidObjectTypePassed, nameof(itemTypeToCreate), nameof(SyndicationItem)), nameof(itemTypeToCreate));
System\ServiceModel\Syndication\SyndicationContent.cs (1)
76throw new ArgumentException(SR.OuterElementNameNotSpecified, nameof(outerElementName));
System\ServiceModel\Syndication\SyndicationElementExtension.cs (1)
61throw new ArgumentException(SR.OuterNameOfElementExtensionEmpty, nameof(outerName));
System\ServiceModel\Syndication\SyndicationElementExtensionCollection.cs (1)
221throw new ArgumentException(SR.ExtensionNameNotSpecified);
System.Text.Encoding.CodePages (13)
System\Text\DBCSCodePageEncoding.cs (2)
541throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, EncodingName, encoder.Fallback.GetType())); 657throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, EncodingName, encoder.Fallback.GetType()));
System\Text\DecoderFallbackBufferHelper.cs (6)
65throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 72throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 88throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 121throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 128throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 138throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex);
System\Text\EncoderFallbackBufferHelper.cs (1)
133throw new ArgumentException(SR.Format(SR.Argument_RecursiveFallback, charRecursive), "chars");
System\Text\EncodingByteBuffer.cs (1)
42throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, _encoder.Encoding.EncodingName, _encoder.Fallback.GetType()));
System\Text\EncodingNLS.cs (2)
338throw new ArgumentException(SR.Format(SR.Argument_EncodingConversionOverflowBytes, EncodingName, EncoderFallback.GetType()), "bytes"); 346throw new ArgumentException(SR.Format(SR.Argument_EncodingConversionOverflowChars, EncodingName, DecoderFallback.GetType()), "chars");
System\Text\ISCIIEncoding.cs (1)
65throw new ArgumentException(SR.Format(SR.Argument_CodepageNotSupported, codePage), nameof(codePage));
System.Text.Encodings.Web (3)
System\Text\Encodings\Web\TextEncoder.cs (1)
624throw new ArgumentException(SR.TextEncoderDoesNotImplementMaxOutputCharsPerInputChar);
System\ThrowHelper.cs (2)
21throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 56return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
System.Text.Json (29)
System\Text\Json\Document\JsonDocument.cs (1)
1162throw new ArgumentException(SR.JsonDocumentDoesNotSupportComments, paramName);
System\Text\Json\Serialization\JsonSerializerOptions.cs (2)
340throw new ArgumentException(SR.SerializationInvalidBufferSize); 436throw new ArgumentException(SR.DefaultIgnoreConditionInvalid);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (2)
31throw new ArgumentException(nameof(propertyInfo.DeclaringType)); 37throw new ArgumentException(nameof(propertyInfo.PropertyName));
System\Text\Json\ThrowHelper.cs (7)
78throw new ArgumentException(SR.Argument_InvalidOffLen); 84throw new ArgumentException(SR.ArrayTooSmall, paramName); 89return new ArgumentException(message); 526throw new ArgumentException(SR.CannotWriteCommentWithEmbeddedDelimiter); 554throw new ArgumentException(SR.Format(SR.CannotEncodeInvalidUTF8, builder)); 560throw new ArgumentException(SR.Format(SR.CannotEncodeInvalidUTF16, $"0x{charAsInt:X2}")); 582return new ArgumentException(SR.CannotTranscodeInvalidUtf16, innerException);
System\Text\Json\ThrowHelper.Node.cs (2)
16throw new ArgumentException(SR.NodeValueNotAllowed, paramName); 22throw new ArgumentException(SR.Format(SR.NodeDuplicateKey, propertyName), paramName);
System\Text\Json\ThrowHelper.Serialization.cs (5)
22throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type, value.GetType())); 28throw new ArgumentException(SR.JsonSerializerDoesNotSupportComments, paramName); 157throw new ArgumentException(SR.Format(SR.CannotSerializeInvalidType, typeToConvert), paramName); 161throw new ArgumentException(SR.Format(SR.CannotSerializeInvalidMember, typeToConvert, propertyName, declaringType), paramName); 973throw new ArgumentException(SR.JsonPolymorphismOptionsAssociatedWithDifferentJsonTypeInfo, paramName: parameterName);
System\Text\Json\Writer\JsonWriterHelper.cs (6)
168throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 198throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 221throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 233throw new ArgumentException( 240throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 250throw new ArgumentException(
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
240throw new ArgumentException(SR.StreamNotWritable); 302throw new ArgumentException(SR.StreamNotWritable);
System\ThrowHelper.cs (2)
21throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 56return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\CaptureCollection.cs (1)
105throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System\Text\RegularExpressions\GroupCollection.cs (1)
119throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System.Text.RegularExpressions.Generator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
System.Threading.RateLimiting (15)
System\Threading\RateLimiting\ConcurrencyLimiter.cs (2)
45throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options)); 49throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options));
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (3)
52throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options)); 56throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options)); 60throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.Window)), nameof(options));
System\Threading\RateLimiting\PartitionedRateLimiter.cs (1)
60throw new ArgumentException("Must pass in at least 1 limiter.", nameof(limiters));
System\Threading\RateLimiting\RateLimiter.cs (1)
39throw new ArgumentException("Must pass in at least 1 limiter.", nameof(limiters));
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (4)
56throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options)); 60throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.SegmentsPerWindow)), nameof(options)); 64throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options)); 68throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.Window)), nameof(options));
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (4)
54throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.TokenLimit)), nameof(options)); 58throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.TokensPerPeriod)), nameof(options)); 62throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options)); 66throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.ReplenishmentPeriod)), nameof(options));
System.Threading.Tasks.Dataflow (40)
Base\DataflowBlock.cs (11)
135if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 621if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 666if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 683if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 1149if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 1150if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept)); 1462if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 2104if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 2105if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept)); 2611if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 2616if (source == null) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Base\DataflowMessageHeader.cs (1)
30if (id == default(long)) throw new ArgumentException(SR.Argument_InvalidMessageId, nameof(id));
Blocks\BatchBlock.cs (2)
352if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 353if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Blocks\BatchedJoinBlock.cs (5)
59if (!dataflowBlockOptions.Greedy) throw new ArgumentException(SR.Argument_NonGreedyNotSupported, nameof(dataflowBlockOptions)); 60if (dataflowBlockOptions.BoundedCapacity != DataflowBlockOptions.Unbounded) throw new ArgumentException(SR.Argument_BoundedCapacityNotSupported, nameof(dataflowBlockOptions)); 307throw new ArgumentException(SR.Argument_NonGreedyNotSupported, nameof(dataflowBlockOptions)); 567if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 568if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Blocks\BroadcastBlock.cs (5)
163if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 164if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept)); 1035if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 1075if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 1102if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
Blocks\BufferBlock.cs (2)
91if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 92if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Blocks\JoinBlock.cs (2)
817if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 818if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Blocks\WriteOnceBlock.cs (5)
338if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 339if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept)); 378if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 399if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 412if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
Internal\SourceCore.cs (3)
160if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 216if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 243if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
Internal\SpscTargetCore.cs (2)
136throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 142if (source == null) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Internal\TargetCore.cs (2)
184if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 185if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\Parallel.cs (1)
212throw new ArgumentException(SR.Parallel_Invoke_ActionNull);
System.Transactions.Local (17)
System\Transactions\CommittableTransaction.cs (1)
166throw new ArgumentException(SR.BadAsyncResult, nameof(asyncResult));
System\Transactions\Transaction.cs (5)
485throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 533throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 907throw new ArgumentException(SR.PromoterTypeInvalid, nameof(promoterType)); 946throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 992throw new ArgumentException(null, nameof(distributedTransactionIdentifier));
System\Transactions\TransactionInteropNonWindows.cs (3)
77throw new ArgumentException(SR.InvalidArgument, nameof(cookie)); 147throw new ArgumentException(SR.InvalidArgument, nameof(propagationToken)); 248throw new ArgumentException(SR.InvalidArgument, nameof(propagationToken));
System\Transactions\TransactionManager.cs (6)
144throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 182throw new ArgumentException(SR.UnrecognizedRecoveryInformation, nameof(recoveryInformation)); 191throw new ArgumentException(SR.UnrecognizedRecoveryInformation, nameof(recoveryInformation), e); 199throw new ArgumentException(SR.UnrecognizedRecoveryInformation, nameof(recoveryInformation), e); 233throw new ArgumentException(SR.InvalidRecoveryInformation, "recoveryInformation"); 242throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier));
System\Transactions\TransactionScope.cs (2)
215throw new ArgumentException(SR.TransactionScopeIsolationLevelDifferentFromTransaction, nameof(transactionOptions)); 297throw new ArgumentException(SR.TransactionScopeIsolationLevelDifferentFromTransaction, nameof(transactionOptions));
System.Windows.Controls.Ribbon (7)
Microsoft\Windows\Controls\ActivatingKeyTipEventArgs.cs (2)
86throw new ArgumentException(Microsoft.Windows.Controls.SR.InvalidKeyTipOffset); 105throw new ArgumentException(Microsoft.Windows.Controls.SR.InvalidKeyTipOffset);
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupsPanel.cs (2)
55throw new ArgumentException(Microsoft.Windows.Controls.SR.RibbonGroupsPanel_InvalidRegistrationParameter, nameof(starLayoutInfoProvider)); 70throw new ArgumentException(Microsoft.Windows.Controls.SR.RibbonGroupsPanel_InvalidRegistrationParameter, nameof(starLayoutInfoProvider));
Microsoft\Windows\Controls\Ribbon\RibbonControlLength.cs (3)
50throw new ArgumentException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidCtorParameterNoNaN, "value")); 55throw new ArgumentException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidCtorParameterNoInfinityForStarSize, "value")); 63throw new ArgumentException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidCtorParameterUnknownRibbonControlLengthUnitType, "type"));
System.Windows.Forms (345)
misc\CollectionHelper.cs (5)
19throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(target)); 23throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(target)); 25throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 48throw new ArgumentException(SR.Argument_IncompatibleArrayType); 63throw new ArgumentException(SR.Argument_IncompatibleArrayType);
System\Resources\AssemblyNamesTypeResolutionService.cs (1)
156throw new ArgumentException(string.Format(SR.InvalidResXNoType, name));
System\Resources\ResxFileRef.Converter.cs (4)
56throw new ArgumentException(null, nameof(stringValue)); 63throw new ArgumentException(null, nameof(stringValue)); 73throw new ArgumentException(null, nameof(stringValue)); 79throw new ArgumentException(null, nameof(stringValue));
System\Resources\ResXResourceReader.cs (4)
392throw new ArgumentException(string.Format(SR.InvalidResXFile, e.Message), e); 404throw new ArgumentException(string.Format(SR.InvalidResXFile, xmlEx.Message), xmlEx); 440throw new ArgumentException(SR.InvalidResXFileReaderWriterTypes); 609throw new ArgumentException(string.Format(SR.InvalidResXResourceNoName, nodeInfo.ValueData));
System\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
131throw new ArgumentException(string.Format(SR.AXDuplicateControl, GetNameForControl(control)), nameof(control));
System\Windows\Forms\ActiveX\AxHost.ConnectionPointCookie.cs (2)
60throw new ArgumentException(string.Format(SR.AXNoEventInterface, eventInterface.Name)); 75throw new ArgumentException(string.Format(SR.AXNoConnectionPoint, eventInterface.Name));
System\Windows\Forms\ActiveX\AxHost.cs (4)
3566throw new ArgumentException(SR.AXUnknownImage, nameof(picture)); 3590throw new ArgumentException(SR.AXUnknownImage, nameof(picture)); 3678throw new ArgumentException(SR.AXFontUnitNotPoint, nameof(font)); 3733throw new ArgumentException(SR.AXFontUnitNotPoint, nameof(font));
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1424throw new ArgumentException(string.Format(SR.AXNoConnectionPoint, eventInterface.Name));
System\Windows\Forms\ComponentModel\COM2Interop\COM2AboutBoxPropertyDescriptor.cs (1)
62public override void SetValue(object? component, object? value) => throw new ArgumentException(null);
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (2)
898VT_USERDEFINED => throw new ArgumentException(string.Format(SR.COM2UnhandledVT, "VT_USERDEFINED")), 899_ => throw new ArgumentException(string.Format(SR.COM2UnhandledVT, ((int)vt).ToString(CultureInfo.InvariantCulture))),
System\Windows\Forms\Control.ControlCollection.cs (4)
51throw new ArgumentException(SR.TopLevelControlAdd); 58throw new ArgumentException(SR.AddDifferentThreads); 134throw new ArgumentException(SR.ControlBadControl, nameof(control)); 408throw new ArgumentException(SR.ControlNotChild);
System\Windows\Forms\Control.cs (6)
885throw new ArgumentException(SR.TransparentBackColorNotAllowed); 4436throw new ArgumentException(SR.CircularOwner); 4449throw new ArgumentException(SR.CircularOwner); 4981throw new ArgumentException(message: null, nameof(targetBounds)); 5032throw new ArgumentException(SR.ControlBadAsyncResult, nameof(asyncResult)); 10378throw new ArgumentException(SR.TopLevelParentedControl, nameof(value));
System\Windows\Forms\Control.MetafileDCWrapper.cs (1)
35throw new ArgumentException(SR.ControlMetaFileDCWrapperSizeInvalid, nameof(size));
System\Windows\Forms\Controls\Buttons\ButtonBase.ButtonBaseAccessibleObject.cs (1)
13: throw new ArgumentException(string.Format(SR.ConstructorArgumentInvalidValueType, nameof(owner), typeof(ButtonBase))))
System\Windows\Forms\Controls\Buttons\CheckBox.CheckBoxAccessibleObject.cs (1)
13: throw new ArgumentException(string.Format(SR.ConstructorArgumentInvalidValueType, nameof(owner), typeof(CheckBox))))
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (4)
1024throw new ArgumentException(SR.ComboBoxSortWithDataSource); 1349throw new ArgumentException(SR.DataSourceLocksItems); 3158throw new ArgumentException(SR.AutoCompleteFailure); 3201throw new ArgumentException(SR.AutoCompleteFailureListItems);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (9)
1012throw new ArgumentException(string.Format(SR.DataGridView_EmptyColor, "BackgroundColor")); 1014throw new ArgumentException(string.Format(SR.DataGridView_TransparentColor, "BackgroundColor")); 1240throw new ArgumentException(string.Format(SR.DataGridView_CustomCellBorderStyleInvalid, "CellBorderStyle")); 1457throw new ArgumentException(string.Format(SR.DataGridView_CustomCellBorderStyleInvalid, "ColumnHeadersBorderStyle")); 1742throw new ArgumentException(SR.DataGridView_CellDoesNotBelongToDataGridView); 2301throw new ArgumentException(SR.DataGridView_CellDoesNotBelongToDataGridView); 2649throw new ArgumentException(string.Format(SR.DataGridView_EmptyColor, nameof(GridColor))); 2651throw new ArgumentException(string.Format(SR.DataGridView_TransparentColor, nameof(GridColor))); 3255throw new ArgumentException(string.Format(SR.DataGridView_CustomCellBorderStyleInvalid, "RowHeadersBorderStyle"));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (31)
1695throw new ArgumentException(string.Format(SR.DataGridView_NeedColumnAutoSizingCriteria, "autoSizeColumnMode")); 1986throw new ArgumentException(string.Format(SR.DataGridView_NeedAutoSizingCriteria, "rowHeadersWidthSizeMode")); 2132throw new ArgumentException(string.Format(SR.DataGridView_NeedAutoSizingCriteria, "rowHeadersWidthSizeMode")); 2364throw new ArgumentException(string.Format(SR.DataGridView_NeedAutoSizingCriteria, "autoSizeRowsMode")); 6847throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 9766throw new ArgumentException(SR.DataGridView_CellDoesNotBelongToDataGridView); 11240throw new ArgumentException(SR.DataGridView_PreviousModesHasWrongLength); 13244throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13308throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13323throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13349throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13421throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13497throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13584throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14045throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14072throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14264throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14466throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14476throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 16655throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17583throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17603throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17641throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17763throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17847throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 18280throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 18364throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 18714throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 19000throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 28170throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 28213throw new ArgumentException(SR.DataGridView_ColumnNeedsToBeDataBoundWhenSortingDataBoundDataGridView, nameof(dataGridViewColumn));
System\Windows\Forms\Controls\DataGridView\DataGridViewAdvancedBorderStyle.cs (7)
67throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "All")); 96throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Bottom")); 141throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Left")); 157throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Left")); 197throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Right")); 213throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Right")); 243throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Top"));
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (3)
131throw new ArgumentException( 284throw new ArgumentException( 302throw new ArgumentException(
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (5)
1685throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(constraintSize), constraintSize)); 1707throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(constraintSize), constraintSize)); 1781throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(rowIndex), rowIndex)); 1806throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(rowIndex), rowIndex)); 3732throw new ArgumentException(SR.DataGridViewCell_FormattedValueHasWrongType, nameof(formattedValue));
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (3)
125throw new ArgumentException(string.Format(SR.DataGridViewColumnCollection_ColumnNotFound, columnName), nameof(columnName)); 140throw new ArgumentException(string.Format(SR.DataGridViewColumnCollection_ColumnNotFound, columnName), nameof(columnName)); 323throw new ArgumentException(SR.DataGridViewCellCollection_CellNotFound);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (1)
30throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewPaintPartsCombination, nameof(paintParts)), nameof(paintParts));
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
59throw new ArgumentException(SR.DataGridViewCell_FormattedValueTypeNull); 66throw new ArgumentException(SR.DataGridViewCheckBoxCell_InvalidValueType); 102throw new ArgumentException(SR.DataGridViewCheckBoxCell_InvalidValueType);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
892throw new ArgumentException(string.Format(SR.DataGridView_NeedColumnAutoSizingCriteria, "autoSizeColumnMode"));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (13)
413throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 552throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 602throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 640throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 646throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 680throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 686throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 723throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 729throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 796throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 802throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 993throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView, nameof(dataGridViewColumn)); 1028throw new ArgumentException(string.Format(SR.DataGridViewColumnCollection_ColumnNotFound, columnName), nameof(columnName));
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (7)
138throw new ArgumentException(SR.BadDataSourceForComplexBinding); 428throw new ArgumentException(SR.ComboBoxSortWithDataSource); 575throw new ArgumentException(SR.DataSourceLocksItems); 968new ArgumentException(SR.DataGridViewComboBoxCell_InvalidValue), 1003new ArgumentException(SR.DataGridViewComboBoxCell_InvalidValue), 1359throw new ArgumentException(string.Format(SR.DataGridViewComboBoxCell_PropertyNotFound, displayMember)); 1390throw new ArgumentException(string.Format(SR.DataGridViewComboBoxCell_PropertyNotFound, valueMember));
System\Windows\Forms\Controls\DataGridView\DataGridViewDataErrorEventArgs.cs (1)
33throw new ArgumentException(SR.DataGridView_CannotThrowNullException);
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (3)
236throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(rowIndex), rowIndex), nameof(rowIndex)); 241throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(rowIndex), rowIndex), nameof(rowIndex)); 367throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(rowIndex), rowIndex), nameof(rowIndex));
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (2)
1379throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(rowIndex), rowIndex), nameof(rowIndex)); 1503throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewPaintPartsCombination, "paintParts"));
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (17)
398throw new ArgumentException(SR.DataGridViewRowCollection_TooManyCells, nameof(dataGridViewRow)); 883throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 933throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 939throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 983throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1042throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1068throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1074throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 1093throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1119throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1125throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 1144throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1240throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1481throw new ArgumentException(SR.DataGridViewRowCollection_TooManyCells, nameof(dataGridViewRow)); 1513throw new ArgumentException(SR.DataGridViewRowCollection_TooManyCells, nameof(dataGridViewRow)); 2148throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, nameof(dataGridViewRow)); 2153throw new ArgumentException(SR.DataGridView_RowMustBeUnshared, nameof(dataGridViewRow));
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPrePaintEventArgs.cs (1)
72throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewPaintPartsCombination, nameof(value)), nameof(value));
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (5)
186throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value))); 246throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value))); 269throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value))); 292throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value))); 315throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value)));
System\Windows\Forms\Controls\ImageList\ImageList.cs (3)
151throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(ImageSize), "Size.Empty"), nameof(value)); 325throw new ArgumentException(SR.ImageListStripBadWidth, nameof(original)); 330throw new ArgumentException(SR.ImageListImageTooShort, nameof(original));
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (6)
142throw new ArgumentException(SR.ImageListBitmap); 193throw new ArgumentException(SR.ImageListBadImage, nameof(value)); 264throw new ArgumentException(SR.ImageListBadImage, nameof(value)); 345throw new ArgumentException(SR.ImageListBitmap); 396throw new ArgumentException(SR.ImageListStripBadWidth, nameof(value)); 401throw new ArgumentException(SR.ImageListImageTooShort, nameof(value));
System\Windows\Forms\Controls\Labels\LinkArea.LinkAreaConverter.cs (3)
66throw new ArgumentException( 131throw new ArgumentException(SR.PropertyValueInvalidEntry, nameof(propertyValues), invalidCast); 135throw new ArgumentException(SR.PropertyValueInvalidEntry, nameof(propertyValues), nullRef);
System\Windows\Forms\Controls\Labels\LinkConverter.cs (1)
62throw new ArgumentException(
System\Windows\Forms\Controls\Labels\LinkLabel.LinkCollection.cs (3)
52throw new ArgumentException(SR.LinkLabelBadLink, nameof(value)); 196throw new ArgumentException(SR.LinkLabelBadLink, nameof(value)); 208throw new ArgumentException(SR.LinkLabelBadLink, nameof(value));
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
197throw new ArgumentException(SR.CheckedListBoxInvalidSelectionMode);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (4)
408throw new ArgumentException(SR.ListBoxVarHeightMultiCol, nameof(value)); 692throw new ArgumentException(SR.ListBoxVarHeightMultiCol, nameof(value)); 856throw new ArgumentException(SR.ListBoxInvalidSelectionMode, nameof(value)); 1279throw new ArgumentException(SR.DataSourceLocksItems);
System\Windows\Forms\Controls\ListBoxes\ListBox.IntegerCollection.cs (4)
155throw new ArgumentException(null, nameof(item)); 186throw new ArgumentException(nameof(item)); 235throw new ArgumentException(null, nameof(value)); 308throw new ArgumentException(null, nameof(value));
System\Windows\Forms\Controls\ListControl\ListControl.cs (3)
54throw new ArgumentException(SR.BadDataSourceForComplexBinding, nameof(value)); 320throw new ArgumentException(SR.ListControlWrongValueMember, nameof(value)); 736throw new ArgumentException(SR.ListControlWrongDisplayMember, nameof(newDisplayMember));
System\Windows\Forms\Controls\ListView\ColumnHeaderConverter.cs (1)
72throw new ArgumentException(string.Format(SR.NoDefaultConstructor, t.FullName));
System\Windows\Forms\Controls\ListView\ListView.ColumnHeaderCollection.cs (1)
299throw new ArgumentException(SR.ColumnHeaderCollectionInvalidArgument, nameof(value));
System\Windows\Forms\Controls\ListView\ListView.cs (8)
258throw new ArgumentException(SR.ListViewActivationMustBeOnWhenHotTrackingIsOn, nameof(value)); 1094throw new ArgumentException(SR.ListViewHoverMustBeOnWhenHotTrackingIsOn, nameof(value)); 1874throw new ArgumentException(string.Format(SR.ListViewVirtualListSizeInvalidArgument, "value", value)); 2268throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(value), value), nameof(value)); 3829throw new ArgumentException(string.Format(SR.OnlyOneControl, ch.Text), nameof(ch)); 4025throw new ArgumentException(string.Format(SR.OnlyOneControl, items[i].Text), nameof(items)); 4052throw new ArgumentException(string.Format(SR.OnlyOneControl, item.Text), nameof(items)); 5043throw new ArgumentException(SR.ListViewStartIndexCannotBeLargerThanEndIndex);
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (2)
224throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(value), value), nameof(value)); 246throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(value), value), nameof(value));
System\Windows\Forms\Controls\ListView\ListViewGroupCollection.cs (2)
145throw new ArgumentException(SR.ListViewGroupCollectionBadListViewGroup, nameof(value)); 180throw new ArgumentException(string.Format(SR.OnlyOneControl, item.Text));
System\Windows\Forms\Controls\ListView\ListViewGroupItemCollection.cs (1)
68throw new ArgumentException(string.Format(SR.OnlyOneControl, item.Text), nameof(item));
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItemCollection.cs (3)
76throw new ArgumentException(SR.ListViewBadListViewSubItem, nameof(value)); 188throw new ArgumentException(SR.ListViewSubItemCollectionInvalidArgument, nameof(item)); 321throw new ArgumentException(SR.ListViewBadListViewSubItem, nameof(item));
System\Windows\Forms\Controls\ListView\ListViewVirtualItemsSelectionRangeChangedEventArgs.cs (1)
18throw new ArgumentException(SR.ListViewStartIndexCannotBeLargerThanEndIndex);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (4)
492throw new ArgumentException(string.Format(SR.MonthCalendarMaxSelCount, value.ToString("D")), nameof(value)); 916throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value)), nameof(value)); 937throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value)), nameof(value)); 958throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value)), nameof(value));
System\Windows\Forms\Controls\MonthCalendar\SelectionRangeConverter.cs (3)
72throw new ArgumentException(string.Format(SR.TextParseFailedFormat, 150throw new ArgumentException(SR.PropertyValueInvalidEntry, invalidCast); 154throw new ArgumentException(SR.PropertyValueInvalidEntry, nullRef);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (7)
920throw new ArgumentException(string.Format(SR.PropertyGridSetNull, count, value.Length)); 1581throw new ArgumentException(SR.PropertyGridTabScope, nameof(tabScope)); 1691throw new ArgumentException(string.Format(SR.PropertyGridNoBitmap, tab.GetType().FullName)); 1696throw new ArgumentException(string.Format(SR.PropertyGridTabName, tab.GetType().FullName)); 3423throw new ArgumentException(SR.PropertyGridTabScope); 3526throw new ArgumentException(SR.PropertyGridRemoveStaticTabs); 3569throw new ArgumentException(SR.PropertyGridRemoveStaticTabs);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
504throw new ArgumentException(SR.PropertyGridInvalidGridEntry);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewListBoxAccessibleObject.cs (1)
24throw new ArgumentException(null, nameof(owningGridViewListBox));
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (5)
1862throw new ArgumentException(string.Format(SR.RichTextFindEndInvalid, end)); 2339throw new ArgumentException(SR.InvalidFileType); 2712_ => throw new ArgumentException(SR.UnknownAttr), 2871throw new ArgumentException(SR.InvalidFileFormat, ex); 2878throw new ArgumentException(SR.InvalidFileFormat);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
246throw new ArgumentException(SR.SplitterInvalidDockEnum);
System\Windows\Forms\Controls\TabControl\TabControl.ControlCollection.cs (1)
25throw new ArgumentException(string.Format(SR.TabControlInvalidTabPageType, value.GetType().Name));
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1137throw new ArgumentException(SR.TabControlBadControl, nameof(item));
System\Windows\Forms\Controls\TabControl\TabControl.TabPageCollection.cs (3)
39throw new ArgumentException(null, nameof(value)); 92throw new ArgumentException(null, nameof(value)); 242throw new ArgumentException(null, nameof(tabPage));
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
496throw new ArgumentException(string.Format(SR.TabControlTabPageNotOnTabControl, value.GetType().FullName));
System\Windows\Forms\Controls\TabControl\TabPage.TabPageControlCollection.cs (1)
31throw new ArgumentException(SR.TabControlTabPageOnTabPage);
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (3)
690throw new ArgumentException(SR.MaskedTextBoxMaskInvalidChar); 841throw new ArgumentException(SR.MaskedTextBoxInvalidCharError); 899throw new ArgumentException(SR.MaskedTextBoxInvalidCharError);
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
762throw new ArgumentException(SR.AutoCompleteFailure);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
275throw new ArgumentException(SR.ToolStripAllowItemReorderAndAllowDropCannotBeSetToTrue); 307throw new ArgumentException(SR.ToolStripAllowItemReorderAndAllowDropCannotBeSetToTrue);
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.ToolStripContainerTypedControlCollection.cs (1)
37throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfTypes, _contentPanelType.Name, _panelType.Name)), value.GetType().Name);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
1075throw new ArgumentException(SR.ToolStripMergeImpossibleIdentical); 1259throw new ArgumentException(SR.ToolStripMergeImpossibleIdentical);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelCell.cs (1)
52throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfType, nameof(ToolStrip))), control.GetType().Name);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (1)
290throw new ArgumentException(SR.ToolStripPanelRowControlCollectionIncorrectIndexLength);
System\Windows\Forms\Controls\TreeView\TreeNode.cs (1)
1774throw new ArgumentException(SR.TreeNodeCircularReference);
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (6)
50throw new ArgumentException(string.Format(SR.TreeNodeBoundToAnotherTreeView), nameof(value)); 55throw new ArgumentException(string.Format(SR.OnlyOneControl, value.Text), nameof(value)); 81throw new ArgumentException(SR.TreeNodeCollectionBadTreeNode, nameof(value)); 302throw new ArgumentException(string.Format(SR.OnlyOneControl, node.Text), nameof(node)); 438throw new ArgumentException(string.Format(SR.OnlyOneControl, node.Text), nameof(node)); 482throw new ArgumentException(SR.TreeNodeCollectionBadTreeNode, nameof(node));
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
117throw new ArgumentException(SR.HtmlDocumentInvalidDomain);
System\Windows\Forms\Controls\WebBrowser\HtmlWindowCollection.cs (1)
70throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(windowId), windowId), nameof(windowId));
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (2)
481throw new ArgumentException(SR.WebBrowserObjectForScriptingComVisibleOnly, nameof(value)); 1290throw new ArgumentException(string.Format(SR.WebBrowserNavigateAbsoluteUri, "uri"));
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
307throw new ArgumentException(string.Format(SR.AXDuplicateControl, GetNameForControl(ctl)), nameof(ctl));
System\Windows\Forms\DataBinding\Binding.BindToObject.cs (1)
223throw new ArgumentException(string.Format(SR.ListBindingBindField, dataField), "dataMember");
System\Windows\Forms\DataBinding\Binding.cs (2)
528throw new ArgumentException(string.Format(SR.ListBindingBindProperty, PropertyName), nameof(PropertyName)); 533throw new ArgumentException(string.Format(SR.ListBindingBindPropertyReadOnly, PropertyName), nameof(PropertyName));
System\Windows\Forms\DataBinding\BindingContext.cs (2)
267?? throw new ArgumentException(string.Format(SR.RelatedListManagerChild, dataField)); 307throw new ArgumentException(string.Format(SR.DataBindingCycle, binding.PropertyName), nameof(propBinding));
System\Windows\Forms\DataBinding\BindingSource.cs (3)
651?? throw new ArgumentException(string.Format(SR.DataSourceDataMemberPropNotFound, propertyName)); 999: throw new ArgumentException(SR.BindingSourceBadSortString); 1004?? throw new ArgumentException(SR.BindingSourceSortStringPropertyNotInIBindingList);
System\Windows\Forms\DataBinding\Command.cs (1)
90throw new ArgumentException(SR.CommandIdNotAllocated);
System\Windows\Forms\DataBinding\ControlBindingsCollection.cs (4)
175throw new ArgumentException(SR.BindingsCollectionAdd1, nameof(dataBinding)); 180throw new ArgumentException(SR.BindingsCollectionAdd2, nameof(dataBinding)); 200throw new ArgumentException(SR.BindingsCollectionDup, nameof(binding)); 246throw new ArgumentException(SR.BindingsCollectionForeign, nameof(dataBinding));
System\Windows\Forms\DataBinding\CurrencyManager.cs (1)
188throw new ArgumentException(string.Format(SR.ListManagerSetDataSource, tempList.GetType().FullName), nameof(dataSource));
System\Windows\Forms\DataBinding\ListBindingConverter.cs (2)
93throw new ArgumentException(SR.PropertyValueInvalidEntry, invalidCast); 97throw new ArgumentException(SR.PropertyValueInvalidEntry, nullRef);
System\Windows\Forms\DataBinding\ListBindingHelper.cs (2)
49?? throw new ArgumentException(string.Format(SR.DataSourceDataMemberPropNotFound, dataMember)); 187listAccessors2[0] = dmProp ?? throw new ArgumentException(string.Format(SR.DataSourceDataMemberPropNotFound, dataMember));
System\Windows\Forms\DataBinding\ListManagerBindingsCollection.cs (3)
32throw new ArgumentException(SR.BindingsCollectionAdd1, nameof(dataBinding)); 37throw new ArgumentException(SR.BindingsCollectionAdd2, nameof(dataBinding)); 61throw new ArgumentException(SR.BindingsCollectionForeign, nameof(dataBinding));
System\Windows\Forms\DataBinding\PropertyManager.cs (1)
42throw new ArgumentException(string.Format(SR.PropertyManagerPropDoesNotExist, _propName, dataSource));
System\Windows\Forms\DataBinding\RelatedCurrencyManager.cs (1)
38throw new ArgumentException(string.Format(SR.RelatedListManagerChild, dataField));
System\Windows\Forms\DataBinding\RelatedPropertyManager.cs (1)
27throw new ArgumentException(string.Format(SR.RelatedListManagerChild, dataField));
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
47throw new ArgumentException(SR.ComponentEditorFormBadComponent, nameof(component));
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (1)
205throw new ArgumentException(SR.FileDialogInvalidFilter, nameof(value));
System\Windows\Forms\Dialogs\MessageBox.cs (2)
60throw new ArgumentException(SR.CantShowMBServiceWithOwner, nameof(options)); 65throw new ArgumentException(SR.CantShowMBServiceWithHelp, nameof(options));
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButtonCollection.cs (2)
73throw new ArgumentException(SR.TaskDialogControlAlreadyAddedToCollection); 108throw new ArgumentException(SR.TaskDialogControlAlreadyAddedToCollection);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogProgressBar.cs (1)
316_ => throw new ArgumentException(null, nameof(state))
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogRadioButtonCollection.cs (2)
72throw new ArgumentException(SR.TaskDialogControlAlreadyAddedToCollection); 107throw new ArgumentException(SR.TaskDialogControlAlreadyAddedToCollection);
System\Windows\Forms\Form.ControlCollection.cs (3)
35throw new ArgumentException(SR.MDIContainerMustBeTopLevel, nameof(value)); 41throw new ArgumentException(SR.FormMDIParentAndChild, nameof(value)); 50throw new ArgumentException(SR.FormMDIParentCannotAdd, nameof(value));
System\Windows\Forms\Form.cs (8)
1464throw new ArgumentException(SR.AddDifferentThreads, nameof(value)); 1481throw new ArgumentException(SR.FormMDIParentAndChild, nameof(value)); 1486throw new ArgumentException(SR.MDIParentNotContainer, nameof(value)); 1639throw new ArgumentException(SR.NonTopLevelCantHaveOwner, nameof(value)); 2045throw new ArgumentException(SR.MDIContainerMustBeTopLevel, nameof(value)); 5511throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(Show)), nameof(owner)); 5659throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(ShowDialog)), nameof(owner)); 5738throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(ShowDialog)), nameof(owner));
System\Windows\Forms\Help\Help.cs (2)
187throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(param), "Integer"), nameof(param)); 196Uri? file = Resolve(url) ?? throw new ArgumentException(string.Format(SR.HelpInvalidURL, url), nameof(url));
System\Windows\Forms\Input\Cursor.cs (3)
61throw new ArgumentException(string.Format(SR.InvalidGDIHandle, (typeof(Cursor)).Name), nameof(handle)); 435throw new ArgumentException(string.Format(SR.InvalidPictureType, nameof(picture), nameof(Cursor)), paramName); 440throw new ArgumentException(SR.InvalidPictureFormat, paramName, e);
System\Windows\Forms\Input\InputLanguage.cs (1)
50throw new ArgumentException(SR.ErrorBadInputLanguage, nameof(value));
System\Windows\Forms\Input\InputLanguageChangedEventArgs.cs (1)
20?? throw new ArgumentException(string.Format(SR.InputLanguageCultureNotFound, culture), nameof(culture));
System\Windows\Forms\Input\InputLanguageChangingEventArgs.cs (1)
21?? throw new ArgumentException(string.Format(SR.InputLanguageCultureNotFound, culture), nameof(culture));
System\Windows\Forms\Internal\TypedControlCollection.cs (1)
48throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfType, _typeOfControl.Name)), value.GetType().Name);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1458throw new ArgumentException(SR.CannotActivateControl, nameof(value));
System\Windows\Forms\Layout\TableLayout.cs (2)
259throw new ArgumentException(SR.TableLayoutPanelFullDesc); 264throw new ArgumentException(SR.TableLayoutPanelSpanDesc);
System\Windows\Forms\Layout\TableLayout.SorterObjectArray.cs (2)
35throw new ArgumentException(null); 79throw new ArgumentException(null);
System\Windows\Forms\MDI\MDIClient.ControlCollection.cs (2)
46throw new ArgumentException(SR.MDIChildAddToNonMDIParent, nameof(value)); 51throw new ArgumentException(SR.AddDifferentThreads, nameof(value));
System\Windows\Forms\NotifyIcon.cs (1)
551throw new ArgumentException(SR.NotifyIconEmptyOrNullTipText);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanelCellPositionTypeConverter.cs (3)
50throw new ArgumentException( 88throw new ArgumentException(SR.PropertyValueInvalidEntry, nameof(propertyValues), invalidCast); 92throw new ArgumentException(SR.PropertyValueInvalidEntry, nameof(propertyValues), nullRef);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutStyleCollection.cs (5)
33throw new ArgumentException(string.Format(SR.InvalidArgumentType, nameof(style), typeof(TableLayoutStyle)), nameof(style)); 48throw new ArgumentException(string.Format(SR.InvalidArgumentType, nameof(style), typeof(TableLayoutStyle)), nameof(style)); 65throw new ArgumentException(string.Format(SR.InvalidArgumentType, nameof(value), typeof(TableLayoutStyle)), nameof(value)); 90throw new ArgumentException(string.Format(SR.InvalidArgumentType, nameof(style), typeof(TableLayoutStyle)), nameof(style)); 143throw new ArgumentException(string.Format(SR.OnlyOneControl, style.GetType().Name), nameof(style));
System\Windows\Forms\Printing\PageSetupDialog.cs (1)
268throw new ArgumentException(SR.PSDcantShowWithoutPage);
System\Windows\Forms\Printing\PrintDialog.cs (6)
275throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "FromPage")); 281throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "ToPage")); 286throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "FromPage")); 389throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "FromPage")); 395throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "ToPage")); 400throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "FromPage"));
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
137throw new ArgumentException(SR.PrintPreviewControlZoomNegative);
System\Windows\Forms\SendKeys\SendKeys.cs (12)
406throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 440throw new ArgumentException(SR.SendKeysKeywordDelimError); 457throw new ArgumentException(SR.SendKeysKeywordDelimError); 474throw new ArgumentException(SR.SendKeysKeywordDelimError); 479throw new ArgumentException(SR.InvalidSendKeysRepeat); 516throw new ArgumentException(string.Format(SR.InvalidSendKeysKeyword, keys[(i + 1)..j])); 526throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 537throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 548throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 567throw new ArgumentException(SR.SendKeysNestingError); 590throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 618throw new ArgumentException(SR.SendKeysGroupDelimError);
System\Windows\Forms\ToolTip\ToolTip.cs (1)
246throw new ArgumentException(string.Format(SR.ToolTipEmptyColor, nameof(ForeColor)), nameof(value));
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (2)
139throw new ArgumentException(SR.VisualStylesInvalidCombination); 201throw new ArgumentException(SR.VisualStylesInvalidCombination);
System.Windows.Forms.Analyzers.CSharp (2)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.FontConverter.cs (2)
81throw new ArgumentException(string.Format(SR.TextParseFailedFormat, 131_ => throw new ArgumentException(string.Format(SR.InvalidArgumentValueFontConverter, units), nameof(units)),
System.Windows.Forms.Design (37)
System\ComponentModel\Design\ComponentDesigner.ShadowPropertyCollection.cs (1)
37PropertyDescriptor property = GetShadowedPropertyDescriptor(propertyName) ?? throw new ArgumentException("The requested property does not exist", nameof(propertyName));
System\ComponentModel\Design\DesignerActionItemCollectionExtensions.cs (1)
10: throw new ArgumentException($"Value must be of type {nameof(DesignerActionItem)}", nameof(value));
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (1)
146throw new ArgumentException(string.Format(SR.EventBindingServiceBadArgType, Name, nameof(String)))
System\ComponentModel\Design\ExceptionCollection.cs (1)
22throw new ArgumentException(string.Format(SR.ExceptionCollectionInvalidArgument, nameof(Exception)), nameof(exceptions));
System\ComponentModel\Design\ExtenderProviderService.cs (1)
36throw new ArgumentException(string.Format(SR.ExtenderProviderServiceDuplicateProvider, provider), nameof(provider));
System\ComponentModel\Design\MenuCommandService.cs (1)
84throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.MenuCommandService_DuplicateCommand, commandId.ToString()));
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (4)
968Exception ex = new ArgumentException(SR.CodeDomDesignerLoaderBadSerializationObject) 1182Exception ex = new ArgumentException(SR.CodeDomDesignerLoaderInvalidBlankIdentifier) 1215Exception ex = new ArgumentException(string.Format(SR.CodeDomDesignerLoaderInvalidIdentifier, name)) 1258Exception ex = new ArgumentException(string.Format(SR.CodeDomDesignerLoaderDupComponentName, name))
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (1)
88throw new ArgumentException(string.Format(SR.SerializerBadElementTypes, codeObject.GetType().Name, supportedTypes));
System\ComponentModel\Design\Serialization\DesignerSerializationManager.cs (2)
931throw new ArgumentException(string.Format(SR.SerializationManagerNameInUse, name), nameof(name)); 936throw new ArgumentException(string.Format(SR.SerializationManagerObjectHasName, name, instanceName), nameof(instance));
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.cs (1)
112throw new ArgumentException(string.Format(SR.SerializerBadElementTypes, codeObject.GetType().Name, supportedTypes));
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (2)
161throw new ArgumentException("Serialization manager should have a PropertyDescriptor context"); 166throw new ArgumentException("Serialization manager should have an ExpressionContext context");
System\Drawing\Design\ToolboxItem.cs (2)
752throw new ArgumentException(string.Format(SR.ToolboxItemInvalidPropertyType, propertyName, expectedType.FullName), nameof(value)); 855: throw new ArgumentException(SR.ToolboxItemInvalidKey, nameof(key));
System\Resources\Tools\StronglyTypedResourceBuilder.cs (2)
174throw new ArgumentException(string.Format(SR.MismatchedResourceName, keyname, node.Name)); 339throw new ArgumentException(string.Format(SR.InvalidIdentifier, className));
System\Windows\Forms\Design\Behavior\Behavior.cs (1)
31throw new ArgumentException(null, nameof(behaviorService));
System\Windows\Forms\Design\CommandSet.cs (1)
2579: throw new ArgumentException(SR.CommandSetUnknownSpacingCommand);
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (3)
249?? throw new ArgumentException(string.Format(SR.AXNotRegistered, controlKey)); 317throw new ArgumentException(string.Format(SR.AXNotRegistered, controlKey)); 335throw new ArgumentException(string.Format(SR.AXNotRegistered, controlKey));
System\Windows\Forms\Design\DocumentDesigner.cs (1)
1411? throw new ArgumentException(null, nameof(technology))
System\Windows\Forms\Design\FormDocumentDesigner.cs (1)
166throw new ArgumentException(
System\Windows\Forms\Design\ImageListDesigner.OriginalImageCollection.cs (2)
72set => this[index] = value is ImageListImage image ? image : throw new ArgumentException(null, nameof(index)); 111int IList.Add(object? value) => value is ImageListImage image ? Add(image) : throw new ArgumentException(null, nameof(value));
System\Windows\Forms\Design\ListControlStringCollectionEditor.cs (1)
25throw new ArgumentException(SR.DataSourceLocksItems);
System\Windows\Forms\Design\ParentControlDesigner.cs (1)
255throw new ArgumentException(string.Format(SR.InvalidArgument,
System\Windows\Forms\Design\TabControlDesigner.cs (1)
123throw new ArgumentException(string.Format(SR.TabControlInvalidTabPageType, tool.DisplayName));
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
66throw new ArgumentException(string.Format(SR.TableLayoutPanelDesignerInvalidColumnRowCount, "RowCount")); 82throw new ArgumentException(string.Format(SR.TableLayoutPanelDesignerInvalidColumnRowCount, "ColumnCount"));
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
116throw new ArgumentException(SR.ToolStripAllowItemReorderAndAllowDropCannotBeSetToTrue); 133throw new ArgumentException(SR.ToolStripAllowItemReorderAndAllowDropCannotBeSetToTrue);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
126throw new ArgumentException(string.Format(SR.InvalidArgument, "DropDown", value.ToString()));
System.Windows.Forms.IntegrationTests.Common (3)
TestHelpers.cs (3)
423throw new ArgumentException($"{nameof(process)} must not be null."); 428throw new ArgumentException($"{nameof(process)} must not have exited."); 433throw new ArgumentException($"{nameof(keys)} must not be null or empty.");
System.Windows.Forms.Primitives (7)
System\Windows\Forms\Internals\ScaleHelper.cs (1)
360?? throw new ArgumentException(string.Format(SR.ResourceNotFound, type, resource));
System\Windows\Forms\PaddingConverter.cs (3)
40: throw new ArgumentException(string.Format(SR.TextParseFailedFormat, stringValue, "left, top, right, bottom"), nameof(value)); 101throw new ArgumentException(SR.PropertyValueInvalidEntry, nameof(propertyValues), invalidCast); 105throw new ArgumentException(SR.PropertyValueInvalidEntry, nameof(propertyValues), nullRef);
Windows\Win32\PInvoke.SetThreadDpiAwarenessContext.cs (1)
21throw new ArgumentException(dpiContext.ToString(), nameof(dpiContext));
Windows\Win32\System\Com\ComSafeArrayScope.cs (1)
27throw new ArgumentException("Must pass in a SafeArray of type VARENUM.VT_UNKNOWN");
Windows\Win32\System\Com\StandardDispatch.cs (1)
47throw new ArgumentException("Interface guid doesn't match type info", nameof(typeInfo));
System.Windows.Forms.Primitives.TestUtilities (2)
Win32\WindowClass.cs (2)
82throw new ArgumentException($"Can't set both {nameof(menuName)} and {nameof(menuId)}."); 157throw new ArgumentException("Window class must be registered before using.");
System.Windows.Forms.Tests (1)
System\Windows\Forms\ToolStripLabelTests.cs (1)
242_ => throw new ArgumentException("Invalid property name", nameof(propertyName))
System.Windows.Forms.UI.IntegrationTests (3)
Infra\SendInput.cs (1)
64throw new ArgumentException($"Unexpected type encountered: {key.GetType()}", nameof(keys));
Input\InputBuilder.cs (2)
88_ => throw new ArgumentException("Unexpected button", nameof(button)), 110_ => throw new ArgumentException("Unexpected button", nameof(button)),
System.Xaml (60)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (6)
331throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 612throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 1096throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 1135throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 1424throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 1499throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (3)
347throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 360throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 365throw new ArgumentException(SR.Format(SR.ParserAttributeArgsHigh, attrType.Name));
System\Windows\Markup\StaticExtension.cs (5)
68throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, _member)); 75throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, _member)); 84throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver))); 94throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, _member)); 110throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, typeNameForError is not null ? $"{typeNameForError}.{_member}" : _member));
System\Windows\Markup\StaticExtensionsToInstanceDescriptorsConverter.cs (1)
32throw new ArgumentException(SR.Format(SR.MustBeOfType, nameof(value), nameof(StaticExtension)));
System\Windows\Markup\TypeExtensionConverter.cs (1)
32throw new ArgumentException(SR.Format(SR.MustBeOfType, nameof(value), nameof(TypeExtension)));
System\Xaml\Context\ObjectWriterContext.cs (2)
317throw new ArgumentException(SR.Format(SR.NotAmbientProperty, xamlMember.DeclaringType.Name, xamlMember.Name), nameof(properties)); 432throw new ArgumentException(SR.Format(SR.NotAmbientType, xamlType.Name), nameof(types));
System\Xaml\Context\ServiceProviderContext.cs (6)
139throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); 155throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "types")); 173throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); 189throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "types")); 209throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); 297throw new ArgumentException(SR.SimpleFixupsMustHaveOneName, nameof(names));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (4)
62throw new ArgumentException(SR.SavedContextSchemaContextNull, nameof(savedContext)); 76throw new ArgumentException(SR.SavedContextSchemaContextMismatch, nameof(schemaContext)); 898throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull); 903throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull);
System\Xaml\NameScope.cs (8)
33throw new ArgumentException(SR.NameScopeNameNotEmptyString); 38throw new ArgumentException(SR.Format(SR.NameScopeInvalidIdentifierName, name)); 56throw new ArgumentException(SR.Format(SR.NameScopeDuplicateNamesNotAllowed, name)); 71throw new ArgumentException(SR.NameScopeNameNotEmptyString); 76throw new ArgumentException(SR.Format(SR.NameScopeNameNotFound, name)); 145throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "item.Key"), nameof(item)); 150throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "item.Value"), nameof(item)); 160throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "item.Key"), nameof(item));
System\Xaml\NameScopeDictionary.cs (6)
43throw new ArgumentException(SR.NameScopeNameNotEmptyString); 47throw new ArgumentException(SR.Format(SR.NameScopeInvalidIdentifierName, name)); 72throw new ArgumentException(SR.Format(SR.NameScopeDuplicateNamesNotAllowed, name)); 83throw new ArgumentException(SR.NameScopeNameNotEmptyString); 98throw new ArgumentException(SR.Format(SR.NameScopeNameNotFound, name)); 108throw new ArgumentException(SR.NameScopeNameNotEmptyString);
System\Xaml\Parser\MeScanner.cs (1)
319throw new ArgumentException(SR.MalformedPropertyName);
System\Xaml\Schema\XamlDirective.cs (1)
44throw new ArgumentException(SR.CollectionCannotContainNulls, nameof(xamlNamespaces));
System\Xaml\Schema\XamlValueConverter.cs (1)
33throw new ArgumentException(SR.Format(SR.ArgumentRequired, $"{nameof(converterType)}, {nameof(targetType)}, {nameof(name)}"));
System\Xaml\XamlMarkupExtensionWriter.cs (1)
177throw new ArgumentException(SR.XamlMarkupExtensionWriterCannotWriteNonstringValue);
System\Xaml\XamlMember.cs (2)
849throw new ArgumentException(SR.IncorrectGetterParamNum, argumentName); 857throw new ArgumentException(SR.IncorrectSetterParamNum, argumentName);
System\Xaml\XamlSchemaContext.cs (4)
279throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "xamlTypeName.Name"), nameof(xamlTypeName)); 284throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "xamlTypeName.Namespace"), nameof(xamlTypeName)); 295throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "xamlTypeName.TypeArguments")); 319throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "typeArguments"));
System\Xaml\XamlServices.cs (1)
146throw new ArgumentException(SR.StringIsNullOrEmpty, nameof(fileName));
System\Xaml\XamlType.cs (1)
1587throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "typeArguments"));
System\Xaml\XamlXmlWriter.cs (6)
166throw new ArgumentException(SR.Format(SR.TypeHasInvalidXamlName, type.Name), nameof(type)); 191throw new ArgumentException(SR.Format(SR.MemberHasInvalidXamlName, property.Name), nameof(property)); 215throw new ArgumentException(SR.XamlXmlWriterCannotWriteNonstringValue, nameof(value)); 230throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull, nameof(namespaceDeclaration)); 235throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull, nameof(namespaceDeclaration)); 240throw new ArgumentException(SR.NamespaceDeclarationCannotBeXml, nameof(namespaceDeclaration));
Templates.Blazor.Tests (3)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Templates.Blazor.WebAssembly.Auth.Tests (3)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Templates.Blazor.WebAssembly.Tests (3)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Templates.Mvc.Tests (3)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Templates.Tests (3)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Test.Utilities (38)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
TestProject.AppHost (2)
TestProgram.cs (1)
36throw new ArgumentException("Missing argument to --skip-resources option.");
tests\testproject\Common\TestResourceNames.cs (1)
30throw new ArgumentException($"Unknown resource name: {resourceName}");
TestProject.IntegrationServiceA (1)
tests\testproject\Common\TestResourceNames.cs (1)
30throw new ArgumentException($"Unknown resource name: {resourceName}");
Text.Analyzers (50)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (6)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource)); 221return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 226return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (3)
348throw new ArgumentException(); 475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (1)
251throw new ArgumentException();
src\Dependencies\Collections\Segmented\SegmentedArray.cs (8)
42throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 44throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 62throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 64throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 88throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 90throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 157throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 159throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
47throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
287throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException(nameof(surrogateChar)); 75throw new ArgumentException("Span should not be empty.", nameof(span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (2)
57throw new ArgumentException(); 60throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
456throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Symbols\ISymbolExtensions_Accessibility.cs (1)
33throw new ArgumentException();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (8)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException( 239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
UIAutomationClient (21)
MS\Internal\Automation\HwndProxyElementProvider.cs (1)
376throw new ArgumentException(SR.UnexpectedWindowState,nameof(state));
MS\Internal\Automation\Misc.cs (3)
144throw new ArgumentException(SR.UnsupportedPattern); 166throw new ArgumentException(SR.Format(SR.GenericInvalidArgument, argName)); 174throw new ArgumentException(SR.GetResourceString(reason, null));
MS\Internal\Automation\ProxyManager.cs (1)
729throw new ArgumentException(SR.NonclientClassnameCannotBeUsedWithFlagsOrImagename);
System\Windows\Automation\Automation.cs (2)
171throw new ArgumentException( SR.ParamsNotApplicableToWindowClosedEvent ); 222throw new ArgumentException( SR.AtLeastOnePropertyMustBeSpecified );
System\Windows\Automation\AutomationElement.cs (4)
501return new ArgumentException(SR.UnsupportedProperty); 707throw new ArgumentException(SR.UnsupportedPattern); 1286throw new ArgumentException(SR.TreeScopeNeedAtLeastOne); 1290throw new ArgumentException(SR.TreeScopeElementChildrenDescendantsOnly);
System\Windows\Automation\CacheRequest.cs (2)
303throw new ArgumentException(SR.TreeScopeNeedAtLeastOne); 308throw new ArgumentException(SR.TreeScopeElementChildrenDescendantsOnly);
System\Windows\Automation\ItemContainerPattern.cs (2)
129throw new ArgumentException(SR.UnsupportedProperty); 140throw new ArgumentException(SR.Format(SR.PropertyConditionIncorrectType, property.ProgrammaticName, expectedType.Name));
System\Windows\Automation\PropertyCondition.cs (2)
127throw new ArgumentException(SR.UnsupportedProperty); 138throw new ArgumentException(SR.Format(SR.PropertyConditionIncorrectType, property.ProgrammaticName, expectedType.Name));
System\Windows\Automation\Text\TextRange.cs (3)
180throw new ArgumentException(SR.UnsupportedAttribute); 185throw new ArgumentException(SR.Format(SR.TextAttributeValueWrongType, attribute, ai.Type.Name, value.GetType().Name), nameof(value)); 236throw new ArgumentException(SR.UnsupportedAttribute);
System\Windows\Automation\TextPattern.cs (1)
220throw new ArgumentException(SR.ScreenCoordinatesOutsideBoundingRect);
UIAutomationClientSideProviders (7)
MS\Internal\AutomationProxies\Accessible.cs (1)
1356throw new ArgumentException(SR.InvalidParameter);
MS\Internal\AutomationProxies\WindowsEditBox.cs (1)
282throw new ArgumentException(SR.Format(SR.NotAValidValue, str), "val");
MS\Internal\AutomationProxies\WindowsListView.cs (2)
825throw new ArgumentException(SR.InvalidParameter); 834throw new ArgumentException(SR.InvalidParameter);
MS\Internal\AutomationProxies\WindowsRichEdit.cs (1)
180throw new ArgumentException(SR.Format(SR.NotAValidValue, str), "val");
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (1)
1261throw new ArgumentException(name);
MS\Internal\AutomationProxies\WindowsUpDown.cs (1)
210throw new ArgumentException(SR.InvalidParameter);
UIAutomationProvider (2)
System\Windows\Automation\Provider\AutomationInteropProvider.cs (2)
182throw new ArgumentException(SR.Format(SR.GenericInvalidArgument, argName)); 190throw new ArgumentException(SR.GetResourceString(reason, null));
UIAutomationTypes (1)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (1)
248throw new ArgumentException($"{osVer} is not a valid OS!", nameof(osVer));
vbc (1)
src\Compilers\Shared\BuildProtocol.cs (1)
134throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
VBCSCompiler (1)
src\Compilers\Shared\BuildProtocol.cs (1)
134throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
VersioningWebSite (1)
VersionRouteAttribute.cs (1)
44throw new ArgumentException(message, "versionRange");
VisualBasicRuntimeTest (2)
Program.cs (2)
23throw new ArgumentException(message: null, nameof(args)); 56throw new ArgumentException(message: null, nameof(args));
Wasm.Performance.ConsoleHost (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
WindowsFormsIntegration (2)
System\Windows\Integration\PropertyMap.cs (1)
140throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyDoesntExist, propertyName, SourceObject.GetType().FullName));
System\Windows\Integration\WindowsFormsHost.cs (1)
317throw new ArgumentException(SR.Host_ChildCantBeTopLevelForm);
xunit.assert (4)
EqualityAsserts.cs (4)
396 throw new ArgumentException("Tolerance must be greater than or equal to zero", nameof(tolerance)); 468 throw new ArgumentException("Tolerance must be greater than or equal to zero", nameof(tolerance)); 877 throw new ArgumentException("Tolerance must be greater than or equal to zero", nameof(tolerance)); 949 throw new ArgumentException("Tolerance must be greater than or equal to zero", nameof(tolerance));
xunit.console (35)
CommandLine.cs (24)
67var reporter = reporters.FirstOrDefault(r => r.RunnerSwitch == unknownOption) ?? throw new ArgumentException($"unknown option: -{unknownOption}"); 70throw new ArgumentException("only one reporter is allowed"); 103throw new ArgumentException($"error: unknown command line option: {option.Value}"); 218throw new ArgumentException($"expecting assembly, got config file: {assemblyFile}"); 220throw new ArgumentException($"file not found: {assemblyFile}"); 230throw new ArgumentException($"config file not found: {configFile}"); 245throw new ArgumentException($"unknown command line option: {option.Key}"); 321throw new ArgumentException("missing argument for -appdomains"); 337throw new ArgumentException("incorrect argument value for -appdomains (must be 'ifavailable', 'required', or 'denied')"); 344throw new ArgumentException("missing argument for -maxthreads"); 359throw new ArgumentException("incorrect argument value for -maxthreads (must be 'default', 'unlimited', or a positive number)"); 368throw new ArgumentException("missing argument for -parallel"); 371throw new ArgumentException("incorrect argument value for -parallel"); 405throw new ArgumentException("missing argument for -trait"); 409throw new ArgumentException("incorrect argument format for -trait (should be \"name=value\")"); 418throw new ArgumentException("missing argument for -notrait"); 422throw new ArgumentException("incorrect argument format for -notrait (should be \"name=value\")"); 431throw new ArgumentException("missing argument for -class"); 438throw new ArgumentException("missing argument for -noclass"); 445throw new ArgumentException("missing argument for -method"); 452throw new ArgumentException("missing argument for -nomethod"); 459throw new ArgumentException("missing argument for -namespace"); 466throw new ArgumentException("missing argument for -nonamespace"); 476throw new ArgumentException($"missing filename for {option.Key}");
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\Dependency.cs (2)
15throw new ArgumentException(nameof(name)); 19throw new ArgumentException(nameof(version));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\Library.cs (3)
35throw new ArgumentException(nameof(type)); 39throw new ArgumentException(nameof(name)); 43throw new ArgumentException(nameof(version));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\ResourceAssembly.cs (2)
14throw new ArgumentException(nameof(path)); 18throw new ArgumentException(nameof(locale));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\RuntimeFallbacks.cs (1)
20throw new ArgumentException(nameof(runtime));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\TargetInfo.cs (1)
17throw new ArgumentException(nameof(framework));
common\Json.cs (1)
53throw new ArgumentException("Token value should be either True or False.", nameof(token));
ConsoleRunner.cs (1)
48throw new ArgumentException("must specify at least one assembly");
8253 references to ArgumentException
Aspire.Azure.AI.Inference (3)
AspireAzureAIInferenceExtensions.cs (3)
51ArgumentException.ThrowIfNullOrEmpty(connectionName); 88ArgumentException.ThrowIfNullOrEmpty(name); 194ArgumentException.ThrowIfNullOrEmpty(serviceKey);
Aspire.Azure.AI.Inference.Tests (4)
AspireAzureAIInferencePublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Azure.AI.OpenAI (4)
AspireAzureOpenAIExtensions.cs (2)
45ArgumentException.ThrowIfNullOrEmpty(connectionName); 73ArgumentException.ThrowIfNullOrEmpty(name);
AspireConfigurableOpenAIExtensions.cs (2)
34ArgumentException.ThrowIfNullOrEmpty(connectionName); 60ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Azure.AI.OpenAI.Tests (10)
AIOpenAIPublicApiTests.cs (10)
37var exception = isNull 39: Assert.Throws<ArgumentException>(action); 65var exception = isNull 67: Assert.Throws<ArgumentException>(action); 93var exception = isNull 95: Assert.Throws<ArgumentException>(action); 121var exception = isNull 123: Assert.Throws<ArgumentException>(action); ; 149var exception = isNull 151: Assert.Throws<ArgumentException>(action); ;
Aspire.Azure.Data.Tables (2)
AspireTablesExtensions.cs (2)
41ArgumentException.ThrowIfNullOrEmpty(connectionName); 63ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Azure.Data.Tables.Tests (4)
DataTablesPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Azure.Messaging.EventHubs (15)
AspireEventHubsExtensions.cs (11)
37ArgumentException.ThrowIfNullOrEmpty(connectionName); 60ArgumentException.ThrowIfNullOrEmpty(name); 83ArgumentException.ThrowIfNullOrEmpty(connectionName); 106ArgumentException.ThrowIfNullOrEmpty(name); 129ArgumentException.ThrowIfNullOrEmpty(connectionName); 152ArgumentException.ThrowIfNullOrEmpty(name); 176ArgumentException.ThrowIfNullOrEmpty(connectionName); 200ArgumentException.ThrowIfNullOrEmpty(name); 223ArgumentException.ThrowIfNullOrEmpty(connectionName); 239/// <exception cref="ArgumentException">Thrown when the name argument is null or empty.</exception> 247ArgumentException.ThrowIfNullOrEmpty(name);
src\Shared\StableConnectionStringBuilder.cs (4)
80ArgumentException.ThrowIfNullOrWhiteSpace(key); 91ArgumentException.ThrowIfNullOrWhiteSpace(key); 124ArgumentException.ThrowIfNullOrWhiteSpace(key); 140ArgumentException.ThrowIfNullOrWhiteSpace(key);
Aspire.Azure.Messaging.EventHubs.Tests (20)
MessagingEventHubsPublicApiTests.cs (20)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action); 89var exception = isNull 91: Assert.Throws<ArgumentException>(action); 117var exception = isNull 119: Assert.Throws<ArgumentException>(action); 145var exception = isNull 147: Assert.Throws<ArgumentException>(action); 173var exception = isNull 175: Assert.Throws<ArgumentException>(action); 201var exception = isNull 203: Assert.Throws<ArgumentException>(action); 229var exception = isNull 231: Assert.Throws<ArgumentException>(action); 257var exception = isNull 259: Assert.Throws<ArgumentException>(action); 285var exception = isNull 287: Assert.Throws<ArgumentException>(action);
Aspire.Azure.Messaging.ServiceBus (6)
AspireServiceBusExtensions.cs (2)
41ArgumentException.ThrowIfNullOrEmpty(connectionName); 62ArgumentException.ThrowIfNullOrEmpty(name);
src\Shared\StableConnectionStringBuilder.cs (4)
80ArgumentException.ThrowIfNullOrWhiteSpace(key); 91ArgumentException.ThrowIfNullOrWhiteSpace(key); 124ArgumentException.ThrowIfNullOrWhiteSpace(key); 140ArgumentException.ThrowIfNullOrWhiteSpace(key);
Aspire.Azure.Messaging.ServiceBus.Tests (4)
MessagingServiceBusPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Azure.Messaging.WebPubSub (8)
AspireWebPubSubExtensions.cs (4)
40ArgumentException.ThrowIfNullOrEmpty(connectionName); 63ArgumentException.ThrowIfNullOrEmpty(connectionName); 64ArgumentException.ThrowIfNullOrEmpty(serviceKey); 95ArgumentException.ThrowIfNullOrEmpty(connectionName);
src\Shared\StableConnectionStringBuilder.cs (4)
80ArgumentException.ThrowIfNullOrWhiteSpace(key); 91ArgumentException.ThrowIfNullOrWhiteSpace(key); 124ArgumentException.ThrowIfNullOrWhiteSpace(key); 140ArgumentException.ThrowIfNullOrWhiteSpace(key);
Aspire.Azure.Messaging.WebPubSub.Tests (7)
AspireWebPubSubExtensionsTests.cs (1)
163Assert.Throws<ArgumentException>(() => builder.AddKeyedAzureWebPubSubServiceClient("wps", ""));
MessagingWebPubSubPublicApiTests.cs (6)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 63var exception = isNull 65: Assert.Throws<ArgumentException>(action); 80var exception = isNull 82: Assert.Throws<ArgumentException>(action);
Aspire.Azure.Npgsql (3)
AspireAzureNpgsqlExtensions.cs (3)
32ArgumentException.ThrowIfNullOrEmpty(connectionName); 56/// <exception cref="ArgumentException">Thrown if mandatory <paramref name="name"/> is empty.</exception> 61ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL (1)
AspireAzureEFPostgreSqlExtensions.cs (1)
53ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
AzureNpgsqlEntityFrameworkCorePostgreSQLPublicApiTests.cs (2)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action);
Aspire.Azure.Npgsql.Tests (4)
NpgsqlPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Azure.Search.Documents (2)
AspireAzureSearchExtensions.cs (2)
41ArgumentException.ThrowIfNullOrEmpty(connectionName); 61ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Azure.Search.Documents.Tests (4)
SearchDocumentsPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Azure.Security.KeyVault (7)
AspireKeyVaultExtensions.cs (7)
41ArgumentException.ThrowIfNullOrEmpty(connectionName); 64ArgumentException.ThrowIfNullOrEmpty(name); 86ArgumentException.ThrowIfNullOrEmpty(connectionName); 108ArgumentException.ThrowIfNullOrEmpty(name); 130ArgumentException.ThrowIfNullOrEmpty(connectionName); 152ArgumentException.ThrowIfNullOrEmpty(name); 174ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Azure.Security.KeyVault.Tests (12)
AspireKeyVaultExtensionsTests.cs (6)
284var exception = isNull 286: Assert.Throws<ArgumentException>(action); 302var exception = isNull 304: Assert.Throws<ArgumentException>(action); 320var exception = isNull 322: Assert.Throws<ArgumentException>(action);
SecurityKeyVaultPublicApiTests.cs (6)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 62var exception = isNull 64: Assert.Throws<ArgumentException>(action); 90var exception = isNull 92: Assert.Throws<ArgumentException>(action);
Aspire.Azure.Storage.Blobs (4)
AspireBlobStorageExtensions.cs (4)
43ArgumentException.ThrowIfNullOrEmpty(connectionName); 75ArgumentException.ThrowIfNullOrEmpty(name); 106ArgumentException.ThrowIfNullOrEmpty(connectionName); 140ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Azure.Storage.Blobs.Tests (5)
AzureBlobStorageContainerSettingsTests.cs (1)
20Assert.Throws<ArgumentException>(() => ((IConnectionStringSettings)settings).ParseConnectionString(connectionString));
StorageBlobsPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Azure.Storage.Queues (2)
AspireQueueStorageExtensions.cs (2)
42ArgumentException.ThrowIfNullOrEmpty(connectionName); 64ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Azure.Storage.Queues.Tests (4)
StorageQueuesPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Confluent.Kafka (19)
AspireKafkaConsumerExtensions.cs (7)
59ArgumentException.ThrowIfNullOrEmpty(name); 67ArgumentException.ThrowIfNullOrEmpty(name); 75ArgumentException.ThrowIfNullOrEmpty(name); 83ArgumentException.ThrowIfNullOrEmpty(name); 91ArgumentException.ThrowIfNullOrEmpty(name); 106ArgumentException.ThrowIfNullOrEmpty(name); 119ArgumentException.ThrowIfNullOrEmpty(connectionName);
AspireKafkaProducerExtensions.cs (7)
59ArgumentException.ThrowIfNullOrEmpty(name); 67ArgumentException.ThrowIfNullOrEmpty(name); 75ArgumentException.ThrowIfNullOrEmpty(name); 83ArgumentException.ThrowIfNullOrEmpty(name); 91ArgumentException.ThrowIfNullOrEmpty(name); 106ArgumentException.ThrowIfNullOrEmpty(name); 119ArgumentException.ThrowIfNullOrEmpty(connectionName);
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\InstrumentedProducer.cs (5)
65catch (ArgumentException argumentException) 112catch (ArgumentException argumentException) 155catch (ArgumentException argumentException) 196catch (ArgumentException argumentException) 274private static string FormatArgumentException(ArgumentException argumentException) =>
Aspire.Confluent.Kafka.Tests (8)
ConfluentKafkaPublicApiTests.cs (8)
74var exception = isNull 76: Assert.Throws<ArgumentException>(action); 142var exception = isNull 144: Assert.Throws<ArgumentException>(action); 210var exception = isNull 212: Assert.Throws<ArgumentException>(action); 278var exception = isNull 280: Assert.Throws<ArgumentException>(action);
Aspire.Dashboard (5)
Model\ResourceViewModel.cs (5)
197ArgumentException.ThrowIfNullOrWhiteSpace(name); 198ArgumentException.ThrowIfNullOrWhiteSpace(displayName); 344ArgumentException.ThrowIfNullOrWhiteSpace(name); 438ArgumentException.ThrowIfNullOrWhiteSpace(resourceName); 439ArgumentException.ThrowIfNullOrWhiteSpace(type);
Aspire.EndToEnd.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
401ArgumentException.ThrowIfNullOrEmpty(dashboardUrl, nameof(dashboardUrl));
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
26ArgumentException.ThrowIfNullOrEmpty(customHiveDirName, nameof(customHiveDirName));
Aspire.Hosting (22)
ApplicationModel\AspireStore.cs (1)
37ArgumentException.ThrowIfNullOrWhiteSpace(filenameTemplate);
ApplicationModel\AspireStoreExtensions.cs (2)
22ArgumentException.ThrowIfNullOrWhiteSpace(filenameTemplate); 23ArgumentException.ThrowIfNullOrWhiteSpace(sourceFilename);
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
23ArgumentException.ThrowIfNullOrWhiteSpace(value, nameof(value));
ApplicationModel\ExecutableResource.cs (1)
39ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Cli\CliOrphanDetector.cs (1)
18catch (ArgumentException)
ContainerResourceBuilderExtensions.cs (3)
479ArgumentException.ThrowIfNullOrEmpty(contextPath); 593ArgumentException.ThrowIfNullOrEmpty(name); 690ArgumentException.ThrowIfNullOrEmpty(name);
Dcp\DcpKubernetesClient.cs (5)
46ArgumentException.ThrowIfNullOrWhiteSpace(group, nameof(group)); 47ArgumentException.ThrowIfNullOrWhiteSpace(version, nameof(version)); 48ArgumentException.ThrowIfNullOrWhiteSpace(plural, nameof(plural)); 49ArgumentException.ThrowIfNullOrWhiteSpace(name, nameof(name)); 50ArgumentException.ThrowIfNullOrWhiteSpace(subResource, nameof(subResource));
Devcontainers\Codespaces\CodespacesOptions.cs (1)
50ArgumentException.ThrowIfNullOrEmpty(key);
Devcontainers\Codespaces\CodespacesUrlRewriter.cs (1)
12ArgumentException.ThrowIfNullOrWhiteSpace(url);
Devcontainers\DevcontainerSettingsWriter.cs (3)
34ArgumentException.ThrowIfNullOrEmpty(url); 35ArgumentException.ThrowIfNullOrEmpty(protocol); 36ArgumentException.ThrowIfNullOrEmpty(label);
DistributedApplicationBuilderExtensions.cs (1)
63ArgumentException.ThrowIfNullOrEmpty(name, nameof(name));
ExternalServiceResource.cs (1)
82private static ArgumentException? GetUriValidationException(Uri uri)
VolumeNameGenerator.cs (1)
20/// <exception cref="ArgumentException"></exception>
Aspire.Hosting.Azure (5)
AzureEnvironmentResource.cs (1)
44/// <exception cref="ArgumentException">Thrown when the name is invalid.</exception>
AzureProvisioningResourceExtensions.cs (2)
219ArgumentException.ThrowIfNullOrEmpty(parameterName); 245ArgumentException.ThrowIfNullOrEmpty(parameterName);
AzureUserAssignedIdentityExtensions.cs (2)
21/// <exception cref="ArgumentException">Thrown when <paramref name="name"/> is null or empty.</exception> 33ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.AIFoundry (4)
AzureAIFoundryExtensions.cs (4)
51ArgumentException.ThrowIfNullOrEmpty(name); 52ArgumentException.ThrowIfNullOrEmpty(modelName); 53ArgumentException.ThrowIfNullOrEmpty(modelVersion); 54ArgumentException.ThrowIfNullOrEmpty(format);
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationExtensions.cs (1)
32ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.AppContainers (1)
ContainerAppExtensions.cs (1)
24/// <exception cref="ArgumentException">Throws if the container app resource is not parented to a <see cref="AzureResourceInfrastructure"/>.</exception>
Aspire.Hosting.Azure.ApplicationInsights (1)
AzureApplicationInsightsExtensions.cs (1)
39ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.CognitiveServices (8)
AzureOpenAIDeployment.cs (1)
59ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureOpenAIDeploymentResource.cs (3)
35ArgumentException.ThrowIfNullOrEmpty(modelName); 36ArgumentException.ThrowIfNullOrEmpty(modelVersion); 108ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureOpenAIExtensions.cs (4)
33ArgumentException.ThrowIfNullOrEmpty(name); 168ArgumentException.ThrowIfNullOrEmpty(name); 169ArgumentException.ThrowIfNullOrEmpty(modelName); 170ArgumentException.ThrowIfNullOrEmpty(modelVersion);
Aspire.Hosting.Azure.ContainerRegistry (2)
AzureContainerRegistryExtensions.cs (2)
25/// <exception cref="ArgumentException">Thrown when <paramref name="name"/> is null or empty.</exception> 29ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.CosmosDB (15)
AzureCosmosDBContainerResource.cs (4)
28ArgumentException.ThrowIfNullOrEmpty(containerName); 53ArgumentException.ThrowIfNullOrEmpty(containerName); 54ArgumentException.ThrowIfNullOrEmpty(partitionKeyPath); 133ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureCosmosDBDatabaseResource.cs (1)
57ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureCosmosDBExtensions.cs (6)
34ArgumentException.ThrowIfNullOrEmpty(name); 231ArgumentException.ThrowIfNullOrEmpty(databaseName); 248ArgumentException.ThrowIfNullOrEmpty(name); 270ArgumentException.ThrowIfNullOrEmpty(name); 271ArgumentException.ThrowIfNullOrEmpty(partitionKeyPath); 293ArgumentException.ThrowIfNullOrEmpty(name);
src\Shared\StableConnectionStringBuilder.cs (4)
80ArgumentException.ThrowIfNullOrWhiteSpace(key); 91ArgumentException.ThrowIfNullOrWhiteSpace(key); 124ArgumentException.ThrowIfNullOrWhiteSpace(key); 140ArgumentException.ThrowIfNullOrWhiteSpace(key);
Aspire.Hosting.Azure.EventHubs (7)
AzureEventHubConsumerGroupResource.cs (1)
66ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureEventHubResource.cs (1)
115ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureEventHubsExtensions.cs (5)
41ArgumentException.ThrowIfNullOrEmpty(name); 112ArgumentException.ThrowIfNullOrEmpty(name); 129ArgumentException.ThrowIfNullOrEmpty(name); 169ArgumentException.ThrowIfNullOrEmpty(name); 390ArgumentException.ThrowIfNullOrEmpty(path);
Aspire.Hosting.Azure.Functions (1)
AzureFunctionsProjectResourceExtensions.cs (1)
39ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.KeyVault (2)
AzureKeyVaultResource.cs (2)
54/// <exception cref="ArgumentException"></exception> 57ArgumentException.ThrowIfNullOrEmpty(secretName, nameof(secretName));
Aspire.Hosting.Azure.PostgreSQL (3)
AzurePostgresExtensions.cs (2)
139ArgumentException.ThrowIfNullOrEmpty(name); 158ArgumentException.ThrowIfNullOrEmpty(name);
AzurePostgresFlexibleServerDatabaseResource.cs (1)
46ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Aspire.Hosting.Azure.Redis (1)
AzureRedisExtensions.cs (1)
119ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.Search (1)
AzureSearchExtensions.cs (1)
34ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.ServiceBus (15)
AzureServiceBusExtensions.cs (11)
40ArgumentException.ThrowIfNullOrEmpty(name); 124ArgumentException.ThrowIfNullOrEmpty(name); 141ArgumentException.ThrowIfNullOrEmpty(name); 177ArgumentException.ThrowIfNullOrEmpty(name); 194ArgumentException.ThrowIfNullOrEmpty(name); 201ArgumentException.ThrowIfNullOrEmpty(subscription); 218ArgumentException.ThrowIfNullOrEmpty(name); 256ArgumentException.ThrowIfNullOrEmpty(topicName); 257ArgumentException.ThrowIfNullOrEmpty(subscriptionName); 284ArgumentException.ThrowIfNullOrEmpty(name); 472ArgumentException.ThrowIfNullOrEmpty(path);
AzureServiceBusQueueResource.cs (1)
204ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureServiceBusRule.cs (1)
187ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureServiceBusSubscriptionResource.cs (1)
189ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureServiceBusTopicResource.cs (1)
132ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRExtensions.cs (1)
56ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.Sql (3)
AzureSqlDatabaseResource.cs (1)
57ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureSqlExtensions.cs (2)
78ArgumentException.ThrowIfNullOrEmpty(name); 106ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.Storage (6)
AzureBlobStorageContainerResource.cs (1)
52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AzureStorageExtensions.cs (5)
40ArgumentException.ThrowIfNullOrEmpty(name); 293ArgumentException.ThrowIfNullOrEmpty(name); 326ArgumentException.ThrowIfNullOrEmpty(name); 360ArgumentException.ThrowIfNullOrEmpty(name); 375ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Azure.Tests (145)
AzureBicepProvisionerTests.cs (1)
25Assert.Throws<ArgumentException>(() =>
AzureKeyVaultTests.cs (6)
210var exception = Assert.Throws<ArgumentException>(() => kv.AddSecret(invalidSecretName, secretParam)); 227var exception = Assert.Throws<ArgumentException>(() => kv.AddSecret(invalidName, secretParam)); 258var exception = Assert.Throws<ArgumentException>(() => kv.AddSecret(tooLongSecretName, secretParam));
AzureWebPubSubExtensionsTests.cs (2)
19var ex = Assert.Throws<ArgumentException>(() => wps.AddHub("a_b_c"));
BicepIdentifierHelpersTests.cs (2)
24var e = Assert.Throws<ArgumentException>(() => BicepIdentifierHelpers.ThrowIfInvalid(value));
PublicApiTests\AppConfigurationPublicApiTests.cs (4)
32var exception = isNull 34: Assert.Throws<ArgumentException>(action); 48var exception = isNull 50: Assert.Throws<ArgumentException>(action);
PublicApiTests\ApplicationInsightsPublicApiTests.cs (4)
49var exception = isNull 51: Assert.Throws<ArgumentException>(action); 65var exception = isNull 67: Assert.Throws<ArgumentException>(action);
PublicApiTests\CognitiveServicesPublicApiTests.cs (8)
24var exception = isNull 26: Assert.Throws<ArgumentException>(action); 41var exception = isNull 43: Assert.Throws<ArgumentException>(action); 58var exception = isNull 60: Assert.Throws<ArgumentException>(action); 86var exception = isNull 88: Assert.Throws<ArgumentException>(action);
PublicApiTests\CosmosDBPublicApiTests.cs (34)
26var exception = isNull 28: Assert.Throws<ArgumentException>(action); 46var exception = isNull 48: Assert.Throws<ArgumentException>(action); 66var exception = isNull 68: Assert.Throws<ArgumentException>(action); 86var exception = isNull 88: Assert.Throws<ArgumentException>(action); 106var exception = isNull 108: Assert.Throws<ArgumentException>(action); 140var exception = Assert.Throws<ArgumentException>(action); 158var exception = Assert.Throws<ArgumentException>(action); 202var exception = isNull 204: Assert.Throws<ArgumentException>(action); 220var exception = isNull 222: Assert.Throws<ArgumentException>(action); 260var exception = isNull 262: Assert.Throws<ArgumentException>(action); 300var exception = isNull 302: Assert.Throws<ArgumentException>(action); 391var exception = isNull 393: Assert.Throws<ArgumentException>(action); 420var exception = isNull 422: Assert.Throws<ArgumentException>(action); 452var exception = isNull 454: Assert.Throws<ArgumentException>(action); 471var exception = isNull 473: Assert.Throws<ArgumentException>(action); 497var exception = Assert.Throws<ArgumentException>(action); 511var exception = Assert.Throws<ArgumentException>(action);
PublicApiTests\EventHubsPublicApiTests.cs (20)
25var exception = isNull 27: Assert.Throws<ArgumentException>(action); 44var exception = isNull 46: Assert.Throws<ArgumentException>(action); 74var exception = isNull 76: Assert.Throws<ArgumentException>(action); 91var exception = isNull 93: Assert.Throws<ArgumentException>(action); 143var exception = isNull 145: Assert.Throws<ArgumentException>(action); 174var exception = isNull 176: Assert.Throws<ArgumentException>(action); 203var exception = isNull 205: Assert.Throws<ArgumentException>(action); 257var exception = isNull 259: Assert.Throws<ArgumentException>(action); 349var exception = isNull 351: Assert.Throws<ArgumentException>(action); 390var exception = isNull 392: Assert.Throws<ArgumentException>(action);
PublicApiTests\FunctionsPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 90var exception = isNull 92: Assert.Throws<ArgumentException>(action);
PublicApiTests\KeyVaultPublicApiTests.cs (4)
20var exception = isNull 22: Assert.Throws<ArgumentException>(action); 60var exception = isNull 62: Assert.Throws<ArgumentException>(action);
PublicApiTests\OperationalInsightsPublicApiTests.cs (4)
20var exception = isNull 22: Assert.Throws<ArgumentException>(action); 60var exception = isNull 62: Assert.Throws<ArgumentException>(action);
PublicApiTests\PostgreSQLPublicApiTests.cs (10)
64var exception = isNull 66: Assert.Throws<ArgumentException>(action); 93var exception = isNull 95: Assert.Throws<ArgumentException>(action); 160var exception = isNull 162: Assert.Throws<ArgumentException>(action); 177var exception = isNull 179: Assert.Throws<ArgumentException>(action); 206var exception = isNull 208: Assert.Throws<ArgumentException>(action);
PublicApiTests\RedisPublicApiTests.cs (4)
21var exception = isNull 23: Assert.Throws<ArgumentException>(action); 91var exception = isNull 93: Assert.Throws<ArgumentException>(action);
PublicApiTests\SearchPublicApiTests.cs (4)
32var exception = isNull 34: Assert.Throws<ArgumentException>(action); 48var exception = isNull 50: Assert.Throws<ArgumentException>(action);
PublicApiTests\ServiceBusPublicApiTests.cs (12)
45var exception = isNull 47: Assert.Throws<ArgumentException>(action); 76var exception = isNull 78: Assert.Throws<ArgumentException>(action); 105var exception = isNull 107: Assert.Throws<ArgumentException>(action); 159var exception = isNull 161: Assert.Throws<ArgumentException>(action); 214var exception = isNull 216: Assert.Throws<ArgumentException>(action); 281var exception = isNull 283: Assert.Throws<ArgumentException>(action);
PublicApiTests\SignalRPublicApiTests.cs (4)
60var exception = isNull 62: Assert.Throws<ArgumentException>(action); 87var exception = isNull 89: Assert.Throws<ArgumentException>(action);
PublicApiTests\SqlPublicApiTests.cs (8)
22var exception = isNull 24: Assert.Throws<ArgumentException>(action); 39var exception = isNull 41: Assert.Throws<ArgumentException>(action); 110var exception = isNull 112: Assert.Throws<ArgumentException>(action); 139var exception = isNull 141: Assert.Throws<ArgumentException>(action);
PublicApiTests\WebPubSubPublicApiTests.cs (10)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 63var exception = isNull 65: Assert.Throws<ArgumentException>(action); 108var exception = isNull 110: Assert.Throws<ArgumentException>(action); 137var exception = isNull 139: Assert.Throws<ArgumentException>(action); 165var exception = isNull 167: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Azure.WebPubSub (4)
AzureWebPubSubExtensions.cs (4)
35ArgumentException.ThrowIfNullOrEmpty(name); 157ArgumentException.ThrowIfNullOrEmpty(name); 190ArgumentException.ThrowIfNullOrEmpty(userEventPattern); 217ArgumentException.ThrowIfNullOrEmpty(userEventPattern);
Aspire.Hosting.Containers.Tests (6)
ContainerMountAnnotationTests.cs (2)
24Assert.Throws<ArgumentException>("source", () => new ContainerMountAnnotation("usr/foo", "/usr/foo", ContainerMountType.BindMount, false)); 30Assert.Throws<ArgumentException>("isReadOnly", () => new ContainerMountAnnotation(null, "/usr/foo", ContainerMountType.Volume, true));
WithDockerfileTests.cs (4)
564var ex = Assert.Throws<ArgumentException>(() => 578var ex = Assert.Throws<ArgumentException>(() =>
Aspire.Hosting.Docker (3)
DockerComposeAspireDashboardResourceBuilderExtensions.cs (2)
26/// <exception cref="ArgumentException">Thrown when <paramref name="name"/> is <c>null</c> or empty.</exception> 32ArgumentException.ThrowIfNullOrEmpty(name);
DockerComposeEnvironmentExtensions.cs (1)
34ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Docker.Tests (4)
EnvVarEscaperTests.cs (4)
66var ex = Assert.Throws<ArgumentException>(() => EscapeUnescapedEnvVars(input)); 75var ex = Assert.Throws<ArgumentException>(() => EscapeUnescapedEnvVars(input));
Aspire.Hosting.Garnet (2)
GarnetBuilderExtensions.cs (2)
101ArgumentException.ThrowIfNullOrEmpty(name); 232ArgumentException.ThrowIfNullOrEmpty(source);
Aspire.Hosting.Garnet.Tests (6)
GarnetPublicApiTests.cs (6)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 74var exception = isNull 76: Assert.Throws<ArgumentException>(action); 116var exception = isNull 118: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Kafka (2)
KafkaBuilderExtensions.cs (2)
35ArgumentException.ThrowIfNullOrEmpty(name); 190ArgumentException.ThrowIfNullOrEmpty(source);
Aspire.Hosting.Kafka.Tests (8)
KafkaPublicApiTests.cs (8)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 97var exception = isNull 99: Assert.Throws<ArgumentException>(action); 112var exception = isNull 114: Assert.Throws<ArgumentException>(action); 127var exception = isNull 129: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Keycloak (4)
KeycloakResourceBuilderExtensions.cs (4)
53ArgumentException.ThrowIfNullOrEmpty(name); 131ArgumentException.ThrowIfNullOrEmpty(source); 160ArgumentException.ThrowIfNullOrEmpty(import); 188ArgumentException.ThrowIfNullOrEmpty(import);
Aspire.Hosting.Keycloak.Tests (8)
KeycloakPublicApiTests.cs (8)
23var exception = isNull 25: Assert.Throws<ArgumentException>(action); 64var exception = isNull 66: Assert.Throws<ArgumentException>(action); 104var exception = isNull 106: Assert.Throws<ArgumentException>(action); 133var exception = isNull 135: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Kubernetes (1)
KubernetesEnvironmentExtensions.cs (1)
33ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.Hosting.Milvus (6)
MilvusBuilderExtensions.cs (5)
47ArgumentException.ThrowIfNullOrEmpty(name); 98ArgumentException.ThrowIfNullOrEmpty(name); 174ArgumentException.ThrowIfNullOrEmpty(source); 189ArgumentException.ThrowIfNullOrEmpty(configurationFilePath); 203ArgumentException.ThrowIfNullOrEmpty(configurationFilePath);
MilvusDatabaseResource.cs (1)
36ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Aspire.Hosting.Milvus.Tests (18)
MilvusPublicApiTests.cs (18)
21var exception = isNull 23: Assert.Throws<ArgumentException>(action); 49var exception = isNull 51: Assert.Throws<ArgumentException>(action); 78var exception = isNull 80: Assert.Throws<ArgumentException>(action); 129var exception = isNull 131: Assert.Throws<ArgumentException>(action); 162var exception = isNull 164: Assert.Throws<ArgumentException>(action); 191var exception = isNull 193: Assert.Throws<ArgumentException>(action); 209var exception = isNull 211: Assert.Throws<ArgumentException>(action); 227var exception = isNull 229: Assert.Throws<ArgumentException>(action); 256var exception = isNull 258: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.MongoDB (6)
MongoDBBuilderExtensions.cs (5)
54ArgumentException.ThrowIfNullOrEmpty(name); 103ArgumentException.ThrowIfNullOrEmpty(name); 208ArgumentException.ThrowIfNullOrEmpty(source); 224ArgumentException.ThrowIfNullOrEmpty(source); 238ArgumentException.ThrowIfNullOrEmpty(source);
MongoDBDatabaseResource.cs (1)
35ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Aspire.Hosting.MongoDB.Tests (20)
MongoDBPublicApiTests.cs (20)
36var exception = isNull 38: Assert.Throws<ArgumentException>(action); 67var exception = isNull 69: Assert.Throws<ArgumentException>(action); 96var exception = isNull 98: Assert.Throws<ArgumentException>(action); 161var exception = isNull 163: Assert.Throws<ArgumentException>(action); 193var exception = isNull 195: Assert.Throws<ArgumentException>(action); 221var exception = isNull 223: Assert.Throws<ArgumentException>(action); 238var exception = isNull 240: Assert.Throws<ArgumentException>(action); 255var exception = isNull 257: Assert.Throws<ArgumentException>(action); 283var exception = isNull 285: Assert.Throws<ArgumentException>(action); 298var exception = isNull 300: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.MySql (6)
MySqlBuilderExtensions.cs (5)
35ArgumentException.ThrowIfNullOrEmpty(name); 98ArgumentException.ThrowIfNullOrEmpty(name); 310ArgumentException.ThrowIfNullOrEmpty(source); 326ArgumentException.ThrowIfNullOrEmpty(source); 340ArgumentException.ThrowIfNullOrEmpty(source);
MySqlDatabaseResource.cs (1)
46ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Aspire.Hosting.MySql.Tests (18)
MySqlPublicApiTests.cs (18)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 63var exception = isNull 65: Assert.Throws<ArgumentException>(action); 128var exception = isNull 130: Assert.Throws<ArgumentException>(action); 161var exception = isNull 163: Assert.Throws<ArgumentException>(action); 190var exception = isNull 192: Assert.Throws<ArgumentException>(action); 211var exception = isNull 213: Assert.Throws<ArgumentException>(action); 232var exception = isNull 234: Assert.Throws<ArgumentException>(action); 264var exception = isNull 266: Assert.Throws<ArgumentException>(action); 291var exception = isNull 293: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Nats (2)
NatsBuilderExtensions.cs (2)
52ArgumentException.ThrowIfNullOrEmpty(name); 166ArgumentException.ThrowIfNullOrEmpty(source);
Aspire.Hosting.Nats.Tests (10)
NatsPublicApiTests.cs (10)
38var exception = isNull 40: Assert.Throws<ArgumentException>(action); 78var exception = isNull 80: Assert.Throws<ArgumentException>(action); 142var exception = isNull 144: Assert.Throws<ArgumentException>(action); 157var exception = isNull 159: Assert.Throws<ArgumentException>(action); 181var exception = isNull 183: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.NodeJs (5)
NodeExtensions.cs (5)
26ArgumentException.ThrowIfNullOrEmpty(name); 27ArgumentException.ThrowIfNullOrEmpty(scriptPath); 54ArgumentException.ThrowIfNullOrEmpty(name); 55ArgumentException.ThrowIfNullOrEmpty(workingDirectory); 56ArgumentException.ThrowIfNullOrEmpty(scriptName);
Aspire.Hosting.NodeJs.Tests (12)
NodeJsPublicApiTests.cs (12)
22var exception = isNull 24: Assert.Throws<ArgumentException>(action); 39var exception = isNull 41: Assert.Throws<ArgumentException>(action); 82var exception = isNull 84: Assert.Throws<ArgumentException>(action); 99var exception = isNull 101: Assert.Throws<ArgumentException>(action); 129var exception = isNull 131: Assert.Throws<ArgumentException>(action); 160var exception = isNull 162: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Oracle (7)
OracleDatabaseBuilderExtensions.cs (6)
35ArgumentException.ThrowIfNullOrEmpty(name); 81ArgumentException.ThrowIfNullOrEmpty(name); 113ArgumentException.ThrowIfNullOrEmpty(source); 128ArgumentException.ThrowIfNullOrEmpty(source); 142ArgumentException.ThrowIfNullOrEmpty(source); 160ArgumentException.ThrowIfNullOrEmpty(source);
OracleDatabaseResource.cs (1)
36ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Aspire.Hosting.Oracle.Tests (18)
OraclePublicApiTests.cs (18)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 63var exception = isNull 65: Assert.Throws<ArgumentException>(action); 103var exception = isNull 105: Assert.Throws<ArgumentException>(action); 136var exception = isNull 138: Assert.Throws<ArgumentException>(action); 165var exception = isNull 167: Assert.Throws<ArgumentException>(action); 194var exception = isNull 196: Assert.Throws<ArgumentException>(action); 213var exception = isNull 215: Assert.Throws<ArgumentException>(action); 232var exception = isNull 234: Assert.Throws<ArgumentException>(action); 261var exception = isNull 263: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.PostgreSQL (6)
PostgresBuilderExtensions.cs (5)
48ArgumentException.ThrowIfNullOrEmpty(name); 141ArgumentException.ThrowIfNullOrEmpty(name); 387ArgumentException.ThrowIfNullOrEmpty(source); 403ArgumentException.ThrowIfNullOrEmpty(source); 417ArgumentException.ThrowIfNullOrEmpty(source);
PostgresDatabaseResource.cs (1)
46ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Aspire.Hosting.PostgreSQL.Tests (20)
PostgrePublicApiTests.cs (20)
22var exception = isNull 24: Assert.Throws<ArgumentException>(action); 37var exception = isNull 39: Assert.Throws<ArgumentException>(action); 65var exception = isNull 67: Assert.Throws<ArgumentException>(action); 94var exception = isNull 96: Assert.Throws<ArgumentException>(action); 180var exception = isNull 182: Assert.Throws<ArgumentException>(action); 225var exception = isNull 227: Assert.Throws<ArgumentException>(action); 242var exception = isNull 244: Assert.Throws<ArgumentException>(action); 262var exception = isNull 264: Assert.Throws<ArgumentException>(action); 282var exception = isNull 284: Assert.Throws<ArgumentException>(action); 313var exception = isNull 315: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Python (8)
PythonAppResourceBuilderExtensions.cs (4)
110ArgumentException.ThrowIfNullOrEmpty(name); 111ArgumentException.ThrowIfNullOrEmpty(appDirectory); 112ArgumentException.ThrowIfNullOrEmpty(scriptPath); 113ArgumentException.ThrowIfNullOrEmpty(virtualEnvironmentPath);
PythonProjectResourceBuilderExtensions.cs (4)
113ArgumentException.ThrowIfNullOrEmpty(name); 114ArgumentException.ThrowIfNullOrEmpty(projectDirectory); 115ArgumentException.ThrowIfNullOrEmpty(scriptPath); 116ArgumentException.ThrowIfNullOrEmpty(virtualEnvironmentPath);
Aspire.Hosting.Python.Tests (44)
PythonPublicApiTests.cs (44)
22var exception = isNull 24: Assert.Throws<ArgumentException>(action); 39var exception = isNull 41: Assert.Throws<ArgumentException>(action); 93var exception = isNull 95: Assert.Throws<ArgumentException>(action); 116var exception = isNull 118: Assert.Throws<ArgumentException>(action); 139var exception = isNull 141: Assert.Throws<ArgumentException>(action); 181var exception = isNull 183: Assert.Throws<ArgumentException>(action); 231var exception = isNull 233: Assert.Throws<ArgumentException>(action); 256var exception = isNull 258: Assert.Throws<ArgumentException>(action); 281var exception = isNull 283: Assert.Throws<ArgumentException>(action); 306var exception = isNull 308: Assert.Throws<ArgumentException>(action); 331var exception = isNull 333: Assert.Throws<ArgumentException>(action); 353var exception = isNull 355: Assert.Throws<ArgumentException>(action); 371var exception = isNull 373: Assert.Throws<ArgumentException>(action); 428var exception = isNull 430: Assert.Throws<ArgumentException>(action); 452var exception = isNull 454: Assert.Throws<ArgumentException>(action); 476var exception = isNull 478: Assert.Throws<ArgumentException>(action); 520var exception = isNull 522: Assert.Throws<ArgumentException>(action); 572var exception = isNull 574: Assert.Throws<ArgumentException>(action); 598var exception = isNull 600: Assert.Throws<ArgumentException>(action); 624var exception = isNull 626: Assert.Throws<ArgumentException>(action); 650var exception = isNull 652: Assert.Throws<ArgumentException>(action); 676var exception = isNull 678: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Qdrant (2)
QdrantBuilderExtensions.cs (2)
44ArgumentException.ThrowIfNullOrEmpty(name); 125ArgumentException.ThrowIfNullOrEmpty(source);
Aspire.Hosting.Qdrant.Tests (6)
QdrantPublicApiTests.cs (6)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 74var exception = isNull 76: Assert.Throws<ArgumentException>(action); 118var exception = isNull 120: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.RabbitMQ (2)
RabbitMQBuilderExtensions.cs (2)
36ArgumentException.ThrowIfNullOrEmpty(name); 113ArgumentException.ThrowIfNullOrEmpty(source);
Aspire.Hosting.RabbitMQ.Tests (6)
RabbitMQPublicApiTests.cs (6)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 74var exception = isNull 76: Assert.Throws<ArgumentException>(action); 116var exception = isNull 118: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Redis (2)
RedisBuilderExtensions.cs (2)
345ArgumentException.ThrowIfNullOrEmpty(source); 408ArgumentException.ThrowIfNullOrEmpty(source);
Aspire.Hosting.Redis.Tests (12)
RedisPublicApiTests.cs (12)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 120var exception = isNull 122: Assert.Throws<ArgumentException>(action); 173var exception = isNull 175: Assert.Throws<ArgumentException>(action); 188var exception = isNull 190: Assert.Throws<ArgumentException>(action); 203var exception = isNull 205: Assert.Throws<ArgumentException>(action); 218var exception = isNull 220: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.SqlServer (4)
SqlServerBuilderExtensions.cs (3)
39ArgumentException.ThrowIfNullOrEmpty(name); 102ArgumentException.ThrowIfNullOrEmpty(name); 158ArgumentException.ThrowIfNullOrEmpty(source);
SqlServerDatabaseResource.cs (1)
47ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Aspire.Hosting.SqlServer.Tests (12)
SqlServerPublicApiTests.cs (12)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 63var exception = isNull 65: Assert.Throws<ArgumentException>(action); 103var exception = isNull 105: Assert.Throws<ArgumentException>(action); 124var exception = isNull 126: Assert.Throws<ArgumentException>(action); 145var exception = isNull 147: Assert.Throws<ArgumentException>(action); 176var exception = isNull 178: Assert.Throws<ArgumentException>(action);
Aspire.Hosting.Testing (10)
DistributedApplicationFactory.cs (5)
83ArgumentException.ThrowIfNullOrEmpty(resourceName); 94/// <exception cref="ArgumentException">The resource was not found or does not expose a connection string.</exception> 97ArgumentException.ThrowIfNullOrEmpty(resourceName); 109/// <exception cref="ArgumentException">The resource was not found, no matching endpoint was found, or multiple endpoints were found.</exception> 113ArgumentException.ThrowIfNullOrEmpty(resourceName);
DistributedApplicationHostingTestingExtensions.cs (5)
26ArgumentException.ThrowIfNullOrEmpty(resourceName); 43/// <exception cref="ArgumentException">The resource was not found or does not expose a connection string.</exception> 47ArgumentException.ThrowIfNullOrEmpty(resourceName); 65/// <exception cref="ArgumentException">The resource was not found, no matching endpoint was found, or multiple endpoints were found.</exception> 70ArgumentException.ThrowIfNullOrEmpty(resourceName);
Aspire.Hosting.Testing.Tests (27)
TestingPublicApiTests.cs (26)
57var exception = isNull 59: Assert.Throws<ArgumentException>(action); 78var exception = isNull 80: Assert.Throws<ArgumentException>(action); 95var exception = isNull 97: await Assert.ThrowsAsync<ArgumentException>(action); 112var exception = isNull 114: Assert.Throws<ArgumentException>(action); 140var exception = isNull 142: Assert.Throws<ArgumentException>(action); 168var exception = isNull 170: await Assert.ThrowsAsync<ArgumentException>(action); 196var exception = isNull 198: Assert.Throws<ArgumentException>(action); 233var exception = isNull 235: await Assert.ThrowsAsync<ArgumentException>(action); 277var exception = isNull 279: await Assert.ThrowsAsync<ArgumentException>(action); 321var exception = isNull 323: await Assert.ThrowsAsync<ArgumentException>(action); 381var exception = isNull 383: await Assert.ThrowsAsync<ArgumentException>(action); 411var exception = isNull 413: Assert.Throws<ArgumentException>(action); 455var exception = isNull 457: Assert.Throws<ArgumentException>(action);
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
26ArgumentException.ThrowIfNullOrEmpty(logText);
Aspire.Hosting.Tests (43)
AddParameterTests.cs (4)
177var ex1 = Assert.Throws<ArgumentException>(() => appBuilder.AddParameter("pass", () => "SomeSecret", publishValueAsDefault: true, secret: true)); 179var ex2 = Assert.Throws<ArgumentException>(() => appBuilder.AddParameter("pass", "SomeSecret", publishValueAsDefault: true, secret: true));
ExecutableResourceTests.cs (1)
91=> Assert.Throws<ArgumentException>("command", () => new ExecutableResource("name", command: "", workingDirectory: "."));
ExternalServiceTests.cs (7)
62var ex = Assert.Throws<ArgumentException>(() => builder.AddExternalService("nuget", invalidUrl)); 72var ex = Assert.Throws<ArgumentException>(() => builder.AddExternalService("nuget", relativeUri)); 82var ex = Assert.Throws<ArgumentException>(() => builder.AddExternalService("nuget", uriWithPath)); 232Assert.Throws<ArgumentException>(() => externalService.WithHttpHealthCheck(path: "https://invalid.com/path"));
ModelNameTests.cs (16)
24var exception = Assert.Throws<ArgumentException>(() => ModelName.ValidateName(nameof(Resource), "")); 35var exception = Assert.Throws<ArgumentException>(() => ModelName.ValidateName(nameof(Resource), name)); 45var exception = Assert.Throws<ArgumentException>(() => ModelName.ValidateName(nameof(Resource), " ")); 55var exception = Assert.Throws<ArgumentException>(() => ModelName.ValidateName(nameof(Resource), "test_name")); 65var exception = Assert.Throws<ArgumentException>(() => ModelName.ValidateName(nameof(Resource), "-abc")); 75var exception = Assert.Throws<ArgumentException>(() => ModelName.ValidateName(nameof(Resource), "test--name")); 85var exception = Assert.Throws<ArgumentException>(() => ModelName.ValidateName(nameof(Resource), "1abc")); 95var exception = Assert.Throws<ArgumentException>(() => ModelName.ValidateName(nameof(Resource), "abc-"));
src\Shared\StableConnectionStringBuilder.cs (4)
80ArgumentException.ThrowIfNullOrWhiteSpace(key); 91ArgumentException.ThrowIfNullOrWhiteSpace(key); 124ArgumentException.ThrowIfNullOrWhiteSpace(key); 140ArgumentException.ThrowIfNullOrWhiteSpace(key);
StableConnectionStringBuilderTests.cs (4)
151var ex = Assert.Throws<ArgumentException>(() => 164var ex = Assert.Throws<ArgumentException>(() =>
Utils\LoggerNotificationExtensions.cs (1)
26ArgumentException.ThrowIfNullOrEmpty(logText);
Utils\PasswordGeneratorTests.cs (5)
26Assert.Throws<ArgumentException>(() => Generate(10, false, true, true, true, 1, 0, 0, 0)); 27Assert.Throws<ArgumentException>(() => Generate(10, true, false, true, true, 0, 1, 0, 0)); 28Assert.Throws<ArgumentException>(() => Generate(10, true, true, false, true, 0, 0, 1, 0)); 29Assert.Throws<ArgumentException>(() => Generate(10, true, true, true, false, 0, 0, 0, 1)); 31Assert.Throws<ArgumentException>(() => Generate(10, false, false, false, false, 0, 0, 0, 0));
Utils\VolumeNameGeneratorTests.cs (1)
33Assert.Throws<ArgumentException>(nameof(suffix), () => Generate(resource, suffix));
Aspire.Hosting.Valkey (3)
ValkeyBuilderExtensions.cs (3)
63ArgumentException.ThrowIfNullOrEmpty(name); 114ArgumentException.ThrowIfNullOrEmpty(name); 245ArgumentException.ThrowIfNullOrEmpty(source);
Aspire.Hosting.Valkey.Tests (6)
ValkeyPublicApiTests.cs (6)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action); 74var exception = isNull 76: Assert.Throws<ArgumentException>(action); 100var exception = isNull 102: Assert.Throws<ArgumentException>(action);
Aspire.Keycloak.Authentication (6)
AspireKeycloakExtensions.cs (6)
80ArgumentException.ThrowIfNullOrEmpty(serviceName); 81ArgumentException.ThrowIfNullOrEmpty(realm); 82ArgumentException.ThrowIfNullOrEmpty(authenticationScheme); 162ArgumentException.ThrowIfNullOrEmpty(serviceName); 163ArgumentException.ThrowIfNullOrEmpty(realm); 164ArgumentException.ThrowIfNullOrEmpty(authenticationScheme);
Aspire.Keycloak.Authentication.Tests (40)
KeycloakAuthenticationPublicApiTests.cs (40)
39var exception = isNull 41: Assert.Throws<ArgumentException>(action); 57var exception = isNull 59: Assert.Throws<ArgumentException>(action); 90var exception = isNull 92: Assert.Throws<ArgumentException>(action); 109var exception = isNull 111: Assert.Throws<ArgumentException>(action); 128var exception = isNull 130: Assert.Throws<ArgumentException>(action); 161var exception = isNull 163: Assert.Throws<ArgumentException>(action); 180var exception = isNull 182: Assert.Throws<ArgumentException>(action); 223var exception = isNull 225: Assert.Throws<ArgumentException>(action); 247var exception = isNull 249: Assert.Throws<ArgumentException>(action); 271var exception = isNull 273: Assert.Throws<ArgumentException>(action); 302var exception = isNull 304: Assert.Throws<ArgumentException>(action); 320var exception = isNull 322: Assert.Throws<ArgumentException>(action); 353var exception = isNull 355: Assert.Throws<ArgumentException>(action); 372var exception = isNull 374: Assert.Throws<ArgumentException>(action); 391var exception = isNull 393: Assert.Throws<ArgumentException>(action); 424var exception = isNull 426: Assert.Throws<ArgumentException>(action); 443var exception = isNull 445: Assert.Throws<ArgumentException>(action); 486var exception = isNull 488: Assert.Throws<ArgumentException>(action); 510var exception = isNull 512: Assert.Throws<ArgumentException>(action); 534var exception = isNull 536: Assert.Throws<ArgumentException>(action);
Aspire.Microsoft.Azure.Cosmos (6)
AspireMicrosoftAzureCosmosExtensions.cs (2)
94ArgumentException.ThrowIfNullOrEmpty(name); 191ArgumentException.ThrowIfNullOrEmpty(connectionName);
src\Shared\StableConnectionStringBuilder.cs (4)
80ArgumentException.ThrowIfNullOrWhiteSpace(key); 91ArgumentException.ThrowIfNullOrWhiteSpace(key); 124ArgumentException.ThrowIfNullOrWhiteSpace(key); 140ArgumentException.ThrowIfNullOrWhiteSpace(key);
Aspire.Microsoft.Azure.Cosmos.Tests (6)
AspireMicrosoftAzureCosmosExtensionsTests.cs (2)
39var e = Assert.Throws<ArgumentException>(() =>
MicrosoftAzureCosmosPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Microsoft.Data.SqlClient (2)
AspireSqlServerSqlClientExtensions.cs (2)
45ArgumentException.ThrowIfNullOrEmpty(name); 57ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Microsoft.Data.SqlClient.Tests (4)
MicrosoftDataSqlClientPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Microsoft.EntityFrameworkCore.Cosmos (7)
AspireAzureEFCoreCosmosExtensions.cs (3)
44ArgumentException.ThrowIfNullOrEmpty(connectionName); 88ArgumentException.ThrowIfNullOrEmpty(connectionName); 89ArgumentException.ThrowIfNullOrEmpty(databaseName);
src\Shared\StableConnectionStringBuilder.cs (4)
80ArgumentException.ThrowIfNullOrWhiteSpace(key); 91ArgumentException.ThrowIfNullOrWhiteSpace(key); 124ArgumentException.ThrowIfNullOrWhiteSpace(key); 140ArgumentException.ThrowIfNullOrWhiteSpace(key);
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (6)
AspireAzureEfCoreCosmosDBExtensionsTests.cs (2)
345var e = Assert.Throws<ArgumentException>(() =>
MicrosoftEntityFrameworkCoreCosmosPublicApiTests.cs (4)
36var exception = isNull 38: Assert.Throws<ArgumentException>(action); 53var exception = isNull 55: Assert.Throws<ArgumentException>(action);
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
AspireSqlServerEFCoreSqlClientExtensions.cs (1)
44ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (2)
MicrosoftEntityFrameworkCoreSqlServerPublicApiTests.cs (2)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action);
Aspire.Milvus.Client (2)
AspireMilvusExtensions.cs (2)
52ArgumentException.ThrowIfNullOrEmpty(name); 64ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Milvus.Client.Tests (4)
MilvusClientPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.MongoDB.Driver (2)
AspireMongoDBDriverExtensions.cs (2)
57ArgumentException.ThrowIfNullOrEmpty(name); 75ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.MongoDB.Driver.Tests (4)
MongoDBDriverPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.MongoDB.Driver.v3.Tests (4)
tests\Aspire.MongoDB.Driver.Tests\MongoDBDriverPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.MySqlConnector (3)
AspireMySqlConnectorExtensions.cs (3)
44/// <exception cref="ArgumentException">Thrown if mandatory <paramref name="name"/> is empty.</exception> 48ArgumentException.ThrowIfNullOrEmpty(name); 60ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.MySqlConnector.Tests (4)
MySqlConnectorPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.NATS.Net (8)
AspireNatsClientExtensions.cs (8)
62ArgumentException.ThrowIfNullOrEmpty(name); 70ArgumentException.ThrowIfNullOrEmpty(name); 78ArgumentException.ThrowIfNullOrEmpty(name); 86ArgumentException.ThrowIfNullOrEmpty(name); 94ArgumentException.ThrowIfNullOrEmpty(name); 108/// <exception cref="ArgumentException">Thrown if mandatory <paramref name="name"/> is empty.</exception> 112ArgumentException.ThrowIfNullOrEmpty(name); 120ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.NATS.Net.Tests (4)
NatsClientPublicApiTests.cs (4)
76var exception = isNull 78: Assert.Throws<ArgumentException>(action); 144var exception = isNull 146: Assert.Throws<ArgumentException>(action);
Aspire.Npgsql (3)
AspirePostgreSqlNpgsqlExtensions.cs (3)
45/// <exception cref="ArgumentException">Thrown if mandatory <paramref name="name"/> is empty.</exception> 49ArgumentException.ThrowIfNullOrEmpty(name); 58ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (1)
AspireEFPostgreSqlExtensions.cs (1)
52ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
NpgsqlEntityFrameworkCorePostgreSQLPublicApiTests.cs (2)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action);
Aspire.Npgsql.Tests (4)
NpgsqlPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.OpenAI (4)
AspireOpenAIClientBuilder.cs (1)
93ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
AspireOpenAIClientBuilderChatClientExtensions.cs (1)
46ArgumentException.ThrowIfNullOrEmpty(serviceKey);
AspireOpenAIClientBuilderEmbeddingGeneratorExtensions.cs (1)
46ArgumentException.ThrowIfNullOrEmpty(serviceKey);
AspireOpenAIExtensions.cs (1)
52ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.OpenAI.Tests (10)
OpenAIPublicApiTests.cs (10)
37var exception = isNull 39: Assert.Throws<ArgumentException>(action); 80var exception = isNull 82: Assert.Throws<ArgumentException>(action); 123var exception = isNull 125: Assert.Throws<ArgumentException>(action); 151var exception = isNull 153: Assert.Throws<ArgumentException>(action); 179var exception = isNull 181: Assert.Throws<ArgumentException>(action);
Aspire.Oracle.EntityFrameworkCore (1)
AspireOracleEFCoreExtensions.cs (1)
45ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Oracle.EntityFrameworkCore.Tests (2)
OracleEntityFrameworkCorePublicApiTests.cs (2)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action);
Aspire.Playground.Tests (1)
tests\Aspire.Hosting.Tests\Utils\LoggerNotificationExtensions.cs (1)
26ArgumentException.ThrowIfNullOrEmpty(logText);
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
AspireEFMySqlExtensions.cs (1)
57ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (2)
PomeloEntityFrameworkCoreMySqlPublicApiTests.cs (2)
34var exception = isNull 36: Assert.Throws<ArgumentException>(action);
Aspire.Qdrant.Client (2)
AspireQdrantExtensions.cs (2)
50ArgumentException.ThrowIfNullOrEmpty(name); 62ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Qdrant.Client.Tests (4)
QdrantClientPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.RabbitMQ.Client (2)
src\Components\Aspire.RabbitMQ.Client\AspireRabbitMQExtensions.cs (2)
60ArgumentException.ThrowIfNullOrEmpty(name); 73ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.RabbitMQ.Client.Tests (4)
RabbitMQClientPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Seq (1)
AspireSeqExtensions.cs (1)
35ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.Seq.Tests (2)
SeqPublicApiTests.cs (2)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action);
Aspire.StackExchange.Redis (2)
AspireRedisExtensions.cs (2)
56ArgumentException.ThrowIfNullOrEmpty(name); 69ArgumentException.ThrowIfNullOrEmpty(connectionName);
Aspire.StackExchange.Redis.DistributedCaching (2)
AspireRedisDistributedCacheExtensions.cs (2)
37ArgumentException.ThrowIfNullOrEmpty(connectionName); 67ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.StackExchange.Redis.DistributedCaching.Tests (4)
StackExchangeRedisDistributedCachingPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.StackExchange.Redis.OutputCaching (2)
AspireRedisOutputCacheExtensions.cs (2)
36ArgumentException.ThrowIfNullOrEmpty(connectionName); 66ArgumentException.ThrowIfNullOrEmpty(name);
Aspire.StackExchange.Redis.OutputCaching.Tests (4)
StackExchangeRedisOutputCachingPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.StackExchange.Redis.Tests (4)
StackExchangeRedisPublicApiTests.cs (4)
33var exception = isNull 35: Assert.Throws<ArgumentException>(action); 61var exception = isNull 63: Assert.Throws<ArgumentException>(action);
Aspire.Templates.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
401ArgumentException.ThrowIfNullOrEmpty(dashboardUrl, nameof(dashboardUrl));
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
26ArgumentException.ThrowIfNullOrEmpty(customHiveDirName, nameof(customHiveDirName));
BasicTestApp (1)
Program.cs (1)
72catch (ArgumentException)
BinaryFormatTests (2)
FormatTests\FormattedObject\HashTableTests.cs (1)
122action.Should().Throw<ArgumentException>();
FormatTests\FormattedObject\RecordMapTests.cs (1)
23action.Should().Throw<ArgumentException>();
dotnet-openapi (11)
Application.cs (1)
70catch (ArgumentException ex)
Commands\AddFileCommand.cs (3)
34ArgumentException.ThrowIfNullOrEmpty(_sourceFileArg.Value); 63ArgumentException.ThrowIfNullOrEmpty(_sourceFileArg.Value); 65catch (ArgumentException ex)
Commands\AddProjectCommand.cs (1)
53ArgumentException.ThrowIfNullOrEmpty(_sourceProjectArg.Value);
Commands\AddURLCommand.cs (2)
34ArgumentException.ThrowIfNullOrEmpty(_sourceFileArg.Value); 52ArgumentException.ThrowIfNullOrEmpty(_sourceFileArg.Value);
Commands\RefreshCommand.cs (2)
29ArgumentException.ThrowIfNullOrEmpty(_sourceFileArg.Value); 58ArgumentException.ThrowIfNullOrEmpty(_sourceFileArg.Value);
Commands\RemoveCommand.cs (2)
29ArgumentException.ThrowIfNullOrEmpty(_sourceProjectArg.Value); 75ArgumentException.ThrowIfNullOrEmpty(_sourceProjectArg.Value);
dotnet-sql-cache (2)
SqlQueries.cs (2)
33ArgumentException.ThrowIfNullOrEmpty(schemaName); 34ArgumentException.ThrowIfNullOrEmpty(tableName);
dotnet-svcutil.xmlserializer (1)
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (1)
66catch (ArgumentException ae)
dotnet-svcutil-lib (66)
CommandProcessorOptions.cs (1)
179catch (ArgumentException ae)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (4)
3333catch (ArgumentException innerEx) 3560catch (ArgumentException) 3589catch (ArgumentException) 7953catch (ArgumentException e)
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlSystemPathResolver.cs (1)
46catch (ArgumentException e)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (8)
627catch (ArgumentException e) 1116catch (ArgumentException e) 1360catch (ArgumentException e) 2097catch (ArgumentException e) 2476catch (ArgumentException e) 2577catch (ArgumentException e) 2776catch (ArgumentException e) 3112catch (ArgumentException e)
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (1)
2099catch (ArgumentException)
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSchemaImporter.cs (1)
449catch (ArgumentException)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (2)
1474catch (ArgumentException) 1878internal static ArgumentException CreateInvalidNameArgumentException(string name, string argumentName)
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\CompiledXpathExpr.cs (1)
172catch (System.ArgumentException)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DateTimeOffsetAdapter.cs (1)
61catch (ArgumentException exception)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (3)
356catch (ArgumentException exception) 552catch (ArgumentException exception) 581catch (ArgumentException exception)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBufferReader.cs (2)
472catch (ArgumentException exception) 494catch (ArgumentException exception)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (13)
76catch (ArgumentException exception) 105catch (ArgumentException exception) 133catch (ArgumentException exception) 161catch (ArgumentException exception) 189catch (ArgumentException exception) 217catch (ArgumentException exception) 242catch (ArgumentException exception) 254catch (ArgumentException exception) 278catch (ArgumentException exception) 299catch (ArgumentException exception) 328catch (ArgumentException exception) 349catch (ArgumentException exception) 974catch (ArgumentException)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryReader.cs (11)
728catch (ArgumentException exception) 759catch (ArgumentException exception) 790catch (ArgumentException exception) 1528catch (ArgumentException exception) 1544catch (ArgumentException exception) 1564catch (ArgumentException exception) 1584catch (ArgumentException exception) 1604catch (ArgumentException exception) 1624catch (ArgumentException exception) 1644catch (ArgumentException exception) 1664catch (ArgumentException exception)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\ExceptionTrace.cs (3)
171public ArgumentException Argument(string paramName, string message) 173return TraceException<ArgumentException>(new ArgumentException(message, paramName)); 186public ArgumentException ArgumentNullOrEmpty(string paramName)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (1)
325catch (ArgumentException)
FrameworkFork\System.ServiceModel\SMDiagnostics\System\ServiceModel\Diagnostics\ExceptionUtility.cs (6)
39public ArgumentException ThrowHelperArgument(string message) 41return (ArgumentException)this.ThrowHelperError(new ArgumentException(message)); 44public ArgumentException ThrowHelperArgument(string paramName, string message) 46return (ArgumentException)this.ThrowHelperError(new ArgumentException(message, paramName)); 59public ArgumentException ThrowHelperArgumentNullOrEmptyString(string arg) 61return (ArgumentException)this.ThrowHelperError(new ArgumentException(SRServiceModel.StringNullOrEmpty, arg));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\KeyInfoSerializer.cs (1)
333return ((e is ArgumentException) || (e is FormatException) || (e is InvalidOperationException));
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\TraceUtility.cs (2)
249internal static ArgumentException ThrowHelperArgument(string paramName, string message, Message msg) 251return (ArgumentException)TraceUtility.ThrowHelperError(new ArgumentException(message, paramName), msg);
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultException.cs (1)
219catch (ArgumentException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityTokenSerializer.cs (1)
206return ((e is ArgumentException) || (e is FormatException) || (e is InvalidOperationException));
FrameworkFork\System.ServiceModel\System\ServiceModel\XmlUtil.cs (1)
137catch (ArgumentException exception)
Shared\Options\ApplicationOptions.cs (1)
288var ex = new ArgumentException(error);
dotnet-user-jwts (1)
src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (1)
14ArgumentException.ThrowIfNullOrEmpty(directory);
dotnet-user-secrets (1)
src\Tools\Shared\SecretsHelpers\MsBuildProjectFinder.cs (1)
14ArgumentException.ThrowIfNullOrEmpty(directory);
GenerateDocumentationAndConfigFiles (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
InMemory.FunctionalTests (1)
HttpsConnectionMiddlewareTests.cs (1)
278Assert.Throws<ArgumentException>(() => CreateMiddleware(new HttpsConnectionAdapterOptions(), ListenOptions.DefaultHttpProtocols));
InProcessWebSite (2)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (2)
478ArgumentException duplicateKeyException = null; 490catch (ArgumentException ex)
Metrics (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Metrics.Legacy (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Microsoft.Analyzers.Local.Tests (11)
Json\JsonArrayTest.cs (3)
47Assert.ThrowsAny<ArgumentException>(() => obj[1] = 0); 71Assert.ThrowsAny<ArgumentException>(() => obj.Insert(obj.Count + 1, 0)); 81Assert.ThrowsAny<ArgumentException>(() => obj.Remove(obj.Count));
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Arcade.Test.Common (1)
AssertEx.cs (1)
362catch (ArgumentException e)
Microsoft.AspNetCore.AsyncState (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.AspNetCore.Authentication.Facebook (2)
FacebookOptions.cs (2)
53ArgumentException.ThrowIfNullOrEmpty(AppId); 54ArgumentException.ThrowIfNullOrEmpty(AppSecret);
Microsoft.AspNetCore.Authentication.Negotiate (2)
LdapSettings.cs (1)
85ArgumentException.ThrowIfNullOrEmpty(Domain);
NegotiateOptions.cs (1)
48ArgumentException.ThrowIfNullOrEmpty(domain);
Microsoft.AspNetCore.Authentication.OAuth (4)
OAuthOptions.cs (4)
29ArgumentException.ThrowIfNullOrEmpty(ClientId); 30ArgumentException.ThrowIfNullOrEmpty(ClientSecret); 31ArgumentException.ThrowIfNullOrEmpty(AuthorizationEndpoint); 32ArgumentException.ThrowIfNullOrEmpty(TokenEndpoint);
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
OpenIdConnectHandler.cs (2)
554ArgumentException.ThrowIfNullOrEmpty(parEndpoint); 1156ArgumentException.ThrowIfNullOrEmpty(nonce);
OpenIdConnectOptions.cs (1)
100ArgumentException.ThrowIfNullOrEmpty(ClientId);
Microsoft.AspNetCore.Authentication.Test (3)
JwtBearerTests.cs (1)
349[InlineData(typeof(ArgumentException))]
JwtBearerTests_Handler.cs (1)
326[InlineData(typeof(ArgumentException))]
OAuthTests.cs (1)
79await Assert.ThrowsAsync<ArgumentException>("CallbackPath", () => server.SendAsync("http://example.com/"));
Microsoft.AspNetCore.Authentication.Twitter (2)
TwitterOptions.cs (2)
107ArgumentException.ThrowIfNullOrEmpty(ConsumerKey); 108ArgumentException.ThrowIfNullOrEmpty(ConsumerSecret);
Microsoft.AspNetCore.Authorization (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.Components (5)
Rendering\RenderTreeBuilder.cs (1)
671ArgumentException.ThrowIfNullOrEmpty(assignedName);
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (4)
730ArgumentException.ThrowIfNullOrEmpty(content); 753ArgumentException.ThrowIfNullOrEmpty(content); 990ArgumentException.ThrowIfNullOrEmpty(constraint); 1020ArgumentException.ThrowIfNullOrEmpty(parameterPolicy);
Microsoft.AspNetCore.Components.Endpoints (1)
Discovery\AssemblyComponentLibraryDescriptor.cs (1)
24ArgumentException.ThrowIfNullOrEmpty(nameof(name));
Microsoft.AspNetCore.Components.Forms.Tests (4)
FieldIdentifierTest.cs (4)
22var ex = Assert.Throws<ArgumentException>(() => new FieldIdentifier(DateTime.Now, "somefield")); 164var ex = Assert.Throws<ArgumentException>(() =>
Microsoft.AspNetCore.Components.Server (3)
ProtectedBrowserStorage\ProtectedBrowserStorage.cs (3)
36ArgumentException.ThrowIfNullOrEmpty(storeName); 71ArgumentException.ThrowIfNullOrEmpty(purpose); 72ArgumentException.ThrowIfNullOrEmpty(key);
Microsoft.AspNetCore.Components.Server.Tests (3)
Circuits\CircuitHostTest.cs (2)
591Assert.Throws<ArgumentException>(() => 692Assert.Throws<ArgumentException>(() =>
ProtectedBrowserStorageTest.cs (1)
233Assert.IsType<ArgumentException>(innerException);
Microsoft.AspNetCore.Components.Tests (24)
ComponentFactoryTest.cs (2)
38var ex = Assert.Throws<ArgumentException>(() => factory.InstantiateComponent(GetServiceProvider(), componentType, null, null));
EventCallbackTest.cs (2)
160await Assert.ThrowsAsync<ArgumentException>(() => 268await Assert.ThrowsAsync<ArgumentException>(() =>
NavigationManagerTest.cs (4)
59var ex = Assert.Throws<ArgumentException>(() => 77var ex = Assert.Throws<ArgumentException>(() =>
PersistentState\ComponentApplicationStateTest.cs (1)
110Assert.Throws<ArgumentException>(() => applicationState.PersistAsJson("MyState", myState));
RendererTest.cs (11)
1991await Assert.ThrowsAsync<ArgumentException>(() => 2701await Assert.ThrowsAsync<ArgumentException>(() => 2742await Assert.ThrowsAsync<ArgumentException>(() => 2793await Assert.ThrowsAsync<ArgumentException>(() => 2828await Assert.ThrowsAsync<ArgumentException>(() => 3534var ex = await Assert.ThrowsAsync<ArgumentException>(() => 4828var ex = Assert.Throws<ArgumentException>(() => 4854var ex = Assert.Throws<ArgumentException>(() =>
Rendering\RenderTreeBuilderTest.cs (2)
2256var ex = Assert.Throws<ArgumentException>(() =>
StackObjectPoolTest.cs (2)
112var ex = Assert.Throws<ArgumentException>(() =>
Microsoft.AspNetCore.Components.Web (1)
JSComponents\JSComponentConfigurationStore.cs (1)
59ArgumentException.ThrowIfNullOrEmpty(javaScriptInitializer);
Microsoft.AspNetCore.CookiePolicy (1)
CookiePolicyOptions.cs (1)
62ArgumentException.ThrowIfNullOrEmpty(value);
Microsoft.AspNetCore.Cryptography.KeyDerivation (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.DataProtection (4)
Error.cs (2)
18public static ArgumentException Common_ArgumentCannotBeNullOrEmpty(string parameterName) 23public static ArgumentException Common_BufferIncorrectlySized(string parameterName, int actualSize, int expectedSize)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.DataProtection.Abstractions (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.DataProtection.Extensions (6)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (4)
14/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty.</summary> 30ArgumentException.ThrowIfNullOrEmpty(argument, paramName); 42/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty or whitespace.</summary> 59ArgumentException.ThrowIfNullOrWhiteSpace(argument, paramName);
Microsoft.AspNetCore.DataProtection.StackExchangeRedis (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.DataProtection.Tests (1)
TypeForwardingActivatorTests.cs (1)
71Assert.Throws<ArgumentException>(() => activator.CreateInstance<object>(name));
Microsoft.AspNetCore.Diagnostics.Middleware (1)
src\Shared\BufferWriterPool\BufferWriter.cs (1)
129/// <exception cref="ArgumentException">
Microsoft.AspNetCore.HeaderParsing (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.AspNetCore.Hosting (2)
Internal\HostingEnvironmentExtensions.cs (2)
16ArgumentException.ThrowIfNullOrEmpty(contentRootPath); 67ArgumentException.ThrowIfNullOrEmpty(contentRootPath);
Microsoft.AspNetCore.Hosting.Tests (1)
WebHostBuilderTests.cs (1)
1266Assert.Throws<ArgumentException>(() => new HostingStartupAttribute(typeof(WebHostTests)));
Microsoft.AspNetCore.Http (1)
Timeouts\RequestTimeoutOptions.cs (1)
43ArgumentException.ThrowIfNullOrEmpty(policyName);
Microsoft.AspNetCore.Http.Abstractions (2)
Internal\ParsingHelpers.cs (2)
52ArgumentException.ThrowIfNullOrEmpty(key); 90ArgumentException.ThrowIfNullOrEmpty(key);
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
MapPathMiddlewareTests.cs (1)
131Assert.Throws<ArgumentException>(() => new ApplicationBuilder(serviceProvider: null!).Map(matchPath, map => { }).Build());
Microsoft.AspNetCore.Http.Connections (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.Http.Connections.Client (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateFactoryTests.cs (2)
2126var exception = Assert.Throws<ArgumentException>(() => RequestDelegateFactory.Create(TestAction));
Microsoft.AspNetCore.Http.Results (4)
TypedResults.cs (4)
511ArgumentException.ThrowIfNullOrEmpty(path); 544ArgumentException.ThrowIfNullOrEmpty(path); 570ArgumentException.ThrowIfNullOrEmpty(url); 590ArgumentException.ThrowIfNullOrEmpty(localUrl);
Microsoft.AspNetCore.Http.Results.Tests (7)
ResultsTests.cs (2)
1083Assert.Throws<ArgumentException>("localUrl", () => Results.LocalRedirect(string.Empty)); 1466Assert.Throws<ArgumentException>("url", () => Results.Redirect(string.Empty));
TypedResultsTests.cs (4)
360Assert.Throws<ArgumentException>("path", () => TypedResults.PhysicalFile(string.Empty)); 372Assert.Throws<ArgumentException>("path", () => TypedResults.VirtualFile(string.Empty)); 927Assert.Throws<ArgumentException>("localUrl", () => TypedResults.LocalRedirect(string.Empty)); 1248Assert.Throws<ArgumentException>("url", () => TypedResults.Redirect(string.Empty));
ValidationProblemResultTests.cs (1)
89Assert.Throws<ArgumentException>("problemDetails", () => new ValidationProblem(
Microsoft.AspNetCore.Http.Tests (3)
ResponseCookiesTest.cs (1)
270Assert.Throws<ArgumentException>(() => cookies.Append(key, "1"));
Timeouts\RequestTimeoutOptionsTests.cs (2)
49Assert.Throws<ArgumentException>(() => options.AddPolicy("", TimeSpan.FromSeconds(47))); 52Assert.Throws<ArgumentException>(() => options.AddPolicy("", new RequestTimeoutPolicy()));
Microsoft.AspNetCore.HttpLogging (2)
W3CLoggerOptions.cs (2)
67ArgumentException.ThrowIfNullOrEmpty(value); 83ArgumentException.ThrowIfNullOrEmpty(value);
Microsoft.AspNetCore.HttpLogging.Tests (2)
W3CLoggerOptionsTests.cs (2)
29Assert.Throws<ArgumentException>(() => options.FileName = ""); 36Assert.Throws<ArgumentException>(() => options.LogDirectory = "");
Microsoft.AspNetCore.HttpOverrides (8)
ForwardedHeadersMiddleware.cs (8)
53ArgumentException.ThrowIfNullOrWhiteSpace(options.Value.ForwardedForHeaderName); 54ArgumentException.ThrowIfNullOrWhiteSpace(options.Value.ForwardedHostHeaderName); 55ArgumentException.ThrowIfNullOrWhiteSpace(options.Value.ForwardedProtoHeaderName); 56ArgumentException.ThrowIfNullOrWhiteSpace(options.Value.ForwardedPrefixHeaderName); 57ArgumentException.ThrowIfNullOrWhiteSpace(options.Value.OriginalForHeaderName); 58ArgumentException.ThrowIfNullOrWhiteSpace(options.Value.OriginalHostHeaderName); 59ArgumentException.ThrowIfNullOrWhiteSpace(options.Value.OriginalProtoHeaderName); 60ArgumentException.ThrowIfNullOrWhiteSpace(options.Value.OriginalPrefixHeaderName);
Microsoft.AspNetCore.Identity (3)
SignInManager.cs (3)
478ArgumentException.ThrowIfNullOrEmpty(credentialJson); 508ArgumentException.ThrowIfNullOrEmpty(credentialJson); 550ArgumentException.ThrowIfNullOrEmpty(credentialJson);
Microsoft.AspNetCore.Identity.EntityFrameworkCore (4)
UserStore.cs (4)
358ArgumentException.ThrowIfNullOrWhiteSpace(normalizedRoleName); 380ArgumentException.ThrowIfNullOrWhiteSpace(normalizedRoleName); 425ArgumentException.ThrowIfNullOrWhiteSpace(normalizedRoleName); 644ArgumentException.ThrowIfNullOrEmpty(normalizedRoleName);
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (4)
UserStoreTest.cs (4)
149await Assert.ThrowsAsync<ArgumentException>("code", async () => await store.RedeemCodeAsync(new IdentityUser("fake"), code: "", default)); 160await Assert.ThrowsAsync<ArgumentException>("normalizedRoleName", async () => await store.AddToRoleAsync(new IdentityUser("fake"), "")); 161await Assert.ThrowsAsync<ArgumentException>("normalizedRoleName", async () => await store.RemoveFromRoleAsync(new IdentityUser("fake"), "")); 162await Assert.ThrowsAsync<ArgumentException>("normalizedRoleName", async () => await store.IsInRoleAsync(new IdentityUser("fake"), ""));
Microsoft.AspNetCore.Identity.FunctionalTests (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.Identity.InMemory.Test (1)
InMemoryStore.cs (1)
60ArgumentException.ThrowIfNullOrEmpty(roleName);
Microsoft.AspNetCore.Identity.Test (3)
IdentityBuilderTest.cs (2)
32Assert.Throws<ArgumentException>(() => new IdentityBuilder(typeof(int), new ServiceCollection())); 38Assert.Throws<ArgumentException>(() => new IdentityBuilder(typeof(PocoUser), typeof(int), new ServiceCollection()));
UserClaimsPrincipalFactoryTest.cs (1)
18Assert.Throws<ArgumentException>("optionsAccessor",
Microsoft.AspNetCore.InternalTesting (19)
ExceptionAssertions.cs (16)
76/// Verifies that the code throws an <see cref="ArgumentException"/>. 82public static ArgumentException ThrowsArgument(Action testCode, string paramName, string exceptionMessage) 84return ThrowsArgumentInternal<ArgumentException>(testCode, paramName, exceptionMessage); 91where TException : ArgumentException 103/// Verifies that the code throws an <see cref="ArgumentException"/>. 109public static Task<ArgumentException> ThrowsArgumentAsync(Func<Task> testCode, string paramName, string exceptionMessage) 111return ThrowsArgumentAsyncInternal<ArgumentException>(testCode, paramName, exceptionMessage); 118where TException : ArgumentException 152public static ArgumentException ThrowsArgumentNullOrEmpty(Action testCode, string paramName) 154return ThrowsArgumentInternal<ArgumentException>(testCode, paramName, "Value cannot be null or empty."); 164public static Task<ArgumentException> ThrowsArgumentNullOrEmptyAsync(Func<Task> testCode, string paramName) 166return ThrowsArgumentAsyncInternal<ArgumentException>(testCode, paramName, "Value cannot be null or empty."); 176public static ArgumentException ThrowsArgumentNullOrEmptyString(Action testCode, string paramName) 178return ThrowsArgumentInternal<ArgumentException>(testCode, paramName, "Value cannot be null or an empty string."); 188public static Task<ArgumentException> ThrowsArgumentNullOrEmptyStringAsync(Func<Task> testCode, string paramName) 190return ThrowsArgumentAsyncInternal<ArgumentException>(testCode, paramName, "Value cannot be null or an empty string.");
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary>
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
14/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty.</summary> 42/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty or whitespace.</summary>
Microsoft.AspNetCore.JsonPatch (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary>
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.Mvc.Abstractions (3)
ModelBinding\Metadata\ModelMetadataIdentity.cs (1)
54ArgumentException.ThrowIfNullOrEmpty(name);
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.Mvc.Core (19)
ApiConventionMethodAttribute.cs (1)
42ArgumentException.ThrowIfNullOrEmpty(methodName);
ApplicationParts\ProvideApplicationPartFactoryAttribute.cs (1)
30ArgumentException.ThrowIfNullOrEmpty(factoryTypeName);
ApplicationParts\RelatedAssemblyAttribute.cs (1)
23ArgumentException.ThrowIfNullOrEmpty(assemblyFileName);
AreaAttribute.cs (1)
21ArgumentException.ThrowIfNullOrEmpty(areaName);
Builder\ControllerEndpointRouteBuilderExtensions.cs (1)
153ArgumentException.ThrowIfNullOrEmpty(areaName);
Builder\MvcAreaRouteBuilderExtensions.cs (1)
121ArgumentException.ThrowIfNullOrEmpty(areaName);
ControllerBase.cs (8)
330ArgumentException.ThrowIfNullOrEmpty(url); 344ArgumentException.ThrowIfNullOrEmpty(url); 359ArgumentException.ThrowIfNullOrEmpty(url); 374ArgumentException.ThrowIfNullOrEmpty(url); 388ArgumentException.ThrowIfNullOrEmpty(localUrl); 402ArgumentException.ThrowIfNullOrEmpty(localUrl); 417ArgumentException.ThrowIfNullOrEmpty(localUrl); 432ArgumentException.ThrowIfNullOrEmpty(localUrl);
Formatters\FormatterMappings.cs (1)
95ArgumentException.ThrowIfNullOrEmpty(format);
LocalRedirectResult.cs (2)
48ArgumentException.ThrowIfNullOrEmpty(localUrl); 75ArgumentException.ThrowIfNullOrEmpty(value);
RedirectResult.cs (2)
51ArgumentException.ThrowIfNullOrEmpty(url); 77ArgumentException.ThrowIfNullOrEmpty(value);
Microsoft.AspNetCore.Mvc.Core.Test (13)
ActionResultOfTTest.cs (6)
18var ex = Assert.Throws<ArgumentException>(() => new ActionResult<FileStreamResult>(value: input)); 29var ex = Assert.Throws<ArgumentException>(() => new ActionResult<FileStreamResult>(result: actionResult)); 40var ex = Assert.Throws<ArgumentException>(() => new ActionResult<TestResult>(value: result));
Formatters\FormatterMappingsTest.cs (1)
20Assert.Throws<ArgumentException>("format", () => options.GetMediaTypeMappingForFormat(format));
Formatters\MediaTypeTest.cs (1)
131Assert.Throws<ArgumentException>(() => new MediaType("lengthof9", 5, 5));
Infrastructure\ControllerActionInvokerTest.cs (2)
969var ex = await Assert.ThrowsAsync<ArgumentException>(
ModelBinding\ModelBindingHelperTest.cs (1)
619var exception = await ExceptionAssert.ThrowsArgumentAsync(
Routing\ControllerLinkGeneratorExtensionsTest.cs (2)
25var exception = Assert.Throws<ArgumentException>(() =>
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
DataTypeAttributeAdapter.cs (1)
19ArgumentException.ThrowIfNullOrEmpty(ruleName);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.Mvc.Razor (5)
RazorFileHierarchy.cs (1)
14ArgumentException.ThrowIfNullOrEmpty(path);
RazorViewEngine.cs (4)
110ArgumentException.ThrowIfNullOrEmpty(pageName); 133ArgumentException.ThrowIfNullOrEmpty(pagePath); 158ArgumentException.ThrowIfNullOrEmpty(viewName); 173ArgumentException.ThrowIfNullOrEmpty(viewPath);
Microsoft.AspNetCore.Mvc.RazorPages (40)
ApplicationModels\PageConventionCollection.cs (6)
89ArgumentException.ThrowIfNullOrEmpty(areaName); 133ArgumentException.ThrowIfNullOrEmpty(areaName); 174ArgumentException.ThrowIfNullOrEmpty(areaName); 215ArgumentException.ThrowIfNullOrEmpty(areaName); 252ArgumentException.ThrowIfNullOrEmpty(pageName); 263ArgumentException.ThrowIfNullOrEmpty(folderPath);
DependencyInjection\MvcRazorPagesMvcBuilderExtensions.cs (1)
41ArgumentException.ThrowIfNullOrEmpty(rootDirectory);
DependencyInjection\MvcRazorPagesMvcCoreBuilderExtensions.cs (1)
72ArgumentException.ThrowIfNullOrEmpty(rootDirectory);
DependencyInjection\PageConventionCollectionExtensions.cs (15)
74ArgumentException.ThrowIfNullOrEmpty(pageName); 109ArgumentException.ThrowIfNullOrEmpty(areaName); 110ArgumentException.ThrowIfNullOrEmpty(pageName); 135ArgumentException.ThrowIfNullOrEmpty(folderPath); 170ArgumentException.ThrowIfNullOrEmpty(areaName); 171ArgumentException.ThrowIfNullOrEmpty(folderPath); 197ArgumentException.ThrowIfNullOrEmpty(pageName); 259ArgumentException.ThrowIfNullOrEmpty(areaName); 260ArgumentException.ThrowIfNullOrEmpty(pageName); 286ArgumentException.ThrowIfNullOrEmpty(folderPath); 348ArgumentException.ThrowIfNullOrEmpty(areaName); 349ArgumentException.ThrowIfNullOrEmpty(folderPath); 379ArgumentException.ThrowIfNullOrEmpty(pageName); 413ArgumentException.ThrowIfNullOrEmpty(areaName); 414ArgumentException.ThrowIfNullOrEmpty(pageName);
PageBase.cs (8)
413ArgumentException.ThrowIfNullOrEmpty(localUrl); 426ArgumentException.ThrowIfNullOrEmpty(localUrl); 440ArgumentException.ThrowIfNullOrEmpty(localUrl); 454ArgumentException.ThrowIfNullOrEmpty(localUrl); 490ArgumentException.ThrowIfNullOrEmpty(url); 503ArgumentException.ThrowIfNullOrEmpty(url); 517ArgumentException.ThrowIfNullOrEmpty(url); 531ArgumentException.ThrowIfNullOrEmpty(url);
PageModel.cs (8)
720ArgumentException.ThrowIfNullOrEmpty(localUrl); 733ArgumentException.ThrowIfNullOrEmpty(localUrl); 747ArgumentException.ThrowIfNullOrEmpty(localUrl); 761ArgumentException.ThrowIfNullOrEmpty(localUrl); 819ArgumentException.ThrowIfNullOrEmpty(url); 832ArgumentException.ThrowIfNullOrEmpty(url); 846ArgumentException.ThrowIfNullOrEmpty(url); 860ArgumentException.ThrowIfNullOrEmpty(url);
RazorPagesOptions.cs (1)
33ArgumentException.ThrowIfNullOrEmpty(value);
Microsoft.AspNetCore.Mvc.RazorPages.Test (4)
ApplicationModels\PageConventionCollectionTest.cs (3)
31var ex = ExceptionAssert.ThrowsArgument( 44var ex = ExceptionAssert.ThrowsArgument( 69var ex = ExceptionAssert.ThrowsArgument(
Infrastructure\DefaultPageActivatorProviderTest.cs (1)
63Assert.Throws<ArgumentException>(() => activator.CreateActivator(descriptor));
Microsoft.AspNetCore.Mvc.TagHelpers (1)
ValidationSummaryTagHelper.cs (1)
49/// <exception cref="ArgumentException">
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
TagHelperOutputExtensionsTest.cs (4)
1053var exceptionAdd = Assert.Throws<ArgumentException>(() => tagHelperOutput.AddClass(classValue, htmlEncoder)); 1054var exceptionRemove = Assert.Throws<ArgumentException>(() => tagHelperOutput.RemoveClass(classValue, htmlEncoder));
Microsoft.AspNetCore.Mvc.ViewFeatures (9)
HtmlHelper.cs (1)
1364/// <exception cref="ArgumentException">
RemoteAttributeBase.cs (2)
83ArgumentException.ThrowIfNullOrEmpty(property); 104ArgumentException.ThrowIfNullOrEmpty(property);
Rendering\IHtmlHelper.cs (2)
379/// <exception cref="ArgumentException"> 393/// <exception cref="ArgumentException">
Rendering\TagBuilder.cs (2)
37ArgumentException.ThrowIfNullOrEmpty(tagName); 279ArgumentException.ThrowIfNullOrEmpty(key);
ViewEngines\CompositeViewEngine.cs (2)
31ArgumentException.ThrowIfNullOrEmpty(viewName); 80ArgumentException.ThrowIfNullOrEmpty(viewPath);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (6)
DefaultDisplayTemplatesTest.cs (2)
366var ex = Assert.Throws<ArgumentException>(() => helper.DisplayFor(m => m.Property1));
Rendering\HtmlHelperTest.cs (4)
324var exception = Assert.Throws<ArgumentException>("viewContext", () => helperToContextualize.Contextualize(viewContext)); 345var exception = Assert.Throws<ArgumentException>("viewContext", () => helperToContextualize.Contextualize(viewContext));
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.OutputCaching.Tests (2)
MemoryOutputCacheStoreTests.cs (1)
245await Assert.ThrowsAsync<ArgumentException>(async () => await store.SetAsync(key, value, new string[] { tag }, TimeSpan.FromMinutes(1), default));
OutputCacheKeyProviderTests.cs (1)
299Assert.Throws<ArgumentException>(() =>
Microsoft.AspNetCore.Owin.Tests (1)
OwinEnvironmentTests.cs (1)
151Assert.Throws<ArgumentException>(() => collection.CopyTo(kvp, 1)); // The number of elements in the source ICollection<T> is greater than the available space from arrayIndex to the end of the destination array.
Microsoft.AspNetCore.RateLimiting.Tests (2)
RateLimitingOptionsTests.cs (2)
38Assert.Throws<ArgumentException>(() => options.AddPolicy<string>("myKey", context => RateLimitPartition.GetNoLimiter<string>("yourKey"))); 46Assert.Throws<ArgumentException>(() => options.AddPolicy<string, TestRateLimiterPolicy>("myKey"));
Microsoft.AspNetCore.ResponseCaching.Tests (1)
ResponseCachingFeatureTests.cs (1)
52Assert.Throws<ArgumentException>(() => new ResponseCachingFeature().VaryByQueryKeys = value);
Microsoft.AspNetCore.Rewrite (10)
ApacheModRewrite\CookieActionFactory.cs (1)
19ArgumentException.ThrowIfNullOrEmpty(flagValue);
ApacheModRewrite\FlagParser.cs (1)
57ArgumentException.ThrowIfNullOrEmpty(flagString);
IISUrlRewrite\IISRewriteMap.cs (3)
12ArgumentException.ThrowIfNullOrEmpty(name); 26ArgumentException.ThrowIfNullOrEmpty(key); 27ArgumentException.ThrowIfNullOrEmpty(value);
RedirectRule.cs (2)
19ArgumentException.ThrowIfNullOrEmpty(regex); 20ArgumentException.ThrowIfNullOrEmpty(replacement);
RewriteRule.cs (2)
19ArgumentException.ThrowIfNullOrEmpty(regex); 20ArgumentException.ThrowIfNullOrEmpty(replacement);
UrlActions\ChangeCookieAction.cs (1)
21ArgumentException.ThrowIfNullOrEmpty(name);
Microsoft.AspNetCore.Rewrite.Tests (1)
ApacheModRewrite\FlagParserTest.cs (1)
62Assert.Throws<ArgumentException>(() => FlagParser.Parse(string.Empty));
Microsoft.AspNetCore.Routing (12)
DefaultLinkGenerator.cs (1)
158ArgumentException.ThrowIfNullOrEmpty(scheme);
LinkGeneratorEndpointNameAddressExtensions.cs (2)
308ArgumentException.ThrowIfNullOrEmpty(scheme); 357ArgumentException.ThrowIfNullOrEmpty(scheme);
Patterns\RoutePatternFactory.cs (9)
730ArgumentException.ThrowIfNullOrEmpty(content); 753ArgumentException.ThrowIfNullOrEmpty(content); 771ArgumentException.ThrowIfNullOrEmpty(parameterName); 794ArgumentException.ThrowIfNullOrEmpty(parameterName); 821ArgumentException.ThrowIfNullOrEmpty(parameterName); 855ArgumentException.ThrowIfNullOrEmpty(parameterName); 891ArgumentException.ThrowIfNullOrEmpty(parameterName); 990ArgumentException.ThrowIfNullOrEmpty(constraint); 1020ArgumentException.ThrowIfNullOrEmpty(parameterPolicy);
Microsoft.AspNetCore.Routing.Tests (27)
Template\TemplateParserTests.cs (27)
503ExceptionAssert.Throws<ArgumentException>( 516ExceptionAssert.Throws<ArgumentException>( 534ExceptionAssert.Throws<ArgumentException>( 550ExceptionAssert.Throws<ArgumentException>( 560var ex = ExceptionAssert.Throws<ArgumentException>( 575ExceptionAssert.Throws<ArgumentException>( 585ExceptionAssert.Throws<ArgumentException>( 595ExceptionAssert.Throws<ArgumentException>( 604ExceptionAssert.Throws<ArgumentException>( 614ExceptionAssert.Throws<ArgumentException>( 644ExceptionAssert.Throws<ArgumentException>( 652ExceptionAssert.Throws<ArgumentException>( 662ExceptionAssert.Throws<ArgumentException>( 672ExceptionAssert.Throws<ArgumentException>( 681ExceptionAssert.Throws<ArgumentException>( 690ExceptionAssert.Throws<ArgumentException>( 700ExceptionAssert.Throws<ArgumentException>( 709ExceptionAssert.Throws<ArgumentException>( 721ExceptionAssert.Throws<ArgumentException>( 733ExceptionAssert.Throws<ArgumentException>( 743ExceptionAssert.Throws<ArgumentException>( 752ExceptionAssert.Throws<ArgumentException>( 774ExceptionAssert.Throws<ArgumentException>( 783ExceptionAssert.Throws<ArgumentException>( 792ExceptionAssert.Throws<ArgumentException>( 804ExceptionAssert.Throws<ArgumentException>(
Microsoft.AspNetCore.Server.HttpSys (2)
RequestProcessing\ResponseBody.cs (1)
604ArgumentException.ThrowIfNullOrEmpty(fileName);
UrlPrefix.cs (1)
70ArgumentException.ThrowIfNullOrEmpty(host);
Microsoft.AspNetCore.Server.HttpSys.Tests (1)
UrlPrefixTests.cs (1)
39Assert.Throws<ArgumentException>(() => UrlPrefix.Create(url));
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpContext.FeatureCollection.cs (2)
289ArgumentException.ThrowIfNullOrEmpty(variableName); 299ArgumentException.ThrowIfNullOrEmpty(variableName);
Microsoft.AspNetCore.Server.IISIntegration (1)
IISMiddleware.cs (1)
80ArgumentException.ThrowIfNullOrEmpty(pairingToken);
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Common\DeploymentParameters.cs (1)
55ArgumentException.ThrowIfNullOrEmpty(applicationPath);
Deployers\ApplicationDeployer.cs (1)
44ArgumentException.ThrowIfNullOrEmpty(DeploymentParameters.ApplicationPath);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
KestrelConfigurationLoader.cs (1)
87ArgumentException.ThrowIfNullOrEmpty(name);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
HttpRequestHeadersTests.cs (3)
299Assert.Throws<ArgumentException>(() => headers.Add("host", new[] { "localhost" })); 300Assert.Throws<ArgumentException>(() => headers.Add("custom", new[] { "value" })); 301Assert.Throws<ArgumentException>(() => headers.Add("Content-Length", new[] { "0" }));
SniOptionsSelectorTests.cs (2)
324var exception = Assert.Throws<ArgumentException>(() => new SniOptionsSelector(
Microsoft.AspNetCore.Server.Kestrel.Tests (6)
ConfigurationReaderTests.cs (2)
97var exception = Assert.Throws<ArgumentException>(() =>
KestrelConfigurationLoaderTests.cs (4)
599var ex = Assert.Throws<ArgumentException>(() => 624var ex = Assert.Throws<ArgumentException>(() =>
Microsoft.AspNetCore.Session (2)
DistributedSession.cs (1)
67ArgumentException.ThrowIfNullOrEmpty(sessionKey);
DistributedSessionStore.cs (1)
35ArgumentException.ThrowIfNullOrEmpty(sessionKey);
Microsoft.AspNetCore.Shared.Tests (10)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (4)
14/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty.</summary> 30ArgumentException.ThrowIfNullOrEmpty(argument, paramName); 42/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty or whitespace.</summary> 59ArgumentException.ThrowIfNullOrWhiteSpace(argument, paramName);
UrlDecoderTests.cs (2)
57Assert.Throws<ArgumentException>(() => UrlDecoder.DecodeRequestLine(source.AsSpan(), source.AsSpan(0, 1))); 64Assert.Throws<ArgumentException>(() => UrlDecoder.DecodeRequestLine(source.AsSpan(), source.AsSpan(0, 1), false));
WebEncodersTests.cs (2)
21Assert.ThrowsAny<ArgumentException>(() => 107Assert.ThrowsAny<ArgumentException>(() =>
Microsoft.AspNetCore.SignalR.Client (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.SignalR.Client.Core (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.SignalR.Client.Tests (8)
HttpConnectionTests.cs (2)
59var exception = Assert.Throws<ArgumentException>(() => new HttpConnection(new HttpConnectionOptions(), NullLoggerFactory.Instance));
LongPollingTransportTests.cs (2)
626var exception = await Assert.ThrowsAsync<ArgumentException>(() =>
ServerSentEventsTransportTests.cs (4)
374var ex = await Assert.ThrowsAsync<ArgumentException>(() => sseTransport.StartAsync(new Uri("http://fakeuri.org"), TransferFormat.Binary).DefaultTimeout()); 400var exception = await Assert.ThrowsAsync<ArgumentException>(() =>
Microsoft.AspNetCore.SignalR.Common (6)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (4)
14/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty.</summary> 30ArgumentException.ThrowIfNullOrEmpty(argument, paramName); 42/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty or whitespace.</summary> 59ArgumentException.ThrowIfNullOrWhiteSpace(argument, paramName);
Microsoft.AspNetCore.SignalR.Core (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.SignalR.Tests (4)
DefaultTransportFactoryTests.cs (2)
35var exception = Assert.Throws<ArgumentException>(
WebSocketsTransportTests.cs (2)
219var exception = await Assert.ThrowsAsync<ArgumentException>(() =>
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
ExceptionMessageExtensions.cs (1)
8public static string GetLocalizationSafeMessage(this ArgumentException argEx)
Microsoft.AspNetCore.SpaServices.Extensions (9)
AngularCli\AngularCliBuilder.cs (1)
33ArgumentException.ThrowIfNullOrEmpty(npmScript);
AngularCli\AngularCliMiddleware.cs (1)
34ArgumentException.ThrowIfNullOrEmpty(scriptName);
Npm\NodeScriptRunner.cs (3)
27ArgumentException.ThrowIfNullOrEmpty(workingDirectory); 28ArgumentException.ThrowIfNullOrEmpty(scriptName); 29ArgumentException.ThrowIfNullOrEmpty(pkgManagerCommand);
Proxying\SpaProxy.cs (1)
228catch (ArgumentException)
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (1)
34ArgumentException.ThrowIfNullOrEmpty(scriptName);
SpaOptions.cs (2)
47ArgumentException.ThrowIfNullOrEmpty(value.Value); 86ArgumentException.ThrowIfNullOrEmpty(value);
Microsoft.AspNetCore.Testing (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.AspNetCore.WebUtilities (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.AspNetCore.WebUtilities.Tests (4)
HttpRequestStreamReaderTest.cs (1)
368Assert.Throws<ArgumentException>(() =>
HttpResponseStreamWriterTest.cs (1)
756Assert.Throws<ArgumentException>(() =>
WebEncodersTests.cs (2)
18Assert.ThrowsAny<ArgumentException>(() => 36Assert.ThrowsAny<ArgumentException>(() =>
Microsoft.Bcl.Cryptography (2)
System\Security\Cryptography\X509Certificates\X509CertificateKeyAccessors.cs (2)
100/// <exception cref="ArgumentException"> 180/// <exception cref="ArgumentException">
Microsoft.Build (35)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
954catch (ArgumentException) 1033catch (ArgumentException)
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (1)
689catch (ArgumentException e)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (1)
724catch (ArgumentException e)
BackEnd\Components\SdkResolution\SdkResolverManifest.cs (1)
130catch (ArgumentException ex)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (3)
775ex is ArgumentException || // can't convert to bool 1121catch (ArgumentException) 1201ex is ArgumentException || // can't convert to bool
CommunicationsUtilities.cs (1)
711catch (ArgumentException ex)
Definition\ProjectCollection.cs (1)
350catch (ArgumentException ex)
Definition\ToolsetReader.cs (2)
496catch (ArgumentException e) 599catch (ArgumentException ex)
ErrorUtilities.cs (1)
607/// <exception cref="ArgumentException">If there is insufficient capacity to copy the collection contents into <paramref name="array"/>
Evaluation\Evaluator.cs (1)
2537catch (ArgumentException ex)
Evaluation\Expander.cs (5)
2755catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3107catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3142catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3175catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException) 3211catch (Exception ex) when (ex is ArgumentException || ex is InvalidOperationException)
ExceptionHandling.cs (2)
166|| (e is ArgumentException && !(e is ArgumentNullException)) 297|| e is ArgumentException)
FileMatcher.cs (1)
2097catch (ArgumentException)
Instance\TaskFactoryWrapper.cs (1)
299catch (ArgumentException)
Instance\TaskRegistry.cs (1)
416catch (ArgumentException ex)
Logging\DistributedLoggers\DistributedFileLogger.cs (1)
118catch (ArgumentException e) // Catching Exception, but rethrowing unless it's a well-known exception.
Logging\FileLogger.cs (1)
220catch (ArgumentException ex)
Logging\ParallelLogger\ParallelConsoleLogger.cs (1)
133catch (ArgumentException)
Logging\ProfilerLogger.cs (1)
305ArgumentException)
ResourceUtilities.cs (1)
457catch (ArgumentException e)
StringExtensions.cs (2)
101/// <exception cref="ArgumentException">Thrown when given argument is unrecognized MSBuild boolean string.</exception> 110/// <exception cref="ArgumentException">Thrown when given argument is unrecognized MSBuild boolean string.</exception>
TaskLoggingHelper.cs (1)
203/// <exception cref="ArgumentException">Thrown when the string resource indicated by <c>resourceName</c> does not exist.</exception>
TaskLoggingHelperExtension.cs (1)
89/// <exception cref="ArgumentException">Thrown when the string resource indicated by <c>resourceName</c> does not exist.</exception>
TypeLoader.cs (2)
177catch (ArgumentException e) 342catch (ArgumentException)
Microsoft.Build.Engine.OM.UnitTests (35)
Construction\ConstructionEditing_Tests.cs (3)
1191Assert.Throws<ArgumentException>(() => 1204Assert.Throws<ArgumentException>(() => 2280Assert.Throws<ArgumentException>(() =>
Construction\ProjectImportElement_Tests.cs (1)
136Assert.Throws<ArgumentException>(() =>
Construction\ProjectImportGroupElement_Tests.cs (1)
346Assert.Throws<ArgumentException>(() =>
Construction\ProjectMetadataElement_Tests.cs (1)
247Assert.Throws<ArgumentException>(() =>
Construction\ProjectOnErrorElement_Tests.cs (1)
245Assert.Throws<ArgumentException>(() =>
Construction\ProjectPropertyElement_Tests.cs (1)
216Assert.Throws<ArgumentException>(() =>
Construction\ProjectTargetElement_Tests.cs (1)
30Assert.Throws<ArgumentException>(() =>
Construction\ProjectTaskElement_Tests.cs (2)
183Assert.Throws<ArgumentException>(() => 196Assert.Throws<ArgumentException>(() =>
Definition\DefinitionEditing_Tests.cs (2)
228Assert.Throws<ArgumentException>(() => 2152Assert.Throws<ArgumentException>(() =>
Definition\Project_Tests.cs (2)
2376Should.Throw<ArgumentException>(() => 2418Should.Throw<ArgumentException>(() =>
Definition\ProjectCollection_Tests.cs (2)
1073Assert.Throws<ArgumentException>(() => 1121Assert.Throws<ArgumentException>(() =>
Definition\ProjectItem_Tests.cs (4)
232Assert.Throws<ArgumentException>(() => 245Assert.Throws<ArgumentException>(() => 1944Assert.Throws<ArgumentException>(() => 2035Assert.Throws<ArgumentException>(() =>
ExceptionHandling.cs (2)
166|| (e is ArgumentException && !(e is ArgumentNullException)) 297|| e is ArgumentException)
Instance\ProjectInstance_Tests.cs (1)
166Assert.Throws<ArgumentException>(() =>
Instance\ProjectItemInstance_Tests.cs (2)
221Assert.Throws<ArgumentException>(() => 307Assert.Throws<ArgumentException>(() =>
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (4)
197Assert.ThrowsAny<ArgumentException>(() => newTarget1.Real.RemoveChild(newTask2.Real)); 200Assert.ThrowsAny<ArgumentException>(() => newTarget1.View.RemoveChild(newTask1.View)); 296Assert.ThrowsAny<ArgumentException>(() => newTask.Real.RemoveChild(newOutputItem2.Real)); 299Assert.ThrowsAny<ArgumentException>(() => newTask.View.RemoveChild(newOutputItem2.View));
ObjectModelRemoting\LinkedEvaluationModify_Tests.cs (4)
166Assert.Throws<ArgumentException>(() => 183Assert.Throws<ArgumentException>(() => 203Assert.Throws<ArgumentException>(() => 221Assert.Throws<ArgumentException>(() =>
ResourceUtilities.cs (1)
457catch (ArgumentException e)
Microsoft.Build.Engine.UnitTests (17)
BackEnd\TargetResult_Tests.cs (1)
68Assert.Equal(typeof(ArgumentException), result.Exception.GetType());
BackEnd\TaskExecutionHost_Tests.cs (1)
1055[InlineData(typeof(ArgumentException), false)]
BackEnd\TaskHostFactory_Tests.cs (1)
56catch (ArgumentException e)
Definition\ProjectEvaluationContext_Tests.cs (1)
136Should.Throw<ArgumentException>(() => EvaluationContext.Create(policy, fileSystem));
Definition\Toolset_Tests.cs (1)
42Assert.Throws<ArgumentException>(() =>
FileUtilities_Tests.cs (6)
293Assert.Throws<ArgumentException>(() => 458Assert.Throws<ArgumentException>(() => 467Assert.Throws<ArgumentException>(() => 476Assert.Throws<ArgumentException>(() => 485Assert.Throws<ArgumentException>(() => 509Assert.Throws<ArgumentException>(() =>
Globbing\MSBuildGlob_Tests.cs (1)
77Assert.Throws<ArgumentException>(() => MSBuildGlob.Parse(((char)i).ToString(), "*"));
Graph\GraphLoadedFromSolution_tests.cs (2)
43var exception = Should.Throw<ArgumentException>(
Graph\ProjectGraph_Tests.cs (1)
1089Should.Throw<ArgumentException>(() => projectGraph.GetTargetLists(new[] { " " }));
NodeStatus_Transition_Tests.cs (1)
33newNodeStatus.ShouldThrow<ArgumentException>().Message.ShouldContain("Target should not contain any escape codes, if you want to colorize target use the other constructor.");
XmlUtilities_Tests.cs (1)
56catch (ArgumentException ex)
Microsoft.Build.Framework (6)
EncodingUtilities.cs (1)
71catch (ArgumentException ex)
NativeMethods.cs (1)
1318catch (ArgumentException)
ThrowHelper.cs (4)
114private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 198private static ArgumentException GetArgumentException(ExceptionResource resource) 203private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 208private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
Microsoft.Build.Framework.UnitTests (1)
ResourceUtilities.cs (1)
457catch (ArgumentException e)
Microsoft.Build.Tasks.CodeAnalysis (3)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
853catch (ArgumentException e)
src\Compilers\Core\MSBuildTask\Utilities.cs (2)
48catch (System.ArgumentException e) 134(e is ArgumentException && !(e is ArgumentNullException)) ||
Microsoft.Build.Tasks.CodeAnalysis.Sdk (3)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
853catch (ArgumentException e)
src\Compilers\Core\MSBuildTask\Utilities.cs (2)
48catch (System.ArgumentException e) 134(e is ArgumentException && !(e is ArgumentNullException)) ||
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
CscTests.cs (1)
649Assert.Throws<ArgumentException>(() => csc.GenerateResponseFileContents());
Microsoft.Build.Tasks.Core (64)
AssemblyDependency\ReferenceTable.cs (2)
656catch (ArgumentException) 747catch (ArgumentException)
AssemblyDependency\ResolveAssemblyReference.cs (2)
2210catch (ArgumentException) 2694catch (ArgumentException e)
AssignCulture.cs (1)
203catch (ArgumentException e)
BootstrapperUtil\BootstrapperBuilder.cs (7)
385catch (ArgumentException ex) 1058catch (ArgumentException ex) 1493catch (ArgumentException ex) 1896catch (ArgumentException ex) 2018catch (ArgumentException) 2057catch (ArgumentException) 2253catch (ArgumentException)
BootstrapperUtil\Util.cs (1)
70catch (ArgumentException)
CombinePath.cs (1)
73catch (ArgumentException e)
CommunicationsUtilities.cs (1)
711catch (ArgumentException ex)
ConvertToAbsolutePath.cs (1)
69catch (ArgumentException e)
Copy.cs (2)
876catch (ArgumentException e) 971case ArgumentException: // Invalid chars
ErrorUtilities.cs (1)
607/// <exception cref="ArgumentException">If there is insufficient capacity to copy the collection contents into <paramref name="array"/>
ExceptionHandling.cs (2)
166|| (e is ArgumentException && !(e is ArgumentNullException)) 297|| e is ArgumentException)
Exec.cs (3)
149catch (ArgumentException) 170catch (ArgumentException) 426catch (ArgumentException ex)
FileIO\WriteLinesToFile.cs (1)
90catch (ArgumentException)
FileMatcher.cs (2)
847catch (ArgumentException) { } 2097catch (ArgumentException)
FindAppConfigFile.cs (1)
141catch (ArgumentException ex)
FindInList.cs (1)
117catch (ArgumentException ex)
FormatVersion.cs (1)
79catch (ArgumentException)
GenerateApplicationManifest.cs (1)
346catch (ArgumentException)
GenerateDeploymentManifest.cs (2)
283catch (ArgumentException) 300catch (ArgumentException)
GenerateManifestBase.cs (2)
374catch (ArgumentException) 405catch (ArgumentException)
GenerateResource.cs (3)
2066catch (ArgumentException e) 2602catch (ArgumentException ae) 2911catch (ArgumentException ex)
GetReferenceAssemblyPaths.cs (1)
189catch (ArgumentException e)
ManifestUtil\AssemblyIdentity.cs (1)
288catch (ArgumentException e) when (e.HResult == unchecked((int)0x80070057))
ManifestUtil\ConvertUtil.cs (1)
31catch (ArgumentException)
ManifestUtil\DeployManifest.cs (5)
169catch (ArgumentException) 269catch (ArgumentException) 511catch (ArgumentException) { return 1; } 529catch (ArgumentException) { return UpdateMode.Foreground; } 545catch (ArgumentException) { return UpdateUnit.Days; }
ManifestUtil\ManifestWriter.cs (1)
138catch (ArgumentException)
ManifestUtil\Util.cs (5)
315catch (ArgumentException) 346catch (ArgumentException) 483catch (ArgumentException) 518catch (ArgumentException) 547catch (ArgumentException)
Message.cs (1)
63catch (ArgumentException)
MetadataConversionUtilities.cs (1)
44catch (System.ArgumentException e)
Move.cs (1)
135catch (ArgumentException e)
MSBuild.cs (1)
638catch (ArgumentException e)
ResGenDependencies.cs (1)
253/// <exception cref="ArgumentException">May be thrown if Resx is invalid. May contain XmlException.</exception>
ResolveKeySource.cs (1)
103catch (ArgumentException ex)
ResolveManifestFiles.cs (2)
249catch (ArgumentException) 1007catch (ArgumentException)
ResourceUtilities.cs (1)
457catch (ArgumentException e)
SdkToolsPathUtility.cs (1)
83catch (ArgumentException e)
SignFile.cs (1)
62catch (ArgumentException ex) when (ex.ParamName.Equals("certThumbprint"))
TaskLoggingHelperExtension.cs (1)
89/// <exception cref="ArgumentException">Thrown when the string resource indicated by <c>resourceName</c> does not exist.</exception>
Microsoft.Build.Tasks.UnitTests (6)
CommandLineBuilderExtension_Tests.cs (2)
28Assert.Throws<ArgumentException>(() => 48catch (ArgumentException e)
FileStateTests.cs (2)
22Assert.Throws<ArgumentException>(() => 43Assert.Throws<ArgumentException>(() => { var time = state.LastWriteTime; });
FormatUrl_Tests.cs (1)
90Should.Throw<ArgumentException>(() => t.Execute());
ToolTaskExtension_Tests.cs (1)
58Assert.Throws<ArgumentException>(() =>
Microsoft.Build.Utilities.Core (12)
ErrorUtilities.cs (1)
607/// <exception cref="ArgumentException">If there is insufficient capacity to copy the collection contents into <paramref name="array"/>
ExceptionHandling.cs (2)
166|| (e is ArgumentException && !(e is ArgumentNullException)) 297|| e is ArgumentException)
FileMatcher.cs (2)
847catch (ArgumentException) { } 2097catch (ArgumentException)
ResourceUtilities.cs (1)
457catch (ArgumentException e)
TaskLoggingHelper.cs (1)
203/// <exception cref="ArgumentException">Thrown when the string resource indicated by <c>resourceName</c> does not exist.</exception>
ToolLocationHelper.cs (2)
1508catch (ArgumentException) 1539catch (ArgumentException e)
ToolTask.cs (3)
1281catch (ArgumentException) 1301catch (ArgumentException) 1597catch (ArgumentException e)
Microsoft.Build.Utilities.UnitTests (63)
CommandLineBuilder_Tests.cs (2)
284Should.Throw<ArgumentException>(() => 481Should.Throw<ArgumentException>(() =>
StringExtensions_Tests.cs (1)
67[InlineData("ab", "", "x", StringComparison.CurrentCulture, typeof(ArgumentException))]
TaskItem_Tests.cs (3)
131Should.Throw<ArgumentException>(() => 151Should.Throw<ArgumentException>(() => 294Should.Throw<ArgumentException>(() =>
ToolLocationHelper_Tests.cs (57)
730Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey((TargetDotNetFrameworkVersion)99, vsVersion)); 736Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(dotNetVersion, (VisualStudioVersion)99)); 748Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version30, vsVersion)); 780Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version100)); 781Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version110)); 786Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version452, VisualStudioVersion.Version100)); 787Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version452, VisualStudioVersion.Version110)); 792Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version100)); 793Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version110)); 794Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version120)); 798Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version100)); 799Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version110)); 800Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version120)); 804Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version100)); 805Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version110)); 806Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version120)); 810Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version100)); 811Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version110)); 812Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version120)); 816Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version100)); 817Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version110)); 818Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version120)); 822Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version100)); 823Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version110)); 824Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version120)); 828Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version100)); 829Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version110)); 830Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version120)); 831Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version140)); 837Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version100)); 838Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version110)); 839Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version120)); 840Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version140)); 841Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version150)); 842Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version160)); 855Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue((TargetDotNetFrameworkVersion)99, vsVersion)); 861Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(dotNetVersion, (VisualStudioVersion)99)); 875Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version30, vsVersion)); 888Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version100)); 889Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version110)); 894Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version100)); 895Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version110)); 896Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version120)); 910Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk((TargetDotNetFrameworkVersion)99, vsVersion)); 916Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(dotNetVersion, (VisualStudioVersion)99)); 950Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version30, vsVersion)); 969Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version100)); 970Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version110)); 975Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version100)); 976Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version110)); 977Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version120)); 1876Should.Throw<ArgumentException>(() => 1889Should.Throw<ArgumentException>(() => 2978Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPlatformExtensionSDKLocations(identifier, version)); 2979Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPlatformSDKLocation(identifier, version)); 3097Should.Throw<ArgumentException>(() => { ToolLocationHelper.GatherSDKListFromDirectory(paths, targetPlatform); }); 3120Should.Throw<ArgumentException>(() => new SDKManifest(""));
Microsoft.Cci.Extensions (1)
HostEnvironment.cs (1)
758catch (ArgumentException)
Microsoft.CodeAnalysis (82)
CaseInsensitiveComparison.cs (1)
37catch (ArgumentException) // System.Globalization.CultureNotFoundException not on all platforms
Compilation\Compilation.cs (1)
1119/// <exception cref="ArgumentException">
Compilation\SemanticModel.cs (8)
634/// <exception cref="System.ArgumentException">The span is not with a method 650/// <exception cref="System.ArgumentException">The span is not with a method 662/// <exception cref="System.ArgumentException">The span is not with a method 677/// <exception cref="System.ArgumentException">The span is not with a method 690/// <exception cref="System.ArgumentException">The span is not with a method 706/// <exception cref="System.ArgumentException">The span is not with a method 718/// <exception cref="System.ArgumentException">The statement or expression is not with a method 733/// <exception cref="System.ArgumentException">The statement or expression is not with a method
Compilation\SourceReferenceResolver.cs (1)
45/// <exception cref="ArgumentException"><paramref name="resolvedPath"/> is not a valid absolute path.</exception>
Compilation\XmlReferenceResolver.cs (1)
35/// <exception cref="ArgumentException"><paramref name="resolvedPath"/> is not a valid absolute path.</exception>
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (1)
52/// <exception cref="ArgumentException"></exception>
DiagnosticAnalyzer\IAnalyzerAssemblyLoader.cs (2)
39/// <exception cref="ArgumentException"><paramref name="fullPath" /> is not a full path.</exception> 46/// <exception cref="ArgumentException"><paramref name="fullPath" /> is not a full path.</exception>
DiaSymReader\Writer\SymUnmanagedWriterImpl.cs (1)
410catch (ArgumentException)
EmbeddedText.cs (4)
93/// <exception cref="ArgumentException"> 129/// <exception cref="ArgumentException"> 169/// <exception cref="ArgumentException"> 194/// <exception cref="ArgumentException"><paramref name="filePath"/> is empty.</exception>
FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
FileSystem\ICommonCompilerFileSystem.cs (1)
34catch (ArgumentException)
FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
FileSystemExtensions.cs (1)
30/// <exception cref="ArgumentException">Path is empty or invalid.</exception>
Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
InternalUtilities\ConcurrentLruCache.cs (1)
48/// <see cref="ArgumentException"/> will be thrown.
MetadataReference\AssemblyIdentity.cs (5)
90/// <exception cref="ArgumentException">If <paramref name="name"/> is null, empty or contains a NUL character.</exception> 91/// <exception cref="ArgumentException">If <paramref name="cultureName"/> contains a NUL character.</exception> 93/// <exception cref="ArgumentException"><paramref name="version"/> contains values that are not greater than or equal to zero and less than or equal to ushort.MaxValue.</exception> 94/// <exception cref="ArgumentException"><paramref name="hasPublicKey"/> is true and <paramref name="publicKeyOrToken"/> is not set.</exception> 95/// <exception cref="ArgumentException"><paramref name="hasPublicKey"/> is false and <paramref name="publicKeyOrToken"/>
MetadataReference\AssemblyMetadata.cs (7)
159/// <exception cref="ArgumentException"><paramref name="path"/> is invalid.</exception> 195/// <exception cref="ArgumentException"><paramref name="modules"/> is default value.</exception> 197/// <exception cref="ArgumentException"><paramref name="modules"/> is empty or contains a module that doesn't own its image (was created via <see cref="Metadata.Copy"/>).</exception> 227/// <exception cref="ArgumentException"><paramref name="modules"/> is default value.</exception> 229/// <exception cref="ArgumentException"><paramref name="modules"/> is empty or contains a module that doesn't own its image (was created via <see cref="Metadata.Copy"/>).</exception> 240/// <exception cref="ArgumentException"><paramref name="modules"/> is default value.</exception> 242/// <exception cref="ArgumentException"><paramref name="modules"/> is empty or contains a module that doesn't own its image (was created via <see cref="Metadata.Copy"/>).</exception>
MetadataReference\CompilationReference.cs (4)
51/// <exception cref="ArgumentException">Alias is invalid for the metadata kind.</exception> 61/// <exception cref="ArgumentException">Alias is invalid for the metadata kind.</exception> 71/// <exception cref="ArgumentException">Interop types can't be embedded from modules.</exception> 81/// <exception cref="ArgumentException">Specified values not valid for this reference.</exception>
MetadataReference\MetadataReference.cs (7)
49/// <exception cref="ArgumentException">Alias is invalid for the metadata kind.</exception> 59/// <exception cref="ArgumentException">Interop types can't be embedded from modules.</exception> 69/// <exception cref="ArgumentException">Alias is invalid for the metadata kind.</exception> 79/// <exception cref="ArgumentException">Specified values not valid for this reference.</exception> 180/// <exception cref="ArgumentException"><paramref name="peStream"/> doesn't support read and seek operations.</exception> 223/// <exception cref="ArgumentException"><paramref name="path"/> is invalid.</exception> 316/// <exception cref="ArgumentException"><paramref name="properties"/>.<see cref="MetadataReferenceProperties.Kind"/> is not <see cref="MetadataImageKind.Assembly"/>.</exception>
MetadataReference\MetadataReferenceProperties.cs (3)
84/// <exception cref="ArgumentException"> 95/// <exception cref="ArgumentException"> 106/// <exception cref="ArgumentException"><see cref="Kind"/> is <see cref="MetadataImageKind.Module"/>, as interop types can't be embedded from modules.</exception>
MetadataReference\ModuleMetadata.cs (3)
184/// <exception cref="ArgumentException">The stream doesn't support seek operations.</exception> 200/// <exception cref="ArgumentException">The stream doesn't support read and seek operations.</exception> 256/// <exception cref="ArgumentException"><paramref name="path"/> is invalid.</exception>
MetadataReference\PortableExecutableReference.cs (4)
78/// <exception cref="ArgumentException">Alias is invalid for the metadata kind.</exception> 88/// <exception cref="ArgumentException">Alias is invalid for the metadata kind.</exception> 98/// <exception cref="ArgumentException">Interop types can't be embedded from modules.</exception> 108/// <exception cref="ArgumentException">Specified values not valid for this reference.</exception>
SourceGeneration\GeneratorContexts.cs (1)
101/// <exception cref="ArgumentException">
SourceGeneration\GeneratorDriverOptions.cs (1)
42/// <exception cref="ArgumentException"><paramref name="baseDirectory"/> is not an absolute path.</exception>
SourceGeneration\IncrementalContexts.cs (1)
190/// <exception cref="ArgumentException">
SourceGeneration\Nodes\HostOutputNode.cs (1)
84catch (ArgumentException e)
SourceGeneration\Nodes\SourceOutputNode.cs (1)
115catch (ArgumentException e)
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (1)
676/// <exception cref="ArgumentException">Format of <paramref name="import"/> is not valid.</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
Symbols\IMethodSymbol.cs (1)
184/// <exception cref="System.ArgumentException">If <paramref name="reducedFromTypeParameter"/> doesn't belong to the corresponding <see cref="ReducedFrom"/> method.</exception>
Syntax\SyntaxNode.cs (1)
326/// <exception cref="ArgumentException"><paramref name="checksumAlgorithm"/> is not supported.</exception>
Text\LinePositionSpan.cs (1)
28/// <exception cref="ArgumentException"><paramref name="end"/> precedes <paramref name="start"/>.</exception>
Text\SourceText.cs (6)
104/// <exception cref="ArgumentException"><paramref name="checksumAlgorithm"/> is not supported.</exception> 130/// <exception cref="ArgumentException"><paramref name="checksumAlgorithm"/> is not supported.</exception> 172/// <exception cref="ArgumentException"> 246/// <exception cref="ArgumentException"><paramref name="checksumAlgorithm"/> is not supported.</exception> 849/// <exception cref="ArgumentException">If any changes are not in bounds of this <see cref="SourceText"/>.</exception> 850/// <exception cref="ArgumentException">If any changes overlap other changes.</exception>
Microsoft.CodeAnalysis.Analyzers (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Microsoft.CodeAnalysis.AnalyzerUtilities (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Microsoft.CodeAnalysis.BannedApiAnalyzers (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Microsoft.CodeAnalysis.CodeStyle (13)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Microsoft.CodeAnalysis.Collections.Package (5)
Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
Microsoft.CodeAnalysis.CSharp (18)
Compilation\CSharpSemanticModel.cs (13)
1560/// <exception cref="ArgumentException">Throws an argument exception if the passed lookup options are invalid.</exception> 2429/// <exception cref="ArgumentException">The two statements are not contained within the same statement list.</exception> 2485/// <exception cref="ArgumentException">The two statements are not contained within the same statement list.</exception> 2516/// <exception cref="ArgumentException">Throws this exception if the <paramref name="method"/> node is contained any SyntaxTree in the current Compilation</exception> 2543/// <exception cref="ArgumentException">Throws this exception if the <paramref name="accessor"/> node is contained any SyntaxTree in the current Compilation</exception> 2572/// <exception cref="ArgumentException">Throws this exception if the <paramref name="type"/> node is contained any SyntaxTree in the current Compilation</exception> 2598/// <exception cref="ArgumentException">Throws this exception if the <paramref name="statement"/> node is contained any SyntaxTree in the current Compilation</exception> 2625/// <exception cref="ArgumentException">Throws this exception if the <paramref name="initializer"/> node is contained any SyntaxTree in the current Compilation.</exception> 2652/// <exception cref="ArgumentException">Throws this exception if the <paramref name="expressionBody"/> node is contained any SyntaxTree in the current Compilation.</exception> 2682/// <exception cref="ArgumentException">Throws this exception if the <paramref name="constructorInitializer"/> node is contained any SyntaxTree in the current Compilation.</exception> 2711/// <exception cref="ArgumentException">Throws this exception if the <paramref name="constructorInitializer"/> node is contained any SyntaxTree in the current Compilation.</exception> 2741/// <exception cref="ArgumentException">Throws this exception if the <paramref name="crefSyntax"/> node is contained any SyntaxTree in the current Compilation.</exception> 2767/// <exception cref="ArgumentException">Throws this exception if the <paramref name="attribute"/> node is contained any SyntaxTree in the current Compilation.</exception>
CSharpFileSystemExtensions.cs (1)
29/// <exception cref="ArgumentException">Path is empty or invalid.</exception>
Symbols\MethodSymbol.cs (1)
834/// <exception cref="System.ArgumentException">If <paramref name="reducedFromTypeParameter"/> doesn't belong to the corresponding <see cref="ReducedFrom"/> method.</exception>
Syntax\SyntaxFactory.cs (1)
2324/// Throws <see cref="ArgumentException"/> if the tree was not compiled as an interactive submission.
Utilities\InterceptableLocation.cs (1)
157catch (ArgumentException)
Utilities\IValueSet.cs (1)
56/// Produce a sample value contained in the set. Throws <see cref="ArgumentException"/> if the set is empty. If the set
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
Workspaces\WorkspaceTests_EditorFeatures.cs (6)
135Assert.Throws<ArgumentException>(() => workspace.OnProjectRemoved(project.Id)); 149Assert.Throws<ArgumentException>(() => workspace.OnProjectRemoved(project2.Id)); 266Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id))); 305Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project1.Id, new ProjectReference(project2.Id))); 344Assert.Throws<ArgumentException>(() => workspace.OnProjectReferenceAdded(project2.Id, new ProjectReference(project1.Id))); 1452Assert.Throws<ArgumentException>(() => VersionStamp.Create(DateTime.Now));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
125catch (ArgumentException ex)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (36)
CodeGen\CodeGenTupleTest.cs (29)
5795var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt2, new[] { "Item1" }.AsImmutable())); 5800e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt2, elementLocations: new[] { loc1 }.AsImmutable())); 5832Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt8, default)); 6213Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType: vt2)); 6217Assert.Throws<ArgumentException>(() => comp.CreateErrorTypeSymbol(null, "a", -1)); 6218Assert.Throws<ArgumentException>(() => comp.CreateErrorTypeSymbol(vbComp.GlobalNamespace, "a", 1)); 6222Assert.Throws<ArgumentException>(() => comp.CreateErrorNamespaceSymbol(vbComp.GlobalNamespace, "a")); 6283var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(intType)); 6296var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("123", ""))); 6314var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vbType, default(ImmutableArray<string>))); 6331var e = Assert.Throws<ArgumentException>(() => comp.CreateAnonymousTypeSymbol(ImmutableArray.Create(vbType), ImmutableArray.Create("m1"))); 6344Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(ImmutableArray<ITypeSymbol>.Empty, default(ImmutableArray<string>))); 6345Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(new[] { intType }.AsImmutable(), default(ImmutableArray<string>))); 6348Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(new[] { intType, intType }.AsImmutable(), new[] { "Item1" }.AsImmutable())); 6352Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(new[] { intType, intType }.AsImmutable(), elementLocations: ImmutableArray.Create(loc1))); 6586Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, vbType), default(ImmutableArray<string>))); 6802var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty)); 6842var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.NotAnnotated, 8))); 6871var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(elementTypes, elementNullableAnnotations: ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty)); 6911var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(elementTypes, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.NotAnnotated, 8)));
Emit\CompilationEmitTests.cs (7)
2530Assert.Throws<ArgumentException>(() => comp.Emit(output, pdbOutput, 2544Assert.Throws<ArgumentException>(() => comp.Emit(output, metadataPEStream: metadataPeOutput, 2558Assert.Throws<ArgumentException>(() => comp.Emit(output, metadataPEStream: metadataPeOutput, 2586Assert.Throws<ArgumentException>(() => comp.Emit(output, metadataPEStream: metadataPeOutput, 2599Assert.Throws<ArgumentException>(() => comp.Emit(output, 2638Assert.Throws<ArgumentException>(() => comp.Emit(output, 5181Assert.Throws<ArgumentException>(() => compilation.Emit(outReal));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
PDB\PDBTests.cs (1)
106Assert.Throws<ArgumentException>(() => context.AddSource("hint3", SourceText.From("class G3 { void F() {} }", encoding: null, checksumAlgorithm: SourceHashAlgorithm.Sha256)));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (14)
Diagnostics\DiagnosticAnalyzerTests.cs (3)
923if (e.Exception is ArgumentException 959if (e.Exception is ArgumentException 1073if (e.Exception is ArgumentException
Diagnostics\DiagnosticSuppressorTests.cs (6)
490if (e.Exception is ArgumentException 507typeof(ArgumentException).FullName, 543if (e.Exception is ArgumentException 560typeof(System.ArgumentException).FullName, 596if (e.Exception is ArgumentException 613typeof(System.ArgumentException).FullName,
Semantics\CollectionExpressionTests.cs (1)
27081Assert.Throws<ArgumentException>(() => spread.GetElementConversion());
Semantics\PrimaryConstructorTests.cs (2)
2197Assert.Throws<ArgumentException>(() => model.TryGetSpeculativeSemanticModel(baseWithargs.ArgumentList.OpenParenToken.SpanStart, baseWithargs, out _)); 2336Assert.Throws<ArgumentException>(() => model.TryGetSpeculativeSemanticModel(baseWithargs.ArgumentList.OpenParenToken.SpanStart, baseWithargs, out _));
Semantics\RecordTests.cs (2)
22413Assert.Throws<ArgumentException>(() => model.TryGetSpeculativeSemanticModel(baseWithargs.ArgumentList.OpenParenToken.SpanStart, baseWithargs, out _)); 22552Assert.Throws<ArgumentException>(() => model.TryGetSpeculativeSemanticModel(baseWithargs.ArgumentList.OpenParenToken.SpanStart, baseWithargs, out _));
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IArgument.cs (2)
3072Assert.Throws<ArgumentException>(() => argument.GetInConversion()); 3073Assert.Throws<ArgumentException>(() => argument.GetOutConversion());
Microsoft.CodeAnalysis.CSharp.Scripting (2)
CSharpScript.cs (2)
49/// <exception cref="ArgumentException">Stream is not readable or seekable.</exception> 80/// <exception cref="ArgumentException">Stream is not readable or seekable.</exception>
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (9)
InteractiveSessionTests.cs (1)
502Assert.Throws<ArgumentException>(() => compilation2.IsSymbolAccessibleWithin(c3C3, c3C1));
ScriptTests.cs (8)
110await Assert.ThrowsAsync<ArgumentException>("globals", () => fn(new object())); 120await Assert.ThrowsAsync<ArgumentException>("globals", () => fn()); 121await Assert.ThrowsAsync<ArgumentException>("globals", () => fn(new object())); 305await Assert.ThrowsAsync<ArgumentException>("globals", () => script.RunAsync(new Globals { X = 1, Y = 2 })); 314await Assert.ThrowsAsync<ArgumentException>("globals", () => script.RunAsync()); 323await Assert.ThrowsAsync<ArgumentException>("globals", () => script.RunAsync(new object())); 340await Assert.ThrowsAsync<ArgumentException>("previousState", () => state1.Script.RunFromAsync(state2)); 444Assert.Throws<ArgumentException>(() => state.GetVariable("x").Value = "str");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
Semantics\AccessCheckTests.cs (7)
769Assert.Throws<ArgumentException>(() => { compilation.IsSymbolAccessibleWithin(classA, pubField); }); 861Assert.Throws<ArgumentException>(() => { compilation.IsSymbolAccessibleWithin(classA, classOther); }); 945Assert.Throws<ArgumentException>(() => { compilation3.IsSymbolAccessibleWithin(Outer, InOtherCompilation); }); 946Assert.Throws<ArgumentException>(() => { compilation3.IsSymbolAccessibleWithin(Outer, InFriendCompilation); }); 975Assert.Throws<ArgumentException>(() => compilation.IsSymbolAccessibleWithin(classC, classQ)); 1525Assert.Throws<ArgumentException>(() => ((Compilation)comp2).IsSymbolAccessibleWithin(ptr1, b)); 1526Assert.Throws<ArgumentException>(() => ((Compilation)comp2).IsSymbolAccessibleWithin(ptr2, b));
Semantics\SyntaxTreeRootTests.cs (4)
57Assert.Throws<ArgumentException>(() => CSharpCompilation.Create("Grrr", syntaxTrees: new[] { arbitraryTree })); 58Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("Wah").AddSyntaxTrees(arbitraryTree)); 59Assert.Throws<ArgumentException>(() => CSharpCompilation.Create("Bahh", syntaxTrees: new[] { parsedTree }).ReplaceSyntaxTree(parsedTree, arbitraryTree)); 60Assert.Throws<ArgumentException>(() => CSharpCompilation.Create("Woo").GetSemanticModel(arbitraryTree));
Semantics\TopLevelStatementsTests.cs (1)
1983Assert.Throws<System.ArgumentException>(() => CreateCompilation(new[] { Parse(text1, filename: "text1", DefaultParseOptions),
SourceGeneration\AdditionalSourcesCollectionTests.cs (10)
110var exception = Assert.Throws<ArgumentException>(nameof(hintName), () => asc.Add(hintName, SourceText.From("public class D{}", Encoding.UTF8))); 167var exception = Assert.Throws<ArgumentException>("hintName", () => asc.Add(hintName2, SourceText.From("", Encoding.UTF8))); 183var exception = Assert.Throws<ArgumentException>("hintName", () => asc.CopyTo(asc2)); 229Assert.Throws<ArgumentException>(() => asc.Add("file4.cs", SourceText.From(""))); 232Assert.Throws<ArgumentException>(() => asc.Add("file5.cs", SourceText.From("", encoding: null))); 234var exception = Assert.Throws<ArgumentException>(() => asc.Add("file5.cs", SourceText.From("", encoding: null)));
SourceGeneration\GeneratorDriverTests.cs (7)
463Assert.Throws<ArgumentException>("hintName", () => sgc.AddSource("test", SourceText.From("public class D{}", Encoding.UTF8))); 466Assert.Throws<ArgumentException>("hintName", () => sgc.AddSource("test.cs", SourceText.From("public class D{}", Encoding.UTF8))); 494Assert.Throws<ArgumentException>("hintName", () => spc.AddSource("test", SourceText.From("public class D{}", Encoding.UTF8))); 497Assert.Throws<ArgumentException>("hintName", () => spc.AddSource("test.cs", SourceText.From("public class D{}", Encoding.UTF8))); 2556Assert.Throws<ArgumentException>("hintName", () => c.AddEmbeddedAttributeDefinition()); 4251VerifyGeneratorExceptionDiagnostic<ArgumentException>(diagnostic, generatorName, expectedMessage, initialization); 4713Assert.IsType<ArgumentException>(result.Exception);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (112)
Compilation\CompilationAPITests.cs (87)
388Assert.Throws<ArgumentException>(() => c.Emit(peStream)); 389Assert.Throws<ArgumentException>(() => c.Emit(new MemoryStream(), pdbStream)); 446Assert.Throws<ArgumentException>("peStream", () => comp.Emit(peStream: new TestStream(canRead: true, canWrite: false, canSeek: true))); 447Assert.Throws<ArgumentException>("pdbStream", () => comp.Emit(peStream: new MemoryStream(), pdbStream: new TestStream(canRead: true, canWrite: false, canSeek: true))); 448Assert.Throws<ArgumentException>("pdbStream", () => comp.Emit(peStream: new MemoryStream(), pdbStream: new MemoryStream(), options: EmitOptions.Default.WithDebugInformationFormat(DebugInformationFormat.Embedded))); 450Assert.Throws<ArgumentException>("sourceLinkStream", () => comp.Emit( 456Assert.Throws<ArgumentException>("embeddedTexts", () => comp.Emit( 462Assert.Throws<ArgumentException>("embeddedTexts", () => comp.Emit( 468Assert.Throws<ArgumentException>("win32Resources", () => comp.Emit( 472Assert.Throws<ArgumentException>("win32Resources", () => comp.Emit( 818Assert.Throws<ArgumentException>(() => comp.AddSyntaxTrees(t1)); 821Assert.Throws<ArgumentException>(() => comp.ReplaceSyntaxTree(t1, comp.SyntaxTrees[0])); 824Assert.Throws<ArgumentException>(() => comp = comp.RemoveSyntaxTrees(SyntaxFactory.ParseSyntaxTree(s1))); 828Assert.Throws<ArgumentException>(() => comp = comp.RemoveSyntaxTrees(withErrorTree)); 856Assert.Throws<ArgumentException>(() => compCollection = compCollection.AddSyntaxTrees(t4, t5).RemoveSyntaxTrees(col)); 867Assert.Throws<ArgumentException>(() => compCollection = compCollection.AddSyntaxTrees(t4, t6).RemoveSyntaxTrees(stack)); 878Assert.Throws<ArgumentException>(() => compCollection = compCollection.AddSyntaxTrees(t4, t6).RemoveSyntaxTrees(queue)); 913Assert.Throws<ArgumentException>(() => CSharpCompilation.Create("Compilation", new SyntaxTree[] { withExpressionRootTree })); 916Assert.Throws<ArgumentException>(() => comp.AddSyntaxTrees(withExpressionRootTree)); 919Assert.Throws<ArgumentException>(() => comp.ReplaceSyntaxTree(comp.SyntaxTrees[0], withExpressionRootTree)); 956Assert.Throws<ArgumentException>(() => comp = comp.AddSyntaxTrees(listSyntaxTree).AddReferences().ReplaceSyntaxTree(t1, t2)); 1296Assert.Throws<ArgumentException>(() => comp.AddReferences(compRef)); 1381Assert.Throws<ArgumentException>(() => comp.AddReferences(compRef)); 1427Assert.Throws<ArgumentException>(() => comp.AddReferences(listRef).AddReferences(ref2).RemoveReferences(ref1, ref2, ref3, ref4).ReplaceReference(ref2, ref2)); 1437Assert.Throws<ArgumentException>(() => comp = comp.RemoveReferences(ref1)); 1442Assert.Throws<ArgumentException>(() => comp = comp.ReplaceReference(MscorlibRef, ref1)); 1453Assert.Throws<ArgumentException>( 1474Assert.Throws<ArgumentException>( 1482Assert.Throws<ArgumentException>( 1488Assert.Throws<ArgumentException>(() => comp.ReplaceSyntaxTree(newTree: SyntaxFactory.ParseSyntaxTree("Using System;"), oldTree: t1)); 1541Assert.Throws<ArgumentException>( 1555Assert.Throws<ArgumentException>(() => (comp.AddSyntaxTrees(t1, t1))); 1619Assert.Throws<ArgumentException>( 2385Assert.Throws<ArgumentException>(() => 2399Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", returnType: genericParameter)); 2400Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", returnType: open)); 2401Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", returnType: typeof(void))); 2402Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", returnType: byref)); 2404Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: genericParameter)); 2405Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: open)); 2406Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: typeof(void))); 2407Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: typeof(int))); 2408Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: ptr)); 2409Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: byref)); 2412Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a1", previousScriptCompilation: s0, globalsType: typeof(List<bool>))); 2415Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseExe)); 2416Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithOutputKind(OutputKind.NetModule))); 2417Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithOutputKind(OutputKind.WindowsRuntimeMetadata))); 2418Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithOutputKind(OutputKind.WindowsRuntimeApplication))); 2419Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithOutputKind(OutputKind.WindowsApplication))); 2420Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithCryptoKeyContainer("goo"))); 2421Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithCryptoKeyFile("goo.snk"))); 2422Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithDelaySign(true))); 2423Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithDelaySign(false))); 2467Assert.Throws<ArgumentException>(() => comp.CreateArrayTypeSymbol(elementType, default)); 2468Assert.Throws<ArgumentException>(() => comp.CreateArrayTypeSymbol(elementType, 0)); 2475Assert.Throws<ArgumentException>(() => comp.CreateArrayTypeSymbol(elementType, rank: default)); 2476Assert.Throws<ArgumentException>(() => comp.CreateArrayTypeSymbol(elementType, rank: 0)); 2507Assert.Throws<ArgumentException>(() => 2517Assert.Throws<ArgumentException>(() => 2529Assert.Throws<ArgumentException>(() => 2541Assert.Throws<ArgumentException>(() => 2704Assert.Throws<ArgumentException>(() => comp.CreateAnonymousTypeSymbol(memberTypes, memberNames, memberNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated))); 2770Assert.Throws<ArgumentException>(() => 2792Assert.Throws<ArgumentException>("name", () => 2796Assert.Throws<ArgumentException>("name", () => 2800Assert.Throws<ArgumentException>(null, () => 2804Assert.Throws<ArgumentException>(null, () => 2808Assert.Throws<ArgumentException>(null, () => 2960Assert.Throws<ArgumentException>(null, () => compilation.CreateBuiltinOperator( 2982Assert.Throws<ArgumentException>("name", () => 2986Assert.Throws<ArgumentException>(null, () => 2990Assert.Throws<ArgumentException>(null, () => 2994Assert.Throws<ArgumentException>("name", () => 2998Assert.Throws<ArgumentException>("name", () => 3002Assert.Throws<ArgumentException>("name", () => 3006Assert.Throws<ArgumentException>("name", () => 3033Assert.Throws<ArgumentException>(() => genericType.Construct(default(ImmutableArray<ITypeSymbol>), default(ImmutableArray<CodeAnalysis.NullableAnnotation>))); 3034Assert.Throws<ArgumentException>(() => genericType.Construct(typeArguments: default, typeArgumentNullableAnnotations: default)); 3041Assert.Throws<ArgumentException>(() => genericType.Construct(typeArguments, ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty)); 3042Assert.Throws<ArgumentException>(() => genericType.Construct(ImmutableArray.Create<ITypeSymbol>(null, null), default)); 3052Assert.Throws<ArgumentException>(() => genericType.Construct(typeArguments, default)); 3068Assert.Throws<ArgumentException>(() => genericMethod.Construct(default(ImmutableArray<ITypeSymbol>), default(ImmutableArray<CodeAnalysis.NullableAnnotation>))); 3069Assert.Throws<ArgumentException>(() => genericMethod.Construct(typeArguments: default, typeArgumentNullableAnnotations: default)); 3076Assert.Throws<ArgumentException>(() => genericMethod.Construct(typeArguments, ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty)); 3077Assert.Throws<ArgumentException>(() => genericMethod.Construct(ImmutableArray.Create<ITypeSymbol>(null, null), default)); 3087Assert.Throws<ArgumentException>(() => genericMethod.Construct(typeArguments, default));
Compilation\GetSemanticInfoTests.cs (5)
4055Assert.Throws<ArgumentException>(() => method1.GetTypeInferredDuringReduction( 5420Assert.Throws<ArgumentException>(() => type.Construct(new ITypeSymbol[] { null })); // null type arg 5421Assert.Throws<ArgumentException>(() => type.Construct()); // typeArgs.Length != Arity 5428Assert.Throws<ArgumentException>(() => type.Construct(new ITypeSymbol[] { null })); // null type arg 5429Assert.Throws<ArgumentException>(() => type.Construct()); // typeArgs.Length != Arity
Compilation\SemanticModelAPITests.cs (4)
647Assert.Throws<ArgumentException>(() => 2186Assert.Throws<ArgumentException>(() => model.TryGetSpeculativeSemanticModel(statement.SpanStart, statement: statement, speculativeModel: out speculativeModel)); 2187Assert.Throws<ArgumentException>(() => model.TryGetSpeculativeSemanticModel(ctorInitializer.SpanStart, constructorInitializer: ctorInitializer, speculativeModel: out speculativeModel)); 2188Assert.Throws<ArgumentException>(() => model.TryGetSpeculativeSemanticModel(attribute.SpanStart, attribute: attribute, speculativeModel: out speculativeModel));
Compilation\SymbolSearchTests.cs (4)
20Assert.Throws<ArgumentException>(() => 26Assert.Throws<ArgumentException>(() => 32Assert.Throws<ArgumentException>(() => 38Assert.Throws<ArgumentException>(() =>
Symbols\FunctionPointerTypeSymbolTests.cs (9)
1539Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray.Create(RefKind.None))); 1540Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.Out, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty)); 1542Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Default, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1543Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.StdCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1544Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.FastCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1545Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.CDecl, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1546Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.ThisCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!)); 1547Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Unmanaged, callingConventionTypes: ImmutableArray.Create(@string)!)); 1967Assert.Throws<ArgumentException>(() => mainComp.CreateFunctionPointerTypeSymbol(
Symbols\Source\FileModifierTests.cs (2)
4590var ex = Assert.Throws<ArgumentException>(() => CreateCompilation(new[] { tree, tree }));
Symbols\Source\TypeMapTests.cs (1)
188Assert.Throws<ArgumentException>(() =>
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (16)
Syntax\SyntaxFactoryTests.cs (7)
103Assert.Throws<ArgumentException>(() => SyntaxFactory.Token(SyntaxKind.NumericLiteralExpression)); 141Assert.Throws<ArgumentException>(() => SyntaxFactory.Token(default(SyntaxTriviaList), SyntaxKind.IdentifierToken, "text", "valueText", default(SyntaxTriviaList))); 142Assert.Throws<ArgumentException>(() => SyntaxFactory.Token(default(SyntaxTriviaList), SyntaxKind.CharacterLiteralToken, "text", "valueText", default(SyntaxTriviaList))); 143Assert.Throws<ArgumentException>(() => SyntaxFactory.Token(default(SyntaxTriviaList), SyntaxKind.NumericLiteralToken, "text", "valueText", default(SyntaxTriviaList))); 154catch (ArgumentException e) 165catch (ArgumentException e) 176catch (ArgumentException e)
Syntax\SyntaxListTests.cs (4)
177Assert.Throws<ArgumentException>(() => list.Replace(nodeD, nodeE)); 178Assert.Throws<ArgumentException>(() => list.ReplaceRange(nodeD, new[] { nodeE })); 224Assert.Throws<ArgumentException>(() => list.Replace(nodeD, nodeE)); 225Assert.Throws<ArgumentException>(() => list.ReplaceRange(nodeD, new[] { nodeE }));
Syntax\SyntaxNodeTests.cs (3)
3522Assert.Throws<ArgumentException>(() => SyntaxFactory.SeparatedList<TypeSyntax>(new SyntaxNodeOrToken[] { commaToken })); 3523Assert.Throws<ArgumentException>(() => SyntaxFactory.SeparatedList<TypeSyntax>(new SyntaxNodeOrToken[] { intType, commaToken, commaToken })); 3524Assert.Throws<ArgumentException>(() => SyntaxFactory.SeparatedList<TypeSyntax>(new SyntaxNodeOrToken[] { intType, intType }));
Syntax\SyntaxTests.cs (1)
34Assert.Throws<ArgumentException>(() =>
Syntax\TrackNodeTests.cs (1)
184Assert.Throws<ArgumentException>(() => expr.TrackNodes(SyntaxFactory.IdentifierName("c")));
Microsoft.CodeAnalysis.Debugging.Package (1)
CustomDebugInfoReader.cs (1)
676/// <exception cref="ArgumentException">Format of <paramref name="import"/> is not valid.</exception>
Microsoft.CodeAnalysis.EditorFeatures (1)
Undo\Extensions.cs (1)
26catch (ArgumentException)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
CodeGeneration\CodeGenerationTests.cs (2)
243ArgumentException exception = null; 254catch (ArgumentException e)
Debugging\DebugInformationReaderProviderTests.cs (2)
18Assert.Throws<ArgumentException>(() => DebugInformationReaderProvider.CreateFromStream(new TestStream(canRead: false, canSeek: true, canWrite: true))); 19Assert.Throws<ArgumentException>(() => DebugInformationReaderProvider.CreateFromStream(new TestStream(canRead: true, canSeek: false, canWrite: true)));
Emit\CompilationOutputFilesTests.cs (2)
22Assert.Throws<ArgumentException>(() => new CompilationOutputFiles(@"a.dll")); 23Assert.Throws<ArgumentException>(() => new CompilationOutputFiles(@"\a.dll", @"a.dll"));
Extensions\SourceTextContainerExtensionsTests.cs (1)
20Assert.Throws<ArgumentException>(() => Microsoft.CodeAnalysis.Text.Extensions.GetTextBuffer(containerMock.Object));
MetadataAsSource\MetadataAsSourceTests.cs (1)
1880await Assert.ThrowsAsync<ArgumentException>(async () =>
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
src\Compilers\Core\Portable\CaseInsensitiveComparison.cs (1)
37catch (ArgumentException) // System.Globalization.CultureNotFoundException not on all platforms
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Debugger\Engine\DkmClrValue.cs (1)
692catch (ArgumentException)
Microsoft.CodeAnalysis.Extensions.Package (6)
Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
Microsoft.CodeAnalysis.Features (5)
Debugging\DebugInformationReaderProvider.cs (1)
122/// <exception cref="ArgumentException"><paramref name="stream"/> does not support read and seek operations.</exception>
EditAndContinue\ActiveStatementsMap.cs (1)
111catch (ArgumentException)
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (2)
517return IsAnyThrowInvocation(statement, parameter, [nameof(ArgumentNullException), nameof(ArgumentException)], m => m is ThrowIfNullName or ThrowIfNullOrEmptyName or ThrowIfNullOrWhiteSpaceName); 972GetTypeNode(compilation, generator, typeof(ArgumentException)),
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoReader.cs (1)
676/// <exception cref="ArgumentException">Format of <paramref name="import"/> is not valid.</exception>
Microsoft.CodeAnalysis.InteractiveHost (9)
Interactive\Core\InteractiveHost.Service.cs (1)
199catch (ArgumentException)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Extensions\Extensions.cs (1)
347/// <exception cref="ArgumentException"></exception>
Extensions\ProtocolConversions.cs (1)
323catch (ArgumentException ex)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
ProtocolConversionsTests.cs (2)
255Assert.Throws<ArgumentException>(() => ProtocolConversions.RangeToTextSpan(range, sourceText)); 266Assert.Throws<ArgumentException>(() => ProtocolConversions.RangeToTextSpan(range, sourceText));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Microsoft.CodeAnalysis.PublicApiAnalyzers (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Microsoft.CodeAnalysis.ResxSourceGenerator (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Microsoft.CodeAnalysis.Scripting (14)
Hosting\AssemblyLoader\InteractiveAssemblyLoader.cs (1)
153/// <exception cref="ArgumentException"><paramref name="path"/> is not an existing path.</exception>
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (5)
70/// <exception cref="ArgumentException"><paramref name="directory"/> is not an absolute path.</exception> 127/// <exception cref="ArgumentException"><paramref name="fullPath"/> is not an absolute path.</exception> 286/// <exception cref="ArgumentException"><paramref name="fullPath"/> is not an absolute path.</exception> 359/// <exception cref="ArgumentException"><paramref name="originalPath"/> is not an absolute path.</exception> 381/// <exception cref="ArgumentException"><paramref name="fullPath"/> is not absolute.</exception>
Script.cs (6)
107/// <exception cref="ArgumentException">Stream is not readable or seekable.</exception> 124/// <exception cref="ArgumentException">Stream is not readable or seekable.</exception> 467/// <exception cref="ArgumentException">The type of <paramref name="globals"/> doesn't match <see cref="Script.GlobalsType"/>.</exception> 485/// <exception cref="ArgumentException">The type of <paramref name="globals"/> doesn't match <see cref="Script.GlobalsType"/>.</exception> 528/// <exception cref="ArgumentException"><paramref name="previousState"/> is not a previous execution state of this script.</exception> 545/// <exception cref="ArgumentException"><paramref name="previousState"/> is not a previous execution state of this script.</exception>
ScriptRunner.cs (1)
18/// <exception cref="ArgumentException">The type of <paramref name="globals"/> doesn't match the corresponding <see cref="Script.GlobalsType"/>.</exception>
ScriptVariable.cs (1)
50/// <exception cref="ArgumentException">The type of the specified <paramref name="value"/> isn't assignable to the type of the variable.</exception>
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (13)
MetadataShadowCopyProviderTests.cs (13)
57Assert.Throws<ArgumentException>(() => _provider.NeedsShadowCopy("c:goo.dll")); 58Assert.Throws<ArgumentException>(() => _provider.NeedsShadowCopy("bar.dll")); 59Assert.Throws<ArgumentException>(() => _provider.NeedsShadowCopy(@"\bar.dll")); 60Assert.Throws<ArgumentException>(() => _provider.NeedsShadowCopy(@"../bar.dll")); 63Assert.Throws<ArgumentException>(() => _provider.SuppressShadowCopy("c:goo.dll")); 64Assert.Throws<ArgumentException>(() => _provider.SuppressShadowCopy("bar.dll")); 65Assert.Throws<ArgumentException>(() => _provider.SuppressShadowCopy(@"\bar.dll")); 66Assert.Throws<ArgumentException>(() => _provider.SuppressShadowCopy(@"../bar.dll")); 70Assert.Throws<ArgumentException>(() => _provider.GetMetadataShadowCopy("c:goo.dll", MetadataImageKind.Assembly)); 71Assert.Throws<ArgumentException>(() => _provider.GetMetadataShadowCopy("bar.dll", MetadataImageKind.Assembly)); 72Assert.Throws<ArgumentException>(() => _provider.GetMetadataShadowCopy(@"\bar.dll", MetadataImageKind.Assembly)); 73Assert.Throws<ArgumentException>(() => _provider.GetMetadataShadowCopy(@"../bar.dll", MetadataImageKind.Assembly)); 77Assert.Throws<ArgumentException>(() => _provider.GetMetadata("c:goo.dll", MetadataImageKind.Assembly));
Microsoft.CodeAnalysis.Test.Utilities (12)
Compilation\CompilationExtensions.cs (1)
339catch (ArgumentException)
Compilation\OperationTreeVerifier.cs (1)
302catch (ArgumentException)
Compilation\TestOperationVisitor.cs (7)
203catch (ArgumentException) 853Assert.Throws<ArgumentException>(() => VisualBasic.VisualBasicExtensions.GetConversion(operation)); 857Assert.Throws<ArgumentException>(() => CSharp.CSharpExtensions.GetConversion(operation)); 1179Assert.Throws<ArgumentException>("compoundAssignment", () => VisualBasic.VisualBasicExtensions.GetInConversion(operation)); 1180Assert.Throws<ArgumentException>("compoundAssignment", () => VisualBasic.VisualBasicExtensions.GetOutConversion(operation)); 1186Assert.Throws<ArgumentException>("compoundAssignment", () => CSharp.CSharpExtensions.GetInConversion(operation)); 1187Assert.Throws<ArgumentException>("compoundAssignment", () => CSharp.CSharpExtensions.GetOutConversion(operation));
CompilationVerifier.cs (2)
206catch (ArgumentException e) 224catch (ArgumentException e)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
1296catch (ArgumentException ex)
Microsoft.CodeAnalysis.Threading.Package (5)
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
Microsoft.CodeAnalysis.UnitTests (128)
AnalyzerAssemblyLoaderTests.cs (4)
268Assert.Throws<ArgumentException>("originalPath", () => loader.AddDependencyLocation("a")); 345Assert.Throws<ArgumentException>(() => loader.LoadFromPath(analyzerPath)); 357Assert.Throws<ArgumentException>(() => loader.LoadFromPath(testFixture.Beta)); 882Assert.Throws<ArgumentException>(() => loader.GetResolvedAnalyzerPath(testFixture.Delta2));
Analyzers\AnalyzerConfigTests.cs (6)
1481Assert.Throws<ArgumentException>(() => Parse("", "relativeDir/file")); 1482Assert.Throws<ArgumentException>(() => Parse("", "/")); 1483Assert.Throws<ArgumentException>(() => Parse("", "/subdir/")); 1489Assert.Throws<ArgumentException>(() => Parse("", "Z:")); 1490Assert.Throws<ArgumentException>(() => Parse("", "Z:\\")); 1491Assert.Throws<ArgumentException>(() => Parse("", ":\\.editorconfig"));
Analyzers\AnalyzerFileReferenceTests.cs (1)
51Assert.Throws<ArgumentException>("fullPath", () => new AnalyzerFileReference("a.dll", s_analyzerLoader));
Collections\ImmutableDictionaryBuilderTestBase.cs (1)
55Assert.Throws<ArgumentException>(null, () => builder.Add("five", 6));
Collections\ImmutableDictionaryTestBase.cs (2)
288Assert.Throws<ArgumentException>(null, () => map1.Add(key, value2)); 289Assert.Throws<ArgumentException>(null, () => map2.Add(key, value1));
Collections\ImmutableSegmentedDictionaryBuilderTest.cs (1)
219Assert.Throws<ArgumentException>(null, () => builder.KeyComparer = StringComparer.OrdinalIgnoreCase);
Collections\ImmutableSegmentedDictionaryTest.cs (3)
201Assert.Throws<ArgumentException>(null, () => map.WithComparer(StringComparer.OrdinalIgnoreCase)); 209var exception = Assert.Throws<ArgumentException>(null, () => map.Add("firstKey", "3"));
Collections\ImmutableSegmentedListTest.cs (4)
562Assert.Throws<ArgumentException>("oldValue", () => ImmutableSegmentedList<int>.Empty.Replace(5, 3)); 623Assert.Throws<ArgumentException>(() => list.RemoveRange(4, 0)); 624Assert.Throws<ArgumentException>(() => list.RemoveRange(0, 4)); 625Assert.Throws<ArgumentException>(() => list.RemoveRange(2, 2));
Collections\List\ICollection.Generic.Tests.cs (5)
68protected virtual Type ICollection_Generic_CopyTo_IndexLargerThanArrayCount_ThrowType => typeof(ArgumentException); 456Assert.Throws<ArgumentException>(() => collection.Contains(invalidValue)) 503Assert.ThrowsAny<ArgumentException>(() => collection.CopyTo(array, count)); 525Assert.ThrowsAny<ArgumentException>(() => collection.CopyTo(array, 1)); 677Assert.Throws<ArgumentException>(() => collection.Remove(value));
Collections\List\ICollection.NonGeneric.Tests.cs (7)
65protected virtual Type ICollection_NonGeneric_CopyTo_ArrayOfIncorrectReferenceType_ThrowType => typeof(ArgumentException); 72protected virtual Type ICollection_NonGeneric_CopyTo_ArrayOfIncorrectValueType_ThrowType => typeof(ArgumentException); 80protected virtual Type ICollection_NonGeneric_CopyTo_NonZeroLowerBound_ThrowType => typeof(ArgumentException); 98protected virtual Type ICollection_NonGeneric_CopyTo_IndexLargerThanArrayCount_ThrowType => typeof(ArgumentException); 104protected virtual Type ICollection_NonGeneric_CopyTo_TwoDimensionArray_ThrowType => typeof(ArgumentException); 263Assert.Throws<ArgumentException>(() => collection.CopyTo(array, count)); 286Assert.Throws<ArgumentException>(() => collection.CopyTo(array, 1));
Collections\List\IList.Generic.Tests.cs (3)
274Assert.Throws<ArgumentException>(() => list[count / 2] = value); 372Assert.Throws<ArgumentException>(() => list.IndexOf(value)); 528Assert.Throws<ArgumentException>(() => list.Insert(count / 2, value));
Collections\List\IList.NonGeneric.Tests.cs (6)
364Assert.Throws<ArgumentException>(() => list[count / 2] = value); 620Assert.Throws<ArgumentException>(() => collection.Contains(invalidValue)) 700Assert.Throws<ArgumentException>(() => list.IndexOf(value)); 854Assert.Throws<ArgumentException>(() => list.Insert(count / 2, value)); 908Assert.Throws<ArgumentException>(() => list.Remove(value)); 999Assert.Throws<ArgumentException>(() => collection.Remove(value));
Collections\List\SegmentedList.Generic.Tests.BinarySearch.cs (2)
69Assert.Throws<ArgumentException>(null, () => list.BinarySearch(0, count + 1, element, GetIComparer())); //"Finding items longer than array should throw ArgumentException" 72Assert.Throws<ArgumentException>(null, () => list.BinarySearch(count + 1, count, element, GetIComparer())); //"ArgumentException should be thrown on index greater than length of array."
Collections\List\SegmentedList.Generic.Tests.cs (2)
73Assert.Throws<ArgumentException>(null, () => list.CopyTo(0, new T[0], 0, count + 1)); 74Assert.Throws<ArgumentException>(null, () => list.CopyTo(count, new T[0], 0, 1));
Collections\List\SegmentedList.Generic.Tests.Misc.cs (2)
118Assert.Throws<ArgumentException>("value", () => _ilist.Insert(0, new LinkedListNode<string>("blargh"))); //"ArgumentException expected." 305Assert.Throws<ArgumentException>(null, () =>
Collections\List\SegmentedList.Generic.Tests.Remove.cs (1)
126Assert.Throws<ArgumentException>(null, () => list.RemoveRange(invalidSet.Item1, invalidSet.Item2));
Collections\List\SegmentedList.Generic.Tests.Reverse.cs (1)
139Assert.Throws<ArgumentException>(null, () => list.Reverse(invalidSet.Item1, invalidSet.Item2));
Collections\List\SegmentedList.Generic.Tests.Sort.cs (1)
200Assert.Throws<ArgumentException>(null, () => list.Sort(invalidSet.Item1, invalidSet.Item2, GetIComparer()));
Diagnostics\OperationTests.cs (7)
156catch (ArgumentException ex) 174catch (ArgumentException ex) 192catch (ArgumentException ex) 210catch (ArgumentException ex) 232catch (ArgumentException ex) 252catch (ArgumentException ex) 313catch (ArgumentException ex)
EmbeddedTextTests.cs (10)
26Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromBytes("", default(ArraySegment<byte>))); 28Assert.Throws<ArgumentException>("checksumAlgorithm", () => EmbeddedText.FromBytes("path", new ArraySegment<byte>(new byte[0], 0, 0), SourceHashAlgorithm.None)); 35Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromSource("", null)); 39Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From("source"))); 42Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new byte[0], 0, Encoding.UTF8, canBeEmbedded: false))); 43Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new MemoryStream(new byte[0]), Encoding.UTF8, canBeEmbedded: false))); 50Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromStream("", null)); 52Assert.Throws<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotReadStream())); 53Assert.Throws<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotSeekStream())); 54Assert.Throws<ArgumentException>("checksumAlgorithm", () => EmbeddedText.FromStream("path", new MemoryStream(), SourceHashAlgorithm.None));
Emit\SemanticEditTests.cs (2)
43Assert.Throws<ArgumentException>("oldSymbol", () => new SemanticEdit(SemanticEditKind.Update, oldSymbol: type, newSymbol: method, instrumentation: instrumentation)); 44Assert.Throws<ArgumentException>("newSymbol", () => new SemanticEdit(SemanticEditKind.Update, oldSymbol: method, newSymbol: type, instrumentation: instrumentation));
FileLinePositionSpanTests.cs (2)
41Assert.Throws<ArgumentException>( 47Assert.Throws<ArgumentException>(
InternalUtilities\ConcurrentDictionaryExtensionsTests.cs (1)
21Assert.Throws<ArgumentException>(() => dictionary.Add(0, 0));
InternalUtilities\StreamExtensionsTests.cs (1)
60Assert.Throws<ArgumentException>(() => stream.TryReadAll(buffer, 0, 100));
IsSymbolAccessibleWithinTests.cs (8)
34Assert.Throws<ArgumentException>(() => csc.IsSymbolAccessibleWithin(Av, Av)); 35Assert.Throws<ArgumentException>(() => csc.IsSymbolAccessibleWithin(Av, Ac)); 36Assert.Throws<ArgumentException>(() => csc.IsSymbolAccessibleWithin(Ac, Av)); 37Assert.Throws<ArgumentException>(() => csc.IsSymbolAccessibleWithin(Ac, Ac, Av)); 39Assert.Throws<ArgumentException>(() => vbc.IsSymbolAccessibleWithin(Ac, Ac)); 40Assert.Throws<ArgumentException>(() => vbc.IsSymbolAccessibleWithin(Ac, Av)); 41Assert.Throws<ArgumentException>(() => vbc.IsSymbolAccessibleWithin(Av, Ac)); 42Assert.Throws<ArgumentException>(() => vbc.IsSymbolAccessibleWithin(Av, Av, Ac));
MetadataReferences\AssemblyIdentityTests.cs (6)
223Assert.Throws<ArgumentException>(() => new AssemblyIdentity("xx\0xx")); 224Assert.Throws<ArgumentException>(() => new AssemblyIdentity("")); 225Assert.Throws<ArgumentException>(() => new AssemblyIdentity(null)); 227Assert.Throws<ArgumentException>( 230Assert.Throws<ArgumentException>( 250Assert.Throws<ArgumentException>(() =>
MetadataReferences\AssemblyMetadataTests.cs (4)
29Assert.Throws<ArgumentException>(() => AssemblyMetadata.Create(default(ImmutableArray<ModuleMetadata>))); 30Assert.Throws<ArgumentException>(() => AssemblyMetadata.Create(ImmutableArray.Create<ModuleMetadata>())); 36Assert.Throws<ArgumentException>(() => AssemblyMetadata.Create(m1, m2.Copy(), m3)); 37Assert.Throws<ArgumentException>(() => AssemblyMetadata.Create(new List<ModuleMetadata>(new ModuleMetadata[] { m1.Copy(), m2.Copy(), m3.Copy() })));
MetadataReferences\FusionAssemblyIdentityTests.cs (1)
216Assert.Throws<ArgumentException>(() => FusionAssemblyIdentity.ToAssemblyNameObject(new AssemblyName { Name = "x\0x" }));
MetadataReferences\MetadataReferencePropertiesTests.cs (7)
43Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray.Create("blah"))); 44Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, embedInteropTypes: true)); 45Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray.Create(""))); 46Assert.Throws<ArgumentException>(() => new MetadataReferenceProperties(MetadataImageKind.Module, ImmutableArray.Create("x\0x"))); 48Assert.Throws<ArgumentException>(() => MetadataReferenceProperties.Module.WithAliases(ImmutableArray.Create("blah"))); 49Assert.Throws<ArgumentException>(() => MetadataReferenceProperties.Module.WithAliases(new[] { "blah" })); 50Assert.Throws<ArgumentException>(() => MetadataReferenceProperties.Module.WithEmbedInteropTypes(true));
MetadataReferences\MetadataReferenceTests.cs (5)
52Assert.Throws<ArgumentException>(() => MetadataReference.CreateFromAssemblyInternal(typeof(object).Assembly, new MetadataReferenceProperties(MetadataImageKind.Module))); 280Assert.Throws<ArgumentException>(() => r.WithAliases(new[] { "bar" })); 281Assert.Throws<ArgumentException>(() => r.WithEmbedInteropTypes(true)); 364Assert.Throws<ArgumentException>(() => r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module))); 395Assert.Throws<ArgumentException>(() => r.WithProperties(new MetadataReferenceProperties(MetadataImageKind.Module)));
MetadataReferences\ModuleMetadataTests.cs (4)
110Assert.Throws<ArgumentException>(() => ModuleMetadata.CreateFromStream(new TestStream(canRead: false, canSeek: true))); 111Assert.Throws<ArgumentException>(() => ModuleMetadata.CreateFromStream(new TestStream(canRead: true, canSeek: false))); 118Assert.Throws<ArgumentException>(() => ModuleMetadata.CreateFromFile("")); 119Assert.Throws<ArgumentException>(() => ModuleMetadata.CreateFromFile(@"c:\*"));
ResourceDescriptionTests.cs (12)
35Assert.Throws<ArgumentException>(() => new ResourceDescription("", "file", data, isPublic: true)); 36Assert.Throws<ArgumentException>(() => new ResourceDescription("res", "", data, isPublic: true)); 37Assert.Throws<ArgumentException>(() => new ResourceDescription("res", "", data, isPublic: true)); 38Assert.Throws<ArgumentException>(() => new ResourceDescription("", "file", data, isPublic: true)); 41Assert.Throws<ArgumentException>(() => new ResourceDescription("x", "x/x", data, isPublic: true)); 42Assert.Throws<ArgumentException>(() => new ResourceDescription("x", "x\\x", data, isPublic: true)); 43Assert.Throws<ArgumentException>(() => new ResourceDescription("x", "x:x", data, isPublic: true)); 44Assert.Throws<ArgumentException>(() => new ResourceDescription("x", "\0", data, isPublic: true)); 45Assert.Throws<ArgumentException>(() => new ResourceDescription("", "x", data, isPublic: true)); 46Assert.Throws<ArgumentException>(() => new ResourceDescription("xxx\0xxxx", "", data, isPublic: true)); 47Assert.Throws<ArgumentException>(() => new ResourceDescription("xxx\uD800asdas", "", data, isPublic: true)); 48Assert.Throws<ArgumentException>(() => new ResourceDescription("xxx", "xxx\uD800asdas", data, isPublic: true));
SourceFileResolverTest.cs (2)
40catch (ArgumentException argException) 63catch (ArgumentException argException)
Text\SourceTextStreamTests.cs (1)
35Assert.Throws<ArgumentException>(() => stream.Read(buffer, 0, local));
Text\StringTextTest.cs (1)
76Assert.Throws<ArgumentException>(() => SourceText.From(new TestStream(canRead: false, canSeek: true), Encoding.UTF8));
Text\TextChangeTests.cs (2)
127Assert.Throws<ArgumentException>(() => text.WithChanges(changes)); 153Assert.ThrowsAny<ArgumentException>(() =>
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\MethodSymbol.vb (1)
796''' <exception cref="System.ArgumentException">If <paramref name="reducedFromTypeParameter"/> doesn't belong to the corresponding <see cref="ReducedFrom"/> method.</exception>
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Semantics\QueryExpressions_FlowAnalysis.vb (2)
889Assert.Throws(Of System.ArgumentException)( 1091Assert.Throws(Of System.ArgumentException)(
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
UsedAssembliesTests.vb (1)
4283Assert.Throws(Of System.ArgumentException)(Sub() GlobalImport.Parse({"global"})) ' System.ArgumentException : Error in project-level import 'global' at 'global' : 'Global' not allowed in this context; identifier expected.
Microsoft.CodeAnalysis.Workspaces (34)
ChangeNamespace\IChangeNamespaceService.cs (2)
33/// - Otherwise, an <see cref="System.ArgumentException"/> will be thrown. 50/// An <see cref="System.ArgumentException"/> will be thrown if:
CodeFixes\CodeFixContext.cs (2)
80/// <exception cref="ArgumentException"> 112/// <exception cref="ArgumentException">
Editing\SyntaxEditor.cs (1)
32/// found, the operation will fail with an <see cref="ArgumentException"/>.
Shared\Utilities\ExtensionOrderer.cs (2)
62/// Throws <see cref="ArgumentException"/> if a cycle is detected. 64/// <exception cref="ArgumentException">A cycle was detected in the extension ordering.</exception>
Shared\Utilities\IOUtilities.cs (1)
55ArgumentException or
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Workspace\Solution\FileTextLoader.cs (1)
46/// <exception cref="ArgumentException"><paramref name="path"/> is not an absolute path.</exception>
Workspace\Solution\Solution.cs (12)
564/// <exception cref="ArgumentException">The solution does not contain <paramref name="projectId"/>.</exception> 565/// <exception cref="ArgumentException">The number of documents specified in <paramref name="documentIds"/> is not equal to the number of documents in project <paramref name="projectId"/>.</exception> 603/// <exception cref="ArgumentException">The solution does not contain <paramref name="projectId"/>.</exception> 617/// <exception cref="ArgumentException"><paramref name="projectReferences"/> contains duplicate items.</exception> 650/// <exception cref="ArgumentException">The solution does not contain <paramref name="projectId"/>.</exception> 680/// <exception cref="ArgumentException"><paramref name="projectReferences"/> contains duplicate items.</exception> 715/// <exception cref="ArgumentException"><paramref name="metadataReferences"/> contains duplicate items.</exception> 765/// <exception cref="ArgumentException"><paramref name="metadataReferences"/> contains duplicate items.</exception> 795/// <exception cref="ArgumentException"><paramref name="analyzerReferences"/> contains duplicate items.</exception> 859/// <exception cref="ArgumentException"><paramref name="analyzerReferences"/> contains duplicate items.</exception> 884/// <exception cref="ArgumentException"><paramref name="analyzerReferences"/> contains duplicate items.</exception> 925/// <exception cref="ArgumentException"><paramref name="analyzerReferences"/> contains duplicate items.</exception>
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (10)
src\Compilers\Core\Portable\CaseInsensitiveComparison.cs (1)
37catch (ArgumentException) // System.Globalization.CultureNotFoundException not on all platforms
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
48/// <see cref="ArgumentException"/> will be thrown.
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\AbstractTestHostProject.cs (1)
27catch (ArgumentException)
Microsoft.CodeAnalysis.Workspaces.UnitTests (39)
Differencing\MatchTests.cs (2)
29Assert.Throws<ArgumentException>(() => TestTreeComparer.Instance.ComputeMatch(oldRoot, newRoot, [KeyValuePair.Create(x1, x1)])); 31Assert.Throws<ArgumentException>(() => TestTreeComparer.Instance.ComputeMatch(oldRoot, newRoot, [KeyValuePair.Create(x1, x2), KeyValuePair.Create(x1, new TestNode(0, 0))]));
ExtensionOrdererTests.cs (8)
80Assert.Throws<ArgumentException>(() => ExtensionOrderer.TestAccessor.CheckForCycles(extensions)); 97Assert.Throws<ArgumentException>(() => ExtensionOrderer.TestAccessor.CheckForCycles(extensions)); 112Assert.Throws<ArgumentException>(() => ExtensionOrderer.TestAccessor.CheckForCycles(extensions)); 127Assert.Throws<ArgumentException>(() => ExtensionOrderer.TestAccessor.CheckForCycles(extensions)); 146Assert.Throws<ArgumentException>(() => ExtensionOrderer.TestAccessor.CheckForCycles(extensions)); 165Assert.Throws<ArgumentException>(() => ExtensionOrderer.TestAccessor.CheckForCycles(extensions)); 183Assert.Throws<ArgumentException>(() => ExtensionOrderer.TestAccessor.CheckForCycles(extensions)); 201Assert.Throws<ArgumentException>(() => ExtensionOrderer.TestAccessor.CheckForCycles(extensions));
ObjectSerializationTests.cs (4)
243Assert.Throws<ArgumentException>(() => TestRoundTripCompressedUint(uint.MaxValue)); // max uint not allowed 244Assert.Throws<ArgumentException>(() => TestRoundTripCompressedUint(0x80000000u)); // highest bit set not allowed 245Assert.Throws<ArgumentException>(() => TestRoundTripCompressedUint(0x40000000u)); // second highest bit set not allowed 246Assert.Throws<ArgumentException>(() => TestRoundTripCompressedUint(0xC0000000u)); // both high bits set not allowed
Options\OptionKeyTests.cs (1)
74Assert.Throws<ArgumentException>(() => new OptionKey(new TestOption() { IsPerLanguage = false }, language: "lang"));
SolutionTests\ProjectInfoTests.cs (5)
39Assert.Throws<ArgumentException>("documents[1]", 45Assert.Throws<ArgumentException>("additionalDocuments[1]", 52Assert.Throws<ArgumentException>("projectReferences[1]", 59Assert.Throws<ArgumentException>("analyzerReferences[1]", 66Assert.Throws<ArgumentException>("metadataReferences[1]",
SolutionTests\SolutionTestHelpers.cs (1)
81Assert.Throws<ArgumentException>(() => factory(instanceWithNoItem, new TValue[] { item, item }));
SolutionTests\SolutionTests.cs (12)
338Assert.Throws<ArgumentException>(() => provider.TryGetDiagnosticValue(tree, "CA1234", CancellationToken.None, out _)); 1987Assert.Throws<ArgumentException>("projectReferences[1]", () => solution.AddProjectReferences(projectId, [projectRef2, projectRef2])); 1988Assert.Throws<ArgumentException>("projectReferences[1]", () => solution.AddProjectReferences(projectId, [new ProjectReference(projectId2), new ProjectReference(projectId2)])); 2027Assert.Throws<ArgumentException>("projectReference", () => solution.RemoveProjectReference(projectId, new ProjectReference(ProjectId.CreateNewId()))); 2106Assert.Throws<ArgumentException>("metadataReferences[1]", () => solution.AddMetadataReferences(projectId, [metadataRef1, metadataRef1])); 2179Assert.Throws<ArgumentException>("analyzerReferences[1]", () => solution.AddAnalyzerReferences(projectId, [analyzerRef1, analyzerRef1])); 2246Assert.Throws<ArgumentException>("analyzerReferences[1]", () => solution.AddAnalyzerReferences([analyzerRef1, analyzerRef1])); 2764Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveDocuments(ImmutableArray.Create(documentInfo1.Id))); 2783Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAdditionalDocuments(ImmutableArray.Create(documentInfo1.Id))); 2802Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAnalyzerConfigDocuments(ImmutableArray.Create(documentInfo1.Id))); 4702Assert.Throws<ArgumentException>(() => solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.Create<DocumentId>())); 4705Assert.Throws<ArgumentException>(() => solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.CreateRange([did3, did2, did1])));
UtilityTest\AsyncLazyTests.cs (3)
277var exception = new ArgumentException(); 295? await Assert.ThrowsAsync<ArgumentException>(async () => await lazy.GetValueAsync(CancellationToken.None)) 296: Assert.Throws<ArgumentException>(() => lazy.GetValue(CancellationToken.None));
WorkspaceTests\DynamicFileInfoProviderMefTests.cs (2)
30Assert.Throws<ArgumentException>(() => 39Assert.Throws<ArgumentException>(() =>
XxHash128Tests.cs (1)
25Assert.Throws<ArgumentException>("destination", () => XxHash128.Hash(new byte[] { 1, 2, 3 }, new byte[7]));
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (1)
334catch (ArgumentException)
Microsoft.Data.Analysis (19)
DataFrame.cs (1)
158/// <exception cref="ArgumentException">Throws if <paramref name="columnName"/> is not present in this <see cref="DataFrame"/></exception>
DataFrameColumnCollection.cs (18)
180/// <exception cref="ArgumentException">Throws if <paramref name="columnName"/> is not present in this <see cref="DataFrame"/></exception> 213/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 231/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 248/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 265/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 282/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 299/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 316/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 333/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 350/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 367/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 384/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 401/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 418/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 435/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 452/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 469/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception> 486/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
Microsoft.Data.Analysis.Tests (42)
ArrowIntegrationTests.cs (1)
235Assert.ThrowsAny<ArgumentException>(() => DataFrame.FromArrowRecordBatch(originalBatch));
DataFrame.IOTests.cs (6)
232Assert.Throws<System.ArgumentException>(() => DataFrame.LoadCsv(GetStream(data))); 432Assert.ThrowsAny<ArgumentException>(() => DataFrame.LoadCsv(GetStream(data), 436Assert.ThrowsAny<ArgumentException>(() => DataFrame.LoadCsvFromString(data, 725var exp = Assert.ThrowsAny<ArgumentException>(() => DataFrame.LoadCsvFromString(data, header: true)); 1079Assert.Throws<ArgumentException>(() => DataFrame.SaveCsv(dataFrame, csvStream, separator: separator, cultureInfo: cultureInfo));
DataFrameTests.BinaryOperations.cs (4)
437Assert.ThrowsAny<ArgumentException>(() => column.Add(5.5, inPlace: true)); 438Assert.ThrowsAny<ArgumentException>(() => column.ReverseAdd(5.5, inPlace: true)); 440Assert.ThrowsAny<ArgumentException>(() => column.Add(str, inPlace: true)); 441Assert.ThrowsAny<ArgumentException>(() => column.ReverseAdd(str, inPlace: true));
DataFrameTests.cs (29)
44Assert.Throws<ArgumentException>(() => dataFrame["Int5"]); 45Assert.Throws<ArgumentException>(() => dataFrame[(string)null]); 78Assert.Throws<ArgumentException>(() => dataFrame.Columns.Insert(2, bigColumn)); 79Assert.Throws<ArgumentException>(() => dataFrame.Columns.Add(bigColumn)); 83Assert.Throws<ArgumentException>(() => dataFrame.Columns.Insert(2, smallColumn)); 84Assert.Throws<ArgumentException>(() => dataFrame.Columns.Add(smallColumn)); 88Assert.Throws<ArgumentException>(() => dataFrame.Columns.Insert(2, repeatedName)); 97Assert.Throws<ArgumentException>(() => dataFrame.Columns[1] = intColumnCopy); 191Assert.Throws<ArgumentException>(() => dataframe["City"]); 210Assert.Throws<ArgumentException>(() => dataframe["City"]); 720Assert.Throws<ArgumentException>(() => df.Sample(13)); 806Assert.Throws<ArgumentException>(() => df.Columns.Insert(1, new Int32DataFrameColumn("Int2", Enumerable.Range(0, 5).Select(x => x)))); 1173Assert.Throws<ArgumentException>(() => df.Append(new List<object> { 5, true, true }, inPlace: true)); 1282Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetPrimitiveColumn<float>("Int")); 1286Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetStringColumn("ArrowString")); 1290Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetArrowStringColumn("String")); 1294Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Byte")); 1298Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Int")); 1302Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Bool")); 1306Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Char")); 1310Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Decimal")); 1314Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Double")); 1318Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetDoubleColumn("Float")); 1322Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Long")); 1326Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Sbyte")); 1330Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Short")); 1334Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Uint")); 1338Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Ulong")); 1342Assert.Throws<ArgumentException>(() => dataFrame.Columns.GetSingleColumn("Ushort"));
TextFieldParserTests.cs (2)
113Assert.Throws<ArgumentException>(() => parser.SetFieldWidths(new[] { -1, -1 })); 254Assert.Throws<ArgumentException>(() => parser.PeekChars(0));
Microsoft.DotNet.Build.Tasks.Feed (2)
src\PushToBuildStorage.cs (2)
389catch (ArgumentException) 625|| (e is ArgumentException && !(e is ArgumentNullException))
Microsoft.DotNet.Build.Tasks.Feed.Tests (4)
ArtifactUrlHelperTests.cs (2)
42act.Should().Throw<ArgumentException>().WithMessage("File name cannot be null or empty. (Parameter 'fileName')"); 74act.Should().Throw<ArgumentException>().WithMessage("File name cannot be null or empty. (Parameter 'fileName')");
SetupTargetFeedConfigV3Tests.cs (1)
452shouldFail.Should().Throw<ArgumentException>();
SetupTargetFeedConfigV4Tests.cs (1)
404shouldFail.Should().Throw<ArgumentException>();
Microsoft.DotNet.Build.Tasks.Workloads (1)
WorkloadPackPackage.wix.cs (1)
111/// <exception cref="ArgumentException"></exception>
Microsoft.DotNet.Helix.Client (2)
ApiFactory.cs (2)
29/// <see cref="ArgumentException"/> triggered by <c>SendAsync</c> call. 55/// <see cref="ArgumentException"/> triggered by <c>SendAsync</c> call.
Microsoft.DotNet.Helix.JobSender.Tests (4)
Payloads\AdHocPayloadTests.cs (4)
16var exception = Assert.Throws<ArgumentException>(() => new AdhocPayload(new[] { "a/b.txt", "a/c.txt", "d/b.txt" })); 24var exception = Assert.Throws<ArgumentException>(() => new AdhocPayload(new[] { "a/B.txt", "a/c.txt", "d/b.txt" }));
Microsoft.DotNet.Helix.Sdk (1)
HelixTask.cs (1)
76catch (ArgumentException argEx) when (argEx.Message.StartsWith("Helix API does not contain an entry "))
Microsoft.DotNet.Internal.SymbolHelper (5)
SymbolPromotionHelper.cs (3)
81ArgumentException.ThrowIfNullOrWhiteSpace(symbolRequestProject); 185ArgumentException.ThrowIfNullOrWhiteSpace(symbolRequestProject); 242ArgumentException.ThrowIfNullOrWhiteSpace(symbolRequestProject);
SymbolUploadHelperFactory.cs (2)
87/// <exception cref="ArgumentException">If <paramref name="azdoOrg"/> is null or empty.</exception> 97ArgumentException.ThrowIfNullOrWhiteSpace(azdoOrg);
Microsoft.DotNet.NuGetRepack.Tests (1)
TestHelpers\AssertEx.cs (1)
361catch (ArgumentException e)
Microsoft.DotNet.XUnitAssert.Tests (65)
EqualityAssertsTests.cs (8)
2063 var argEx = Assert.IsType<ArgumentException>(ex); 2223 var argEx = Assert.IsType<ArgumentException>(ex); 4037 var argEx = Assert.IsType<ArgumentException>(ex); 4185 var argEx = Assert.IsType<ArgumentException>(ex);
EquivalenceAssertsTests.cs (1)
1486 Assert.IsType<ArgumentException>(ex.InnerException); // Thrown by DateTime.CompareTo
ExceptionAssertsTests.cs (56)
27 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode)); 43 Assert.Throws(typeof(ArgumentException), testCode); 52 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode)); 70 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode)); 110 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode)); 126 Assert.Throws(typeof(ArgumentException), testCode); 135 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode)); 153 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode)); 175 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Action)!)); 183 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode)); 199 Assert.Throws<ArgumentException>(testCode); 208 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode)); 226 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode)); 244 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Func<object>)!)); 263 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode)); 279 Assert.Throws<ArgumentException>(testCode); 288 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode)); 306 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode)); 327 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Action)!)); 335 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode)); 351 Assert.Throws<ArgumentException>("paramName", testCode); 359 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName2", testCode)); 377 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode)); 395 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode)); 413 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Func<object>)!)); 421 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode)); 437 Assert.Throws<ArgumentException>("paramName", testCode); 445 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName2", testCode)); 463 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode)); 481 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode)); 502 Assert.Throws<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Action)!)); 510 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode)); 526 Assert.ThrowsAny<ArgumentException>(testCode); 535 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode)); 552 Assert.ThrowsAny<ArgumentException>(testCode); 561 Assert.Throws<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Func<object>)!)); 580 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode)); 596 Assert.ThrowsAny<ArgumentException>(testCode); 605 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode)); 622 Assert.ThrowsAny<ArgumentException>(testCode); 632 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.ThrowsAnyAsync<ArgumentException>(default(Func<Task>)!)); 640 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAnyAsync<ArgumentException>(testCode)); 656 await Assert.ThrowsAnyAsync<ArgumentException>(testCode); 665 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAnyAsync<ArgumentException>(testCode)); 682 await Assert.ThrowsAnyAsync<ArgumentException>(testCode); 691 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.ThrowsAsync<ArgumentException>(default(Func<Task>)!)); 699 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>(testCode)); 715 await Assert.ThrowsAsync<ArgumentException>(testCode); 724 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>(testCode)); 742 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>(testCode)); 760 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.ThrowsAsync<ArgumentException>("paramName", default(Func<Task>)!)); 768 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName", testCode)); 784 await Assert.ThrowsAsync<ArgumentException>("paramName", testCode); 792 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName2", testCode)); 810 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName", testCode)); 828 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName", testCode));
Microsoft.Extensions.AI (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Abstractions (29)
AdditionalPropertiesDictionary{TValue}.cs (1)
180catch (Exception e) when (e is ArgumentException or FormatException or InvalidCastException or OverflowException)
ChatCompletion\ChatFinishReason.cs (1)
23/// <exception cref="ArgumentException"><paramref name="value"/> is empty or composed entirely of whitespace.</exception>
ChatCompletion\RequiredChatToolMode.cs (1)
29/// <exception cref="ArgumentException"><paramref name="requiredFunctionName"/> is empty or composed entirely of whitespace.</exception>
Contents\DataContent.cs (7)
61/// <exception cref="ArgumentException"><paramref name="uri"/> is not a data URI.</exception> 62/// <exception cref="ArgumentException"><paramref name="uri"/> did not contain a media type and <paramref name="mediaType"/> was not supplied.</exception> 63/// <exception cref="ArgumentException"><paramref name="mediaType"/> is an invalid media type.</exception> 75/// <exception cref="ArgumentException"><paramref name="uri"/> is not a data URI.</exception> 76/// <exception cref="ArgumentException"><paramref name="uri"/> did not contain a media type and <paramref name="mediaType"/> was not supplied.</exception> 77/// <exception cref="ArgumentException"><paramref name="mediaType"/> is an invalid media type.</exception> 118/// <exception cref="ArgumentException"><paramref name="mediaType"/> is empty or composed entirely of whitespace.</exception>
Contents\UriContent.cs (2)
32/// <exception cref="ArgumentException"><paramref name="mediaType"/> is an invalid media type.</exception> 49/// <exception cref="ArgumentException"><paramref name="mediaType"/> is an invalid media type.</exception>
Functions\AIFunctionFactory.cs (7)
274/// <exception cref="ArgumentException"><paramref name="method"/> represents an open generic method.</exception> 275/// <exception cref="ArgumentException"><paramref name="method"/> contains a parameter without a parameter name.</exception> 357/// <exception cref="ArgumentException"><paramref name="method"/> represents an open generic method.</exception> 358/// <exception cref="ArgumentException"><paramref name="method"/> contains a parameter without a parameter name.</exception> 460/// <exception cref="ArgumentException"><paramref name="method"/> represents a static method.</exception> 461/// <exception cref="ArgumentException"><paramref name="method"/> represents an open generic method.</exception> 462/// <exception cref="ArgumentException"><paramref name="method"/> contains a parameter without a parameter name.</exception>
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Utilities\AIJsonUtilities.cs (2)
34/// <exception cref="ArgumentException"><typeparamref name="TContent"/> is a built-in content type.</exception> 52/// <exception cref="ArgumentException"><paramref name="contentType"/> is a built-in content type or does not derived from <see cref="AIContent"/>.</exception>
Microsoft.Extensions.AI.Abstractions.Tests (28)
ChatCompletion\ChatFinishReasonTests.cs (1)
22Assert.Throws<ArgumentException>("value", () => new ChatFinishReason(" "));
ChatCompletion\ChatResponseFormatTests.cs (3)
24Assert.Throws<ArgumentException>("schemaName", () => new ChatResponseFormatJson(null, "name")); 25Assert.Throws<ArgumentException>("schemaDescription", () => new ChatResponseFormatJson(null, null, "description")); 26Assert.Throws<ArgumentException>("schemaName", () => new ChatResponseFormatJson(null, "name", "description"));
ChatCompletion\ChatRoleTests.cs (1)
22Assert.Throws<ArgumentException>("value", () => new ChatRole(" "));
Contents\DataContentTests.cs (8)
16[InlineData("", typeof(ArgumentException))] 17[InlineData("invalid", typeof(ArgumentException))] 18[InlineData("data", typeof(ArgumentException))] 21[InlineData("http://localhost/blah.png", typeof(ArgumentException))] 22[InlineData("https://localhost/blah.png", typeof(ArgumentException))] 23[InlineData("ftp://localhost/blah.png", typeof(ArgumentException))] 24[InlineData("a://localhost/blah.png", typeof(ArgumentException))] 58Assert.Throws<ArgumentException>("mediaType", () => new DataContent("data:image/png;base64,aGVsbG8=", type));
Contents\UriContentTests.cs (6)
20Assert.Throws<ArgumentException>("mediaType", () => new UriContent("data:image/png;base64,aGVsbG8=", "")); 21Assert.Throws<ArgumentException>("mediaType", () => new UriContent("data:image/png;base64,aGVsbG8=", "image")); 24Assert.Throws<ArgumentException>("mediaType", () => new UriContent(new Uri("data:image/png;base64,aGVsbG8="), "")); 25Assert.Throws<ArgumentException>("mediaType", () => new UriContent(new Uri("data:image/png;base64,aGVsbG8="), "audio")); 40Assert.Throws<ArgumentException>("mediaType", () => new UriContent("http://localhost/something", type)); 43Assert.Throws<ArgumentException>("value", () => c.MediaType = type);
SpeechToText\SpeechToTextResponseUpdateKindTests.cs (1)
22Assert.Throws<ArgumentException>("value", () => new SpeechToTextResponseUpdateKind(" "));
Utilities\AIJsonSchemaTransformCacheTests.cs (1)
21Assert.Throws<ArgumentException>(() => new AIJsonSchemaTransformCache(transformOptions: new()));
Utilities\AIJsonUtilitiesTests.cs (7)
960Assert.Throws<ArgumentException>("contentType", () => options.AddAIContentType(typeof(int), "discriminator")); 961Assert.Throws<ArgumentException>("contentType", () => options.AddAIContentType(typeof(object), "discriminator")); 962Assert.Throws<ArgumentException>("contentType", () => options.AddAIContentType(typeof(ChatMessage), "discriminator")); 969Assert.Throws<ArgumentException>(() => options.AddAIContentType<AIContent>("discriminator")); 970Assert.Throws<ArgumentException>(() => options.AddAIContentType<TextContent>("discriminator")); 1294Assert.Throws<ArgumentException>(() => AIJsonUtilities.TransformSchema(schema, transformOptions: new())); 1307Assert.Throws<ArgumentException>(() => AIJsonUtilities.TransformSchema(schema, transformOptions));
Microsoft.Extensions.AI.AzureAIInference (10)
AzureAIInferenceEmbeddingGenerator.cs (1)
45/// <exception cref="ArgumentException"><paramref name="defaultModelId"/> is empty or composed entirely of whitespace.</exception>
AzureAIInferenceImageEmbeddingGenerator.cs (1)
41/// <exception cref="ArgumentException"><paramref name="defaultModelId"/> is empty or composed entirely of whitespace.</exception>
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.AzureAIInference.Tests (3)
AzureAIInferenceChatClientTests.cs (1)
33Assert.Throws<ArgumentException>("defaultModelId", () => client.AsIChatClient(" "));
AzureAIInferenceEmbeddingGeneratorTests.cs (1)
26Assert.Throws<ArgumentException>("defaultModelId", () => client.AsIEmbeddingGenerator(" "));
AzureAIInferenceImageEmbeddingGeneratorTests.cs (1)
26Assert.Throws<ArgumentException>("defaultModelId", () => client.AsIEmbeddingGenerator(" "));
Microsoft.Extensions.AI.Evaluation (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Evaluation.Console (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Evaluation.NLP (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Evaluation.Quality (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Evaluation.Reporting (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Evaluation.Safety (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Integration.Tests (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Ollama (10)
OllamaChatClient.cs (1)
65/// <exception cref="ArgumentException"><paramref name="modelId"/> is empty or composed entirely of whitespace.</exception>
OllamaEmbeddingGenerator.cs (1)
49/// <exception cref="ArgumentException"><paramref name="modelId"/> is empty or composed entirely of whitespace.</exception>
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Ollama.Tests (2)
OllamaChatClientTests.cs (1)
27Assert.Throws<ArgumentException>("modelId", () => new OllamaChatClient("http://localhost", " "));
OllamaEmbeddingGeneratorTests.cs (1)
21Assert.Throws<ArgumentException>("modelId", () => new OllamaEmbeddingGenerator(new Uri("http://localhost"), " "));
Microsoft.Extensions.AI.OpenAI (11)
OpenAIClientExtensions.cs (1)
136/// <exception cref="ArgumentException"><paramref name="assistantId"/> is empty or composed entirely of whitespace.</exception>
src\Shared\ServerSentEvents\SseItem.cs (2)
29/// <exception cref="ArgumentException">Thrown when <paramref name="eventType"/> contains a line break.</exception> 48/// <exception cref="ArgumentException">Thrown when the value contains a line break.</exception>
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AI.Tests (7)
Functions\AIFunctionFactoryTest.cs (7)
35Assert.Throws<ArgumentException>("method", () => AIFunctionFactory.Create(typeof(List<>).GetMethod("Add")!, new List<int>())); 74Exception e = await Assert.ThrowsAsync<ArgumentException>(() => f.InvokeAsync().AsTask()); 427Assert.Throws<ArgumentException>("method", () => AIFunctionFactory.Create( 508Exception e = await Assert.ThrowsAsync<ArgumentException>("arguments.Services", () => f.InvokeAsync(new() { ["myInteger"] = 1 }).AsTask()); 531Exception e = await Assert.ThrowsAsync<ArgumentException>("arguments.Services", () => f.InvokeAsync(new() { ["myInteger"] = 1 }).AsTask()); 590Exception e = await Assert.ThrowsAsync<ArgumentException>(() => f.InvokeAsync(new() { ["myInteger"] = 1 }).AsTask()); 593e = await Assert.ThrowsAsync<ArgumentException>(() => f.InvokeAsync(new()
Microsoft.Extensions.AmbientMetadata.Application (11)
ApplicationMetadataConfigurationBuilderExtensions.cs (1)
26/// <exception cref="ArgumentException"><paramref name="sectionName"/> is either <see langword="null"/>, empty, or whitespace.</exception>
ApplicationMetadataHostBuilderExtensions.cs (1)
25/// <exception cref="ArgumentException"><paramref name="sectionName"/> is either <see langword="null"/>, empty, or whitespace.</exception>
ApplicationMetadataSource.cs (1)
25/// <exception cref="ArgumentException"><paramref name="sectionName"/> is either <see langword="null"/>, empty or whitespace.</exception>
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.AmbientMetadata.Application.Tests (3)
ApplicationMetadataExtensionsTests.cs (2)
55act.Should().Throw<ArgumentException>(); 66act.Should().Throw<ArgumentException>();
ApplicationMetadataSourceTests.cs (1)
47act.Should().Throw<ArgumentException>();
Microsoft.Extensions.AsyncState (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Caching.Hybrid (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Caching.Hybrid.Tests (4)
TagSetTests.cs (4)
142var ex = Assert.Throws<ArgumentException>(() => TagSet.Create(["abc", "", "ghi"])); 150var ex = Assert.Throws<ArgumentException>(() => TagSet.Create(["abc", "*", "ghi"]));
Microsoft.Extensions.Caching.SqlServer (3)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary>
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
14/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty.</summary> 42/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty or whitespace.</summary>
Microsoft.Extensions.Caching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary>
Microsoft.Extensions.Compliance.Abstractions (11)
Redaction\Redactor.cs (3)
70/// <exception cref="ArgumentException"><paramref name="destination"/> is too small.</exception> 82/// <exception cref="ArgumentException"><paramref name="destination"/> is too small.</exception> 168/// <exception cref="ArgumentException"><paramref name="destination"/> is too small.</exception>
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Compliance.Abstractions.Tests (4)
Classification\DataClassificationTypeConverterTests.cs (3)
132[InlineData(42, typeof(ArgumentException))] 133[InlineData(false, typeof(ArgumentException))] 134[InlineData(null, typeof(ArgumentException))]
Redaction\NullRedactorTest.cs (1)
44Assert.Throws<ArgumentException>(() => r.Redact("ABCD".AsSpan(), new char[1].AsSpan()));
Microsoft.Extensions.Compliance.Redaction (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Compliance.Redaction.Tests (3)
HmacRedactorTest.cs (2)
81Assert.IsAssignableFrom<ArgumentException>(e); 87Assert.Throws<ArgumentException>(() => new HmacRedactor(Microsoft.Extensions.Options.Options.Create<HmacRedactorOptions>(null!)));
RedactorProviderTests.cs (1)
105Assert.Throws<ArgumentException>(() => new RedactorProvider(
Microsoft.Extensions.Compliance.Testing (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Compliance.Testing.Tests (1)
FakeRedactorTests.cs (1)
36Assert.Throws<ArgumentException>(() => FakeRedactor.Create(new FakeRedactorOptions { RedactionFormat = "{{{{{23123{}}" }));
Microsoft.Extensions.Configuration.KeyPerFile.Tests (3)
ConfigurationProviderTestBase.cs (1)
124Assert.True(caught is ArgumentException
KeyPerFileTests.cs (2)
35var e = Assert.Throws<ArgumentException>(() => new ConfigurationBuilder().AddKeyPerFile("nonexistent", false).Build());
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\CallSiteFactory.cs (1)
545catch (ArgumentException)
Microsoft.Extensions.DependencyInjection.AutoActivation (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Diagnostics.ExceptionSummarization (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Diagnostics.HealthChecks (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.Extensions.Diagnostics.HealthChecks.Common (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (1)
TelemetryHealthChecksPublisherTests.cs (1)
135Assert.Throws<ArgumentException>(() => new TelemetryHealthCheckPublisher(metrics, logger, Options.Options.Create<TelemetryHealthCheckPublisherOptions>(null!)));
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (2)
DefaultHealthCheckServiceTest.cs (2)
47var exception = Assert.Throws<ArgumentException>(() => new DefaultHealthCheckService(scopeFactory, options, logger));
Microsoft.Extensions.Diagnostics.Probes (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Diagnostics.ResourceMonitoring (9)
src\Shared\BufferWriterPool\BufferWriter.cs (1)
129/// <exception cref="ArgumentException">
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
ResourceMonitoringServiceTests.cs (1)
72Assert.Throws<ArgumentException>(() =>
Microsoft.Extensions.Diagnostics.Testing (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Diagnostics.Testing.Tests (4)
Logging\FakeLogCollectorTests.cs (1)
114Assert.Throws<ArgumentException>(() => new FakeLogCollector(Microsoft.Extensions.Options.Options.Create((FakeLogCollectorOptions)null!)));
Metrics\MetricCollectorTests.cs (3)
25Assert.Throws<ArgumentException>(() => new MetricCollector<long>(new Meter(Guid.NewGuid().ToString()), string.Empty)); 26Assert.Throws<ArgumentException>(() => new MetricCollector<long>(null, string.Empty, "Hello")); 27Assert.Throws<ArgumentException>(() => new MetricCollector<long>(null, "Hello", string.Empty));
Microsoft.Extensions.Features (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.Extensions.FileProviders.Embedded (6)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (4)
14/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty.</summary> 30ArgumentException.ThrowIfNullOrEmpty(argument, paramName); 42/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty or whitespace.</summary> 59ArgumentException.ThrowIfNullOrWhiteSpace(argument, paramName);
Microsoft.Extensions.Hosting.Testing (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Http.Diagnostics (1)
src\Shared\BufferWriterPool\BufferWriter.cs (1)
129/// <exception cref="ArgumentException">
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\HttpResponseBodyReaderTest.cs (1)
35act.Should().Throw<ArgumentException>();
Microsoft.Extensions.Http.Resilience (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Http.Resilience.Tests (7)
Hedging\StandardHedgingTests.cs (2)
157Assert.Throws<ArgumentException>(() => 166Assert.Throws<ArgumentException>(() =>
Polly\HttpRetryStrategyOptionsExtensionsTests.cs (2)
30Assert.Throws<ArgumentException>(() => new HttpRetryStrategyOptions().DisableFor([])); 37Assert.Throws<ArgumentException>(() => options.DisableFor(HttpMethod.Get));
Resilience\HttpClientBuilderExtensionsTests.Resilience.cs (2)
33Assert.Throws<ArgumentException>(() => builder.AddResilienceHandler(string.Empty, _ => { })); 35Assert.Throws<ArgumentException>(() => builder.AddResilienceHandler(string.Empty, (_, _) => { }));
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
138Assert.Throws<ArgumentException>(() => AddStandardResilienceHandler(mode, builder, _emptyConfigurationSection, options => { }));
Microsoft.Extensions.Identity.Core (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary>
Microsoft.Extensions.Identity.Stores (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary>
Microsoft.Extensions.Localization (6)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (4)
14/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty.</summary> 30ArgumentException.ThrowIfNullOrEmpty(argument, paramName); 42/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty or whitespace.</summary> 59ArgumentException.ThrowIfNullOrWhiteSpace(argument, paramName);
Microsoft.Extensions.Localization.Abstractions (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.Extensions.Logging.AzureAppServices (6)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (4)
14/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty.</summary> 30ArgumentException.ThrowIfNullOrEmpty(argument, paramName); 42/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty or whitespace.</summary> 59ArgumentException.ThrowIfNullOrWhiteSpace(argument, paramName);
Microsoft.Extensions.ObjectPool (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.Extensions.ObjectPool.DependencyInjection (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (2)
DependencyInjectionExtensionsTests.cs (2)
33var exception = Assert.Throws<ArgumentException>(
Microsoft.Extensions.Options.Contextual (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Primitives (2)
StringValues.cs (1)
351/// <exception cref="ArgumentException">The number of elements in the source <see cref="StringValues" /> is greater than the available space from <paramref name="arrayIndex" /> to the end of the destination <paramref name="array" />.</exception>
ThrowHelper.cs (1)
54internal static ArgumentException GetArgumentException(ExceptionResource resource)
Microsoft.Extensions.Resilience (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.SecretManager.Tools.Tests (1)
InitCommandTest.cs (1)
138Assert.Throws<ArgumentException>(() =>
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
ServiceEndpointQuery.cs (1)
38ArgumentException.ThrowIfNullOrEmpty(input);
Microsoft.Extensions.ServiceDiscovery.Tests (2)
ExtensionsServicePublicApiTests.cs (2)
187var exception = isNull 189: Assert.Throws<ArgumentException>(action);
Microsoft.Extensions.Telemetry (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Telemetry.Abstractions (12)
Enrichment\IEnrichmentTagCollector.cs (1)
19/// <exception cref="ArgumentException"><paramref name="tagName"/> is an empty string.</exception>
Logging\ITagCollector.cs (2)
23/// <exception cref="ArgumentException"><paramref name="tagName" /> is empty or contains exclusively whitespace, 35/// <exception cref="ArgumentException"><paramref name="tagName" /> is empty or contains exclusively whitespace,
Logging\TagProviderAttribute.cs (1)
26/// <exception cref="ArgumentException">
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.Telemetry.Abstractions.Tests (5)
Latency\LatencyRegistryExtensionsTests.cs (3)
33Assert.Throws<ArgumentException>(() => LatencyRegistryServiceCollectionExtensions.RegisterCheckpointNames(new ServiceCollection(), "")); 34Assert.Throws<ArgumentException>(() => LatencyRegistryServiceCollectionExtensions.RegisterMeasureNames(new ServiceCollection(), "")); 35Assert.Throws<ArgumentException>(() => LatencyRegistryServiceCollectionExtensions.RegisterTagNames(new ServiceCollection(), ""));
Logging\TagProviderAttributeTests.cs (2)
33Assert.Throws<ArgumentException>(() => new TagProviderAttribute(typeof(object), string.Empty)); 34Assert.Throws<ArgumentException>(() => new TagProviderAttribute(typeof(object), new string(' ', 3)));
Microsoft.Extensions.Telemetry.Tests (18)
Enrichment\ApplicationLogEnricherTests.cs (2)
46Assert.Throws<ArgumentException>(() => new ApplicationLogEnricher(optionsNull.Object, null!)); 47Assert.Throws<ArgumentException>(() => new ApplicationLogEnricher(options, serviceOptionsNull.Object));
Enrichment\ProcessLogEnricherTests.cs (1)
27Assert.Throws<ArgumentException>(() => new ProcessLogEnricher(optionsNull.Object));
Http\HttpParserTests.cs (2)
561var exception = Assert.Throws<ArgumentException>(() => httpParser.ParseRoute(httpRoute));
Latency\Internal\LatencyContextProviderTests.cs (3)
87Assert.Throws<ArgumentException>(() => tokenissuer.GetCheckpointToken("ca1")); 88Assert.Throws<ArgumentException>(() => tokenissuer.GetMeasureToken("ma1")); 89Assert.Throws<ArgumentException>(() => tokenissuer.GetTagToken("ta1"));
Latency\Internal\LatencyContextRegistrySetTests.cs (6)
49Assert.Throws<ArgumentException>(() => GetRegistry(n, e, e)); 50Assert.Throws<ArgumentException>(() => GetRegistry(e, n, e)); 51Assert.Throws<ArgumentException>(() => GetRegistry(e, e, n)); 54Assert.Throws<ArgumentException>(() => GetRegistry(n, e, e)); 55Assert.Throws<ArgumentException>(() => GetRegistry(e, n, e)); 56Assert.Throws<ArgumentException>(() => GetRegistry(e, e, n));
Latency\Internal\RegistryTests.cs (3)
23Assert.Throws<ArgumentException>(() => new Registry(s!, true)); 24Assert.Throws<ArgumentException>(() => new Registry(s!, false)); 78Assert.Throws<ArgumentException>(() => r.GetRegisteredKeyIndex("e"));
Logging\ExtendedLoggerFactoryTests.cs (1)
237Assert.Throws<ArgumentException>(() =>
Microsoft.Extensions.TimeProvider.Testing (8)
src\Shared\Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Microsoft.Extensions.WebEncoders (2)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary> 52ArgumentException.ThrowIfNullOrEmpty(argument, paramName);
Microsoft.Gen.Logging.Generated.Tests (1)
LogMethodTests.cs (1)
547var exception = new ArgumentException("Foo");
Microsoft.JSInterop (3)
Infrastructure\DotNetDispatcher.cs (2)
353ArgumentException.ThrowIfNullOrWhiteSpace(assemblyKey.AssemblyName); 354ArgumentException.ThrowIfNullOrWhiteSpace(methodIdentifier);
JSInvokableAttribute.cs (1)
38ArgumentException.ThrowIfNullOrEmpty(identifier);
Microsoft.JSInterop.Tests (15)
DotNetObjectReferenceTest.cs (1)
79Assert.Throws<ArgumentException>(() => jsRuntime.GetObjectReference(objectId));
Infrastructure\DotNetDispatcherTest.cs (14)
43var ex = Assert.Throws<ArgumentException>(() => 65var ex = Assert.Throws<ArgumentException>(() => 239var ex = Assert.Throws<ArgumentException>( 258var ex = Assert.Throws<ArgumentException>( 543var ex = Assert.Throws<ArgumentException>(() => DotNetDispatcher.Invoke(jsRuntime, new DotNetInvocationInfo(thisAssemblyName, methodIdentifier, 0, default), "[7]")); 558var ex = Assert.Throws<ArgumentException>(() => DotNetDispatcher.Invoke(jsRuntime, new DotNetInvocationInfo(null, methodIdentifier, 1, default), argsJson)); 588var ex = Assert.Throws<ArgumentException>(() =>
Microsoft.Maui (3)
Animations\Animation.cs (1)
129 /// <exception cref="ArgumentException">Thrown when <paramref name="duration"/> is less than or equal to <paramref name="beginAt"/>.</exception>
Hosting\Fonts\FontCollectionExtensions.cs (2)
17 /// <exception cref="ArgumentException">The <paramref name="filename"/> parameter is empty or only whitespace.</exception> 37 /// <exception cref="ArgumentException">The <paramref name="filename"/> parameter is empty or only whitespace.</exception>
Microsoft.Maui.Controls (3)
BindableObject.cs (2)
792 /// <exception cref="ArgumentException">Thrown when the value is invalid according to the assigned logic in <see cref="BindableProperty.ValidateValueDelegate"/>.</exception> 803 /// <exception cref="ArgumentException">Thrown when the value is invalid according to the assigned logic in <see cref="BindableProperty.ValidateValueDelegate"/>.</exception>
OrderedDictionary.cs (1)
164 /// <exception cref="ArgumentException"><paramref name="key" /> already exists in the dictionary.</exception>
Microsoft.Maui.Controls.Xaml (2)
ApplyPropertiesVisitor.cs (1)
509 catch (ArgumentException)
RegisterXNamesVisitor.cs (1)
33 catch (ArgumentException ae)
Microsoft.Maui.Essentials (3)
Share\Share.shared.cs (3)
106 /// <exception cref="ArgumentException">Thrown when <see cref="ShareTextRequest.Text"/> and <see cref="ShareTextRequest.Uri"/> are both <see langword="null"/> or empty.</exception> 120 /// <exception cref="ArgumentException">Thrown when <see cref="ShareFileRequest.File"/> is <see langword="null"/>.</exception> 134 /// <exception cref="ArgumentException">Thrown when <see cref="ShareMultipleFilesRequest.Files"/> is <see langword="null"/> or empty or one of the entries in <see cref="ShareMultipleFilesRequest.Files"/> is <see langword="null"/>.</exception>
Microsoft.ML.AutoML.Tests (38)
ColumnInferenceTests.cs (1)
48Assert.Throws<ArgumentException>(new System.Action(() => context.Auto().InferColumns(dataPath, "Junk", groupColumns: false)));
ColumnInferenceValidationUtilTests.cs (1)
30Assert.Throws<ArgumentException>(() => ColumnInferenceValidationUtil.ValidateSpecifiedColumnsExist(columnInfo, dataView));
UserInputValidationTests.cs (36)
36var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, 48var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, 62var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, 78var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, columnInfo, null, task)); 89var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, columnInfo, null, TaskKind.Regression)); 99var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, columnInfo, null, TaskKind.Regression)); 118var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainData, 141var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainData, 164var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainData, 180var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateInferColumnsArgs("idontexist", "Label")); 189var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateInferColumnsArgs(emptyFilePath, "Label")); 208var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, new ColumnInformation(), null, TaskKind.Regression)); 228var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, columnInfo, null, task)); 302var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, new ColumnInformation(), 315var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, new ColumnInformation(), 338var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainingData, new ColumnInformation(), 403var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, 418var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data,
Microsoft.ML.Tests (9)
ImagesTests.cs (9)
120Assert.Throws<ArgumentException>(() => new ImageLoadingTransformer(env, incorrectImageFolder, ("ImageReal", "ImagePath")).Transform(data)); 1265Assert.Throws<ArgumentException>(() => MLImage.CreateFromFile("This is Invalid Path")); 1267Assert.Throws<ArgumentException>(() => MLImage.CreateFromStream(new MemoryStream(new byte[10]))); 1268Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Unknown, Array.Empty<byte>())); 1269Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, Array.Empty<byte>())); 1270Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(0, 10, MLPixelFormat.Bgra32, new byte[10])); 1271Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 0, MLPixelFormat.Bgra32, new byte[10])); 1272Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, new byte[401])); 1302Assert.Throws<ArgumentException>(() => image1.Save(imageTempPath));
Microsoft.ML.Tokenizers (1)
PreTokenizer\CompositePreTokenizer.cs (1)
27/// <exception cref="ArgumentException">Thrown when <paramref name="preTokenizers"/> contains null elements.</exception>
Microsoft.ML.Tokenizers.Tests (5)
TiktokenTests.cs (5)
500Assert.Throws<ArgumentException>(() => TiktokenTokenizer.CreateForEncoding("r50k_base_")); 501Assert.Throws<ArgumentException>(() => TiktokenTokenizer.CreateForEncoding("p50k_base_")); 502Assert.Throws<ArgumentException>(() => TiktokenTokenizer.CreateForEncoding("p50k_edit_")); 503Assert.Throws<ArgumentException>(() => TiktokenTokenizer.CreateForEncoding("cl100k_base_")); 504Assert.Throws<ArgumentException>(() => TiktokenTokenizer.CreateForEncoding("o200k_base_"));
Microsoft.ML.TorchSharp (2)
Utils\DataUtils.cs (1)
50/// <exception cref="ArgumentException"></exception>
Utils\FileUtils.cs (1)
40/// <exception cref="ArgumentException"/>
Microsoft.Net.Http.Headers (3)
ContentDispositionHeaderValue.cs (2)
604catch (ArgumentException) 748catch (ArgumentException)
MediaTypeHeaderValue.cs (1)
123catch (ArgumentException)
Microsoft.Net.Http.Headers.Tests (24)
CacheControlHeaderValueTest.cs (2)
46Assert.Throws<ArgumentException>(() => cacheControl.NoCacheHeaders.Add(null)); 53Assert.Throws<ArgumentException>(() => cacheControl.PrivateHeaders.Add(null));
ContentDispositionHeaderValueTest.cs (2)
14Assert.Throws<ArgumentException>(() => new ContentDispositionHeaderValue(null)); 21Assert.Throws<ArgumentException>(() => new ContentDispositionHeaderValue(string.Empty));
ContentRangeHeaderValueTest.cs (2)
79Assert.Throws<ArgumentException>(() => range.Unit = null); 80Assert.Throws<ArgumentException>(() => range.Unit = "");
CookieHeaderValueTest.cs (2)
161Assert.Throws<ArgumentException>(() => new CookieHeaderValue(name, "value")); 168Assert.Throws<ArgumentException>(() => new CookieHeaderValue("name", value));
EntityTagHeaderValueTest.cs (2)
11Assert.Throws<ArgumentException>(() => new EntityTagHeaderValue(null)); 13Assert.Throws<ArgumentException>(() => new EntityTagHeaderValue(string.Empty));
MediaTypeHeaderValueTest.cs (2)
13Assert.Throws<ArgumentException>(() => new MediaTypeHeaderValue(null)); 15Assert.Throws<ArgumentException>(() => new MediaTypeHeaderValue(string.Empty));
NameValueHeaderValueTest.cs (2)
11Assert.Throws<ArgumentException>(() => new NameValueHeaderValue(null)); 13Assert.Throws<ArgumentException>(() => new NameValueHeaderValue(string.Empty));
RangeConditionHeaderValueTest.cs (1)
26Assert.Throws<ArgumentException>(() => new RangeConditionHeaderValue((string?)null));
RangeHeaderValueTest.cs (2)
21Assert.Throws<ArgumentException>(() => range.Unit = null); 22Assert.Throws<ArgumentException>(() => range.Unit = "");
RangeItemHeaderValueTest.cs (1)
11Assert.Throws<ArgumentException>(() => new RangeItemHeaderValue(null, null));
SetCookieHeaderValueTest.cs (2)
307Assert.Throws<ArgumentException>(() => new SetCookieHeaderValue(name, "value")); 314Assert.Throws<ArgumentException>(() => new SetCookieHeaderValue("name", value));
StringWithQualityHeaderValueTest.cs (4)
15Assert.Throws<ArgumentException>(() => new StringWithQualityHeaderValue(null)); 16Assert.Throws<ArgumentException>(() => new StringWithQualityHeaderValue("")); 27Assert.Throws<ArgumentException>(() => new StringWithQualityHeaderValue(null, 0.1)); 28Assert.Throws<ArgumentException>(() => new StringWithQualityHeaderValue("", 0.1));
Microsoft.VisualBasic.Core (10)
Microsoft\VisualBasic\Collection.vb (1)
57Catch ex As ArgumentException
Microsoft\VisualBasic\CompilerServices\Conversions.vb (1)
1916Catch ex As ArgumentException
Microsoft\VisualBasic\CompilerServices\DoubleType.vb (1)
173Catch ex As ArgumentException
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
312ByVal ResourceID As String, ByVal ParamArray PlaceHolders() As String) As ArgumentException
Microsoft\VisualBasic\CompilerServices\Symbols.vb (1)
1485Catch ex As ArgumentException
Microsoft\VisualBasic\CompilerServices\VB6RandomFile.vb (1)
46Catch ex As ArgumentException 'Invalid combination of FileMode and OpenAccess
Microsoft\VisualBasic\FileIO\FileSystem.vb (4)
221''' <exception cref="ArgumentException">path contains one or more of the invalid characters defined in InvalidPathChars.</exception> 1330Debug.Assert(Not (TypeOf ex Is ArgumentException Or TypeOf ex Is ArgumentOutOfRangeException Or 1509If TypeOf ex Is ArgumentException OrElse 1517Debug.Assert(Not (TypeOf ex Is ArgumentException OrElse
Microsoft.VisualBasic.IntegrationTests (4)
InteractionTests.cs (4)
18catch (ArgumentException) 30_ = Assert.Throws<ArgumentException>(() => Interaction.AppActivate(GetUniqueName())).ToString(); 64catch (ArgumentException) 80catch (ArgumentException)
Microsoft.VisualBasic.Tests (7)
Microsoft\VisualBasic\ApplicationServices\ApplicationBaseTests.cs (2)
59var ex = Assert.Throws<ArgumentException>(() => app.GetEnvironmentVariable($"{key}z"));
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (2)
648Assert.Throws<ArgumentException>(() => _fileSystem.RenameDirectory(OrigDirectoryWithPath, DirectoryNameWithPath)); 671Assert.Throws<ArgumentException>(() => _fileSystem.RenameFile(OrigFileWithPath, ExistingFileWithPath));
Microsoft\VisualBasic\MyServices\RegistryProxyTests.cs (3)
27Assert.Throws<ArgumentException>(() => registry.GetValue(keyName, "", null)); 36Assert.Throws<ArgumentException>(() => registry.SetValue(keyName, valueName, "")); 37Assert.Throws<ArgumentException>(() => registry.SetValue(keyName, valueName, "", Win32.RegistryValueKind.String));
Microsoft.VisualStudio.LanguageServices (7)
CodeLens\CodeLensCallbackListener.cs (1)
225catch (ArgumentException)
Options\LocalUserRegistryOptionPersister.cs (1)
106catch (ArgumentException)
Packaging\PackageInstallerServiceFactory.cs (1)
176catch (ArgumentException ae) when (FatalError.ReportAndCatch(ae))
ProjectSystem\MetadataReferences\VisualStudioFrameworkAssemblyPathResolverFactory.cs (1)
142catch (ArgumentException)
ProjectSystem\RuleSets\RuleSetEventHandler.cs (1)
259catch (ArgumentException)
ProjectSystem\VisualStudioProjectManagementService.cs (1)
49catch (ArgumentException)
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
48/// <see cref="ArgumentException"/> will be thrown.
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (7)
GlyphExtensionsTests.cs (1)
107Assert.ThrowsAny<ArgumentException>(() =>
ProjectSystemShim\CPS\SourceFileHandlingTests.cs (5)
314Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([sourceFileFullPath4, sourceFileFullPath5])); 341Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([sourceFileFullPath4, sourceFileFullPath5])); 342Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([@"C:\invalid source file"])); // no files were added, therefore we should get an argument exception 349Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([sourceFileFullPath4, sourceFileFullPath5])); 365Assert.Throws<ArgumentException>(() => project.ReorderSourceFiles([sourceFileFullPath4, sourceFileFullPath5]));
ProjectSystemShim\VisualStudioCompilationOutputFilesTests.cs (1)
23Assert.Throws<ArgumentException>(() => new CompilationOutputFilesWithImplicitPdbPath(@"a.dll"));
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\XamlProjectService.cs (1)
131catch (ArgumentException)
Microsoft.Web.Xdt.Extensions (3)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
33/// <summary>Throws an <see cref="ArgumentException"/> if <paramref name="argument"/> is null or empty.</summary>
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
14/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty.</summary> 42/// <summary>Throws an <see cref="ArgumentNullException"/> if <paramref name="argument"/> is null or an <see cref="ArgumentException"/> if it is empty or whitespace.</summary>
MSBuild (7)
CommunicationsUtilities.cs (1)
711catch (ArgumentException ex)
ExceptionHandling.cs (2)
166|| (e is ArgumentException && !(e is ArgumentNullException)) 297|| e is ArgumentException)
ResourceUtilities.cs (1)
457catch (ArgumentException e)
TypeLoader.cs (2)
177catch (ArgumentException e) 342catch (ArgumentException)
XMake.cs (1)
3404catch (ArgumentException ex)
MSBuildTaskHost (7)
CommunicationsUtilities.cs (1)
711catch (ArgumentException ex)
ExceptionHandling.cs (2)
166|| (e is ArgumentException && !(e is ArgumentNullException)) 297|| e is ArgumentException)
NativeMethods.cs (1)
1318catch (ArgumentException)
ResourceUtilities.cs (1)
457catch (ArgumentException e)
TypeLoader.cs (2)
254catch (ArgumentException) 307catch (ArgumentException e)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
48[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ArgumentException))]
netstandard (1)
netstandard.cs (1)
41[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ArgumentException))]
PresentationBuildTasks (4)
Microsoft\Build\Tasks\Windows\UidManager.cs (1)
81catch (ArgumentException)
MS\Internal\Tasks\TaskHelper.cs (1)
182catch (ArgumentException)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XamlTypeMapper.cs (1)
2647catch (ArgumentException)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (1)
112catch (ArgumentException)
PresentationCore (52)
MS\Internal\DpiUtil\DpiUtil+ProcessDpiAwarenessHelper.cs (1)
74catch (Exception e) when (e is ArgumentException || e is UnauthorizedAccessException || e is COMException)
MS\Internal\FontFace\CompositeFontParser.cs (1)
203catch (ArgumentException x)
MS\Internal\Ink\ExtendedProperty.cs (2)
18/// <exception cref="System.ArgumentException">Value type must be compatible with attribute Id</exception> 144/// <exception cref="System.ArgumentException">Value type must be compatible with attribute Id</exception>
MS\Internal\Ink\ExtendedPropertyCollection.cs (1)
217/// <exception cref="System.ArgumentException">Specified identifier was not found</exception>
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (1)
946catch (ArgumentException ex)
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (1)
130catch (ArgumentException ex)
MS\Internal\IO\Packaging\PreloadedPackages.cs (2)
48/// <exception cref="ArgumentException">uri must be absolute</exception> 61/// <exception cref="ArgumentException">uri must be absolute</exception>
MS\Internal\TextFormatting\CultureMapper.cs (1)
62catch (ArgumentException)
src\Microsoft.DotNet.Wpf\src\Shared\Telemetry\Managed\TraceLoggingProvider.cs (1)
40catch(ArgumentException)
System\IO\Packaging\PackWebRequest.cs (2)
45/// <exception cref="ArgumentException">Will throw an ArgumentException if the given URI is not of the correct scheme</exception> 61/// <exception cref="ArgumentException">Will throw an ArgumentException if the given URI is not of the correct scheme</exception>
System\Windows\clipboard.cs (4)
36ArgumentException.ThrowIfNullOrEmpty(format); 79ArgumentException.ThrowIfNullOrEmpty(format); 162ArgumentException.ThrowIfNullOrWhiteSpace(format); 495ArgumentException.ThrowIfNullOrWhiteSpace(format);
System\Windows\CultureInfoConverter.cs (2)
77/// <exception cref="ArgumentException"> 106/// <exception cref="ArgumentException">
System\Windows\dataobject.cs (1)
650/// <exception cref="ArgumentException">
System\Windows\Documents\DynamicDocumentPaginator.cs (5)
39/// <exception cref="ArgumentException"> 49/// <exception cref="ArgumentException"> 63/// <exception cref="ArgumentException"> 88/// <exception cref="ArgumentException"> 98/// <exception cref="ArgumentException">
System\Windows\IContentHost.cs (2)
35/// <exception cref="ArgumentException"> 65/// <exception cref="ArgumentException">
System\Windows\Ink\StrokeCollection.cs (3)
383ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, nameof(strokes)); 475ArgumentException ae = new ArgumentException(SR.EmptyScToReplace, nameof(strokesToReplace)); 488ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, nameof(strokesToReplace));
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
1134|| e is ArgumentException
System\Windows\Markup\XmlLanguage.cs (5)
110/// <exception cref="ArgumentException"> 197catch (ArgumentException e) 251catch (ArgumentException e) 289catch (ArgumentException) 706/// <exception cref="ArgumentException">tag is non-empty, but does not conform to RFC 3066.</exception>
System\Windows\Markup\XmlLanguageConverter.cs (2)
70/// <exception cref="ArgumentException"> 99/// <exception cref="ArgumentException">
System\Windows\Media\Animation\TimelineGroup.cs (1)
136/// <exception cref="ArgumentException">The child parameter is not a
System\Windows\Media\FontEmbeddingManager.cs (1)
78/// <exception cref="System.ArgumentException">
System\Windows\Media\FontFamily.cs (1)
532catch (ArgumentException)
System\Windows\Media\RequestCachePolicyConverter.cs (1)
90/// <exception cref="ArgumentException">
System\Windows\Media\Visual.cs (3)
4296/// <exception cref="ArgumentException"> 4317/// <exception cref="ArgumentException"> 4335/// <exception cref="ArgumentException">
System\Windows\Media\VisualCollection.cs (4)
307/// <exception cref="ArgumentException">If the new child has already a parent or if the slot a the specified index is not null.</exception> 356/// <exception cref="ArgumentException">If the new child has already a parent or if the slot a the specified index is not null.</exception> 434/// <exception cref="ArgumentException">If the new child has already a parent.</exception> 745/// <exception cref="ArgumentException">
System\Windows\Media3D\Visual3D.cs (3)
1607/// <exception cref="ArgumentException"> 1627/// <exception cref="ArgumentException"> 1769/// <exception cref="ArgumentException">
PresentationCore.Tests (9)
System\Windows\ClipboardTests.cs (3)
112action.Should().Throw<ArgumentException>().WithParameterName("format"); 164action.Should().Throw<ArgumentException>(); 178action.Should().Throw<ArgumentException>();
System\Windows\DataObjectTests.cs (2)
144act.Should().Throw<ArgumentException>(); 295act.Should().Throw<ArgumentException>();
System\Windows\Media\Animation\KeySplineConverter.Tests.cs (1)
81Assert.Throws<ArgumentException>(() => converter.ConvertFrom(null, cultureInfo, input));
System\Windows\Media\ColorConverter.Tests.cs (1)
409Assert.Throws<ArgumentException>(() => converter.ConvertFrom(notString));
System\Windows\TextDecorationCollectionConverter.Tests.cs (2)
114Assert.Throws<ArgumentException>(() => converter.ConvertFrom(null, null, source)); 184Assert.Throws<ArgumentException>(() => TextDecorationCollectionConverter.ConvertFromString(text));
PresentationFramework (170)
Microsoft\Win32\CommonItemDialog.cs (1)
426catch (ArgumentException)
Microsoft\Win32\FileDialog.cs (1)
295/// <exception cref="System.ArgumentException">
MS\Internal\Annotations\Anchoring\DataIdProcessor.cs (1)
173/// <exception cref="ArgumentException">locatorPart is of the incorrect
MS\Internal\Annotations\Anchoring\FixedPageProcessor.cs (2)
103/// <exception cref="ArgumentException">node points to a Document Page View which 162/// <exception cref="ArgumentException">locatorPart is of the incorrect
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (8)
82/// <exception cref="ArgumentException">selection is of wrong type</exception> 83/// <exception cref="ArgumentException">selection start or end point can not be resolved to a page</exception> 150/// <exception cref="ArgumentException">selection is of wrong type</exception> 166/// <exception cref="ArgumentException">selection is of wrong type</exception> 181/// <exception cref="ArgumentException">selection is of the wrong type</exception> 249/// <exception cref="ArgumentException">locatorPart is of the incorrect type</exception> 250/// <exception cref="ArgumentException">startNode is not a FixedPage</exception> 251/// <exception cref="ArgumentException">startNode does not belong to the DocumentViewer</exception>
MS\Internal\Annotations\Anchoring\LocatorManager.cs (2)
332/// <exception cref="ArgumentException">if no processor is registered for 384/// <exception cref="ArgumentException">offset is negative or greater than
MS\Internal\Annotations\Anchoring\SelectionProcessor.cs (5)
73/// <exception cref="ArgumentException">selection is of wrong type</exception> 82/// <exception cref="ArgumentException">selection is of wrong type</exception> 91/// <exception cref="ArgumentException">selection is of wrong type</exception> 104/// <exception cref="ArgumentException">startNode is not a DependencyObject or 120/// <exception cref="ArgumentException">locatorPart is of the incorrect type</exception>
MS\Internal\Annotations\Anchoring\SubTreeProcessor.cs (1)
137/// <exception cref="ArgumentException">locatorPart is of the incorrect
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (3)
102/// <exception cref="ArgumentException">selection is of wrong type</exception> 146/// <exception cref="ArgumentException">selection is of wrong type</exception> 220/// <exception cref="ArgumentException">anchor is of wrong type</exception>
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (5)
80/// <exception cref="ArgumentException">selection is of wrong type</exception> 92/// <exception cref="ArgumentException">selection is of wrong type</exception> 105/// <exception cref="ArgumentException">selection is of wrong type</exception> 122/// <exception cref="ArgumentException">selection is of the wrong type</exception> 185/// <exception cref="ArgumentException">locatorPart is of the incorrect type</exception>
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (4)
68/// <exception cref="ArgumentException">selection is of wrong type</exception> 83/// <exception cref="ArgumentException">selection is of wrong type</exception> 100/// <exception cref="ArgumentException">selection is of wrong type</exception> 120/// <exception cref="ArgumentException">selection is of the wrong type</exception>
MS\Internal\Annotations\Anchoring\TreeNodeSelectionProcessor.cs (5)
77/// <exception cref="ArgumentException">selection is of wrong type</exception> 89/// <exception cref="ArgumentException">selection is of wrong type</exception> 109/// <exception cref="ArgumentException">selection is of wrong type</exception> 135/// <exception cref="ArgumentException">startNode is not a DependencyObject or 157/// <exception cref="ArgumentException">locatorPart is of the incorrect type</exception>
MS\Internal\Annotations\ObservableDictionary.cs (1)
60/// <exception cref="ArgumentException">a value for key is already present in the locator part</exception>
MS\Internal\Data\ViewManager.cs (1)
487/// <exception cref="ArgumentException">
MS\Internal\Documents\ContentElementCollection.cs (6)
56/// <exception cref="ArgumentException"> 89/// <exception cref="ArgumentException"> 144/// <exception cref="ArgumentException"> 227/// <exception cref="ArgumentException"> 266/// <exception cref="ArgumentException"> 674/// <exception cref="ArgumentException">
MS\Internal\Documents\FlowDocumentPaginator.cs (4)
208/// <exception cref="ArgumentException"> 263/// <exception cref="ArgumentException"> 339/// <exception cref="ArgumentException"> 404/// <exception cref="ArgumentException">
MS\Internal\Documents\TableColumnCollectionInternal.cs (4)
29/// <exception cref="ArgumentException"> 125/// <exception cref="ArgumentException"> 196/// <exception cref="ArgumentException"> 257/// <exception cref="ArgumentException">
MS\Internal\Documents\TableTextElementCollectionInternal.cs (4)
34/// <exception cref="ArgumentException"> 134/// <exception cref="ArgumentException"> 207/// <exception cref="ArgumentException"> 247/// <exception cref="ArgumentException">
MS\Internal\Ink\EraserBehavior.cs (1)
412catch (ArgumentException ex)
MS\Internal\Ink\ISFClipboardData.cs (1)
90catch ( ArgumentException )
MS\Internal\WindowsRuntime\Windows\Data\Text\WordsSegmenter.cs (2)
34/// <exception cref="System.ArgumentException"><paramref name="language"/> is not a well-formed language identifier</exception> 70(e is ArgumentException) ||
src\Microsoft.DotNet.Wpf\src\Shared\Telemetry\Managed\TraceLoggingProvider.cs (1)
40catch(ArgumentException)
System\Windows\Annotations\Annotation.cs (4)
85/// <exception cref="ArgumentException">annotationType's Name or Namespace is null or empty string</exception> 119/// <exception cref="ArgumentException">lastModificationTime is earlier than creationTime</exception> 120/// <exception cref="ArgumentException">annotationType's Name or Namespace is null or empty string</exception> 121/// <exception cref="ArgumentException">id is equal to Guid.Empty</exception>
System\Windows\Annotations\AnnotationHelper.cs (10)
40/// <exception cref="ArgumentException">service is not enabled or highlightBrush is not a SolidColorBrush</exception> 70/// <exception cref="ArgumentException">service is not enabled</exception> 86/// <exception cref="ArgumentException">service is not enabled</exception> 103/// <exception cref="ArgumentException">service is not enabled</exception> 126/// <exception cref="ArgumentException">service is not enabled</exception> 149/// <exception cref="ArgumentException">service is not enabled</exception> 171/// <exception cref="ArgumentException">service is not enabled</exception> 484/// <exception cref="ArgumentException">service is not enabled</exception> 876/// <exception cref="ArgumentException">service is not enabled</exception> 1077/// <exception cref="ArgumentException">service is not enabled</exception>
System\Windows\Annotations\AnnotationResource.cs (1)
72/// <exception cref="ArgumentException">id is equal to Guid.Empty</exception>
System\Windows\Annotations\AnnotationService.cs (4)
128/// <exception cref="ArgumentException">element is not a FrameworkElement or FrameworkContentElement</exception> 342/// <exception cref="ArgumentException">element is not a FrameworkElement or FrameworkContentElement</exception> 382/// <exception cref="ArgumentException">element is not a FrameworkElement or FrameworkContentElement</exception> 859/// <exception cref="ArgumentException">element is not a FrameworkElement or FrameworkContentElement</exception>
System\Windows\Annotations\LocatorPart.cs (1)
42/// <exception cref="ArgumentException">partType.Namespace or partType.Name is null or empty string</exception>
System\Windows\Annotations\Storage\AnnotationStore.cs (1)
59/// <exception cref="ArgumentException">newAnnotation already exists in this store, as determined by its Id</exception>
System\Windows\Annotations\Storage\XmlStreamStore.cs (4)
87/// <exception cref="ArgumentException">duplicate namespace in knownNamespaces dictionary</exception> 88/// <exception cref="ArgumentException">null key in knownNamespaces dictionary</exception> 113/// <exception cref="ArgumentException">newAnnotation already exists in this store, as determined by its Id</exception> 540/// <exception cref="ArgumentException">queryExpression is empty string</exception>
System\Windows\Application.cs (1)
1650/// <exception cref="ArgumentException"></exception>
System\Windows\Controls\DataGridLength.cs (3)
26/// <exception cref="ArgumentException"> 46/// <exception cref="ArgumentException"> 68/// <exception cref="ArgumentException">
System\Windows\Controls\DataGridLengthConverter.cs (2)
63/// <exception cref="ArgumentException"> 118/// <exception cref="ArgumentException">
System\Windows\Controls\DateTimeHelper.cs (3)
21catch (System.ArgumentException) 33catch (System.ArgumentException) 45catch (System.ArgumentException)
System\Windows\Controls\InkCanvas.cs (1)
2756catch ( ArgumentException )
System\Windows\Controls\RowDefinitionCollectionConverter.cs (1)
37/// <exception cref="ArgumentException">
System\Windows\Controls\VirtualizationCacheLength.cs (1)
54/// <exception cref="ArgumentException">
System\Windows\Controls\VirtualizationCacheLengthConverter.cs (2)
86/// <exception cref="ArgumentException"> 120/// <exception cref="ArgumentException">
System\Windows\CornerRadiusConverter.cs (2)
81/// <exception cref="ArgumentException"> 107/// <exception cref="ArgumentException">
System\Windows\Data\CompositeCollection.cs (1)
103/// <exception cref="ArgumentException">
System\Windows\Data\ObjectDataProvider.cs (2)
448catch (ArgumentException ae) 519catch (ArgumentException ae)
System\Windows\Documents\FixedDocument.cs (2)
121/// <exception cref="ArgumentException">value is not of type PageContent.</exception> 394/// <exception cref="ArgumentException">ContentPosition does not exist within this element?s tree.</exception>
System\Windows\Documents\FixedPage.cs (2)
174/// <exception cref="ArgumentException">value is not of type UIElement.</exception> 198/// <exception cref="ArgumentException">text contains non-whitespace text.</exception>
System\Windows\Documents\PageContent.cs (1)
157/// <exception cref="ArgumentException">value is not of type FixedPage.</exception>
System\Windows\Documents\RtfToXamlReader.cs (1)
4890catch (System.ArgumentException)
System\Windows\Documents\TableCellCollection.cs (6)
51/// <exception cref="ArgumentException"> 70/// <exception cref="ArgumentException"> 111/// <exception cref="ArgumentException"> 190/// <exception cref="ArgumentException"> 234/// <exception cref="ArgumentException"> 492/// <exception cref="ArgumentException">
System\Windows\Documents\TableColumnCollection.cs (5)
51/// <exception cref="ArgumentException"> 70/// <exception cref="ArgumentException"> 111/// <exception cref="ArgumentException"> 190/// <exception cref="ArgumentException"> 234/// <exception cref="ArgumentException">
System\Windows\Documents\TableRowCollection.cs (6)
51/// <exception cref="ArgumentException"> 70/// <exception cref="ArgumentException"> 111/// <exception cref="ArgumentException"> 190/// <exception cref="ArgumentException"> 234/// <exception cref="ArgumentException"> 492/// <exception cref="ArgumentException">
System\Windows\Documents\TableRowGroupCollection.cs (6)
51/// <exception cref="ArgumentException"> 70/// <exception cref="ArgumentException"> 111/// <exception cref="ArgumentException"> 190/// <exception cref="ArgumentException"> 234/// <exception cref="ArgumentException"> 491/// <exception cref="ArgumentException">
System\windows\Documents\TextEditorCopyPaste.cs (1)
194catch (ArgumentException)
System\Windows\Documents\TextElement.cs (2)
77/// <exception cref="System.ArgumentException"> 783/// <exception cref="System.ArgumentException">
System\Windows\Documents\TextPointer.cs (6)
449/// <exception cref="System.ArgumentException"> 610/// <exception cref="System.ArgumentException"> 757/// <exception cref="ArgumentException"> 1372/// <exception cref="ArgumentException"> 1840/// <exception cref="System.ArgumentException"> 2132/// <exception cref="ArgumentException">
System\Windows\Documents\TextRange.cs (4)
34/// <exception cref="System.ArgumentException"> 617/// <exception cref="System.ArgumentException"> 656/// <exception cref="System.ArgumentException"> 684/// <exception cref="System.ArgumentException">
System\Windows\Documents\WinRTSpellerInterop.cs (3)
61catch (Exception ex) when (ex is ArgumentException || ex is NotSupportedException || ex is PlatformNotSupportedException) 320if (throwOnError && ex is ArgumentException) 478catch (Exception e) when ((e is ArgumentException) || !fileCopied)
System\Windows\Documents\WpfPayload.cs (1)
288/// <exception cref="ArgumentException">
System\Windows\Documents\XamlToRtfWriter.cs (1)
3299catch (System.ArgumentException)
System\Windows\FigureLength.cs (2)
67/// <exception cref="ArgumentException"> 90/// <exception cref="ArgumentException">
System\Windows\FigureLengthConverter.cs (2)
97/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException">
System\Windows\GridLength.cs (2)
61/// <exception cref="ArgumentException"> 83/// <exception cref="ArgumentException">
System\Windows\GridLengthConverter.cs (2)
100/// <exception cref="ArgumentException"> 153/// <exception cref="ArgumentException">
System\Windows\LengthConverter.cs (2)
95/// <exception cref="ArgumentException"> 124/// <exception cref="ArgumentException">
System\Windows\LogicalTreeHelper.cs (1)
65ArgumentException.ThrowIfNullOrEmpty(elementName);
System\Windows\Markup\XamlTypeMapper.cs (1)
2647catch (ArgumentException)
System\Windows\PropertyPathConverter.cs (2)
84/// <exception cref="ArgumentException"> 114/// <exception cref="ArgumentException">
System\Windows\ThicknessConverter.cs (2)
81/// <exception cref="ArgumentException"> 110/// <exception cref="ArgumentException">
PresentationFramework.Tests (1)
System\Windows\MessageBox.Tests.cs (1)
158Assert.Throws<ArgumentException>(() =>
PresentationUI (4)
MS\Internal\Documents\Application\DocumentProperties.cs (1)
306catch (ArgumentException)
MS\Internal\Documents\Application\RestrictedTransactionalPackage.cs (1)
42/// <exception cref="System.ArgumentException" />
MS\Internal\Documents\Application\RightsManagementErrorHandler.cs (1)
265else if ((exception is ArgumentException) ||
MS\Internal\Documents\Application\TransactionalPackage.cs (1)
94/// <exception cref="System.ArgumentException" />
ReachFramework (20)
Packaging\XpsFixedPageReaderWriter.cs (4)
218/// <exception cref="ArgumentException">resourceName is an empty string.</exception> 311/// <exception cref="ArgumentException">imageType is an empty string.</exception> 1186/// <exception cref="ArgumentException">imageType is an empty string.</exception> 1210/// <exception cref="ArgumentException">imageType is an empty string.</exception>
PrintConfig\FallbackPTProvider.cs (4)
91/// <exception cref="ArgumentException"> 248/// <exception cref="ArgumentException"> 292/// <exception cref="ArgumentException"> 318/// <exception cref="ArgumentException">
PrintConfig\PTConverter.cs (4)
120/// <exception cref="ArgumentException"> 146/// <exception cref="ArgumentException"> 178/// <exception cref="ArgumentException"> 209/// <exception cref="ArgumentException">
PrintConfig\PTManager.cs (4)
251/// <exception cref="ArgumentException"> 279/// <exception cref="ArgumentException"> 321/// <exception cref="ArgumentException"> 355/// <exception cref="ArgumentException">
PrintConfig\PTProvider.cs (4)
200/// <exception cref="ArgumentException"> 268/// <exception cref="ArgumentException"> 376/// <exception cref="ArgumentException"> 440/// <exception cref="ArgumentException">
Roslyn.Diagnostics.Analyzers (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Roslyn.VisualStudio.Next.UnitTests (1)
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (1)
417Assert.IsType<ArgumentException>(result.ExtensionException);
ScenarioTests.Common.Tests (2)
ScenarioTestTypes.cs (2)
719throw new FaultException<ArgumentException>(new ArgumentException()); 750if (error is FaultException<ArgumentException>)
Security.TransportSecurity.IntegrationTests (2)
Https\ClientCredentialTypeTests.4.1.0.cs (2)
178ArgumentException exception = Assert.Throws<ArgumentException>(() =>
Shared (12)
BufferWriterPool\BufferWriter.cs (1)
129/// <exception cref="ArgumentException">
ServerSentEvents\SseItem.cs (2)
29/// <exception cref="ArgumentException">Thrown when <paramref name="eventType"/> contains a line break.</exception> 48/// <exception cref="ArgumentException">Thrown when the value contains a line break.</exception>
StringSplit\StringRange.cs (1)
61/// <exception cref="ArgumentException">
Throw\Throw.cs (8)
53/// or <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 89/// Throws an <see cref="System.ArgumentException" /> if the specified member is <see langword="null"/>. 126/// Throws either an <see cref="System.ArgumentNullException"/> or an <see cref="System.ArgumentException"/> 160/// or <see cref="System.ArgumentException"/> if it is empty. 196/// Throws an <see cref="System.ArgumentException"/> if the argument's buffer size is less than the required buffer size. 243/// or <see cref="System.ArgumentException"/> if it is empty. 361/// Throws an <see cref="System.ArgumentException"/>. 373/// Throws an <see cref="System.ArgumentException"/>.
Shared.Tests (16)
Throw\ThrowTest.cs (16)
41var exception = Assert.Throws<ArgumentException>(() => Throw.ArgumentException(paramName, message)); 54var exception = Assert.Throws<ArgumentException>(() => Throw.ArgumentException(paramName, message, innerException)); 231var exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrWhitespace(" ", "paramName")); 253var exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty("", "paramName")); 294var exception = Assert.Throws<ArgumentException>(() => Throw.IfBufferTooSmall(23, 24, "paramName")); 322ArgumentException exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((ICollection<int>?)null, "foo")); 339exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty((ICollection<int>?)list, "foo")); 343exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty((IReadOnlyCollection<int>?)list, "foo")); 347exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty(list, "foo")); 353exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty(queue, "foo")); 359exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty(enumerable, "foo"));
System.Collections (3)
System\Collections\Generic\OrderedDictionary.cs (3)
483/// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="OrderedDictionary{TKey, TValue}"/>.</exception> 721/// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="OrderedDictionary{TKey, TValue}"/>.</exception> 815/// <exception cref="ArgumentException">An element with the same key already exists at an index different to <paramref name="index"/>.</exception>
System.Collections.Concurrent (34)
System\Collections\Concurrent\BlockingCollection.cs (20)
174/// <exception cref="System.ArgumentException">The supplied <paramref name="collection"/> contains more values 744/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 786/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 825/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 851/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 879/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 911/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 940/// <exception cref="System.ArgumentException">If the collections argument is a 0-length array or contains a 1126/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 1155/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 1183/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 1211/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 1242/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 1276/// <exception cref="System.ArgumentException">The <paramref name="collections"/> argument is 1308/// <exception cref="System.ArgumentException">If the collections argument is a 0-length array or contains a 1342/// <exception cref="System.ArgumentException">If the collections argument is a 0-length array or contains a 1533/// <exception cref="System.ArgumentException">The <paramref name="index"/> argument is equal to or greater 1551/// <exception cref="System.ArgumentException">The <paramref name="index"/> argument is equal to or greater 1576catch (ArgumentException) 1650/// <exception cref="System.ArgumentException">If the collections argument is a 0-length array or contains a
System\Collections\Concurrent\ConcurrentBag.cs (2)
272/// <exception cref="ArgumentException"><paramref name="index"/> is equal to or greater than the 346/// <exception cref="ArgumentException">
System\Collections\Concurrent\ConcurrentDictionary.cs (8)
97/// <exception cref="ArgumentException"><paramref name="collection"/> contains one or more duplicate keys.</exception> 140/// <exception cref="ArgumentException"><paramref name="collection"/> contains one or more duplicate keys.</exception> 746/// <exception cref="ArgumentException"> 1542/// <exception cref="ArgumentException"> 1600/// <exception cref="ArgumentException">An element with the same key already exists in the 1668/// <exception cref="ArgumentException"> 1785/// <exception cref="ArgumentException"> 1860/// <exception cref="ArgumentException"><paramref name="index"/> is equal to or greater than
System\Collections\Concurrent\ConcurrentStack.cs (4)
215/// <exception cref="ArgumentException"> 250/// <exception cref="ArgumentException"><paramref name="index"/> is equal to or greater than the 324/// <exception cref="ArgumentException"><paramref name="startIndex"/> + <paramref name="count"/> is 524/// <exception cref="ArgumentException"><paramref name="startIndex"/> + <paramref name="count"/> is
System.Collections.Immutable (20)
System\Collections\Immutable\IImmutableDictionary.cs (2)
27/// <exception cref="ArgumentException">Thrown when the given key already exists in the dictionary but has a different value.</exception> 38/// <exception cref="ArgumentException">Thrown when one of the given keys already exists in the dictionary but has a different value.</exception>
System\Collections\Immutable\IImmutableList.cs (1)
177/// <exception cref="ArgumentException">Thrown when the old value does not exist in the list.</exception>
System\Collections\Immutable\ImmutableArray.cs (2)
531/// <exception cref="ArgumentException"> 570/// <exception cref="ArgumentException">
System\Collections\Immutable\ImmutableArray_1.cs (2)
572/// <exception cref="ArgumentException">Thrown when the old value does not exist in the list.</exception> 588/// <exception cref="ArgumentException">Thrown when the old value does not exist in the list.</exception>
System\Collections\Immutable\ImmutableDictionary_2.Builder.cs (1)
521/// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="IDictionary{TKey, TValue}"/>.</exception>
System\Collections\Immutable\ImmutableDictionary_2.cs (1)
569/// <exception cref="ArgumentException">
System\Collections\Immutable\ImmutableList.cs (1)
99/// <exception cref="ArgumentException">Thrown when the old value does not exist in the list.</exception>
System\Collections\Immutable\ImmutableList_1.Builder.cs (3)
816/// <exception cref="ArgumentException">Thrown when the old value does not exist in the list.</exception> 831/// <exception cref="ArgumentException">Thrown when the old value does not exist in the list.</exception> 990/// <exception cref="ArgumentException">
System\Collections\Immutable\ImmutableList_1.cs (2)
116/// <exception cref="ArgumentException"> 884/// <exception cref="ArgumentException">Thrown when the old value does not exist in the list.</exception>
System\Collections\Immutable\ImmutableList_1.Node.cs (1)
643/// <exception cref="ArgumentException">
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
474/// <exception cref="ArgumentException">
Validation\Requires.cs (3)
11/// Common runtime checks that throw <see cref="ArgumentException"/> upon failure. 110/// Throws an <see cref="ArgumentException"/> if a condition does not evaluate to true. 122/// Throws an <see cref="ArgumentException"/> if a condition does not evaluate to true.
System.ComponentModel.Annotations (18)
System\ComponentModel\DataAnnotations\EnumDataTypeAttribute.cs (1)
80catch (ArgumentException)
System\ComponentModel\DataAnnotations\RegularExpressionAttribute.cs (3)
55/// <exception cref="ArgumentException"> is thrown if the <see cref="Pattern" /> is not a valid regular expression.</exception> 86/// <exception cref="ArgumentException"> is thrown if the <see cref="Pattern" /> is not a valid regular expression.</exception> 98/// <exception cref="ArgumentException"> is thrown if the current <see cref="Pattern" /> cannot be parsed</exception>
System\ComponentModel\DataAnnotations\Schema\ColumnAttribute.cs (2)
31ArgumentException.ThrowIfNullOrWhiteSpace(name); 63ArgumentException.ThrowIfNullOrWhiteSpace(value);
System\ComponentModel\DataAnnotations\Schema\ForeignKeyAttribute.cs (1)
26ArgumentException.ThrowIfNullOrWhiteSpace(name);
System\ComponentModel\DataAnnotations\Schema\InversePropertyAttribute.cs (1)
20ArgumentException.ThrowIfNullOrWhiteSpace(property);
System\ComponentModel\DataAnnotations\Schema\TableAttribute.cs (2)
23ArgumentException.ThrowIfNullOrWhiteSpace(name); 41ArgumentException.ThrowIfNullOrWhiteSpace(value);
System\ComponentModel\DataAnnotations\ValidationContext.cs (1)
124ArgumentException.ThrowIfNullOrEmpty(displayName);
System\ComponentModel\DataAnnotations\Validator.cs (7)
44/// <exception cref="ArgumentException"> 90/// <exception cref="ArgumentException"> 128/// <exception cref="ArgumentException"> 244/// <exception cref="ArgumentException"> 270/// <exception cref="ArgumentException"> 375/// <exception cref="ArgumentException"> is thrown if <paramref name="value" /> is the wrong type for this property.</exception> 398/// <exception cref="ArgumentException">
System.ComponentModel.Composition (48)
System\ComponentModel\Composition\CompositionException.cs (1)
83/// <exception cref="ArgumentException">
System\ComponentModel\Composition\ExceptionBuilder.cs (5)
19public static ArgumentException CreateContainsNullElement(string parameterName) 49public static ArgumentException CreateExportDefinitionNotOnThisComposablePart(string parameterName) 64public static ArgumentException CreateImportDefinitionNotOnThisComposablePart(string parameterName) 88public static ArgumentException CreateReflectionModelInvalidPartDefinition(string parameterName, Type partDefinitionType) 102public static ArgumentException ExportFactory_TooManyGenericParameters(string typeName)
System\ComponentModel\Composition\Hosting\AggregateCatalog.cs (2)
43/// <exception cref="ArgumentException"> 60/// <exception cref="ArgumentException">
System\ComponentModel\Composition\Hosting\AggregateExportProvider.cs (1)
24/// <exception cref="ArgumentException">
System\ComponentModel\Composition\Hosting\AssemblyCatalog.cs (9)
44/// <exception cref="ArgumentException"> 100/// <exception cref="ArgumentException"> 157/// <exception cref="ArgumentException"> 221/// <exception cref="ArgumentException"> 273/// <exception cref="ArgumentException"> 309/// <exception cref="ArgumentException"> 343/// <exception cref="ArgumentException"> 369/// <exception cref="ArgumentException"> 555catch (ArgumentException)
System\ComponentModel\Composition\Hosting\CompositionContainer.cs (8)
50/// <exception cref="ArgumentException"> 71/// <exception cref="ArgumentException"> 90/// <exception cref="ArgumentException"> 112/// <exception cref="ArgumentException"> 134/// <exception cref="ArgumentException"> 442/// <exception cref="ArgumentException"> 463/// <exception cref="ArgumentException"> 484/// <exception cref="ArgumentException">
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (8)
54/// <exception cref="ArgumentException"> 92/// <exception cref="ArgumentException"> 130/// <exception cref="ArgumentException"> 172/// <exception cref="ArgumentException"> 211/// <exception cref="ArgumentException"> 254/// <exception cref="ArgumentException"> 302/// <exception cref="ArgumentException"> 355/// <exception cref="ArgumentException">
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (5)
45/// <exception cref="ArgumentException"> 67/// <exception cref="ArgumentException"> 98/// <exception cref="ArgumentException"> 127/// <exception cref="ArgumentException"> 159/// <exception cref="ArgumentException">
System\ComponentModel\Composition\Primitives\ComposablePart.cs (2)
143/// <exception cref="ArgumentException"> 177/// <exception cref="ArgumentException">
System\ComponentModel\Composition\Primitives\ContractBasedImportDefinition.cs (2)
89/// <exception cref="ArgumentException"> 151/// <exception cref="ArgumentException">
System\ComponentModel\Composition\Primitives\Export.cs (2)
55/// <exception cref="ArgumentException"> 88/// <exception cref="ArgumentException">
System\ComponentModel\Composition\Primitives\ExportDefinition.cs (1)
51/// <exception cref="ArgumentException">
System\ComponentModel\Composition\Primitives\ExportedDelegate.cs (1)
38catch (ArgumentException)
System\ComponentModel\Composition\Primitives\ImportDefinition.cs (1)
77/// <exception cref="ArgumentException">
System.ComponentModel.TypeConverter (2)
System\ComponentModel\EnumConverter.cs (1)
287catch (ArgumentException)
System\ComponentModel\MaskedTextProvider.cs (1)
221ArgumentException.ThrowIfNullOrEmpty(mask);
System.Configuration.ConfigurationManager (7)
System\Configuration\ExceptionUtil.cs (4)
13internal static ArgumentException ParameterInvalid(string parameter) 18internal static ArgumentException ParameterNullOrEmpty(string parameter) 23internal static ArgumentException PropertyInvalid(string property) 28internal static ArgumentException PropertyNullOrEmpty(string property)
System\Configuration\GenericEnumConverter.cs (1)
49private ArgumentException CreateExceptionForInvalidValue()
System\Diagnostics\ListenerElementsCollection.cs (2)
223catch (ArgumentException e) 363catch (ArgumentException e)
System.Data.Common (44)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (18)
44internal static ArgumentException Argument(string error) 46ArgumentException e = new ArgumentException(error); 51internal static ArgumentException Argument(string error, Exception? inner) 53ArgumentException e = new ArgumentException(error, inner); 58internal static ArgumentException Argument(string error, string? parameter) 60ArgumentException e = new ArgumentException(error, parameter); 203internal static ArgumentException InvalidMultipartName(string property, string value) 205ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartName, property, value)); 210internal static ArgumentException InvalidMultipartNameIncorrectUsageOfQuotes(string property, string value) 212ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameQuoteUsage, property, value)); 217internal static ArgumentException InvalidMultipartNameToManyParts(string property, string value, int limit) 219ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameToManyParts, property, value, limit)); 282internal static ArgumentException ConnectionStringSyntax(int index) 286internal static ArgumentException KeywordNotSupported(string keyword) 290internal static ArgumentException ConvertFailed(Type fromType, Type toType, Exception? innerException) 310internal static ArgumentException CollectionRemoveInvalidObject(Type itemType, ICollection collection) 396internal static ArgumentException ParametersIsNotParent(Type parameterType, ICollection collection) 400internal static ArgumentException ParametersIsParent(Type parameterType, ICollection collection)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
508catch (ArgumentException f) 598catch (ArgumentException e)
System\Data\Common\AdapterUtil.Common.cs (4)
266internal static ArgumentException InvalidKeyname(string? parameterName) 270internal static ArgumentException InvalidValue(string parameterName) 511internal static ArgumentException UnwantedStatementType(StatementType statementType) 637internal static ArgumentException UpdateMismatchRowTable(int i)
System\Data\Common\DbConnection.cs (2)
170/// <exception cref="ArgumentException"> 189/// <exception cref="ArgumentException">
System\Data\Common\DbConnectionStringBuilder.cs (1)
184catch (ArgumentException)
System\Data\Common\ObjectStorage.cs (2)
60catch (ArgumentException e) 117catch (ArgumentException e)
System\Data\DataColumn.cs (2)
1931/// <exception cref="ArgumentException">if value is 0</exception> 2012/// <exception cref="ArgumentException">if value is 0</exception>
System\Data\DataColumnCollection.cs (1)
832catch (ArgumentException)
System\Data\DataRowView.cs (4)
68/// <exception cref="ArgumentException"><see cref="DataColumnCollection.get_Item(string)"/> when <paramref name="property"/> is ambiguous.</exception> 69/// <exception cref="ArgumentException">Unmatched <paramref name="property"/> when getting a value.</exception> 145/// <exception cref="ArgumentException">null or mismatch between <paramref name="relation"/> and <see cref="System.Data.DataView.get_Table"/>.</exception> 176/// <exception cref="ArgumentException">Unmatched <paramref name="relationName"/>.</exception>
System\Data\DataSetUtil.cs (1)
18internal static ArgumentException Argument(string message)
System\Data\Filter\BinaryNode.cs (1)
258catch (System.ArgumentException e)
System\Data\Filter\ConstNode.cs (5)
146catch (System.ArgumentException e) 166catch (System.ArgumentException e) 224catch (System.ArgumentException e) 245catch (System.ArgumentException e) 266catch (System.ArgumentException e)
System\Data\SQLTypes\SQLString.cs (1)
907catch (ArgumentException)
System.Data.Odbc (32)
Common\System\Data\Common\AdapterUtil.Odbc.cs (10)
196internal static ArgumentException InvalidKeyname(string? parameterName) 200internal static ArgumentException InvalidValue(string parameterName) 364internal static ArgumentException InvalidDataType(TypeCode typecode) 368internal static ArgumentException UnknownDataType(Type dataType) 372internal static ArgumentException DbTypeNotSupported(System.Data.DbType type, Type enumtype) 376internal static ArgumentException UnknownDataTypeCode(Type dataType, TypeCode typeCode) 380internal static ArgumentException InvalidOffsetValue(int value) 384internal static ArgumentException InvalidSizeValue(int value) 396if (inner is ArgumentException) 480internal static ArgumentException InvalidRestrictionValue(string collectionName, string restrictionName, string? restrictionValue)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (18)
44internal static ArgumentException Argument(string error) 46ArgumentException e = new ArgumentException(error); 51internal static ArgumentException Argument(string error, Exception? inner) 53ArgumentException e = new ArgumentException(error, inner); 58internal static ArgumentException Argument(string error, string? parameter) 60ArgumentException e = new ArgumentException(error, parameter); 203internal static ArgumentException InvalidMultipartName(string property, string value) 205ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartName, property, value)); 210internal static ArgumentException InvalidMultipartNameIncorrectUsageOfQuotes(string property, string value) 212ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameQuoteUsage, property, value)); 217internal static ArgumentException InvalidMultipartNameToManyParts(string property, string value, int limit) 219ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameToManyParts, property, value, limit)); 282internal static ArgumentException ConnectionStringSyntax(int index) 286internal static ArgumentException KeywordNotSupported(string keyword) 290internal static ArgumentException ConvertFailed(Type fromType, Type toType, Exception? innerException) 310internal static ArgumentException CollectionRemoveInvalidObject(Type itemType, ICollection collection) 396internal static ArgumentException ParametersIsNotParent(Type parameterType, ICollection collection) 400internal static ArgumentException ParametersIsParent(Type parameterType, ICollection collection)
src\libraries\Common\src\System\Data\Common\DbConnectionOptions.Common.cs (2)
508catch (ArgumentException f) 598catch (ArgumentException e)
System\Data\Odbc\Odbc32.cs (1)
28internal static ArgumentException GetSchemaRestrictionRequired()
System\Data\Odbc\OdbcMetaDataFactory.cs (1)
273catch (ArgumentException)
System.Diagnostics.Process (2)
System\Diagnostics\Process.Unix.cs (1)
718catch (ArgumentException) { } // ignore any errors in data that may come from the exe path
System\Diagnostics\ProcessManager.cs (1)
13ArgumentException.ThrowIfNullOrEmpty(machineName);
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\DelimitedListTraceListener.cs (1)
67ArgumentException.ThrowIfNullOrEmpty(value, nameof(Delimiter));
System.Diagnostics.TraceSource (2)
System\Diagnostics\SwitchAttribute.cs (1)
29ArgumentException.ThrowIfNullOrEmpty(value);
System\Diagnostics\TraceSource.cs (1)
30ArgumentException.ThrowIfNullOrEmpty(name);
System.Drawing.Common.Tests (1080)
mono\System.Drawing\BitmapTests.cs (6)
355public void FileDoesNotExists() => Assert.Throws<ArgumentException>(() => new Bitmap("FileDoesNotExists.jpg")); 1148public void SetResolution_Zero() => Assert.Throws<ArgumentException>(() => SetResolution(0.0f, 0.0f)); 1151public void SetResolution_Negative_X() => Assert.Throws<ArgumentException>(() => SetResolution(-1.0f, 1.0f)); 1154public void SetResolution_Negative_Y() => Assert.Throws<ArgumentException>(() => SetResolution(1.0f, -1.0f)); 1163public void SetResolution_NaN() => Assert.Throws<ArgumentException>(() => SetResolution(float.NaN, float.NaN)); 1166public void SetResolution_NegativeInfinity() => Assert.Throws<ArgumentException>(() => SetResolution(float.NegativeInfinity, float.NegativeInfinity));
mono\System.Drawing\GraphicsTests.cs (34)
347Exception exception = AssertExtensions.Throws<ArgumentException, Exception>(() => Graphics.FromImage(img)); 348if (exception is ArgumentException argumentException) 425Assert.Throws<ArgumentException>(() => g.Transform = matrix); 436Assert.Throws<ArgumentException>(() => g.MultiplyTransform(matrix)); 658Assert.Throws<ArgumentException>(() => g.ScaleTransform(0, 1)); 666Assert.Throws<ArgumentException>(() => g.ScaleTransform(1, 0)); 728Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, [new(10, 10)], 0.5f)); 738Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, s_tooSmallCurve, 0, 2, 0.5f)); 772Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, s_smallCurveF, 0, 0)); 780Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, s_smallCurveF, 0, -1)); 789Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, s_smallCurveF, 1, 2)); 1056Assert.Throws<ArgumentException>(() => BeginContainer_GraphicsUnit(GraphicsUnit.Display)); 1072Assert.Throws<ArgumentException>(() => BeginContainer_GraphicsUnit(GraphicsUnit.World)); 1078Assert.Throws<ArgumentException>(() => BeginContainer_GraphicsUnit((GraphicsUnit)int.MinValue)); 1158Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<Rectangle>())); 1182Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<RectangleF>())); 1942Assert.Throws<ArgumentException>(() => MeasureCharacterRanges(text, text.Length, 1, useSpan)); 1951Assert.Throws<ArgumentException>(() => MeasureCharacterRanges(text, 0, text.Length + 1, useSpan)); 1999Assert.Throws<ArgumentException>(() => g.MeasureCharacterRanges("Mono", _font, default, null)); 2000Assert.Throws<ArgumentException>(() => g.MeasureCharacterRanges("Mono".AsSpan(), _font, default, null)); 2146Assert.Throws<ArgumentException>(() => g.ReleaseHdcInternal(IntPtr.Zero)); 2156Assert.Throws<ArgumentException>(() => g.ReleaseHdcInternal(hdc)); 2176Assert.Throws<ArgumentException>(g.ReleaseHdc); 2186Assert.Throws<ArgumentException>(g.ReleaseHdc); 2452Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<PointF>())); 2526Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<Point>())); 2604Assert.Throws<ArgumentException>(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.Display)); 2617Assert.Throws<ArgumentException>(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.World)); 2647Assert.Throws<ArgumentException>(() => DrawImage_ImagePointRectangleGraphicsUnit([])); 2654Assert.Throws<ArgumentException>(() => DrawImage_ImagePointRectangleGraphicsUnit([p])); 2661Assert.Throws<ArgumentException>(() => DrawImage_ImagePointRectangleGraphicsUnit([p, p])); 2705Assert.Throws<ArgumentException>(() => DrawImage_ImagePointFRectangleGraphicsUnit([])); 2712Assert.Throws<ArgumentException>(() => DrawImage_ImagePointFRectangleGraphicsUnit([p])); 2719Assert.Throws<ArgumentException>(() => DrawImage_ImagePointFRectangleGraphicsUnit([p, p]));
mono\System.Imaging\MetafileTest.cs (2)
146Assert.Throws<ArgumentException>(() => header.WmfHeader); 280Assert.Throws<ArgumentException>(() => Metafile_StreamEmfType(ms, (EmfType)int.MinValue));
System\Drawing\BitmapTests.cs (78)
78AssertExtensions.Throws<ArgumentException>(paramName, null, () => new Bitmap(filename)); 79AssertExtensions.Throws<ArgumentException>(paramName, null, () => new Bitmap(filename, false)); 80AssertExtensions.Throws<ArgumentException>(paramName, null, () => new Bitmap(filename, true)); 106AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(type, resource)); 112AssertExtensions.Throws<ArgumentNullException, ArgumentException>("resource", null, () => new Bitmap(typeof(Bitmap), null)); 145AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Bitmap((Stream)null)); 146AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Bitmap((Stream)null, false)); 153AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(stream)); 154AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(stream, false)); 155AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(stream, true)); 220AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(width, 1)); 221AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(width, 1, Graphics.FromImage(new Bitmap(1, 1)))); 222AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), width, 1)); 223AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), new Size(width, 1))); 224AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(width, 1, PixelFormat.Format16bppArgb1555)); 225AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(width, 1, 0, PixelFormat.Format16bppArgb1555, IntPtr.Zero)); 235AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, height)); 236AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, height, Graphics.FromImage(new Bitmap(1, 1)))); 237AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), 1, height)); 238AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), new Size(1, height))); 239AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, height, PixelFormat.Format16bppArgb1555)); 240AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, height, 0, PixelFormat.Format16bppArgb1555, IntPtr.Zero)); 256AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, 1, format)); 257AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, 1, 0, format, IntPtr.Zero)); 263AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, 1, 0, PixelFormat.Format16bppArgb1555, 10)); 351AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(image)); 352AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(image, 1, 1)); 353AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(image, new Size(1, 1))); 425AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new Rectangle(0, 0, width, height), bitmap.PixelFormat)); 426AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new RectangleF(0, 0, width, height), bitmap.PixelFormat)); 483AssertExtensions.Throws<ArgumentException>(null, bitmap.Clone); 484AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new Rectangle(0, 0, 1, 1), PixelFormat.Format32bppArgb)); 485AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new RectangleF(0, 0, 1, 1), PixelFormat.Format32bppArgb)); 504AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetFrameCount(FrameDimension.Page)); 526AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SelectActiveFrame(FrameDimension.Page, 0)); 574AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPixel(0, 0)); 583AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPixel(0, 0)); 639AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetHbitmap()); 648AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetHbitmap()); 712AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetHicon()); 721AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetHicon()); 759AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromHicon(IntPtr.Zero)); 760AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromHicon(10)); 767AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromHicon(icon.Handle)); 773AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(IntPtr.Zero, "Name")); 774AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(10, "Name")); 780AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(IntPtr.Zero, "Name")); 781AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(10, "Name")); 884AssertExtensions.Throws<ArgumentException>(null, bitmap.MakeTransparent); 885AssertExtensions.Throws<ArgumentException>(null, () => bitmap.MakeTransparent(Color.Red)); 892AssertExtensions.Throws<ArgumentException>(null, bitmap.MakeTransparent); 957AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0, Color.Red)); 966AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0, Color.Red)); 987AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetResolution(xDpi, 1)); 998AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetResolution(1, yDpi)); 1007AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetResolution(1, 1)); 1077AssertExtensions.Throws<ArgumentException>(null, () => bitmap.UnlockBits(data)); 1112AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat)); 1115AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat, bitmapData)); 1133AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, format)); 1136AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, format, bitmapData)); 1145AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format16bppGrayScale)); 1146AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format16bppGrayScale, new BitmapData())); 1148AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format16bppGrayScale)); 1149AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format16bppGrayScale, new BitmapData())); 1152AssertExtensions.Throws<ArgumentException>(null, () => bitmap.UnlockBits(data)); 1162AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.PixelFormat)); 1165AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.PixelFormat, bitmapData)); 1174AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb)); 1177AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb, bitmapData)); 1260AssertExtensions.Throws<ArgumentException>(null, () => bitmap.UnlockBits(new BitmapData())); 1269AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Width); 1270AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Height); 1271AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Size); 1456AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Palette); 1457AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Palette = palette); 1458AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Size); 1660bitmap.Invoking(b => b.ConvertFormat(format, dither, palette)).Should().Throw<ArgumentException>();
System\Drawing\BufferedGraphicsContextTests.cs (5)
123AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(-1, new Rectangle(0, 0, 10, 10))); 151AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(graphics, largeRectangle)); 152AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(graphics, Rectangle.Empty)); 200AssertExtensions.Throws<ArgumentException>("value", null, () => context.MaximumBuffer = new Size(width, 1)); 209AssertExtensions.Throws<ArgumentException>("value", null, () => context.MaximumBuffer = new Size(1, height));
System\Drawing\ColorTranslatorTests.cs (10)
210Exception exception = AssertExtensions.Throws<ArgumentException, Exception>(() => ColorTranslator.FromHtml(htmlColor)); 211if (exception is ArgumentException argumentException) 219[InlineData("1,2", typeof(ArgumentException))] 220[InlineData("1,2,3,4,5", typeof(ArgumentException))] 221[InlineData("-1,2,3", typeof(ArgumentException))] 222[InlineData("256,2,3", typeof(ArgumentException))] 223[InlineData("1,-1,3", typeof(ArgumentException))] 224[InlineData("1,256,3", typeof(ArgumentException))] 225[InlineData("1,2,-1", typeof(ArgumentException))] 226[InlineData("1,2,256", typeof(ArgumentException))]
System\Drawing\Drawing2D\CustomLineCapTests.cs (10)
72AssertExtensions.Throws<ArgumentException>(null, () => new CustomLineCap(fillPath, null)); 112AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.SetStrokeCaps(startCap, endCap)); 161AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.BaseCap = baseCap); 213AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.StrokeJoin); 214AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.BaseCap); 215AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.BaseInset); 216AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.WidthScale); 217AssertExtensions.Throws<ArgumentException>(null, customLineCap.Clone); 218AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.SetStrokeCaps(LineCap.Flat, LineCap.Flat)); 219AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.GetStrokeCaps(out LineCap startCap, out LineCap endCap));
System\Drawing\Drawing2D\GraphicsPathIteratorTests.cs (5)
264AssertExtensions.Throws<ArgumentException>(null, () => gpi.Enumerate(ref points, ref types)); 277AssertExtensions.Throws<ArgumentException>(null, () => gpi.Enumerate(ref points, ref types)); 302AssertExtensions.Throws<ArgumentException>(null, () => gpi.CopyData(ref points, ref types, 0, points.Length)); 324AssertExtensions.Throws<ArgumentException>(null, () => gpi.CopyData(ref resultPoints, ref resultTypes, startIndex, endIndex)); 343AssertExtensions.Throws<ArgumentException>(null, () => gpi.CopyData(ref resultPoints, ref resultTypes, startIndex, endIndex));
System\Drawing\Drawing2D\GraphicsPathTests.cs (27)
95AssertExtensions.Throws<ArgumentException>(null, () => new GraphicsPath(new Point[pointsLength], new byte[typesLength])); 96AssertExtensions.Throws<ArgumentException>(null, () => new GraphicsPath(new PointF[pointsLength], new byte[typesLength])); 132Assert.ThrowsAny<ArgumentException>(() => gp.FillMode = fillMode); 323AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<Point>())); 324AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<PointF>())); 360AssertExtensions.Throws<ArgumentException>(null, () => gp.AddArc(1, 1, width, height, Pi4, Pi4)); 361AssertExtensions.Throws<ArgumentException>(null, () => gp.AddArc(1.0f, 1.0f, width, height, Pi4, Pi4)); 444AssertExtensions.Throws<ArgumentException>(null, () => gp.AddBeziers(points)); 558AssertExtensions.Throws<ArgumentException>(null, () => gp.AddCurve((PointF[])null)); 559AssertExtensions.Throws<ArgumentException>(null, () => gp.AddCurve((Point[])null)); 573AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(() => gp.AddCurve(points)); 574AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(() => gp.AddCurve(points, 0, 2, 0.5f)); 588AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(() => gp.AddCurve(points)); 589AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(() => gp.AddCurve(points, 0, 2, 0.5f)); 603AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>( 606AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>( 614AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>( 617AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>( 682AssertExtensions.Throws<ArgumentException>(null, () => gp.AddClosedCurve(points)); 697AssertExtensions.Throws<ArgumentException>(null, () => gp.AddClosedCurve(points)); 879AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(1, 1, height, width, Pi4, Pi4)); 880AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(1f, 1f, height, width, Pi4, Pi4)); 881AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(new Rectangle(1, 1, height, width), Pi4, Pi4)); 955AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPolygon(points)); 970AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPolygon(points)); 1080AssertExtensions.Throws<ArgumentNullException, ArgumentException>("family", null, () => 1288AssertExtensions.Throws<ArgumentException>(null, () => new GraphicsPath().Warp([], default));
System\Drawing\Drawing2D\HatchBrushTests.cs (6)
52AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.Empty)); 53AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.Empty, Color.Empty)); 85AssertExtensions.Throws<ArgumentException>(null, brush.Clone); 94AssertExtensions.Throws<ArgumentException>(null, () => brush.HatchStyle); 103AssertExtensions.Throws<ArgumentException>(null, () => brush.ForegroundColor); 112AssertExtensions.Throws<ArgumentException>(null, () => brush.BackgroundColor);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (62)
206AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0f)); 207AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0f)); 208AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 209AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 210AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true)); 211AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true)); 217AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0f)); 218AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0f)); 219AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 220AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal)); 221AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true)); 222AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true)); 230Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode)); 231Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new RectangleF(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode)); 254AssertExtensions.Throws<ArgumentException>(null, brush.Clone); 307AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = blend); 328AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () => brush.Blend = new Blend { Factors = new float[2], Positions = null }); 335AssertExtensions.Throws<ArgumentException>("value", null, () => brush.Blend = new Blend { Factors = new float[2], Positions = new float[1] }); 342AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = new Blend { Factors = [], Positions = [] }); 351AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend); 352AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = new Blend()); 370AssertExtensions.Throws<ArgumentException>(null, () => brush.GammaCorrection); 371AssertExtensions.Throws<ArgumentException>(null, () => brush.GammaCorrection = true); 430AssertExtensions.Throws<ArgumentException>( 439Assert.Throws<ArgumentException>(() => brush.InterpolationColors = new ColorBlend { Colors = new Color[2], Positions = null }); 449AssertExtensions.Throws<ArgumentException>("value", () => brush.InterpolationColors = new ColorBlend 462AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend 482AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors); 483AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend 563AssertExtensions.Throws<ArgumentException>(null, () => brush.LinearColors); 564AssertExtensions.Throws<ArgumentException>(null, () => brush.LinearColors = [Color.Red, Color.Wheat]); 573AssertExtensions.Throws<ArgumentException>(null, () => brush.Rectangle); 597AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform); 598AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform = new Matrix()); 618Assert.ThrowsAny<ArgumentException>(() => brush.WrapMode = wrapMode); 625AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode = WrapMode.Clamp); 634AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode); 635AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode = WrapMode.TileFlipX); 654AssertExtensions.Throws<ArgumentException>(null, brush.ResetTransform); 721AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix)); 722AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Append)); 731AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(new Matrix())); 732AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(new Matrix(), MatrixOrder.Prepend)); 772AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(0, 0, order)); 781AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(0, 0)); 782AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(0, 0, MatrixOrder.Append)); 822AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0, 0, order)); 831AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0, 0)); 832AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0, 0, MatrixOrder.Append)); 873AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(0, order)); 882AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(0)); 883AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(0, MatrixOrder.Append)); 905AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(focus)); 906AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(focus, 1)); 917AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(0.1f, scale)); 926AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(0)); 927AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(0, 1)); 965AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(focus)); 966AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(focus, 1)); 977AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(0.1f, scale)); 986AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(0)); 987AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(0, 1));
System\Drawing\Drawing2D\MatrixTests.cs (45)
141AssertExtensions.Throws<ArgumentException>(null, () => new Matrix(default, new PointF[length])); 142AssertExtensions.Throws<ArgumentException>(null, () => new Matrix(default, new Point[length])); 171AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Clone()); 217AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Equals(new Matrix())); 223AssertExtensions.Throws<ArgumentException>(null, () => new Matrix().Equals(CreateDisposedMatrix())); 229AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Elements); 262AssertExtensions.Throws<ArgumentException>(null, matrix1.Invert); 263AssertExtensions.Throws<ArgumentException>(null, matrix2.Invert); 264AssertExtensions.Throws<ArgumentException>(null, matrix3.Invert); 265AssertExtensions.Throws<ArgumentException>(null, matrix4.Invert); 266AssertExtensions.Throws<ArgumentException>(null, matrix5.Invert); 267AssertExtensions.Throws<ArgumentException>(null, matrix6.Invert); 273AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Invert()); 279AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().IsIdentity); 285AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().IsInvertible); 349AssertExtensions.Throws<ArgumentException>(null, () => matrix.Multiply(other, order)); 358AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Multiply(other)); 359AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Multiply(other, MatrixOrder.Prepend)); 368AssertExtensions.Throws<ArgumentException>(null, () => matrix.Multiply(disposedMatrix)); 369AssertExtensions.Throws<ArgumentException>(null, () => matrix.Multiply(disposedMatrix, MatrixOrder.Prepend)); 394AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Reset()); 478AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Rotate(1, MatrixOrder.Append)); 487AssertExtensions.Throws<ArgumentException>(null, () => matrix.Rotate(1, order)); 495AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.RotateAt(1, PointF.Empty)); 496AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.RotateAt(1, PointF.Empty, MatrixOrder.Append)); 505AssertExtensions.Throws<ArgumentException>(null, () => matrix.RotateAt(1, PointF.Empty, order)); 562AssertExtensions.Throws<ArgumentException>(null, () => matrix.Shear(1, 2, order)); 570AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Scale(1, 2)); 571AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Scale(1, 2, MatrixOrder.Append)); 628AssertExtensions.Throws<ArgumentException>(null, () => matrix.Shear(1, 2, order)); 636AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Shear(1, 2)); 637AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Shear(1, 2, MatrixOrder.Append)); 685AssertExtensions.Throws<ArgumentException>(null, () => matrix.Translate(1, 2, order)); 693AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Translate(1, 2)); 694AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Translate(1, 2, MatrixOrder.Append)); 739AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<Point>())); 740AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<PointF>())); 748AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new Point[1])); 749AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new PointF[1])); 806AssertExtensions.Throws<ArgumentException>(null, () => matrix.VectorTransformPoints([])); 807AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<Point>())); 808AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<PointF>())); 816AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.VectorTransformPoints(new Point[1])); 817AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new Point[1])); 818AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformVectors(new PointF[1]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (48)
80Assert.Throws<ArgumentException>(() => new PathGradientBrush(new Point[pointsLength])); 81Assert.Throws<ArgumentException>(() => new PathGradientBrush(new Point[pointsLength], WrapMode.Clamp)); 82Assert.Throws<ArgumentException>(() => new PathGradientBrush(new PointF[pointsLength])); 83Assert.Throws<ArgumentException>(() => new PathGradientBrush(new PointF[pointsLength], WrapMode.Clamp)); 89Assert.ThrowsAny<ArgumentException>(() => 92Assert.ThrowsAny<ArgumentException>(() => 136AssertExtensions.Throws<ArgumentException>(null, brush.Clone); 156AssertExtensions.Throws<ArgumentException>(null, () => brush.CenterColor = Color.Blue); 194AssertExtensions.Throws<ArgumentException>(null, () => brush.SurroundColors = colors); 208AssertExtensions.Throws<ArgumentException>(null, () => brush.SurroundColors = colors); 242AssertExtensions.Throws<ArgumentException>(null, () => brush.CenterPoint); 294AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend); 311AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = blend); 320AssertExtensions.Throws<ArgumentException>("value", null, () => brush.Blend = invalidBlend); 336AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () => 420AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(1f)); 421AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(1f, 1f)); 430AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(focus)); 431AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(focus, 1f)); 440AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(1f, scale)); 504AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(1f)); 505AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(1f, 1f)); 514AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(focus)); 515AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(focus, 1f)); 524AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(1f, scale)); 570AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors); 595AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () => 603AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend()); 610AssertExtensions.Throws<ArgumentException>(null, () => 618AssertExtensions.Throws<ArgumentException, ArgumentException>("value", null, () => 626Assert.Throws<ArgumentException>(() => 656AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform); 671AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform = nonInvertible); 693AssertExtensions.Throws<ArgumentException>(null, brush.ResetTransform); 727AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Append)); 757AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, (MatrixOrder)int.MinValue)); 765AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(nonInvertible)); 766AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(nonInvertible, MatrixOrder.Append)); 797AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(20f, 30f, MatrixOrder.Append)); 804AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(20f, 30f, (MatrixOrder)int.MinValue)); 847AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0.25f, 2, MatrixOrder.Append)); 854AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 1, (MatrixOrder)int.MinValue)); 888AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(45, MatrixOrder.Append)); 895AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(45, (MatrixOrder)int.MinValue)); 914AssertExtensions.Throws<ArgumentException>(null, () => brush.FocusScales); 932AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode); 939Assert.ThrowsAny<ArgumentException>(() => brush.WrapMode = (WrapMode)int.MinValue);
System\Drawing\FontConverterTests.cs (1)
63AssertExtensions.Throws<ArgumentException>(paramName, netfxParamName, () => converter.ConvertFrom(input));
System\Drawing\FontFamilyTests.cs (9)
49AssertExtensions.Throws<ArgumentException>(null, () => new FontFamily(name)); 50AssertExtensions.Throws<ArgumentException>(null, () => new FontFamily(name, null)); 64AssertExtensions.Throws<ArgumentException>(null, () => new FontFamily("Times New Roman", fontCollection)); 196AssertExtensions.Throws<ArgumentException>(null, () => family.IsStyleAvailable(FontStyle.Italic)); 208AssertExtensions.Throws<ArgumentException>(null, () => family.GetEmHeight(FontStyle.Italic)); 237AssertExtensions.Throws<ArgumentException>(null, () => family.GetName(0)); 249AssertExtensions.Throws<ArgumentException>(null, () => family.GetCellAscent(FontStyle.Italic)); 261AssertExtensions.Throws<ArgumentException>(null, () => family.GetCellDescent(FontStyle.Italic)); 273AssertExtensions.Throws<ArgumentException>(null, () => family.GetLineSpacing(FontStyle.Italic));
System\Drawing\FontTests.cs (40)
343AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10)); 344AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic)); 345AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, GraphicsUnit.Display)); 346AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display)); 347AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display, 10)); 348AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display, 10, gdiVerticalFont: true)); 360AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize)); 361AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize)); 362AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic)); 363AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic)); 364AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, GraphicsUnit.Document)); 365AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, GraphicsUnit.Document)); 366AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document)); 367AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document)); 368AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document, 10)); 369AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10)); 370AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document, 10, gdiVerticalFont: true)); 371AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10, gdiVerticalFont: true)); 381AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, unit)); 382AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, unit)); 383AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit)); 384AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit)); 385AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit, 10)); 386AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10)); 387AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit, 10, gdiVerticalFont: true)); 388AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10, gdiVerticalFont: true)); 414AssertExtensions.Throws<ArgumentException>(null, font.Clone); 461AssertExtensions.Throws<ArgumentException>(null, () => Font.FromHdc(IntPtr.Zero)); 472AssertExtensions.Throws<ArgumentException>(null, () => Font.FromHdc(hdc)); 483AssertExtensions.Throws<ArgumentException>(null, () => Font.FromHfont(IntPtr.Zero)); 538AssertExtensions.Throws<ArgumentException>("graphics", () => font.GetHeight(graphics)); 550AssertExtensions.Throws<ArgumentException>(null, () => font.GetHeight()); 551AssertExtensions.Throws<ArgumentException>(null, () => font.GetHeight(10)); 552AssertExtensions.Throws<ArgumentException>(null, () => font.GetHeight(graphics)); 598AssertExtensions.Throws<ArgumentException>(null, () => Font.FromLogFont(null)); 599AssertExtensions.Throws<ArgumentException>(null, () => Font.FromLogFont(null, hdc)); 622AssertExtensions.Throws<ArgumentException>(null, () => Font.FromLogFont(logFont)); 623AssertExtensions.Throws<ArgumentException>(null, () => Font.FromLogFont(logFont, hdc)); 787Assert.Throws<ArgumentException>(() => font.ToLogFont(new LOGFONT(), graphics)); 845AssertExtensions.Throws<ArgumentException>(null, () => font.ToHfont());
System\Drawing\Graphics_DrawBezierTests.cs (13)
78AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, 1, 2, 3, 4, 5, 6, 7, 8)); 79AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, Point.Empty, Point.Empty, Point.Empty, Point.Empty)); 80AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, PointF.Empty, PointF.Empty, PointF.Empty, PointF.Empty)); 110AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 111AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90)); 112AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 113AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90)); 133AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new Point[2])); 134AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new PointF[2])); 153AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<Point>())); 154AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<PointF>())); 183AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new Point[2])); 184AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new PointF[2]));
System\Drawing\Graphics_DrawLineTests.cs (14)
57AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, Point.Empty, Point.Empty)); 58AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0, 0, 0, 0)); 59AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, PointF.Empty, PointF.Empty)); 60AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0f, 0f, 0f, 0f)); 91AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, Point.Empty, Point.Empty)); 92AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0, 0, 0, 0)); 93AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, PointF.Empty, PointF.Empty)); 94AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0f, 0f, 0f, 0f)); 114AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[2])); 115AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new PointF[2])); 136AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[length])); 137AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new PointF[length])); 166AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[2])); 167AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new PointF[2]));
System\Drawing\GraphicsTests.Core.cs (9)
19AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformElements = matrix); 46AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformElements); 47AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformElements = Matrix3x2.Identity); 88AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f))); 119AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f))); 142AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90)); 153AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 0, 1), 0, 90)); 164AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 0), 0, 90)); 195AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90));
System\Drawing\GraphicsTests.cs (197)
78AssertExtensions.Throws<ArgumentException>(null, () => graphics.GetHdc()); 140AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(hdc)); 141AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(hdc)); 145AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc); 146AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(hdc)); 150AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc); 151AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(hdc)); 161AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(10)); 165AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(10)); 180AssertExtensions.Throws<ArgumentException>(null, () => graphics1.ReleaseHdc(hdc1)); 183AssertExtensions.Throws<ArgumentException>(null, () => graphics2.ReleaseHdc(hdc2)); 191AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc); 192AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(IntPtr.Zero)); 193AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(IntPtr.Zero)); 203AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc); 204AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(IntPtr.Zero)); 205AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(IntPtr.Zero)); 269Exception exception = AssertExtensions.Throws<ArgumentException, Exception>(() => Graphics.FromImage(image)); 270if (exception is ArgumentException argumentException) 280AssertExtensions.Throws<ArgumentException>(null, () => Graphics.FromImage(image)); 367AssertExtensions.Throws<ArgumentException>(null, () => graphics.CompositingMode); 368AssertExtensions.Throws<ArgumentException>(null, () => graphics.CompositingMode = CompositingMode.SourceCopy); 451AssertExtensions.Throws<ArgumentException>(null, () => graphics.CompositingQuality); 452AssertExtensions.Throws<ArgumentException>(null, () => graphics.CompositingQuality = CompositingQuality.AssumeLinear); 504AssertExtensions.Throws<ArgumentException>(null, () => graphics.DpiX); 530AssertExtensions.Throws<ArgumentException>(null, () => graphics.DpiX); 576AssertExtensions.Throws<ArgumentException>(null, graphics.Flush); 577AssertExtensions.Throws<ArgumentException>(null, () => graphics.Flush(FlushIntention.Flush)); 612AssertExtensions.Throws<ArgumentException>(null, () => graphics.InterpolationMode = InterpolationMode.Invalid); 639AssertExtensions.Throws<ArgumentException>(null, () => graphics.InterpolationMode); 640AssertExtensions.Throws<ArgumentException>(null, () => graphics.InterpolationMode = InterpolationMode.HighQualityBilinear); 665AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageScale = pageScale); 692AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageScale); 693AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageScale = 10); 726AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageUnit = GraphicsUnit.World); 753AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageUnit); 754AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageUnit = GraphicsUnit.Document); 786AssertExtensions.Throws<ArgumentException>(null, () => graphics.PixelOffsetMode = PixelOffsetMode.Invalid); 813AssertExtensions.Throws<ArgumentException>(null, () => graphics.PixelOffsetMode); 814AssertExtensions.Throws<ArgumentException>(null, () => graphics.PixelOffsetMode = PixelOffsetMode.Default); 895AssertExtensions.Throws<ArgumentException>(null, () => graphics.RenderingOrigin); 896AssertExtensions.Throws<ArgumentException>(null, () => graphics.RenderingOrigin = Point.Empty); 928AssertExtensions.Throws<ArgumentException>(null, () => graphics.SmoothingMode = SmoothingMode.Invalid); 955AssertExtensions.Throws<ArgumentException>(null, () => graphics.SmoothingMode); 956AssertExtensions.Throws<ArgumentException>(null, () => graphics.SmoothingMode = SmoothingMode.AntiAlias); 978AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextContrast = textContrast); 1005AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextContrast); 1006AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextContrast = 5); 1058AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextRenderingHint); 1059AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit); 1104AssertExtensions.Throws<ArgumentException>(null, () => graphics.Transform = matrix); 1113AssertExtensions.Throws<ArgumentException>(null, () => graphics.Transform = matrix); 1142AssertExtensions.Throws<ArgumentException>(null, () => graphics.Transform); 1143AssertExtensions.Throws<ArgumentException>(null, () => graphics.Transform = matrix); 1182AssertExtensions.Throws<ArgumentException>(null, graphics.ResetTransform); 1247AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix)); 1248AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix, MatrixOrder.Append)); 1259AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix, order)); 1288AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix)); 1289AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix, MatrixOrder.Prepend)); 1336AssertExtensions.Throws<ArgumentException>(null, () => graphics.TranslateTransform(0, 0, order)); 1363AssertExtensions.Throws<ArgumentException>(null, () => graphics.TranslateTransform(0, 0)); 1364AssertExtensions.Throws<ArgumentException>(null, () => graphics.TranslateTransform(0, 0, MatrixOrder.Append)); 1406AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0)); 1407AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0, MatrixOrder.Append)); 1417AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0, order)); 1444AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0)); 1445AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0, MatrixOrder.Append)); 1493AssertExtensions.Throws<ArgumentException>(null, () => graphics.RotateTransform(0, order)); 1520AssertExtensions.Throws<ArgumentException>(null, () => graphics.RotateTransform(0)); 1521AssertExtensions.Throws<ArgumentException>(null, () => graphics.RotateTransform(0, MatrixOrder.Append)); 1649Assert.ThrowsAny<ArgumentException>(() => graphics.CopyFromScreen(1, 2, 3, 4, Size.Empty, copyPixelOperation)); 1679AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty)); 1680AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty, CopyPixelOperation.MergeCopy)); 1681AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty)); 1682AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty, CopyPixelOperation.MergeCopy)); 1854AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(destSpace, CoordinateSpace.World, [new(1, 1)])); 1855AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(destSpace, CoordinateSpace.World, new PointF[] { new(1, 1) })); 1865AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.World, srcSpace, [new(1, 1)])); 1866AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.World, srcSpace, new PointF[] { new(1, 1) })); 1883AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<Point>())); 1884AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<PointF>())); 1911AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [Point.Empty])); 1912AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [PointF.Empty])); 1953AssertExtensions.Throws<ArgumentException>(null, () => graphics.GetNearestColor(Color.Red)); 1975AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 1976AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90)); 1977AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 1978AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90)); 1987AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 0, 1), 0, 90)); 1988AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 0, 1, 0, 90)); 1989AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 0, 1), 0, 90)); 1990AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 0f, 1f, 0, 90)); 1999AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 0), 0, 90)); 2000AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 0, 0, 90)); 2001AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 0), 0, 90)); 2002AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 0f, 0, 90)); 2033AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2034AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90)); 2035AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2036AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90)); 2057AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1))); 2058AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0, 0, 1, 1)); 2059AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0f, 0f, 1f, 1f)); 2089AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1))); 2090AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0, 0, 1, 1)); 2091AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0f, 0f, 1f, 1f)); 2111AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new Rectangle[2])); 2112AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new RectangleF[2])); 2131AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<Rectangle>())); 2132AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<RectangleF>())); 2161AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new Rectangle[2])); 2162AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new RectangleF[2])); 2184AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1))); 2185AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0, 0, 1, 1)); 2186AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1))); 2187AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0f, 0f, 1f, 1f)); 2218AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1))); 2219AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0, 0, 1, 1)); 2220AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1))); 2221AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0f, 0f, 1f, 1f)); 2243AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2244AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0, 0, 1, 1, 0, 90)); 2245AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2246AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0f, 0f, 1f, 1f, 0, 90)); 2255AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 0, 1), 0, 90)); 2256AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0, 0, 0, 1, 0, 90)); 2257AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 0, 1), 0, 90)); 2258AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0f, 0f, 0f, 1f, 0, 90)); 2267AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 0), 0, 90)); 2268AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 0, 0, 90)); 2269AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 0), 0, 90)); 2270AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 0f, 0, 90)); 2301AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90)); 2302AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0, 0, 1, 1, 0, 90)); 2303AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90)); 2304AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0f, 0f, 1f, 1f, 0, 90)); 2324AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[2])); 2325AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new PointF[2])); 2346AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[length])); 2347AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new PointF[length])); 2376AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[2])); 2377AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new PointF[2])); 2398AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPath(pen, graphicsPath)); 2419AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPath(pen, graphicsPath)); 2449AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPath(pen, graphicsPath)); 2474AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2])); 2475AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2])); 2476AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 1)); 2477AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 1)); 2478AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2)); 2479AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 0, 2, 1)); 2480AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2, 1)); 2506AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length])); 2507AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length])); 2508AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], 1)); 2509AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], 1)); 2510AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], 0, length)); 2511AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], 0, length, 1)); 2512AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], 0, length, 1)); 2526AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], offset, numberOfSegments)); 2527AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], offset, numberOfSegments, 1)); 2528AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], offset, numberOfSegments, 1)); 2562AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2])); 2563AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2])); 2564AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 1)); 2565AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 1)); 2566AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2)); 2567AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 0, 2, 1)); 2568AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2, 1)); 2590AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3])); 2591AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Winding)); 2592AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3])); 2593AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3], 1, FillMode.Winding)); 2617AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[length])); 2618AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[length], 1, FillMode.Winding)); 2619AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[length])); 2620AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[length], 1, FillMode.Winding)); 2651AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3])); 2652AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Alternate)); 2653AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3])); 2654AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3], 1, FillMode.Alternate)); 2675AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90)); 2676AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 1, 1, 0, 90)); 2677AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 1f, 1f, 0, 90)); 2686AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 0, 1), 0, 90)); 2687AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 0, 1, 0, 90)); 2688AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 0f, 1f, 0, 90)); 2697AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 0), 0, 90)); 2698AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 1, 0, 0, 90)); 2699AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 1f, 0f, 0, 90)); 2729AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90)); 2730AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 1, 1, 0, 90)); 2731AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 1f, 1f, 0, 90)); 2777AssertExtensions.Throws<ArgumentException>(null, () => graphics.Clear(Color.Red)); 2795AssertExtensions.Throws<ArgumentException>( 2879Assert.Throws<ArgumentException>(() => graphics.DrawCachedBitmap(cachedBitmap, 0, 0));
System\Drawing\IconTests.cs (25)
145AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null)); 146AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null, 32, 32)); 147AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null, new Size(32, 32))); 153yield return new object[] { Array.Empty<byte>(), typeof(ArgumentException) }; 154yield return new object[] { new byte[6], typeof(ArgumentException) }; 155yield return new object[] { new byte[21], typeof(ArgumentException) }; 158yield return new object[] { new byte[] { 10, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) }; 159yield return new object[] { new byte[] { 0, 10, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) }; 162yield return new object[] { new byte[] { 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) }; 163yield return new object[] { new byte[] { 0, 0, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) }; 164yield return new object[] { new byte[] { 0, 0, 1, 2, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) }; 167yield return new object[] { new byte[] { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) }; 170yield return new object[] { new byte[] { 0, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) }; 179PlatformDetection.IsNetFramework ? typeof(Win32Exception) : typeof(ArgumentException) 186yield return new object[] { new byte[] { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255 }, typeof(ArgumentException) }; 189yield return new object[] { new byte[] { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0 }, typeof(ArgumentException) }; 197PlatformDetection.IsNetFramework ? typeof(Win32Exception) : typeof(ArgumentException) 201yield return new object[] { new byte[] { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 127 }, typeof(ArgumentException) }; 245AssertExtensions.Throws<ArgumentNullException, ArgumentException>("original", null, () => new Icon((Icon)null, 32, 32)); 246AssertExtensions.Throws<ArgumentNullException, ArgumentException>("original", null, () => new Icon((Icon)null, new Size(32, 32))); 269AssertExtensions.Throws<ArgumentException>(null, () => new Icon(type, resource)); 275AssertExtensions.Throws<ArgumentNullException, ArgumentException>("resource", null, () => new Icon(typeof(Icon), null)); 401AssertExtensions.Throws<ArgumentNullException, ArgumentException>("filePath", null, () => Icon.ExtractAssociatedIcon(null)); 407AssertExtensions.Throws<ArgumentException>("filePath", null, () => Icon.ExtractAssociatedIcon("")); 700AssertExtensions.Throws<ArgumentException>("handle", null, () => Icon.FromHandle(IntPtr.Zero));
System\Drawing\ImageTests.cs (23)
114AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(propid)); 124AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(propid)); 141AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagExifUserComment)); 142AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagExifUserComment)); 146AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagLuminanceTable)); 147AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagLuminanceTable)); 151AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagChrominanceTable)); 161AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagExifUserComment)); 162AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagExifUserComment)); 166AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagLuminanceTable)); 167AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagLuminanceTable)); 171AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagChrominanceTable)); 210AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(propid)); 220AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(propid)); 512AssertExtensions.Throws<ArgumentException>("path", null, () => Image.FromFile(string.Empty)); 513AssertExtensions.Throws<ArgumentException>("path", null, () => Image.FromFile(string.Empty, useEmbeddedColorManagement: true)); 553AssertExtensions.Throws<ArgumentException>(null, () => Image.FromStream(stream)); 556AssertExtensions.Throws<ArgumentException>(null, () => Image.FromStream(stream, useEmbeddedColorManagement: true)); 557AssertExtensions.Throws<ArgumentException>(null, () => Image.FromStream(stream, useEmbeddedColorManagement: true, validateImageData: true)); 564AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null)); 565AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true)); 566AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true, validateImageData: true)); 691action.Should().Throw<ArgumentException>();
System\Drawing\Imaging\BitmapDataTests.cs (1)
121Assert.ThrowsAny<ArgumentException>(() => bd.PixelFormat = (PixelFormat)(-1));
System\Drawing\Imaging\Effects\EffectsTests.cs (15)
44action.Should().Throw<ArgumentException>(); 70action.Should().Throw<ArgumentException>(); 93action.Should().Throw<ArgumentException>(); 119action.Should().Throw<ArgumentException>(); 147action.Should().Throw<ArgumentException>(); 173action.Should().Throw<ArgumentException>(); 229action.Should().Throw<ArgumentException>(); 264action.Should().Throw<ArgumentException>(); 284action.Should().Throw<ArgumentException>(); 304action.Should().Throw<ArgumentException>(); 324action.Should().Throw<ArgumentException>(); 344action.Should().Throw<ArgumentException>(); 364action.Should().Throw<ArgumentException>(); 385action.Should().Throw<ArgumentException>(); 407action.Should().Throw<ArgumentException>();
System\Drawing\Imaging\EncoderParameterTests.cs (6)
214[InlineData(new int[] { 1, 2 }, new int[] { 1 }, new int[] { 1 }, new int[] { 1 }, typeof(ArgumentException))] 215[InlineData(new int[] { 1 }, new int[] { 1, 2 }, new int[] { 1 }, new int[] { 1 }, typeof(ArgumentException))] 233[InlineData(new int[] { 0 }, new int[] { 0, 1 }, typeof(ArgumentException))] 234[InlineData(new int[] { 0, 1 }, new int[] { 0 }, typeof(ArgumentException))] 243[InlineData(new long[] { 0 }, new long[] { 0, 1 }, typeof(ArgumentException))] 244[InlineData(new long[] { 0, 1 }, new long[] { 0 }, typeof(ArgumentException))]
System\Drawing\Imaging\ImageAttributesTests.cs (67)
88AssertExtensions.Throws<ArgumentException>(null, imageAttr.Clone); 221AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix)); 222AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, ColorMatrixFlag.Default)); 223AssertExtensions.Throws<ArgumentException>(null, () => 250AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, ColorMatrixFlag.Default, type)); 267AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, flag)); 268AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, flag, ColorAdjustType.Default)); 327AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearColorMatrix); 328AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorMatrix(ColorAdjustType.Default)); 336AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorMatrix(type)); 439AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix)); 440AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, ColorMatrixFlag.Default)); 441AssertExtensions.Throws<ArgumentException>(null, () => 451AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, null, ColorMatrixFlag.AltGrays)); 454AssertExtensions.Throws<ArgumentException>(null, () => 463AssertExtensions.Throws<ArgumentException>(null, () => 475AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, flag)); 476AssertExtensions.Throws<ArgumentException>(null, () => 524AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetThreshold(0.5f)); 532AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetThreshold(0.5f, type)); 568AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearThreshold(ColorAdjustType.Default)); 576AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearThreshold(type)); 623AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f)); 624AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f, ColorAdjustType.Default)); 632AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f, type)); 656AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearGamma(ColorAdjustType.Default)); 664AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearGamma(type)); 703AssertExtensions.Throws<ArgumentException>(null, imageAttr.SetNoOp); 704AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetNoOp(ColorAdjustType.Default)); 712AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetNoOp(type)); 771AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearNoOp); 772AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearNoOp(ColorAdjustType.Default)); 780AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearNoOp(type)); 832AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150))); 833AssertExtensions.Throws<ArgumentException>(null, () => 842AssertExtensions.Throws<ArgumentException>(null, () => 881AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearColorKey); 882AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorKey(ColorAdjustType.Default)); 890AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorKey(type)); 977AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY)); 978AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY, ColorAdjustType.Default)); 986AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY, type)); 1003AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(flag)); 1004AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(flag, ColorAdjustType.Default)); 1042AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearOutputChannel); 1043AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannel(ColorAdjustType.Default)); 1051AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannel(type)); 1073AssertExtensions.Throws<ArgumentException>(null, () => 1075AssertExtensions.Throws<ArgumentException>(null, () => 1091Assert.Throws<ArgumentException>(() => imageAttr.SetOutputChannelColorProfile(string.Empty)); 1092Assert.Throws<ArgumentException>(() => imageAttr.SetOutputChannelColorProfile(string.Empty, ColorAdjustType.Default)); 1117AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannelColorProfile("path", type)); 1157AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearOutputChannelColorProfile); 1158AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannelColorProfile(ColorAdjustType.Default)); 1166AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannelColorProfile(type)); 1213AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable(_yellowToRedColorMap)); 1214AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable(_yellowToRedColorMap, ColorAdjustType.Default)); 1222AssertExtensions.ThrowsAny<ArgumentNullException, ArgumentException>(() => imageAttr.SetRemapTable(_yellowToRedColorMap, type)); 1243AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable([], ColorAdjustType.Default)); 1279AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearRemapTable); 1280AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearRemapTable(ColorAdjustType.Default)); 1288AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearRemapTable(type)); 1297AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp)); 1298AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black)); 1299AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black, true)); 1309AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.Palette, ColorAdjustType.Default)); 1325AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.Palette, type));
System\Drawing\Imaging\MetafileTests.cs (75)
43AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, false)); 90AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(path)); 104AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Metafile((Stream)null)); 146AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(g.GetHdc(), emfType)); 152AssertExtensions.Throws<ArgumentException>(null, () => new Metafile((IntPtr)null, EmfType.EmfOnly)); 158AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly)); 181AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly, description)); 277AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangleF)); 278AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel)); 279AssertExtensions.Throws<ArgumentException>(null, () => 281AssertExtensions.Throws<ArgumentException>(null, () => 284AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangle)); 285AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel)); 286AssertExtensions.Throws<ArgumentException>(null, () => 288AssertExtensions.Throws<ArgumentException>(null, () => 307AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangleF, farameUnit)); 308AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangleF, farameUnit, EmfType.EmfOnly)); 309AssertExtensions.Throws<ArgumentException>(null, () => 312AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangle, farameUnit)); 313AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangle, farameUnit, EmfType.EmfOnly)); 314AssertExtensions.Throws<ArgumentException>(null, () => 325AssertExtensions.Throws<ArgumentException>(null, () => 327AssertExtensions.Throws<ArgumentException>(null, () => 330AssertExtensions.Throws<ArgumentException>(null, () => 332AssertExtensions.Throws<ArgumentException>(null, () => 389AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero)); 390AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly)); 391AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly, "description")); 403AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, emfType)); 404AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, emfType, "description")); 427AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc)); 428AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly)); 429AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly, "description")); 617AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangleF)); 618AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible)); 619AssertExtensions.Throws<ArgumentException>(null, () => 621AssertExtensions.Throws<ArgumentException>(null, () => 624AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangle)); 625AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible)); 626AssertExtensions.Throws<ArgumentException>(null, () => 628AssertExtensions.Throws<ArgumentException>(null, () => 641AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, _rectangleF, frameUnit)); 642AssertExtensions.Throws<ArgumentException>(null, () => 644AssertExtensions.Throws<ArgumentException>(null, () => 647AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, _rectangle, frameUnit)); 648AssertExtensions.Throws<ArgumentException>(null, () => 650AssertExtensions.Throws<ArgumentException>(null, () => 663AssertExtensions.Throws<ArgumentException>(null, () => 665AssertExtensions.Throws<ArgumentException>(null, () => 668AssertExtensions.Throws<ArgumentException>(null, () => 670AssertExtensions.Throws<ArgumentException>(null, () => 698AssertExtensions.Throws<ArgumentException, ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, _rectangleF)); 699AssertExtensions.Throws<ArgumentException, ArgumentException>("path", null, () => 701AssertExtensions.Throws<ArgumentException, ArgumentException>("path", null, () => 703AssertExtensions.Throws<ArgumentException, ArgumentException>("path", null, () => 787AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(stream, IntPtr.Zero, _rectangle)); 788AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible)); 789AssertExtensions.Throws<ArgumentException>(null, () => 791AssertExtensions.Throws<ArgumentException>(null, () => 803AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(stream, referenceHdc, _rectangle, frameUnit)); 804AssertExtensions.Throws<ArgumentException>(null, () => 806AssertExtensions.Throws<ArgumentException>(null, () => 818AssertExtensions.Throws<ArgumentException>(null, () => 820AssertExtensions.Throws<ArgumentException>(null, () => 848AssertExtensions.Throws<ArgumentException>(null, () => Metafile.GetMetafileHeader(IntPtr.Zero)); 850AssertExtensions.Throws<ArgumentException>(null, () => Metafile.GetMetafileHeader(metafile.GetHenhmetafile())); 858AssertExtensions.Throws<ArgumentException>("path", null, () => Metafile.GetMetafileHeader(fileName)); 885AssertExtensions.Throws<ArgumentException>(null, () => Metafile.GetMetafileHeader(stream)); 904AssertExtensions.Throws<ArgumentException>(null, metafile.GetMetafileHeader); 920AssertExtensions.Throws<ArgumentException>(null, () => metafile.GetHenhmetafile()); 929AssertExtensions.Throws<ArgumentException>(null, () =>
System\Drawing\PensTests.cs (1)
164AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.AliceBlue);
System\Drawing\PenTests.cs (73)
87AssertExtensions.Throws<ArgumentException>(null, () => new Pen(brush)); 88AssertExtensions.Throws<ArgumentException>(null, () => new Pen(brush, 10)); 135Assert.ThrowsAny<ArgumentException>(() => pen.Alignment = alignment); 145AssertExtensions.Throws<ArgumentException>(null, () => pen.Alignment); 146AssertExtensions.Throws<ArgumentException>(null, () => pen.Alignment = PenAlignment.Center); 163AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush = new SubBrush()); 185AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush = brush); 195AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush); 196AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush = brush); 231AssertExtensions.Throws<ArgumentException>(null, pen.Clone); 260AssertExtensions.Throws<ArgumentException>(null, () => pen.Color); 290AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.Black); 300AssertExtensions.Throws<ArgumentException>(null, () => pen.Color); 301AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.Red); 333AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray = []); 349AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray = compoundArray); 359AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray); 360AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray = [1]); 385AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap = null); 398AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap = lineCap); 411AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap); 412AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap = lineCap); 437AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap = null); 450AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap = lineCap); 463AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap); 464AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap = lineCap); 487Assert.ThrowsAny<ArgumentException>(() => pen.DashCap = dashCap); 497AssertExtensions.Throws<ArgumentException>(null, () => pen.DashCap); 498AssertExtensions.Throws<ArgumentException>(null, () => pen.DashCap = DashCap.Triangle); 523AssertExtensions.Throws<ArgumentException>(null, () => pen.DashOffset); 524AssertExtensions.Throws<ArgumentException>(null, () => pen.DashOffset = 10); 550AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = null); 558AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = []); 570AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = pattern); 580AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern); 581AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = [1]); 627Assert.ThrowsAny<ArgumentException>(() => pen.DashStyle = dashStyle); 637AssertExtensions.Throws<ArgumentException>(null, () => pen.DashStyle); 638AssertExtensions.Throws<ArgumentException>(null, () => pen.DashStyle = DashStyle.Dash); 681Assert.ThrowsAny<ArgumentException>(() => pen.EndCap = lineCap); 691AssertExtensions.Throws<ArgumentException>(null, () => pen.EndCap); 692AssertExtensions.Throws<ArgumentException>(null, () => pen.EndCap = LineCap.ArrowAnchor); 715Assert.ThrowsAny<ArgumentException>(() => pen.LineJoin = lineJoin); 725AssertExtensions.Throws<ArgumentException>(null, () => pen.LineJoin); 726AssertExtensions.Throws<ArgumentException>(null, () => pen.LineJoin = LineJoin.Miter); 751AssertExtensions.Throws<ArgumentException>(null, () => pen.MiterLimit); 752AssertExtensions.Throws<ArgumentException>(null, () => pen.MiterLimit = 10); 807AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix)); 808AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix, MatrixOrder.Prepend)); 851AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix)); 852AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix, MatrixOrder.Prepend)); 878AssertExtensions.Throws<ArgumentException>(null, pen.ResetTransform); 924AssertExtensions.Throws<ArgumentException>(null, () => pen.RotateTransform(10, matrixOrder)); 935AssertExtensions.Throws<ArgumentException>(null, () => pen.RotateTransform(1)); 936AssertExtensions.Throws<ArgumentException>(null, () => pen.RotateTransform(1, MatrixOrder.Prepend)); 984AssertExtensions.Throws<ArgumentException>(null, () => pen.ScaleTransform(1, 2, matrixOrder)); 995AssertExtensions.Throws<ArgumentException>(null, () => pen.ScaleTransform(1, 2)); 996AssertExtensions.Throws<ArgumentException>(null, () => pen.ScaleTransform(1, 2, MatrixOrder.Prepend)); 1026AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(LineCap.AnchorMask, LineCap.ArrowAnchor, DashCap.Flat)); 1045Assert.ThrowsAny<ArgumentException>(() => pen.StartCap = lineCap); 1055AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap); 1056AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap = LineCap.ArrowAnchor); 1088AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform = matrix); 1099AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform = matrix); 1110AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform); 1111AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform = matrix); 1159AssertExtensions.Throws<ArgumentException>(null, () => pen.TranslateTransform(1, 2, matrixOrder)); 1170AssertExtensions.Throws<ArgumentException>(null, () => pen.TranslateTransform(1, 2)); 1171AssertExtensions.Throws<ArgumentException>(null, () => pen.TranslateTransform(1, 2, MatrixOrder.Prepend)); 1196AssertExtensions.Throws<ArgumentException>(null, () => pen.Width); 1197AssertExtensions.Throws<ArgumentException>(null, () => pen.Width = 10); 1208AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap); 1209AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap);
System\Drawing\Printing\MarginsConverterTests.cs (4)
56Assert.Throws<ArgumentException>(() => mc.CreateInstance(context, values)); 89AssertExtensions.Throws<ArgumentException, Exception>(() => mc.ConvertFrom(context, culture, "1;2;3;4")); 112AssertExtensions.Throws<ArgumentException, Exception>(() => mc.ConvertFrom(context, null, "wrong string format")); 113AssertExtensions.Throws<ArgumentException, Exception>(() => mc.ConvertFrom(context, culture, "wrong string format"));
System\Drawing\Printing\MarginsTests.cs (8)
58AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("left", null, () => new Margins(-1, 2, 3, 4)); 64AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("right", null, () => new Margins(1, -1, 3, 4)); 70AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("top", null, () => new Margins(1, 2, -1, 4)); 76AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("bottom", null, () => new Margins(1, 2, 3, -1)); 178AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Left = -1); 200AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Right = -1); 222AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Top = -1); 244AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Bottom = -1);
System\Drawing\Printing\PaperSizeTests.cs (3)
116AssertExtensions.Throws<ArgumentException>("value", null, () => size.Height = 1); 153AssertExtensions.Throws<ArgumentException>("value", null, () => size.PaperName = "name"); 214AssertExtensions.Throws<ArgumentException>("value", null, () => size.Width = 1);
System\Drawing\Printing\PrinterSettingsTests.cs (8)
75AssertExtensions.Throws<ArgumentException>(null, () => printerSettings.Copies = copies); 125Assert.ThrowsAny<ArgumentException>(() => printerSettings.Duplex = duplex); 155AssertExtensions.Throws<ArgumentException>(null, () => printerSettings.FromPage = pageNumber); 231AssertExtensions.Throws<ArgumentException>(null, () => printerSettings.MaximumPage = maximumPage); 260AssertExtensions.Throws<ArgumentException>(null, () => printerSettings.MinimumPage = minimumPage); 326Assert.ThrowsAny<ArgumentException>(() => printerSettings.PrintRange = printRange); 442AssertExtensions.Throws<ArgumentException>(null, () => printerSettings.ToPage = toPage); 581AssertExtensions.Throws<ArgumentException>(null, () => printerSettings.SetHdevmode(IntPtr.Zero));
System\Drawing\RegionTests.cs (61)
130AssertExtensions.Throws<ArgumentException>(null, () => new Region(regionData)); 254AssertExtensions.Throws<ArgumentException>(null, () => new Region(path)); 275AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().Clone()); 412AssertExtensions.Throws<ArgumentException>(null, () => new Region().Complement(CreateDisposedRegion())); 519AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(graphicPath)); 520AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(default(Rectangle))); 521AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(default(RectangleF))); 522AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(disposedRegion)); 610AssertExtensions.Throws<ArgumentException>(null, () => region.Equals(region, graphics)); 618AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Equals(new Region(), s_graphic)); 619AssertExtensions.Throws<ArgumentException>(null, () => new Region().Equals(disposedRegion, s_graphic)); 819AssertExtensions.Throws<ArgumentException>(null, () => new Region().Exclude(CreateDisposedRegion())); 902AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(graphicsPath)); 903AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(default(Rectangle))); 904AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(default(RectangleF))); 905AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(other)); 930AssertExtensions.Throws<ArgumentException>(null, () => Region.FromHrgn(IntPtr.Zero)); 967AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetHrgn(s_graphic)); 991AssertExtensions.Throws<ArgumentException>(null, () => region.GetBounds(graphics)); 997AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetBounds(s_graphic)); 1003AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetRegionData()); 1030AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetRegionScans(matrix)); 1039AssertExtensions.Throws<ArgumentException>(null, () => region.GetRegionScans(matrix)); 1152AssertExtensions.Throws<ArgumentException>(null, () => new Region().Intersect(CreateDisposedRegion())); 1259AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(graphicsPath)); 1260AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(default(Rectangle))); 1261AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(default(RectangleF))); 1262AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(other)); 1275AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().IsEmpty(s_graphic)); 1292AssertExtensions.Throws<ArgumentException>(null, () => region.IsInfinite(graphics)); 1298AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().IsInfinite(s_graphic)); 1415AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f)); 1416AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new PointF(1, 2))); 1417AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Point(1, 2))); 1419AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, s_graphic)); 1420AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new PointF(1, 2), s_graphic)); 1421AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Point(1, 2), s_graphic)); 1423AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, 3f, 4f)); 1424AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Rectangle(1, 2, 3, 4))); 1425AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new RectangleF(1, 2, 3, 4))); 1427AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, 3f, 4f, s_graphic)); 1428AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Rectangle(1, 2, 3, 4), s_graphic)); 1429AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new RectangleF(1, 2, 3, 4), s_graphic)); 1431AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, s_graphic)); 1432AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, 3, 4)); 1433AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, 3, 4, s_graphic)); 1460AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().MakeEmpty()); 1483AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().MakeInfinite()); 1715AssertExtensions.Throws<ArgumentException>(null, () => region.Union(CreateDisposedRegion())); 1798AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(graphicsPath)); 1799AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(default(Rectangle))); 1800AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(default(RectangleF))); 1801AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(disposedRegion)); 1883AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().Transform(matrix)); 1967AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Translate(1, 2)); 1968AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Translate(1f, 2f)); 2073AssertExtensions.Throws<ArgumentException>(null, () => region.Xor(CreateDisposedRegion())); 2156AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(graphicsPath)); 2157AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(default(Rectangle))); 2158AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(default(RectangleF))); 2159AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(other));
System\Drawing\SolidBrushTests.cs (5)
56AssertExtensions.Throws<ArgumentException>(null, brush.Clone); 65AssertExtensions.Throws<ArgumentException>(null, () => brush.Color); 90AssertExtensions.Throws<ArgumentException>(null, () => brush.Color = Color.WhiteSmoke); 97AssertExtensions.Throws<ArgumentException>(null, () => brush.Color = Color.AntiqueWhite); 112AssertExtensions.Throws<ArgumentException>(null, brush.Dispose);
System\Drawing\StringFormatTests.cs (24)
87AssertExtensions.Throws<ArgumentException>(null, () => new StringFormat(format)); 122AssertExtensions.Throws<ArgumentException>(null, format.Clone); 144AssertExtensions.Throws<ArgumentException>(null, () => format.SetDigitSubstitution(0, StringDigitSubstitute.None)); 170AssertExtensions.Throws<ArgumentException>(null, () => format.SetTabStops(-1, [])); 186AssertExtensions.Throws<ArgumentException>(null, () => format.SetTabStops(0, [])); 195AssertExtensions.Throws<ArgumentException>(null, () => format.GetTabStops(out float firstTabOffset)); 234AssertExtensions.Throws<ArgumentException>(null, () => format.SetMeasurableCharacterRanges([])); 253Assert.ThrowsAny<ArgumentException>(() => format.Alignment = alignment); 262AssertExtensions.Throws<ArgumentException>(null, () => format.Alignment); 263AssertExtensions.Throws<ArgumentException>(null, () => format.Alignment = StringAlignment.Center); 272AssertExtensions.Throws<ArgumentException>(null, () => format.DigitSubstitutionMethod); 281AssertExtensions.Throws<ArgumentException>(null, () => format.DigitSubstitutionLanguage); 300AssertExtensions.Throws<ArgumentException>(null, () => format.FormatFlags); 301AssertExtensions.Throws<ArgumentException>(null, () => format.FormatFlags = StringFormatFlags.NoClip); 320Assert.ThrowsAny<ArgumentException>(() => format.LineAlignment = alignment); 329AssertExtensions.Throws<ArgumentException>(null, () => format.LineAlignment); 330AssertExtensions.Throws<ArgumentException>(null, () => format.LineAlignment = StringAlignment.Center); 349Assert.ThrowsAny<ArgumentException>(() => format.HotkeyPrefix = prefix); 358AssertExtensions.Throws<ArgumentException>(null, () => format.HotkeyPrefix); 359AssertExtensions.Throws<ArgumentException>(null, () => format.HotkeyPrefix = HotkeyPrefix.Hide); 376Assert.ThrowsAny<ArgumentException>(() => format.Trimming = trimming); 385AssertExtensions.Throws<ArgumentException>(null, () => format.Trimming); 386AssertExtensions.Throws<ArgumentException>(null, () => format.Trimming = StringTrimming.Word); 432AssertExtensions.Throws<ArgumentException>(null, format.ToString);
System\Drawing\SystemBrushesTests.cs (2)
53AssertExtensions.Throws<ArgumentException>(null, () => brush.Color = Color.Red); 61AssertExtensions.Throws<ArgumentException>(null, () => SystemBrushes.FromSystemColor(Color.Blue));
System\Drawing\SystemIconsTests.cs (1)
52Assert.Throws<ArgumentException>(() => SystemIcons.GetStockIcon((StockIconId)(-1)));
System\Drawing\SystemPensTest.cs (19)
58AssertExtensions.Throws<ArgumentException>(null, pen.Dispose); 59AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(LineCap.ArrowAnchor, LineCap.Custom, DashCap.Round)); 61AssertExtensions.Throws<ArgumentException>(null, () => pen.Alignment = PenAlignment.Center); 62AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush = null); 63AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.AliceBlue); 64AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray = null); 65AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap = null); 66AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap = null); 67AssertExtensions.Throws<ArgumentException>(null, () => pen.DashCap = DashCap.Flat); 68AssertExtensions.Throws<ArgumentException>(null, () => pen.DashStyle = DashStyle.Custom); 69AssertExtensions.Throws<ArgumentException>(null, () => pen.DashOffset = 10); 70AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = null); 71AssertExtensions.Throws<ArgumentException>(null, () => pen.EndCap = LineCap.RoundAnchor); 72AssertExtensions.Throws<ArgumentException>(null, () => pen.LineJoin = LineJoin.MiterClipped); 73AssertExtensions.Throws<ArgumentException>(null, () => pen.MiterLimit = 10); 74AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap = LineCap.RoundAnchor); 77AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform = matrix); 80AssertExtensions.Throws<ArgumentException>(null, () => pen.Width = 10); 86AssertExtensions.Throws<ArgumentException>(null, () => SystemPens.FromSystemColor(Color.Blue));
System\Drawing\Text\PrivateFontCollectionTests.cs (5)
131AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.AddFontFile(typeof(Font).Assembly.Location)); 159AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.AddMemoryFont(IntPtr.Zero, 100)); 180AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.AddMemoryFont(fontBuffer, length)); 194AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.AddMemoryFont(10, 100)); 203AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.Families);
System\Drawing\TextureBrushTests.cs (33)
258AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image)); 259AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile)); 260AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, RectangleF.Empty)); 261AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, Rectangle.Empty)); 262AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, RectangleF.Empty, null)); 263AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, Rectangle.Empty, null)); 264AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, RectangleF.Empty)); 265AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, Rectangle.Empty)); 274Assert.ThrowsAny<ArgumentException>(() => new TextureBrush(image, wrapMode)); 275Assert.ThrowsAny<ArgumentException>(() => new TextureBrush(image, wrapMode, RectangleF.Empty)); 276Assert.ThrowsAny<ArgumentException>(() => new TextureBrush(image, wrapMode, Rectangle.Empty)); 319AssertExtensions.Throws<ArgumentException>(null, brush.Clone); 329AssertExtensions.Throws<ArgumentException>(null, () => brush.Image); 384AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix)); 385AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Prepend)); 428AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix)); 429AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Prepend)); 454AssertExtensions.Throws<ArgumentException>(null, brush.ResetTransform); 504AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(10, matrixOrder)); 515AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(1)); 516AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(1, MatrixOrder.Prepend)); 568AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 2, matrixOrder)); 579AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 2)); 580AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 2, MatrixOrder.Prepend)); 609AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform = matrix); 620AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform); 621AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform = matrix); 673AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(1, 2, matrixOrder)); 684AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(1, 2)); 685AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(1, 2, MatrixOrder.Prepend)); 709Assert.ThrowsAny<ArgumentException>(() => brush.WrapMode = wrapMode); 719AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode); 720AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode = WrapMode.Tile);
System.Formats.Asn1 (91)
System\Formats\Asn1\Asn1Tag.cs (1)
359/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.BitString.cs (6)
54/// <exception cref="ArgumentException"> 139/// <exception cref="ArgumentException"> 261/// <exception cref="ArgumentException"> 709/// <exception cref="ArgumentException"> 773/// <exception cref="ArgumentException"> 829/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.Boolean.cs (2)
38/// <exception cref="ArgumentException"> 106/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.Enumerated.cs (6)
42/// <exception cref="ArgumentException"> 98/// <exception cref="ArgumentException"> 168/// <exception cref="ArgumentException"> 288/// <exception cref="ArgumentException"> 332/// <exception cref="ArgumentException"> 383/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.GeneralizedTime.cs (2)
42/// <exception cref="ArgumentException"> 425/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.Integer.cs (12)
43/// <exception cref="ArgumentException"> 93/// <exception cref="ArgumentException"> 171/// <exception cref="ArgumentException"> 237/// <exception cref="ArgumentException"> 304/// <exception cref="ArgumentException"> 363/// <exception cref="ArgumentException"> 541/// <exception cref="ArgumentException"> 578/// <exception cref="ArgumentException"> 617/// <exception cref="ArgumentException"> 656/// <exception cref="ArgumentException"> 696/// <exception cref="ArgumentException"> 735/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (6)
49/// <exception cref="ArgumentException"> 159/// <exception cref="ArgumentException"> 307/// <exception cref="ArgumentException"> 428/// <exception cref="ArgumentException"> 520/// <exception cref="ArgumentException"> 569/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.Null.cs (2)
35/// <exception cref="ArgumentException"> 84/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.OctetString.cs (6)
49/// <exception cref="ArgumentException"> 149/// <exception cref="ArgumentException"> 260/// <exception cref="ArgumentException"> 564/// <exception cref="ArgumentException"> 614/// <exception cref="ArgumentException"> 653/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.Oid.cs (2)
44/// <exception cref="ArgumentException"> 360/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.Sequence.cs (2)
44/// <exception cref="ArgumentException"> 123/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.SetOf.cs (3)
49/// <exception cref="ArgumentException"> 157/// <exception cref="ArgumentException"> 200/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.Text.cs (8)
50/// <exception cref="ArgumentException"> 129/// <exception cref="ArgumentException"> 234/// <exception cref="ArgumentException"> 306/// <exception cref="ArgumentException"> 575/// <exception cref="ArgumentException"> 634/// <exception cref="ArgumentException"> 705/// <exception cref="ArgumentException"> 765/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnDecoder.UtcTime.cs (3)
49/// <exception cref="ArgumentException"> 265/// <exception cref="ArgumentException"> 308/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.BitString.cs (1)
18/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.Boolean.cs (1)
15/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.cs (2)
548catch (ArgumentException e) 563/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.Enumerated.cs (2)
17/// <exception cref="ArgumentException"> 49/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.GeneralizedTime.cs (1)
22/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.Integer.cs (7)
17/// <exception cref="ArgumentException"> 35/// <exception cref="ArgumentException"> 54/// <exception cref="ArgumentException"> 72/// <exception cref="ArgumentException"> 78/// <exception cref="ArgumentException"> 97/// <exception cref="ArgumentException"> 103/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.NamedBitList.cs (3)
18/// <exception cref="ArgumentException"> 53/// <exception cref="ArgumentException"> 79/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.Null.cs (1)
14/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.OctetString.cs (2)
41/// <exception cref="ArgumentException"> 67/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.Oid.cs (2)
18/// <exception cref="ArgumentException"> 44/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.Sequence.cs (2)
17/// <exception cref="ArgumentException"> 37/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.SetOf.cs (2)
17/// <exception cref="ArgumentException"> 41/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.Text.cs (2)
33/// <exception cref="ArgumentException"> 66/// <exception cref="ArgumentException">
System\Formats\Asn1\AsnWriter.UtcTime.cs (2)
18/// <exception cref="ArgumentException"> 44/// <exception cref="ArgumentException">
System.Formats.Cbor (5)
System\Formats\Cbor\Writer\CborWriter.cs (2)
128/// <exception cref="ArgumentException"><para><paramref name="encodedValue" /> is not a well-formed CBOR encoding.</para> 187/// <exception cref="ArgumentException">The destination buffer is not large enough to hold the encoded value.</exception>
System\Formats\Cbor\Writer\CborWriter.String.cs (2)
100/// <exception cref="ArgumentException">The supplied string is not a valid UTF-8 encoding, which is not permitted under the current conformance mode.</exception> 115/// <exception cref="ArgumentException">The supplied string is not a valid UTF-8 encoding, which is not permitted under the current conformance mode.</exception>
System\Formats\Cbor\Writer\CborWriter.Tag.cs (1)
68/// <exception cref="ArgumentException">The <paramref name="seconds" /> parameter cannot be infinite or NaN.</exception>
System.Formats.Nrbf (4)
System\Formats\Nrbf\NrbfDecoder.cs (1)
102/// <exception cref="ArgumentException"><paramref name="payload"/> does not support reading or is already closed.</exception>
System\Formats\Nrbf\Utils\BinaryReaderExtensions.cs (3)
124catch (ArgumentException) // A surrogate character was read. 137catch (ArgumentException) // A surrogate character was read. 166catch (ArgumentException ex)
System.Formats.Tar (47)
System\Formats\Tar\GnuTarEntry.cs (2)
34/// <exception cref="ArgumentException"><para><paramref name="entryName"/> is empty.</para> 47/// <exception cref="ArgumentException"><para><paramref name="other"/> is a <see cref="PaxGlobalExtendedAttributesTarEntry"/> and cannot be converted.</para>
System\Formats\Tar\PaxTarEntry.cs (3)
36/// <exception cref="ArgumentException"><para><paramref name="entryName"/> is empty.</para> 64/// <exception cref="ArgumentException"><para><paramref name="entryName"/> is empty.</para> 79/// <exception cref="ArgumentException">
System\Formats\Tar\TarEntry.cs (9)
39ArgumentException.ThrowIfNullOrEmpty(entryName); 123/// <exception cref="ArgumentException">The specified value is empty.</exception> 133ArgumentException.ThrowIfNullOrEmpty(value); 165ArgumentException.ThrowIfNullOrEmpty(value); 190/// <exception cref="ArgumentException"><paramref name="destinationFileName"/> is empty.</exception> 202ArgumentException.ThrowIfNullOrEmpty(destinationFileName); 220/// <exception cref="ArgumentException"><paramref name="destinationFileName"/> is empty.</exception> 236ArgumentException.ThrowIfNullOrEmpty(destinationFileName); 251/// <exception cref="ArgumentException">Cannot set an unreadable stream.</exception>
System\Formats\Tar\TarFile.cs (20)
26/// <exception cref="ArgumentException"><para><paramref name="sourceDirectoryName"/> is empty.</para> 33ArgumentException.ThrowIfNullOrEmpty(sourceDirectoryName); 61/// <exception cref="ArgumentException"><para><paramref name="sourceDirectoryName"/> is empty.</para> 72ArgumentException.ThrowIfNullOrEmpty(sourceDirectoryName); 98/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName"/> or <paramref name="destinationFileName"/> is empty.</exception> 103ArgumentException.ThrowIfNullOrEmpty(sourceDirectoryName); 104ArgumentException.ThrowIfNullOrEmpty(destinationFileName); 130/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName"/> or <paramref name="destinationFileName"/> is empty.</exception> 139ArgumentException.ThrowIfNullOrEmpty(sourceDirectoryName); 140ArgumentException.ThrowIfNullOrEmpty(destinationFileName); 165/// <exception cref="ArgumentException"><para>Extracting tar entry would have resulted in a file outside the specified destination directory.</para> 174ArgumentException.ThrowIfNullOrEmpty(destinationDirectoryName); 206/// <exception cref="ArgumentException"><para>Extracting tar entry would have resulted in a file outside the specified destination directory.</para> 219ArgumentException.ThrowIfNullOrEmpty(destinationDirectoryName); 250/// <exception cref="ArgumentException"><para>Extracting tar entry would have resulted in a file outside the specified destination directory.</para> 256ArgumentException.ThrowIfNullOrEmpty(sourceFileName); 257ArgumentException.ThrowIfNullOrEmpty(destinationDirectoryName); 293/// <exception cref="ArgumentException"><para>Extracting tar entry would have resulted in a file outside the specified destination directory.</para> 303ArgumentException.ThrowIfNullOrEmpty(sourceFileName); 304ArgumentException.ThrowIfNullOrEmpty(destinationDirectoryName);
System\Formats\Tar\TarReader.cs (1)
31/// <exception cref="ArgumentException"><paramref name="archiveStream"/> does not support reading.</exception>
System\Formats\Tar\TarWriter.cs (8)
29/// <exception cref="ArgumentException"><paramref name="archiveStream"/> does not support writing.</exception> 42/// <exception cref="ArgumentException"><paramref name="archiveStream"/> is unwritable.</exception> 59/// <exception cref="ArgumentException"><paramref name="archiveStream"/> is unwritable.</exception> 137/// <exception cref="ArgumentException"><paramref name="fileName"/> or <paramref name="entryName"/> is <see langword="null"/> or empty.</exception> 157/// <exception cref="ArgumentException"><paramref name="fileName"/> or <paramref name="entryName"/> is <see langword="null"/> or empty.</exception> 227/// <exception cref="ArgumentException">The entry type is <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/> and the <see cref="TarEntry.LinkName"/> is <see langword="null"/> or empty.</exception> 275/// <exception cref="ArgumentException">The entry type is <see cref="TarEntryType.HardLink"/> or <see cref="TarEntryType.SymbolicLink"/> and the <see cref="TarEntry.LinkName"/> is <see langword="null"/> or empty.</exception> 386ArgumentException.ThrowIfNullOrEmpty(fileName);
System\Formats\Tar\UstarTarEntry.cs (2)
29/// <exception cref="ArgumentException"><para><paramref name="entryName"/> is empty.</para> 41/// <exception cref="ArgumentException"><para><paramref name="other"/> is a <see cref="PaxGlobalExtendedAttributesTarEntry"/> and cannot be converted.</para>
System\Formats\Tar\V7TarEntry.cs (2)
24/// <exception cref="ArgumentException"><para><paramref name="entryName"/> is empty.</para> 35/// <exception cref="ArgumentException"><para><paramref name="other"/> is a <see cref="PaxGlobalExtendedAttributesTarEntry"/> and cannot be converted.</para>
System.IO.Compression (14)
System\IO\Compression\ZipArchive.Async.cs (3)
57/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 60/// <exception cref="ArgumentException">The stream is already closed. -or- mode is incompatible with the capabilities of the stream.</exception> 64/// <exception cref="ArgumentException">If a Unicode encoding other than UTF-8 is specified for the <code>entryNameEncoding</code>.</exception>
System\IO\Compression\ZipArchive.cs (10)
42/// <exception cref="ArgumentException">The stream is already closed or does not support reading.</exception> 51/// <exception cref="ArgumentException">The stream is already closed. -or- mode is incompatible with the capabilities of the stream.</exception> 62/// <exception cref="ArgumentException">The stream is already closed. -or- mode is incompatible with the capabilities of the stream.</exception> 74/// <exception cref="ArgumentException">The stream is already closed. -or- mode is incompatible with the capabilities of the stream.</exception> 118/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 120/// <exception cref="ArgumentException">If a Unicode encoding other than UTF-8 is specified for the <code>entryNameEncoding</code>.</exception> 259/// <exception cref="ArgumentException">entryName is a zero-length string.</exception> 273/// <exception cref="ArgumentException">entryName is a zero-length string.</exception> 323/// <exception cref="ArgumentException">entryName is a zero-length string.</exception> 384ArgumentException.ThrowIfNullOrEmpty(entryName);
System\IO\Compression\ZipHelper.cs (1)
81catch (ArgumentException)
System.IO.Compression.Brotli (4)
System\IO\Compression\dec\BrotliStream.Decompress.cs (3)
28/// <exception cref="System.ArgumentException">The <paramref name="buffer" /> length minus the index starting point is less than <paramref name="count" />.</exception> 94/// <exception cref="System.ArgumentException">One or more of the arguments is invalid.</exception> 105/// <exception cref="System.ArgumentException"><paramref name="asyncResult" /> did not originate from a <see cref="System.IO.Compression.BrotliStream.BeginRead(byte[],int,int,System.AsyncCallback,object)" /> method on the current stream.</exception>
System\IO\Compression\enc\BrotliStream.Compress.cs (1)
108/// <exception cref="System.ArgumentException">One or more of the arguments is invalid.</exception>
System.IO.Compression.ZipFile (54)
System\IO\Compression\ZipFile.Create.Async.cs (11)
17/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace, or contains one 41/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace, 80/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace, 149/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 193/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length 237/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length 285/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length 331/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 350/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 378/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 408/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System\IO\Compression\ZipFile.Create.cs (11)
15/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace, or contains one 37/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace, 74/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace, 142/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 183/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length 225/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length 271/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length 316/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 333/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 359/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 387/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System\IO\Compression\ZipFile.Extract.Async.cs (10)
22/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace, 56/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace, 91/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace, 131/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 147/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace, 188/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 214/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.</exception> 245/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.</exception> 282/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 322/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System\IO\Compression\ZipFile.Extract.cs (10)
20/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace, 52/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace, 85/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace, 124/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 139/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace, 179/// otherwise an <see cref="ArgumentException"/> is thrown.</para> 200/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.</exception> 229/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.</exception> 264/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 302/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Async.cs (2)
26/// <exception cref="ArgumentException">sourceFileName is a zero-length string, contains only whitespace, or contains one or more 58/// <exception cref="ArgumentException">sourceFileName is a zero-length string, contains only whitespace, or contains one or more
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.cs (2)
26/// <exception cref="ArgumentException">sourceFileName is a zero-length string, contains only whitespace, or contains one or more 57/// <exception cref="ArgumentException">sourceFileName is a zero-length string, contains only whitespace, or contains one or more
System\IO\Compression\ZipFileExtensions.ZipArchive.Extract.Async.cs (2)
19/// <exception cref="ArgumentException">destinationDirectoryName is a zero-length string, contains only whitespace, 51/// <exception cref="ArgumentException">destinationDirectoryName is a zero-length string, contains only whitespace,
System\IO\Compression\ZipFileExtensions.ZipArchive.Extract.cs (2)
17/// <exception cref="ArgumentException">destinationDirectoryName is a zero-length string, contains only whitespace, 47/// <exception cref="ArgumentException">destinationDirectoryName is a zero-length string, contains only whitespace,
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.Async.cs (2)
18/// <exception cref="ArgumentException">destinationFileName is a zero-length string, contains only whitespace, or contains one or more 46/// <exception cref="ArgumentException">destinationFileName is a zero-length string, contains only whitespace,
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (2)
15/// <exception cref="ArgumentException">destinationFileName is a zero-length string, contains only whitespace, or contains one or more 43/// <exception cref="ArgumentException">destinationFileName is a zero-length string, contains only whitespace,
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
822catch (ArgumentException)
System.IO.Hashing (4)
System\IO\Hashing\NonCryptographicHashAlgorithm.cs (2)
183/// <exception cref="ArgumentException"> 245/// <exception cref="ArgumentException">
System\IO\Hashing\XxHash128.cs (1)
85/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
System\IO\Hashing\XxHash3.cs (1)
85/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (8 bytes).</exception>
System.IO.IsolatedStorage (11)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (11)
237ArgumentException.ThrowIfNullOrEmpty(path); 253ArgumentException.ThrowIfNullOrEmpty(path); 269ArgumentException.ThrowIfNullOrEmpty(path); 285ArgumentException.ThrowIfNullOrEmpty(sourceFileName); 286ArgumentException.ThrowIfNullOrEmpty(destinationFileName); 293ArgumentException.ThrowIfNullOrEmpty(sourceFileName); 294ArgumentException.ThrowIfNullOrEmpty(destinationFileName); 321ArgumentException.ThrowIfNullOrEmpty(sourceFileName); 322ArgumentException.ThrowIfNullOrEmpty(destinationFileName); 349ArgumentException.ThrowIfNullOrEmpty(sourceDirectoryName); 350ArgumentException.ThrowIfNullOrEmpty(destinationDirectoryName);
System.IO.MemoryMappedFiles (4)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (3)
63ArgumentException.ThrowIfNullOrEmpty(mapName); 189/// <exception cref="ArgumentException"> 348ArgumentException.ThrowIfNullOrEmpty(mapName);
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (1)
81catch (ArgumentException exc)
System.IO.Packaging (73)
System\IO\Packaging\ContentType.cs (6)
70/// <exception cref="ArgumentException">If the contentType string has leading or 72/// <exception cref="ArgumentException">If the contentType string invalid CR-LF characters</exception> 280/// <exception cref="ArgumentException">If the typeAndSubType parameter does not have the "/" character</exception> 302/// <exception cref="ArgumentException">If the string does not have the required "="</exception> 409/// <exception cref="ArgumentException">If the token is Empty</exception> 432/// <exception cref="ArgumentException">If the parameter value is empty</exception>
System\IO\Packaging\InternalRelationshipCollection.cs (1)
333catch (ArgumentException argEx)
System\IO\Packaging\Package.cs (10)
185/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception> 207/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception> 257/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception> 281/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception> 306/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception> 576/// <exception cref="ArgumentException">If TargetMode is TargetMode.Internal and the targetUri is an absolute Uri </exception> 577/// <exception cref="ArgumentException">If relationship is being targeted to a relationship part</exception> 598/// <exception cref="ArgumentException">If TargetMode is TargetMode.Internal and the targetUri is an absolute Uri </exception> 599/// <exception cref="ArgumentException">If relationship is being targeted to a relationship part</exception> 659/// <exception cref="ArgumentException">If parameter "relationshipType" is an empty string</exception>
System\IO\Packaging\PackagePart.cs (7)
66/// <exception cref="ArgumentException">If parameter "partUri" does not conform to the valid partUri syntax</exception> 95/// <exception cref="ArgumentException">If parameter "partUri" does not conform to the valid partUri syntax</exception> 374/// <exception cref="ArgumentException">If TargetMode is TargetMode.Internal and the targetUri is an absolute Uri </exception> 375/// <exception cref="ArgumentException">If relationship is being targeted to a relationship part</exception> 398/// <exception cref="ArgumentException">If TargetMode is TargetMode.Internal and the targetUri is an absolute Uri </exception> 399/// <exception cref="ArgumentException">If relationship is being targeted to a relationship part</exception> 463/// <exception cref="ArgumentException">If parameter "relationshipType" is an empty string</exception>
System\IO\Packaging\PackageRelationshipSelector.cs (2)
28/// <exception cref="ArgumentException">If PackageRelationshipSelectorType.Type and selection criteria is not valid relationship type</exception> 29/// <exception cref="ArgumentException">If sourceUri is not "/" to indicate the PackageRoot, then it must conform to the
System\IO\Packaging\PackUriHelper.cs (30)
31/// <exception cref="ArgumentException">If partUri parameter is an absolute Uri</exception> 32/// <exception cref="ArgumentException">If partUri parameter is empty</exception> 33/// <exception cref="ArgumentException">If partUri parameter ends with "/"</exception> 34/// <exception cref="ArgumentException">If partUri parameter starts with two "/"</exception> 35/// <exception cref="ArgumentException">If partUri parameter has a fragment</exception> 74/// <exception cref="ArgumentException">If either sourcePartUri or targetUri parameter is an absolute Uri</exception> 75/// <exception cref="ArgumentException">If sourcePartUri parameter does not conform to the valid partUri syntax</exception> 101/// <exception cref="ArgumentException">If either sourcePartUri or targetPartUri parameter does not conform to the valid partUri syntax</exception> 119/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception> 139/// <exception cref="ArgumentException">If firstPartUri or secondPartUri parameter does not conform to the valid partUri syntax</exception> 163/// <exception cref="ArgumentException">If partUri parameter is an absolute Uri</exception> 164/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri Syntax</exception> 183/// <exception cref="ArgumentException">If the input Uri is a relationship part Uri itself</exception> 185/// <exception cref="ArgumentException">If partUri parameter is an absolute Uri</exception> 186/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri Syntax</exception> 236/// <exception cref="ArgumentException">If relationshipPartUri parameter is an absolute Uri</exception> 237/// <exception cref="ArgumentException">If relationshipPartUri parameter does not conform to the valid partUri Syntax</exception> 238/// <exception cref="ArgumentException">If the relationshipPartUri is not a relationship part Uri itself</exception> 239/// <exception cref="ArgumentException">If the resultant Uri obtained is a relationship part Uri</exception> 329/// <exception cref="ArgumentException">If partUri parameter is an absolute Uri</exception> 330/// <exception cref="ArgumentException">If partUri parameter is empty</exception> 331/// <exception cref="ArgumentException">If partUri parameter does not start with a "/"</exception> 332/// <exception cref="ArgumentException">If partUri parameter starts with two "/"</exception> 333/// <exception cref="ArgumentException">If partUri parameter ends with a "/"</exception> 334/// <exception cref="ArgumentException">If partUri parameter has a fragment</exception> 335/// <exception cref="ArgumentException">If partUri parameter has some escaped characters that should not be escaped 442private static ArgumentException? GetExceptionIfAbsoluteUri(Uri uri) 457private static ArgumentException? GetExceptionIfFragmentPresent(string partName) 472private static ArgumentException? GetExceptionIfPartNameEndsWithSlash(string partName) 495private static ArgumentException? GetExceptionIfPartNameStartsWithTwoSlashes(string partName)
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (15)
30/// <exception cref="ArgumentException">If packageUri parameter is not an absolute Uri</exception> 47/// <exception cref="ArgumentException">If packageUri parameter is not an absolute Uri</exception> 48/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception> 67/// <exception cref="ArgumentException">If packageUri parameter is not an absolute Uri</exception> 68/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception> 69/// <exception cref="ArgumentException">If fragment parameter is empty or does not start with a "#"</exception> 128/// <exception cref="ArgumentException">If packUri parameter is not an absolute Uri</exception> 129/// <exception cref="ArgumentException">If packUri parameter does not have "pack://" scheme</exception> 130/// <exception cref="ArgumentException">If inner packageUri extracted from the packUri has a fragment component</exception> 151/// <exception cref="ArgumentException">If packUri parameter is not an absolute Uri</exception> 152/// <exception cref="ArgumentException">If packUri parameter does not have "pack://" scheme</exception> 153/// <exception cref="ArgumentException">If partUri extracted from packUri does not conform to the valid partUri syntax</exception> 171/// <exception cref="ArgumentException">If either of the Uris are not absolute or if either of the Uris are not with pack:// scheme</exception> 172/// <exception cref="ArgumentException">If firstPackUri or secondPackUri parameter is not an absolute Uri</exception> 173/// <exception cref="ArgumentException">If firstPackUri or secondPackUri parameter does not have "pack://" scheme</exception>
System\IO\Packaging\ZipPackage.cs (2)
34/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception> 107/// <exception cref="ArgumentException">If partUri parameter does not conform to the valid partUri syntax</exception>
System.IO.Pipes (2)
System\IO\Pipes\NamedPipeClientStream.cs (1)
60ArgumentException.ThrowIfNullOrEmpty(pipeName);
System\IO\Pipes\NamedPipeServerStream.cs (1)
95ArgumentException.ThrowIfNullOrEmpty(pipeName);
System.Linq (10)
System\Linq\Max.cs (3)
307/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception> 403/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="System.IComparable{TKey}" /> interface.</exception> 417/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System\Linq\Min.cs (3)
286/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception> 382/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="System.IComparable{TKey}" /> interface.</exception> 396/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System\Linq\ToCollection.cs (4)
81/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys.</exception> 94/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys.</exception> 116/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys.</exception> 129/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys.</exception>
System.Linq.AsyncEnumerable (12)
System\Linq\MaxAsync.cs (1)
19/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{T}" /> interface (via the returned task).</exception>
System\Linq\MaxByAsync.cs (2)
21/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 131/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System\Linq\MinAsync.cs (1)
19/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{T}" /> interface.</exception>
System\Linq\MinByAsync.cs (2)
21/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 131/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System\Linq\ToDictionaryAsync.cs (6)
23/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys (via the returned task).</exception> 57/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys (via the returned task).</exception> 75/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys (via the returned task).</exception> 114/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys (via the returned task).</exception> 157/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys (via the returned task).</exception> 203/// <exception cref="ArgumentException"><paramref name="source"/> contains one or more duplicate keys (via the returned task).</exception>
System.Linq.Expressions (165)
System\Dynamic\Utils\ContractUtils.cs (7)
34/// The parameter name to use in the <see cref="ArgumentException.ParamName"/> property when an exception is thrown. 36/// <exception cref="ArgumentException"> 56/// The parameter name to use in the <see cref="ArgumentException.ParamName"/> property when an exception is thrown. 60/// If an exception is thrown, this value is used in <see cref="ArgumentException.ParamName"/> if it's greater than or equal to 0. 82/// The parameter name to use in the <see cref="ArgumentException.ParamName"/> property when an exception is thrown. 84/// <exception cref="ArgumentException"> 103/// The parameter name to use in the <see cref="ArgumentException.ParamName"/> property when an exception is thrown.
System\Linq\Expressions\Error.cs (133)
17internal static ArgumentException ReducibleMustOverrideReduce() 24internal static ArgumentException ArgCntMustBeGreaterThanNameCnt() 45internal static ArgumentException SameKeyExistsInExpando(object? key) 73internal static ArgumentException MustReduceToDifferent() 115internal static ArgumentException ReducedNotCompatible() 122internal static ArgumentException SetterHasNoParams(string? paramName) 129internal static ArgumentException PropertyCannotHaveRefType(string? paramName) 136internal static ArgumentException IndexesOfSetGetMustMatch(string? paramName) 150internal static ArgumentException FirstArgumentMustBeCallSite() 157internal static ArgumentException AccessorsCannotHaveVarArgs(string? paramName) 164private static ArgumentException AccessorsCannotHaveByRefArgs(string? paramName) 171internal static ArgumentException AccessorsCannotHaveByRefArgs(string? paramName, int index) 178internal static ArgumentException TypeMustBeDerivedFromSystemDelegate() 192internal static ArgumentException BoundsCannotBeLessThanOne(string? paramName) 199internal static ArgumentException TypeMustNotBeByRef(string? paramName) 207internal static ArgumentException TypeMustNotBePointer(string? paramName) 215internal static ArgumentException SetterMustBeVoid(string? paramName) 223internal static ArgumentException PropertyTypeMustMatchGetter(string? paramName) 231internal static ArgumentException PropertyTypeMustMatchSetter(string? paramName) 238internal static ArgumentException BothAccessorsMustBeStatic(string? paramName) 245internal static ArgumentException OnlyStaticFieldsHaveNullInstance(string? paramName) 252internal static ArgumentException OnlyStaticPropertiesHaveNullInstance(string? paramName) 259internal static ArgumentException OnlyStaticMethodsHaveNullInstance() 266internal static ArgumentException PropertyTypeCannotBeVoid(string? paramName) 273internal static ArgumentException InvalidUnboxType(string? paramName) 280internal static ArgumentException ExpressionMustBeWriteable(string? paramName) 287internal static ArgumentException ArgumentMustNotHaveValueType(string? paramName) 294internal static ArgumentException MustBeReducible() 301internal static ArgumentException AllTestValuesMustHaveSameType(string? paramName) 308internal static ArgumentException AllCaseBodiesMustHaveSameType(string? paramName) 315internal static ArgumentException DefaultBodyMustBeSupplied(string? paramName) 322internal static ArgumentException LabelMustBeVoidOrHaveExpression(string? paramName) 329internal static ArgumentException LabelTypeMustBeVoid(string? paramName) 336internal static ArgumentException QuotedExpressionMustBeLambda(string? paramName) 343internal static ArgumentException VariableMustNotBeByRef(object? p0, object? p1, string? paramName) 350internal static ArgumentException VariableMustNotBeByRef(object? p0, object? p1, string? paramName, int index) 357private static ArgumentException DuplicateVariable(object? p0, string? paramName) 364internal static ArgumentException DuplicateVariable(object? p0, string? paramName, int index) 371internal static ArgumentException StartEndMustBeOrdered() 378internal static ArgumentException FaultCannotHaveCatchOrFinally(string? paramName) 385internal static ArgumentException TryMustHaveCatchFinallyOrFault() 392internal static ArgumentException BodyOfCatchMustHaveSameTypeAsBodyOfTry() 406internal static ArgumentException UserDefinedOperatorMustBeStatic(object? p0, string? paramName) 413internal static ArgumentException UserDefinedOperatorMustNotBeVoid(object? p0, string? paramName) 469internal static ArgumentException ArgumentTypeCannotBeVoid() 476internal static ArgumentException ArgumentMustBeArray(string? paramName) 483internal static ArgumentException ArgumentMustBeBoolean(string? paramName) 490internal static ArgumentException EqualityMustReturnBoolean(object? p0, string? paramName) 497internal static ArgumentException ArgumentMustBeFieldInfoOrPropertyInfo(string? paramName) 504private static ArgumentException ArgumentMustBeFieldInfoOrPropertyInfoOrMethod(string? paramName) 511internal static ArgumentException ArgumentMustBeFieldInfoOrPropertyInfoOrMethod(string? paramName, int index) 519private static ArgumentException ArgumentMustBeInstanceMember(string? paramName) 526internal static ArgumentException ArgumentMustBeInstanceMember(string? paramName, int index) 533private static ArgumentException ArgumentMustBeInteger(string? paramName) 540internal static ArgumentException ArgumentMustBeInteger(string? paramName, int index) 547internal static ArgumentException ArgumentMustBeArrayIndexType(string? paramName) 554internal static ArgumentException ArgumentMustBeArrayIndexType(string? paramName, int index) 561internal static ArgumentException ArgumentMustBeSingleDimensionalArrayType(string? paramName) 568internal static ArgumentException ArgumentTypesMustMatch() 575internal static ArgumentException ArgumentTypesMustMatch(string? paramName) 596internal static ArgumentException IncorrectTypeForTypeAs(object? p0, string? paramName) 618private static ArgumentException ArgumentTypeDoesNotMatchMember(object? p0, object? p1, string? paramName) 625internal static ArgumentException ArgumentTypeDoesNotMatchMember(object? p0, object? p1, string? paramName, int index) 632private static ArgumentException ArgumentMemberNotDeclOnType(object? p0, object? p1, string? paramName) 639internal static ArgumentException ArgumentMemberNotDeclOnType(object? p0, object? p1, string? paramName, int index) 647internal static ArgumentException ExpressionTypeDoesNotMatchReturn(object? p0, object? p1) 654internal static ArgumentException ExpressionTypeDoesNotMatchAssignment(object? p0, object? p1) 661internal static ArgumentException ExpressionTypeDoesNotMatchLabel(object? p0, object? p1) 668internal static ArgumentException ExpressionTypeNotInvocable(object? p0, string? paramName) 675internal static ArgumentException FieldNotDefinedForType(object? p0, object? p1) 682internal static ArgumentException InstanceFieldNotDefinedForType(object? p0, object? p1) 689internal static ArgumentException FieldInfoNotDefinedForType(object? p0, object? p1, object? p2) 696internal static ArgumentException IncorrectNumberOfIndexes() 703internal static ArgumentException IncorrectNumberOfLambdaDeclarationParameters() 711internal static ArgumentException IncorrectNumberOfMembersForGivenConstructor() 718internal static ArgumentException IncorrectNumberOfArgumentsForMembers() 725internal static ArgumentException LambdaTypeMustBeDerivedFromSystemDelegate(string? paramName) 732internal static ArgumentException MemberNotFieldOrProperty(object? p0, string? paramName) 739internal static ArgumentException MethodContainsGenericParameters(object? p0, string? paramName) 746internal static ArgumentException MethodIsGeneric(object? p0, string? paramName) 753private static ArgumentException MethodNotPropertyAccessor(object? p0, object? p1, string? paramName) 760internal static ArgumentException MethodNotPropertyAccessor(object? p0, object? p1, string? paramName, int index) 767internal static ArgumentException PropertyDoesNotHaveGetter(object? p0, string? paramName) 774internal static ArgumentException PropertyDoesNotHaveGetter(object? p0, string? paramName, int index) 781internal static ArgumentException PropertyDoesNotHaveSetter(object? p0, string? paramName) 788internal static ArgumentException PropertyDoesNotHaveAccessor(object? p0, string? paramName) 795internal static ArgumentException NotAMemberOfType(object? p0, object? p1, string? paramName) 802internal static ArgumentException NotAMemberOfType(object? p0, object? p1, string? paramName, int index) 810internal static ArgumentException NotAMemberOfAnyType(object? p0, string? paramName) 818internal static ArgumentException ParameterExpressionNotValidAsDelegate(object? p0, object? p1) 825internal static ArgumentException PropertyNotDefinedForType(object? p0, object? p1, string? paramName) 832internal static ArgumentException InstancePropertyNotDefinedForType(object? p0, object? p1, string? paramName) 839internal static ArgumentException InstancePropertyWithoutParameterNotDefinedForType(object? p0, object? p1) 846internal static ArgumentException InstancePropertyWithSpecifiedParametersNotDefinedForType(object? p0, object? p1, object? p2, string? paramName) 853internal static ArgumentException InstanceAndMethodTypeMismatch(object? p0, object? p1, object? p2) 861internal static ArgumentException TypeMissingDefaultConstructor(object? p0, string? paramName) 869internal static ArgumentException ElementInitializerMethodNotAdd(string? paramName) 876internal static ArgumentException ElementInitializerMethodNoRefOutParam(object? p0, object? p1, string? paramName) 883internal static ArgumentException ElementInitializerMethodWithZeroArgs(string? paramName) 890internal static ArgumentException ElementInitializerMethodStatic(string? paramName) 897internal static ArgumentException TypeNotIEnumerable(object? p0, string? paramName) 905internal static ArgumentException UnhandledBinary(object? p0, string? paramName) 912internal static ArgumentException UnhandledBinding() 919internal static ArgumentException UnhandledBindingType(object? p0) 927internal static ArgumentException UnhandledUnary(object? p0, string? paramName) 934internal static ArgumentException UnknownBindingType(int index) 941internal static ArgumentException UserDefinedOpMustHaveConsistentTypes(object? p0, object? p1) 948internal static ArgumentException UserDefinedOpMustHaveValidReturnType(object? p0, object? p1) 955internal static ArgumentException LogicalOperatorMustHaveBooleanOperators(object? p0, object? p1) 990internal static ArgumentException IncorrectNumberOfTypeArgsForFunc(string? paramName) 997internal static ArgumentException IncorrectNumberOfTypeArgsForAction(string? paramName) 1004internal static ArgumentException ArgumentCannotBeOfTypeVoid(string? paramName) 1170internal static ArgumentException TestValueTypeDoesNotMatchComparisonMethodParameter(object? p0, object? p1) 1177internal static ArgumentException SwitchValueTypeDoesNotMatchComparisonMethodParameter(object? p0, object? p1) 1211internal static ArgumentException NonStaticConstructorRequired(string? paramName) 1243private static ArgumentException TypeContainsGenericParameters(object? p0, string? paramName) 1251internal static ArgumentException TypeContainsGenericParameters(object? p0, string? paramName, int index) 1259internal static ArgumentException TypeIsGeneric(object? p0, string? paramName) 1267internal static ArgumentException TypeIsGeneric(object? p0, string? paramName, int index) 1275internal static ArgumentException IncorrectNumberOfConstructorArguments() 1283internal static ArgumentException ExpressionTypeDoesNotMatchMethodParameter(object? p0, object? p1, object? p2, string? paramName) 1291internal static ArgumentException ExpressionTypeDoesNotMatchMethodParameter(object? p0, object? p1, object? p2, string? paramName, int index) 1299internal static ArgumentException ExpressionTypeDoesNotMatchParameter(object? p0, object? p1, string? paramName) 1307internal static ArgumentException ExpressionTypeDoesNotMatchParameter(object? p0, object? p1, string? paramName, int index) 1323internal static ArgumentException IncorrectNumberOfMethodCallArguments(object? p0, string? paramName) 1331internal static ArgumentException ExpressionTypeDoesNotMatchConstructorParameter(object? p0, object? p1, string? paramName) 1340internal static ArgumentException ExpressionTypeDoesNotMatchConstructorParameter(object? p0, object? p1, string? paramName, int index) 1348internal static ArgumentException ExpressionMustBeReadable(string? paramName) 1356internal static ArgumentException ExpressionMustBeReadable(string? paramName, int index) 1361internal static ArgumentException InvalidArgumentValue(string? paramName) 1366internal static ArgumentException NonEmptyCollectionRequired(string? paramName) 1371internal static ArgumentException InvalidNullValue(Type? type, string? paramName) 1376internal static ArgumentException InvalidTypeException(object? value, Type? type, string? paramName)
System\Linq\Expressions\InvocationExpression.cs (8)
414/// <exception cref="ArgumentException"> 450/// <exception cref="ArgumentException"> 491/// <exception cref="ArgumentException"> 535/// <exception cref="ArgumentException"> 584/// <exception cref="ArgumentException"> 637/// <exception cref="ArgumentException"> 680/// <exception cref="ArgumentException"> 707/// <exception cref="ArgumentException">
System\Linq\Expressions\MemberInitExpression.cs (2)
144/// <exception cref="ArgumentException">The <see cref="MemberBinding.Member"/> property of an element of <paramref name="bindings"/> does not represent a member of the type that <paramref name="newExpression"/>.Type represents.</exception> 156/// <exception cref="ArgumentException">The <see cref="MemberBinding.Member"/> property of an element of <paramref name="bindings"/> does not represent a member of the type that <paramref name="newExpression"/>.Type represents.</exception>
System\Linq\Expressions\MemberListBinding.cs (4)
65/// <exception cref="ArgumentException"> 78/// <exception cref="ArgumentException"> 97/// <exception cref="ArgumentException"> 111/// <exception cref="ArgumentException">
System\Linq\Expressions\MethodCallExpression.cs (2)
1187/// <exception cref="ArgumentException"> 1407/// <exception cref="ArgumentException">
System\Linq\Expressions\UnaryExpression.cs (9)
301/// <exception cref="ArgumentException">Thrown when <paramref name="unaryType"/> does not correspond to a unary expression.</exception> 316/// <exception cref="ArgumentException">Thrown when <paramref name="unaryType"/> does not correspond to a unary expression.</exception> 469/// <exception cref="ArgumentException">Thrown when <paramref name="method"/> is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument.</exception> 504/// <exception cref="ArgumentException">Thrown when <paramref name="method"/> is not null and the method it represents returns void, is not static (Shared in Visual Basic), or does not take exactly one argument.</exception> 536/// <exception cref="ArgumentException"> 571/// <exception cref="ArgumentException"> 741/// <exception cref="ArgumentException"> 781/// <exception cref="ArgumentException"> 810/// <exception cref="ArgumentException">
System.Linq.Parallel (2)
System\Linq\ParallelEnumerable.cs (2)
343/// <exception cref="System.ArgumentException"> 376/// <exception cref="System.ArgumentException">
System.Linq.Queryable (7)
System\Linq\Queryable.cs (7)
2319/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception> 2353/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 2376/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TSource}" /> interface.</exception> 2403/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 2470/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 2493/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TSource}" /> interface.</exception> 2520/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System.Memory (6)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (4)
43/// <exception cref="ArgumentException"> 117/// <exception cref="ArgumentException"> 141/// <exception cref="ArgumentException"> 172/// <exception cref="ArgumentException">
System\Text\EncodingExtensions.cs (2)
97/// <exception cref="ArgumentException">Thrown if <paramref name="bytes"/> is not large enough to contain the encoded form of <paramref name="chars"/>.</exception> 288/// <exception cref="ArgumentException">Thrown if <paramref name="chars"/> is not large enough to contain the encoded form of <paramref name="bytes"/>.</exception>
System.Net.Http (18)
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (2)
478catch (ArgumentException) 544catch (ArgumentException)
System\Net\Http\Headers\HeaderUtilities.cs (3)
145ArgumentException.ThrowIfNullOrEmpty(value, parameterName); 155ArgumentException.ThrowIfNullOrEmpty(value, parameterName); 166ArgumentException.ThrowIfNullOrEmpty(value, parameterName);
System\Net\Http\Headers\HttpHeaders.cs (1)
1136ArgumentException.ThrowIfNullOrEmpty(name);
System\Net\Http\Headers\MediaTypeHeaderValue.cs (1)
277ArgumentException.ThrowIfNullOrEmpty(mediaType, parameterName);
System\Net\Http\Headers\UriHeaderParser.cs (1)
81catch (ArgumentException) { } // Not actually Utf-8
System\Net\Http\Headers\ViaHeaderValue.cs (1)
258ArgumentException.ThrowIfNullOrEmpty(receivedBy);
System\Net\Http\Headers\WarningHeaderValue.cs (1)
293ArgumentException.ThrowIfNullOrEmpty(agent);
System\Net\Http\HttpContent.cs (1)
144catch (ArgumentException e)
System\Net\Http\HttpMethod.cs (1)
35ArgumentException.ThrowIfNullOrWhiteSpace(method);
System\Net\Http\MultipartContent.cs (2)
46ArgumentException.ThrowIfNullOrWhiteSpace(subtype); 68ArgumentException.ThrowIfNullOrWhiteSpace(boundary);
System\Net\Http\MultipartFormDataContent.cs (3)
38ArgumentException.ThrowIfNullOrWhiteSpace(name); 46ArgumentException.ThrowIfNullOrWhiteSpace(name); 47ArgumentException.ThrowIfNullOrWhiteSpace(fileName);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (1)
336catch (ArgumentException)
System.Net.Http.Json (1)
System\Net\Http\Json\JsonHelpers.cs (1)
48catch (ArgumentException e)
System.Net.HttpListener (5)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (1)
42ArgumentException.ThrowIfNullOrWhiteSpace(subProtocol);
System\Net\HttpListenerRequest.cs (2)
83catch (ArgumentException) 99catch (ArgumentException)
System\Net\Managed\HttpRequestStream.Managed.cs (1)
196catch (IOException e) when (e.InnerException is ArgumentException || e.InnerException is InvalidOperationException)
System\Net\Managed\HttpResponseStream.Managed.cs (1)
287if (ex.InnerException is ArgumentException || ex.InnerException is InvalidOperationException)
System.Net.Mail (23)
System\Net\Mail\Attachment.cs (2)
71ArgumentException.ThrowIfNullOrEmpty(fileName); 79ArgumentException.ThrowIfNullOrEmpty(fileName);
System\Net\Mail\MailAddress.cs (2)
124ArgumentException.ThrowIfNullOrEmpty(address); 214catch (ArgumentException argEx)
System\Net\Mail\MailAddressCollection.cs (1)
21ArgumentException.ThrowIfNullOrEmpty(addresses);
System\Net\Mail\MailAddressParser.cs (1)
443catch (ArgumentException e)
System\Net\Mail\MailMessage.cs (2)
46ArgumentException.ThrowIfNullOrEmpty(from); 47ArgumentException.ThrowIfNullOrEmpty(to);
System\Net\Mail\MailPriority.cs (3)
49ArgumentException.ThrowIfNullOrEmpty(from); 50ArgumentException.ThrowIfNullOrEmpty(to); 144catch (ArgumentException)
System\Net\Mail\SmtpClient.cs (2)
124catch (ArgumentException) { } 159ArgumentException.ThrowIfNullOrEmpty(value);
System\Net\Mime\ContentDisposition.cs (1)
80ArgumentException.ThrowIfNullOrEmpty(value);
System\Net\Mime\ContentType.cs (2)
48ArgumentException.ThrowIfNullOrEmpty(contentType); 95ArgumentException.ThrowIfNullOrEmpty(value);
System\Net\Mime\HeaderCollection.cs (7)
25ArgumentException.ThrowIfNullOrEmpty(name); 35ArgumentException.ThrowIfNullOrEmpty(name); 44ArgumentException.ThrowIfNullOrEmpty(name); 72ArgumentException.ThrowIfNullOrEmpty(name); 73ArgumentException.ThrowIfNullOrEmpty(value); 93ArgumentException.ThrowIfNullOrEmpty(name); 94ArgumentException.ThrowIfNullOrEmpty(value);
System.Net.Ping (6)
System\Net\NetworkInformation\Ping.cs (6)
283/// <exception cref="ArgumentException">The <paramref name="buffer"/>'s size is greater than 65,500 bytes.</exception> 313/// <exception cref="ArgumentException">The <paramref name="buffer"/>'s size is greater than 65,500 bytes.</exception> 347/// <exception cref="ArgumentException">The <paramref name="buffer"/>'s size is greater than 65,500 bytes.</exception> 392/// <exception cref="ArgumentException">The <paramref name="buffer"/>'s size is greater than 65,500 bytes.</exception> 443/// <exception cref="ArgumentException">The <paramref name="buffer"/>'s size is greater than 65,500 bytes.</exception> 475/// <exception cref="ArgumentException">The <paramref name="buffer"/>'s size is greater than 65,500 bytes.</exception>
System.Net.Primitives (4)
System\Net\CredentialCache.cs (2)
50ArgumentException.ThrowIfNullOrEmpty(host); 147ArgumentException.ThrowIfNullOrEmpty(host);
System\Net\DnsEndPoint.cs (1)
19ArgumentException.ThrowIfNullOrEmpty(host);
System\Net\IPNetwork.cs (1)
43/// <exception cref="ArgumentException">The specified <paramref name="baseAddress"/> has non-zero bits after the network prefix.</exception>
System.Net.Quic (2)
src\libraries\Common\src\System\Net\Security\TargetHostNameHelper.cs (1)
32catch (ArgumentException) when (IsSafeDnsString(targetHost))
System\Net\Quic\QuicListener.cs (1)
171/// Propagates exceptions from <see cref="QuicListenerOptions.ConnectionOptionsCallback"/>, including validation errors from misconfigured <see cref="QuicServerConnectionOptions"/>, e.g. <see cref="ArgumentException"/>.
System.Net.Requests (6)
System\Net\FileWebRequest.cs (1)
87ArgumentException.ThrowIfNullOrEmpty(value);
System\Net\FtpControlStream.cs (1)
951catch (ArgumentException)
System\Net\FtpWebRequest.cs (3)
267ArgumentException.ThrowIfNullOrEmpty(value); 277catch (ArgumentException) 304ArgumentException.ThrowIfNullOrEmpty(value);
System\Net\HttpWebRequest.cs (1)
933ArgumentException.ThrowIfNullOrEmpty(value);
System.Net.Security (5)
src\libraries\Common\src\System\Net\Security\TargetHostNameHelper.cs (1)
32catch (ArgumentException) when (IsSafeDnsString(targetHost))
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (2)
231catch (ArgumentException e) 245catch (ArgumentException e)
System\Net\Security\TlsFrameHelper.cs (1)
781catch (ArgumentException)
System\Security\Authentication\ExtendedProtection\ServiceNameCollection.cs (1)
135ArgumentException.ThrowIfNullOrEmpty(serviceName);
System.Net.ServerSentEvents (2)
System\Net\ServerSentEvents\SseItem.cs (2)
20/// <exception cref="ArgumentException">Thrown when <paramref name="eventType"/> contains a line break.</exception> 39/// <exception cref="ArgumentException">Thrown when the value contains a line break.</exception>
System.Net.Sockets (3)
System\Net\Sockets\Socket.cs (2)
106/// <exception cref="ArgumentException"><paramref name="handle"/> is invalid.</exception> 1736/// <exception cref="ArgumentException">The <see cref="AddressFamily"/> of the <see cref="EndPoint"/> used in
System\Net\Sockets\SocketPal.Unix.cs (1)
2147exc is ArgumentException ? SocketError.InvalidArgument :
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
1122catch (ArgumentException)
System.Net.WebHeaderCollection (1)
System\Net\WebHeaderCollection.cs (1)
331ArgumentException.ThrowIfNullOrEmpty(name);
System.Net.WebSockets (1)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (1)
42ArgumentException.ThrowIfNullOrWhiteSpace(subProtocol);
System.Net.WebSockets.Client (1)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (1)
42ArgumentException.ThrowIfNullOrWhiteSpace(subProtocol);
System.Numerics.Tensors (574)
System\Numerics\Tensors\netcore\IReadOnlyTensor_1.cs (2)
55/// <exception cref="ArgumentException"><paramref name="destination" /> is shorter than the source tensor.</exception> 61/// <exception cref="ArgumentException"><paramref name="destination" /> is shorter than the source tensor.</exception>
System\Numerics\Tensors\netcore\Tensor.cs (5)
67/// <exception cref="ArgumentException">The shapes are not broadcast compatible.</exception> 4902/// <exception cref="ArgumentException">Destination is too short.</exception> 4915/// <exception cref="ArgumentException">Destination is too short.</exception> 4929/// <exception cref="ArgumentException">Destination is too short.</exception> 4942/// <exception cref="ArgumentException">Destination is too short.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Abs.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Acos.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Acosh.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.AcosPi.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Add.cs (6)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 41/// <exception cref="ArgumentException">Destination is too short.</exception> 42/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.AddMultiply.cs (13)
15/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" /> and the length of <paramref name="multiplier" />.</exception> 16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 18/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 19/// <exception cref="ArgumentException"><paramref name="multiplier"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 44/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 45/// <exception cref="ArgumentException">Destination is too short.</exception> 46/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 47/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 72/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="multiplier" />.</exception> 73/// <exception cref="ArgumentException">Destination is too short.</exception> 74/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 75/// <exception cref="ArgumentException"><paramref name="multiplier"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Asin.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Asinh.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.AsinPi.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Atan.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Atan2.cs (8)
14/// <exception cref="ArgumentException">Length of <paramref name="y" /> must be same as length of <paramref name="x" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 35/// <exception cref="ArgumentException">Destination is too short.</exception> 36/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 54/// <exception cref="ArgumentException">Destination is too short.</exception> 55/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Atan2Pi.cs (8)
14/// <exception cref="ArgumentException">Length of <paramref name="y" /> must be same as length of <paramref name="x" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 35/// <exception cref="ArgumentException">Destination is too short.</exception> 36/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 54/// <exception cref="ArgumentException">Destination is too short.</exception> 55/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Atanh.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.AtanPi.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Average.cs (1)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.BitDecrement.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.BitIncrement.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.BitwiseAnd.cs (6)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 38/// <exception cref="ArgumentException">Destination is too short.</exception> 39/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.BitwiseOr.cs (6)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 38/// <exception cref="ArgumentException">Destination is too short.</exception> 39/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Cbrt.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Ceiling.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Clamp.cs (30)
21/// <exception cref="ArgumentException">An element-wise <paramref name="min"/> is greater than <paramref name="max"/>.</exception> 22/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="min" /> and the length of <paramref name="max" />.</exception> 23/// <exception cref="ArgumentException">Destination is too short.</exception> 24/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 25/// <exception cref="ArgumentException"><paramref name="min"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 26/// <exception cref="ArgumentException"><paramref name="max"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 51/// <exception cref="ArgumentException">An element-wise <paramref name="min"/> is greater than <paramref name="max"/>.</exception> 52/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="min" />.</exception> 53/// <exception cref="ArgumentException">Destination is too short.</exception> 54/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 55/// <exception cref="ArgumentException"><paramref name="min"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 80/// <exception cref="ArgumentException">An element-wise <paramref name="min"/> is greater than <paramref name="max"/>.</exception> 81/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="max" />.</exception> 82/// <exception cref="ArgumentException">Destination is too short.</exception> 83/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 84/// <exception cref="ArgumentException"><paramref name="max"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 109/// <exception cref="ArgumentException">An element-wise <paramref name="min"/> is greater than <paramref name="max"/>.</exception> 110/// <exception cref="ArgumentException">Length of <paramref name="min" /> must be same as length of <paramref name="max" />.</exception> 111/// <exception cref="ArgumentException">Destination is too short.</exception> 112/// <exception cref="ArgumentException"><paramref name="min"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 113/// <exception cref="ArgumentException"><paramref name="max"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 138/// <exception cref="ArgumentException"><paramref name="min"/> is greater than <paramref name="max"/>.</exception> 139/// <exception cref="ArgumentException">Destination is too short.</exception> 140/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 170/// <exception cref="ArgumentException">An element-wise <paramref name="min"/> is greater than <paramref name="max"/>.</exception> 171/// <exception cref="ArgumentException">Destination is too short.</exception> 172/// <exception cref="ArgumentException"><paramref name="min"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 197/// <exception cref="ArgumentException">An element-wise <paramref name="min"/> is greater than <paramref name="max"/>.</exception> 198/// <exception cref="ArgumentException">Destination is too short.</exception> 199/// <exception cref="ArgumentException"><paramref name="max"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertChecked.cs (1)
16/// <exception cref="ArgumentException">Destination is too short.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertSaturating.cs (1)
16/// <exception cref="ArgumentException">Destination is too short.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToInteger.cs (1)
16/// <exception cref="ArgumentException">Destination is too short.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertToIntegerNative.cs (1)
16/// <exception cref="ArgumentException">Destination is too short.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertTruncating.cs (1)
16/// <exception cref="ArgumentException">Destination is too short.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.CopySign.cs (6)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="sign" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="sign"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 38/// <exception cref="ArgumentException">Destination is too short.</exception> 39/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Cos.cs (2)
15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Cosh.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.CosineSimilarity.cs (2)
16/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 17/// <exception cref="ArgumentException"><paramref name="x" /> and <paramref name="y" /> must not be empty.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.CosPi.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Decrement.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.DegreesToRadians.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Distance.cs (2)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 15/// <exception cref="ArgumentException"><paramref name="x" /> and <paramref name="y" /> must not be empty.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Divide.cs (8)
13/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 16/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 41/// <exception cref="ArgumentException">Destination is too short.</exception> 42/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 67/// <exception cref="ArgumentException">Destination is too short.</exception> 68/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.DivRem.cs (13)
15/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 16/// <exception cref="ArgumentException"><paramref name="quotientDestination"/> is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="remainderDestination"/> is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> or <paramref name="y"/> and <paramref name="quotientDestination"/> reference overlapping memory locations and do not begin at the same location.</exception> 19/// <exception cref="ArgumentException"><paramref name="x"/> or <paramref name="y"/> and <paramref name="remainderDestination"/> reference overlapping memory locations and do not begin at the same location.</exception> 38/// <exception cref="ArgumentException"><paramref name="quotientDestination"/> is too short.</exception> 39/// <exception cref="ArgumentException"><paramref name="remainderDestination"/> is too short.</exception> 40/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="quotientDestination"/> reference overlapping memory locations and do not begin at the same location.</exception> 41/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="remainderDestination"/> reference overlapping memory locations and do not begin at the same location.</exception> 60/// <exception cref="ArgumentException"><paramref name="quotientDestination"/> is too short.</exception> 61/// <exception cref="ArgumentException"><paramref name="remainderDestination"/> is too short.</exception> 62/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="quotientDestination"/> reference overlapping memory locations and do not begin at the same location.</exception> 63/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="remainderDestination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Dot.cs (1)
12/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Exp.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Exp10.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Exp10M1.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Exp2.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Exp2M1.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.ExpM1.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Floor.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.FusedMultiplyAdd.cs (13)
18/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" /> and length of <paramref name="addend" />.</exception> 19/// <exception cref="ArgumentException">Destination is too short.</exception> 20/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 21/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 22/// <exception cref="ArgumentException"><paramref name="addend"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 53/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 54/// <exception cref="ArgumentException">Destination is too short.</exception> 55/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 56/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 88/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="addend" />.</exception> 89/// <exception cref="ArgumentException">Destination is too short.</exception> 90/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 91/// <exception cref="ArgumentException"><paramref name="addend"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Half.cs (2)
18/// <exception cref="ArgumentException">Destination is too short.</exception> 36/// <exception cref="ArgumentException">Destination is too short.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.HammingDistance.cs (4)
18/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 19/// <exception cref="ArgumentException"><paramref name="x" /> and <paramref name="y" /> must not be empty.</exception> 40/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 41/// <exception cref="ArgumentException"><paramref name="x" /> and <paramref name="y" /> must not be empty.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Hypot.cs (4)
15/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 18/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Ieee754Remainder.cs (9)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 31/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 32/// <exception cref="ArgumentException">Destination is too short.</exception> 33/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 47/// <exception cref="ArgumentException">Destination is too short.</exception> 48/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.ILogB.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Increment.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsCanonical.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsComplexNumber.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsEvenInteger.cs (2)
18/// <exception cref="ArgumentException">Destination is too short.</exception> 19/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsFinite.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsImaginaryNumber.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsInfinity.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsInteger.cs (2)
16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsNaN.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsNegative.cs (2)
16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsNegativeInfinity.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsNormal.cs (2)
16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsOddInteger.cs (2)
18/// <exception cref="ArgumentException">Destination is too short.</exception> 19/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsPositive.cs (2)
16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsPositiveInfinity.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsPow2.cs (2)
16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsRealNumber.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsSubnormal.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.IsZero.cs (2)
16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.LeadingZeroCount.cs (2)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Lerp.cs (13)
16/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" /> and length of <paramref name="amount" />.</exception> 17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 19/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 20/// <exception cref="ArgumentException"><paramref name="amount"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 45/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 46/// <exception cref="ArgumentException">Destination is too short.</exception> 47/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 48/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 73/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="amount" />.</exception> 74/// <exception cref="ArgumentException">Destination is too short.</exception> 75/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 76/// <exception cref="ArgumentException"><paramref name="amount"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Log.cs (8)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 46/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 47/// <exception cref="ArgumentException">Destination is too short.</exception> 48/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 49/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 74/// <exception cref="ArgumentException">Destination is too short.</exception> 75/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Log10.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Log10P1.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Log2.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Log2P1.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.LogP1.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Max.cs (7)
17/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 43/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 44/// <exception cref="ArgumentException">Destination is too short.</exception> 45/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 46/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 75/// <exception cref="ArgumentException">Destination is too short.</exception> 76/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitude.cs (7)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 41/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 42/// <exception cref="ArgumentException">Destination is too short.</exception> 43/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 44/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 67/// <exception cref="ArgumentException">Destination is too short.</exception> 68/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.MaxMagnitudeNumber.cs (7)
15/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 42/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 43/// <exception cref="ArgumentException">Destination is too short.</exception> 44/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 45/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 75/// <exception cref="ArgumentException">Destination is too short.</exception> 76/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.MaxNumber.cs (7)
17/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 42/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 43/// <exception cref="ArgumentException">Destination is too short.</exception> 44/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 45/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 74/// <exception cref="ArgumentException">Destination is too short.</exception> 75/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Min.cs (7)
15/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 41/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 42/// <exception cref="ArgumentException">Destination is too short.</exception> 43/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 44/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 73/// <exception cref="ArgumentException">Destination is too short.</exception> 74/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitude.cs (7)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 41/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 42/// <exception cref="ArgumentException">Destination is too short.</exception> 43/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 44/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 72/// <exception cref="ArgumentException">Destination is too short.</exception> 73/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.MinMagnitudeNumber.cs (7)
15/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 42/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 43/// <exception cref="ArgumentException">Destination is too short.</exception> 44/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 45/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 75/// <exception cref="ArgumentException">Destination is too short.</exception> 76/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.MinNumber.cs (7)
17/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 42/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 43/// <exception cref="ArgumentException">Destination is too short.</exception> 44/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 45/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 74/// <exception cref="ArgumentException">Destination is too short.</exception> 75/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Multiply.cs (6)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 41/// <exception cref="ArgumentException">Destination is too short.</exception> 42/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAdd.cs (13)
15/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" /> and length of <paramref name="addend" />.</exception> 16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 18/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 19/// <exception cref="ArgumentException"><paramref name="addend"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 44/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 45/// <exception cref="ArgumentException">Destination is too short.</exception> 46/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 47/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 73/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="addend" />.</exception> 74/// <exception cref="ArgumentException">Destination is too short.</exception> 75/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 76/// <exception cref="ArgumentException"><paramref name="addend"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.MultiplyAddEstimate.cs (13)
19/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" /> and length of <paramref name="addend" />.</exception> 20/// <exception cref="ArgumentException">Destination is too short.</exception> 21/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 22/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 23/// <exception cref="ArgumentException"><paramref name="addend"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 52/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 53/// <exception cref="ArgumentException">Destination is too short.</exception> 54/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 55/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 85/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="addend" />.</exception> 86/// <exception cref="ArgumentException">Destination is too short.</exception> 87/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 88/// <exception cref="ArgumentException"><paramref name="addend"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Negate.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.OnesComplement.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.PopCount.cs (2)
31/// <exception cref="ArgumentException">Destination is too short.</exception> 32/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Pow.cs (8)
15/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 18/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 32/// <exception cref="ArgumentException">Destination is too short.</exception> 33/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 47/// <exception cref="ArgumentException">Destination is too short.</exception> 48/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Product.cs (5)
11/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 36/// <exception cref="ArgumentException">Length of both input spans must be greater than zero.</exception> 37/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="y"/> must have the same length.</exception> 68/// <exception cref="ArgumentException">Length of both input spans must be greater than zero.</exception> 69/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="y"/> must have the same length.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.RadiansToDegrees.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Reciprocal.cs (8)
15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 37/// <exception cref="ArgumentException">Destination is too short.</exception> 38/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 59/// <exception cref="ArgumentException">Destination is too short.</exception> 60/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 81/// <exception cref="ArgumentException">Destination is too short.</exception> 82/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Remainder.cs (7)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 15/// <exception cref="ArgumentException"><paramref name="destination"/> is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> or <paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 41/// <exception cref="ArgumentException"><paramref name="destination"/> is too short.</exception> 42/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 67/// <exception cref="ArgumentException"><paramref name="destination"/> is too short.</exception> 68/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.RootN.cs (2)
15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Rotate.cs (4)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 29/// <exception cref="ArgumentException">Destination is too short.</exception> 30/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (9)
17/// <exception cref="ArgumentException">Destination is too short.</exception> 18/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 39/// <exception cref="ArgumentException">Destination is too short.</exception> 40/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 85/// <exception cref="ArgumentException">Destination is too short.</exception> 86/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 100/// <exception cref="ArgumentException">Destination is too short.</exception> 101/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 103/// <exception cref="ArgumentException"><paramref name="mode"/> is invalid.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.ScaleB.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.ShiftLeft.cs (6)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 29/// <exception cref="ArgumentException">Destination is too short.</exception> 30/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 44/// <exception cref="ArgumentException">Destination is too short.</exception> 45/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Sigmoid.cs (3)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x" /> must not be empty.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Sign.cs (2)
15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Sin.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.SinCos.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="sinDestination"/> or <paramref name="cosDestination" /> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.SinCosPi.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="sinPiDestination"/> or <paramref name="cosPiDestination" /> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Sinh.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.SinPi.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.SoftMax.cs (3)
11/// <exception cref="ArgumentException">Destination is too short.</exception> 12/// <exception cref="ArgumentException"><paramref name="x" /> must not be empty.</exception> 13/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Sqrt.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.StdDev.cs (1)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Subtract.cs (8)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 41/// <exception cref="ArgumentException">Destination is too short.</exception> 42/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 66/// <exception cref="ArgumentException">Destination is too short.</exception> 67/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Tan.cs (2)
14/// <exception cref="ArgumentException">Destination is too short.</exception> 15/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Tanh.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.TanPi.cs (2)
13/// <exception cref="ArgumentException">Destination is too short.</exception> 14/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.TrailingZeroCount.cs (2)
16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Truncate.cs (2)
16/// <exception cref="ArgumentException">Destination is too short.</exception> 17/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\netcore\TensorPrimitives.Xor.cs (6)
14/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 17/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 38/// <exception cref="ArgumentException">Destination is too short.</exception> 39/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\Numerics\Tensors\TensorPrimitives.Single.cs (102)
15/// <exception cref="ArgumentException">Destination is too short.</exception> 16/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 36/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 37/// <exception cref="ArgumentException">Destination is too short.</exception> 38/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 39/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 55/// <exception cref="ArgumentException">Destination is too short.</exception> 56/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 73/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" /> and the length of <paramref name="multiplier" />.</exception> 74/// <exception cref="ArgumentException">Destination is too short.</exception> 75/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 76/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 77/// <exception cref="ArgumentException"><paramref name="multiplier"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 94/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 95/// <exception cref="ArgumentException">Destination is too short.</exception> 96/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 97/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 114/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="multiplier" />.</exception> 115/// <exception cref="ArgumentException">Destination is too short.</exception> 116/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 117/// <exception cref="ArgumentException"><paramref name="multiplier"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 132/// <exception cref="ArgumentException">Destination is too short.</exception> 133/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 157/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 158/// <exception cref="ArgumentException"><paramref name="x" /> and <paramref name="y" /> must not be empty.</exception> 179/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 180/// <exception cref="ArgumentException"><paramref name="x" /> and <paramref name="y" /> must not be empty.</exception> 213/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 214/// <exception cref="ArgumentException">Destination is too short.</exception> 215/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 216/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 232/// <exception cref="ArgumentException">Destination is too short.</exception> 233/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 249/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 274/// <exception cref="ArgumentException">Destination is too short.</exception> 275/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 361/// <exception cref="ArgumentException">Destination is too short.</exception> 362/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 384/// <exception cref="ArgumentException">Destination is too short.</exception> 385/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 407/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 425/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 426/// <exception cref="ArgumentException">Destination is too short.</exception> 427/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 428/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 448/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 467/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 468/// <exception cref="ArgumentException">Destination is too short.</exception> 469/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 470/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 484/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 502/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 503/// <exception cref="ArgumentException">Destination is too short.</exception> 504/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 505/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 525/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 544/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 545/// <exception cref="ArgumentException">Destination is too short.</exception> 546/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 547/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 567/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 568/// <exception cref="ArgumentException">Destination is too short.</exception> 569/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 570/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 586/// <exception cref="ArgumentException">Destination is too short.</exception> 587/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 605/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" /> and length of <paramref name="addend" />.</exception> 606/// <exception cref="ArgumentException">Destination is too short.</exception> 607/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 608/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 609/// <exception cref="ArgumentException"><paramref name="addend"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 626/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 627/// <exception cref="ArgumentException">Destination is too short.</exception> 628/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 629/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 647/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="addend" />.</exception> 648/// <exception cref="ArgumentException">Destination is too short.</exception> 649/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 650/// <exception cref="ArgumentException"><paramref name="addend"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 665/// <exception cref="ArgumentException">Destination is too short.</exception> 666/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 701/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be greater than zero.</exception> 725/// <exception cref="ArgumentException">Length of both input spans must be greater than zero.</exception> 726/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="y"/> must have the same length.</exception> 756/// <exception cref="ArgumentException">Length of both input spans must be greater than zero.</exception> 757/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="y"/> must have the same length.</exception> 786/// <exception cref="ArgumentException">Destination is too short.</exception> 787/// <exception cref="ArgumentException"><paramref name="x" /> must not be empty.</exception> 788/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 811/// <exception cref="ArgumentException">Destination is too short.</exception> 812/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 835/// <exception cref="ArgumentException">Destination is too short.</exception> 836/// <exception cref="ArgumentException"><paramref name="x" /> must not be empty.</exception> 837/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 871/// <exception cref="ArgumentException">Length of <paramref name="x" /> must be same as length of <paramref name="y" />.</exception> 872/// <exception cref="ArgumentException">Destination is too short.</exception> 873/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 874/// <exception cref="ArgumentException"><paramref name="y"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 890/// <exception cref="ArgumentException">Destination is too short.</exception> 891/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception> 963/// <exception cref="ArgumentException">Destination is too short.</exception> 964/// <exception cref="ArgumentException"><paramref name="x"/> and <paramref name="destination"/> reference overlapping memory locations and do not begin at the same location.</exception>
System\ThrowHelper.cs (1)
98private static ArgumentException GetArgumentException(string message)
System.Private.CoreLib (493)
src\libraries\Common\src\System\Threading\Tasks\TaskToAsyncResult.cs (4)
48/// <exception cref="ArgumentException"><paramref name="asyncResult"/> was not produced by a call to <see cref="Begin"/>.</exception> 58/// <exception cref="ArgumentException"><paramref name="asyncResult"/> was not produced by a call to <see cref="Begin"/>.</exception> 67/// <exception cref="ArgumentException"><paramref name="asyncResult"/> was not produced by a call to <see cref="Begin"/>.</exception> 85/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (6)
71/// <exception cref="ArgumentException">An element of <paramref name="innerExceptions"/> is 85/// <exception cref="ArgumentException">An element of <paramref name="innerExceptions"/> is 100/// <exception cref="ArgumentException">An element of <paramref name="innerExceptions"/> is 115/// <exception cref="ArgumentException">An element of <paramref name="innerExceptions"/> is 147/// <exception cref="ArgumentException">An element of <paramref name="innerExceptionInfos"/> is 165/// <exception cref="ArgumentException">An element of <paramref name="innerExceptionInfos"/> is
src\libraries\System.Private.CoreLib\src\System\AppContext.cs (2)
124ArgumentException.ThrowIfNullOrEmpty(switchName); 151ArgumentException.ThrowIfNullOrEmpty(switchName);
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
97ArgumentException.ThrowIfNullOrEmpty(assemblyName);
src\libraries\System.Private.CoreLib\src\System\ApplicationId.cs (1)
15ArgumentException.ThrowIfNullOrEmpty(name);
src\libraries\System.Private.CoreLib\src\System\ArgumentException.cs (2)
103/// <exception cref="ArgumentException"><paramref name="argument"/> is empty.</exception> 116/// <exception cref="ArgumentException"><paramref name="argument"/> is empty or consists only of white-space characters.</exception>
src\libraries\System.Private.CoreLib\src\System\Array.cs (3)
200/// <exception cref="ArgumentException"><para><paramref name="arrayType"/> is not an array type.</para> 235/// <exception cref="ArgumentException"><para>The lengths array is empty.</para> 283/// <exception cref="ArgumentException"><para>The <paramref name="lengths"/> and <paramref name="lowerBounds"/> arrays do not contain the same number of elements.</para>
src\libraries\System.Private.CoreLib\src\System\BitConverter.cs (13)
400/// <exception cref="ArgumentException"><paramref name="startIndex"/> equals the length of <paramref name="value"/> minus 1.</exception> 425/// <exception cref="ArgumentException"><paramref name="startIndex"/> equals the length of <paramref name="value"/> minus 1.</exception> 460/// <exception cref="ArgumentException"> 498/// <exception cref="ArgumentException"> 536/// <exception cref="ArgumentException"> 574/// <exception cref="ArgumentException"><paramref name="startIndex"/> equals the length of <paramref name="value"/> minus 1.</exception> 601/// <exception cref="ArgumentException"> 631/// <exception cref="ArgumentException"> 661/// <exception cref="ArgumentException"> 701/// <exception cref="ArgumentException"><paramref name="startIndex"/> equals the length of <paramref name="value"/> minus 1.</exception> 726/// <exception cref="ArgumentException"> 754/// <exception cref="ArgumentException"> 792/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (1)
199/// <exception cref="ArgumentException">The <paramref name="destination"/>'s length is smaller than that of the <paramref name="source"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (2)
105/// <exception cref="ArgumentException">The buffer in <paramref name="destination"/> is too small to hold the encoded output.</exception> 329/// <exception cref="ArgumentException">The buffer in <paramref name="destination"/> is too small to hold the encoded output.</exception>
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (2)
65/// <exception cref="ArgumentException">The buffer in <paramref name="destination"/> is too small to hold the encoded output.</exception> 116/// <exception cref="ArgumentException">The buffer in <paramref name="destination"/> is too small to hold the encoded output.</exception>
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (5)
130/// <exception cref="ArgumentException">The length of <paramref name="bytes"/> in bits is greater than <see cref="int.MaxValue"/>.</exception> 228/// <exception cref="ArgumentException">The length of <paramref name="values"/> in bits is greater than <see cref="int.MaxValue"/>.</exception> 362/// <exception cref="ArgumentException"><paramref name="value"/> and the current <see cref="BitArray"/> do not have the same number of elements.</exception> 373/// <exception cref="ArgumentException"><paramref name="value"/> and the current <see cref="BitArray"/> do not have the same number of elements.</exception> 384/// <exception cref="ArgumentException"><paramref name="value"/> and the current <see cref="BitArray"/> do not have the same number of elements.</exception>
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (2)
123/// <exception cref="ArgumentException"> 433/// <exception cref="ArgumentException"><paramref name="index"/> is equal to or greater than the
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\IProducerConsumerCollection.cs (2)
34/// <exception cref="ArgumentException"><paramref name="index"/> is equal to or greater than the 49/// <exception cref="ArgumentException">The <paramref name="item"/> was invalid for this collection.</exception>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\CollectionExtensions.cs (1)
163/// <exception cref="ArgumentException">The number of elements in the source <see cref="List{T}"/> is greater than the number of elements that the destination span can contain.</exception>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (1)
707/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="List{T}" />.</exception>
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (4)
275/// <exception cref="ArgumentException"> 471/// <exception cref="ArgumentException"> 665/// <exception cref="ArgumentException"> 794/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (3)
213/// <exception cref="ArgumentException"> 278/// <exception cref="ArgumentException"> 620catch (ArgumentException e)
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (2)
290/// <exception cref="ArgumentException">The length of <paramref name="bits"/> is not 4, or the representation of the decimal value in <paramref name="bits"/> is not valid.</exception> 590/// <exception cref="ArgumentException">The destination span was not long enough to store the binary representation.</exception>
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.cs (1)
48ArgumentException.ThrowIfNullOrEmpty(providerName);
src\libraries\System.Private.CoreLib\src\System\Enum.cs (34)
83/// <exception cref="ArgumentException"> 247/// <exception cref="ArgumentException"><paramref name="enumType"/> is not an <see cref="Enum"/>.</exception> 280/// <exception cref="ArgumentException"><paramref name="enumType"/> is not an <see cref="Enum"/>.</exception> 302/// <exception cref="ArgumentException"><paramref name="enumType"/> is not an <see cref="Enum"/>.</exception> 331/// <exception cref="ArgumentException"><paramref name="enumType" /> is not an enumeration type.</exception> 397/// <exception cref="ArgumentException"><paramref name="flag"/> is a different type than the current instance.</exception> 514/// <exception cref="ArgumentException"> 544/// <exception cref="ArgumentException"><paramref name="enumType"/> is not an <see cref="Enum"/>.</exception> 545/// <exception cref="ArgumentException"><paramref name="value"/> is either an empty string or only contains white space.</exception> 546/// <exception cref="ArgumentException"><paramref name="value"/> is a name, but not one of the named constants defined for the enumeration.</exception> 556/// <exception cref="ArgumentException"><paramref name="enumType"/> is not an <see cref="Enum"/>.</exception> 557/// <exception cref="ArgumentException"><paramref name="value"/> is either an empty string or only contains white space.</exception> 558/// <exception cref="ArgumentException"><paramref name="value"/> is a name, but not one of the named constants defined for the enumeration.</exception> 572/// <exception cref="ArgumentException"><paramref name="enumType"/> is not an <see cref="Enum"/>.</exception> 573/// <exception cref="ArgumentException"><paramref name="value"/> is either an empty string or only contains white space.</exception> 574/// <exception cref="ArgumentException"><paramref name="value"/> is a name, but not one of the named constants defined for the enumeration.</exception> 597/// <exception cref="ArgumentException"><paramref name="enumType"/> is not an <see cref="Enum"/>.</exception> 598/// <exception cref="ArgumentException"><paramref name="value"/> is either an empty string or only contains white space.</exception> 599/// <exception cref="ArgumentException"><paramref name="value"/> is a name, but not one of the named constants defined for the enumeration.</exception> 613/// <exception cref="ArgumentException"><typeparamref name="TEnum"/> is not an <see cref="Enum"/> type</exception> 614/// <exception cref="ArgumentException"><paramref name="value"/> does not contain enumeration information</exception> 622/// <exception cref="ArgumentException"><typeparamref name="TEnum"/> is not an <see cref="Enum"/> type</exception> 623/// <exception cref="ArgumentException"><paramref name="value"/> does not contain enumeration information</exception> 636/// <exception cref="ArgumentException"><typeparamref name="TEnum"/> is not an <see cref="Enum"/> type</exception> 637/// <exception cref="ArgumentException"><paramref name="value"/> does not contain enumeration information</exception> 658/// <exception cref="ArgumentException"><typeparamref name="TEnum"/> is not an <see cref="Enum"/> type</exception> 659/// <exception cref="ArgumentException"><paramref name="value"/> does not contain enumeration information</exception> 832/// <exception cref="ArgumentException"><typeparamref name="TEnum"/> is not an enumeration type</exception> 841/// <exception cref="ArgumentException"><typeparamref name="TEnum"/> is not an enumeration type</exception> 854/// <exception cref="ArgumentException"><typeparamref name="TEnum"/> is not an enumeration type</exception> 875/// <exception cref="ArgumentException"><typeparamref name="TEnum"/> is not an enumeration type</exception> 1619/// <exception cref="ArgumentException">The <paramref name="enumType"/> parameter is not an <see cref="Enum"/> type.</exception> 1620/// <exception cref="ArgumentException">The <paramref name="value"/> is from an enumeration that differs in type from <paramref name="enumType"/>.</exception> 1621/// <exception cref="ArgumentException">The type of <paramref name="value"/> is not an underlying type of <paramref name="enumType"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\Environment.cs (2)
136ArgumentException.ThrowIfNullOrEmpty(value); 271ArgumentException.ThrowIfNullOrEmpty(variable);
src\libraries\System.Private.CoreLib\src\System\Environment.Variables.Windows.cs (1)
118catch (ArgumentException) { }
src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (1)
604catch (ArgumentException)
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (13)
411/// <exception cref="ArgumentException"> 525/// <exception cref="ArgumentException"> 592/// <exception cref="ArgumentException"> 668/// <exception cref="ArgumentException"> 735/// <exception cref="ArgumentException"> 940/// <exception cref="ArgumentException"> 1005/// <exception cref="ArgumentException"> 1031/// <exception cref="ArgumentException"> 1314/// <exception cref="ArgumentException"> 1377/// <exception cref="ArgumentException"> 1403/// <exception cref="ArgumentException"> 1452/// <exception cref="ArgumentException"> 1486/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Utf8.cs (1)
22/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (5)
252catch (ArgumentException) 275catch (ArgumentException) 290catch (ArgumentException) 1012catch (ArgumentException) 1090catch (ArgumentException)
src\libraries\System.Private.CoreLib\src\System\Globalization\HebrewCalendar.cs (1)
573catch (ArgumentException)
src\libraries\System.Private.CoreLib\src\System\Globalization\JapaneseCalendar.cs (1)
93catch (ArgumentException e)
src\libraries\System.Private.CoreLib\src\System\Globalization\KoreanCalendar.cs (1)
49catch (ArgumentException e)
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (3)
261ArgumentException.ThrowIfNullOrEmpty(value); 565ArgumentException.ThrowIfNullOrEmpty(value); 682ArgumentException.ThrowIfNullOrEmpty(value);
src\libraries\System.Private.CoreLib\src\System\Globalization\TaiwanCalendar.cs (1)
50catch (ArgumentException e)
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
429/// <exception cref="ArgumentException">Thrown when <paramref name="obj"/> is not of type <see cref="Half"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\IComparable.cs (1)
38/// <exception cref="ArgumentException"><paramref name="obj" /> is not the same type as this instance.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (1)
236catch (ArgumentException e)
src\libraries\System.Private.CoreLib\src\System\IO\Directory.cs (8)
18ArgumentException.ThrowIfNullOrEmpty(path); 30ArgumentException.ThrowIfNullOrEmpty(path); 61/// <exception cref="ArgumentException"><paramref name="prefix" /> contains a directory separator.</exception> 93catch (ArgumentException) { } 264ArgumentException.ThrowIfNullOrEmpty(path); 271ArgumentException.ThrowIfNullOrEmpty(sourceDirName); 272ArgumentException.ThrowIfNullOrEmpty(destDirName); 301/// <exception cref="ArgumentException"><paramref name="path"/> or <paramref name="pathToTarget"/> is empty.
src\libraries\System.Private.CoreLib\src\System\IO\Directory.Unix.cs (1)
13ArgumentException.ThrowIfNullOrEmpty(path);
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (1)
208ArgumentException.ThrowIfNullOrEmpty(destDirName);
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerableFactory.cs (1)
19/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (21)
53ArgumentException.ThrowIfNullOrEmpty(sourceFileName); 54ArgumentException.ThrowIfNullOrEmpty(destFileName); 114catch (ArgumentException) { } 645/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 677/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 749/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 761ArgumentException.ThrowIfNullOrEmpty(path); 775/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 799/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 811ArgumentException.ThrowIfNullOrEmpty(path); 828/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 846/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 850ArgumentException.ThrowIfNullOrEmpty(path); 956/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 988/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 1049ArgumentException.ThrowIfNullOrEmpty(sourceFileName); 1050ArgumentException.ThrowIfNullOrEmpty(destFileName); 1275/// <exception cref="ArgumentException"><paramref name="path"/> is empty.</exception> 1279ArgumentException.ThrowIfNullOrEmpty(path); 1421/// <exception cref="ArgumentException"><paramref name="path"/> or <paramref name="pathToTarget"/> is empty. 1456ArgumentException.ThrowIfNullOrEmpty(path);
src\libraries\System.Private.CoreLib\src\System\IO\FileInfo.cs (2)
93ArgumentException.ThrowIfNullOrEmpty(destFileName); 155ArgumentException.ThrowIfNullOrEmpty(destFileName);
src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (1)
184ArgumentException.ThrowIfNullOrEmpty(path);
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.cs (1)
24ArgumentException.ThrowIfNullOrEmpty(path, argName);
src\libraries\System.Private.CoreLib\src\System\IO\FileSystemInfo.cs (1)
153/// <exception cref="ArgumentException"><paramref name="pathToTarget"/> is empty.
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (1)
105catch (Exception ex) when (ex is ArgumentException or IOException or UnauthorizedAccessException)
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (1)
28ArgumentException.ThrowIfNullOrEmpty(path);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (2)
57(e is ArgumentException && e is not ArgumentNullException); 61ArgumentException.ThrowIfNullOrEmpty(path);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (2)
217ArgumentException.ThrowIfNullOrEmpty(path); 229ArgumentException.ThrowIfNullOrEmpty(path);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (2)
174ArgumentException.ThrowIfNullOrEmpty(path); 186ArgumentException.ThrowIfNullOrEmpty(path);
src\libraries\System.Private.CoreLib\src\System\Memory.cs (2)
359/// <exception cref="ArgumentException"> 379/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (14)
3918/// <exception cref="ArgumentException"> 3934/// <exception cref="ArgumentException"> 4309/// <exception cref="ArgumentException"> 4347/// <exception cref="ArgumentException"> 4369/// <exception cref="ArgumentException"> 4397/// <exception cref="ArgumentException"> 4577/// <exception cref="ArgumentException">The <paramref name="destination"/> span was shorter than the <paramref name="source"/> span.</exception> 4578/// <exception cref="ArgumentException">The <paramref name="source"/> and <paramref name="destination"/> were overlapping but not referring to the same starting location.</exception> 4661/// <exception cref="ArgumentException">The <paramref name="destination"/> span was shorter than the <paramref name="source"/> span.</exception> 4662/// <exception cref="ArgumentException">The <paramref name="source"/> and <paramref name="destination"/> were overlapping but not referring to the same starting location.</exception> 4767/// <exception cref="ArgumentException">The <paramref name="destination"/> span was shorter than the <paramref name="source"/> span.</exception> 4768/// <exception cref="ArgumentException"> 4817/// <exception cref="ArgumentException">The <paramref name="destination"/> span was shorter than the <paramref name="source"/> span.</exception> 4818/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Numerics\INumber.cs (2)
24/// <exception cref="ArgumentException"><paramref name="min" /> is greater than <paramref name="max" />.</exception> 45/// <exception cref="ArgumentException"><paramref name="min" /> is greater than <paramref name="max" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Numerics\INumberBase.cs (6)
280/// <exception cref="ArgumentException"><paramref name="style" /> is not a supported <see cref="NumberStyles" /> value.</exception> 291/// <exception cref="ArgumentException"><paramref name="style" /> is not a supported <see cref="NumberStyles" /> value.</exception> 301/// <exception cref="ArgumentException"><paramref name="style" /> is not a supported <see cref="NumberStyles" /> value.</exception> 419/// <exception cref="ArgumentException"><paramref name="style" /> is not a supported <see cref="NumberStyles" /> value.</exception> 428/// <exception cref="ArgumentException"><paramref name="style" /> is not a supported <see cref="NumberStyles" /> value.</exception> 437/// <exception cref="ArgumentException"><paramref name="style" /> is not a supported <see cref="NumberStyles" /> value.</exception>
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector_1.cs (4)
625/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</exception> 643/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</exception> 665/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <c>sizeof(<see cref="Vector{T}" />)</c>.</exception> 681/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector{T}.Count" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector2.cs (3)
962/// <exception cref="ArgumentException">The number of elements in the current instance is greater than in the array.</exception> 982/// <exception cref="ArgumentException">The number of elements in the current instance is greater than in the array.</exception> 1007/// <exception cref="ArgumentException">If number of elements in source vector is greater than those available in destination span.</exception>
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector3.cs (3)
975/// <exception cref="ArgumentException">The number of elements in the current instance is greater than in the array.</exception> 995/// <exception cref="ArgumentException">The number of elements in the current instance is greater than in the array.</exception> 1020/// <exception cref="ArgumentException">If number of elements in source vector is greater than those available in destination span.</exception>
src\libraries\System.Private.CoreLib\src\System\Numerics\Vector4.cs (3)
1054/// <exception cref="ArgumentException">The number of elements in the current instance is greater than in the array.</exception> 1063/// <exception cref="ArgumentException">The number of elements in the current instance is greater than in the array.</exception> 1072/// <exception cref="ArgumentException">If number of elements in source vector is greater than those available in destination span.</exception>
src\libraries\System.Private.CoreLib\src\System\Random.cs (4)
188/// <exception cref="ArgumentException"><paramref name="choices" /> is empty.</exception> 298/// <exception cref="ArgumentException"><paramref name="choices" /> is empty.</exception> 320/// <exception cref="ArgumentException"><paramref name="choices" /> is empty.</exception> 385/// <exception cref="ArgumentException"><paramref name="choices" /> is empty.</exception>
src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (2)
281/// <exception cref="ArgumentException"> 301/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (2)
95/// <exception cref="ArgumentException"> 303/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyName.cs (1)
35ArgumentException.ThrowIfNullOrEmpty(assemblyName);
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (3)
46/// <exception cref="ArgumentException"> 101/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\AssemblyBuilder.cs (2)
22ArgumentException.ThrowIfNullOrEmpty(name); 31ArgumentException.ThrowIfNullOrEmpty(name);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (2)
199/// <exception cref="ArgumentException"><paramref name="document"/> is not valid.</exception> 244/// <exception cref="ArgumentException"><paramref name="document"/> is not valid.</exception>
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ModuleBuilder.cs (6)
24ArgumentException.ThrowIfNullOrEmpty(name); 53ArgumentException.ThrowIfNullOrEmpty(url); 81ArgumentException.ThrowIfNullOrEmpty(name); 129ArgumentException.ThrowIfNullOrEmpty(name); 145ArgumentException.ThrowIfNullOrEmpty(name); 162ArgumentException.ThrowIfNullOrEmpty(methodName);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (9)
64ArgumentException.ThrowIfNullOrEmpty(name); 77ArgumentException.ThrowIfNullOrEmpty(fieldName); 123ArgumentException.ThrowIfNullOrEmpty(name); 165ArgumentException.ThrowIfNullOrEmpty(name); 184ArgumentException.ThrowIfNullOrEmpty(name); 211ArgumentException.ThrowIfNullOrEmpty(name); 212ArgumentException.ThrowIfNullOrEmpty(dllName); 213ArgumentException.ThrowIfNullOrEmpty(entryName); 246ArgumentException.ThrowIfNullOrEmpty(name);
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (3)
48/// <exception cref="ArgumentException"> 129/// <exception cref="ArgumentException"> 236/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (1)
147catch (ArgumentException e)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConditionalWeakTable.cs (1)
67/// <exception cref="ArgumentException"><paramref name="key"/> is already entered into the dictionary.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (1)
150/// <exception cref="ArgumentException"><paramref name="fldHandle"/> does not refer to a field which is an Rva, is misaligned, or T is of an invalid type.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TypeForwardedFromAttribute.cs (1)
11ArgumentException.ThrowIfNullOrEmpty(assemblyFullName);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (1)
1432/// the call to <see cref="GetOrCreateComInterfaceForObject(object, CreateComInterfaceFlags)"/> will throw a <see cref="ArgumentException"/>.
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (4)
255/// <exception cref="ArgumentException">When <typeparamref name="T"/> does not directly correspond to a <see cref="VarEnum"/> variant type.</exception> 379/// <exception cref="ArgumentException">When the provided <paramref name="vt"/> corresponds to a variant type that is not supported in VARIANTs or is <see cref="VarEnum.VT_DECIMAL"/></exception> 443/// <exception cref="ArgumentException">When <typeparamref name="T"/> does not match the <see cref="VarType"/> of the <see cref="ComVariant"/>.</exception> 571/// <exception cref="ArgumentException"><typeparamref name="T"/> is <see cref="decimal"/> or larger than the storage space in an <see cref="ComVariant"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\MemoryMarshal.cs (6)
23/// <exception cref="ArgumentException"> 46/// <exception cref="ArgumentException"> 110/// <exception cref="ArgumentException"> 165/// <exception cref="ArgumentException"> 250/// <exception cref="ArgumentException">The string is longer than <see cref="int.MaxValue"/>.</exception> 260/// <exception cref="ArgumentException">The string is longer than <see cref="int.MaxValue"/>.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (3)
81/// <exception cref="ArgumentException">If assembly is not a RuntimeAssembly</exception> 118/// <exception cref="ArgumentException">If assembly is not a RuntimeAssembly</exception> 200/// <exception cref="ArgumentException">If a resolver is already set for this assembly</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeMemory.Unix.cs (2)
16/// <exception cref="ArgumentException"><paramref name="alignment" /> is not a power of two.</exception> 76/// <exception cref="ArgumentException"><paramref name="alignment" /> is not a power of two.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (6)
631/// <exception cref="ArgumentException"> 661/// <exception cref="ArgumentException"> 679/// <exception cref="ArgumentException"> 727/// <exception cref="ArgumentException"> 744/// <exception cref="ArgumentException"> 778/// <exception cref="ArgumentException"><paramref name="obj" /> is not a <see cref="NFloat" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\OSPlatform.cs (1)
22ArgumentException.ThrowIfNullOrEmpty(osPlatform);
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\ISimdVector_2.cs (3)
181/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Count" />.</exception> 190/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Count" />.</exception> 199/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Count" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\SimdVectorExtensions.cs (3)
15/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="ISimdVector{TVector, T}.Count" />.</exception> 30/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="ISimdVector{TVector, T}.Count" />.</exception> 45/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="ISimdVector{TVector, T}.Count" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector128.cs (3)
666/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</exception> 687/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</exception> 713/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector128{T}.Count" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector256.cs (3)
682/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector256{T}.Count" />.</exception> 703/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector256{T}.Count" />.</exception> 729/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector256{T}.Count" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector512.cs (3)
595/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector512{T}.Count" />.</exception> 615/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector512{T}.Count" />.</exception> 640/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector512{T}.Count" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\Intrinsics\Vector64.cs (3)
632/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector64{T}.Count" />.</exception> 653/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector64{T}.Count" />.</exception> 679/// <exception cref="ArgumentException">The length of <paramref name="destination" /> is less than <see cref="Vector64{T}.Count" />.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (2)
440ArgumentException.ThrowIfNullOrEmpty(unmanagedDllPath); 644ArgumentException.ThrowIfNullOrEmpty(requestedSimpleName, "AssemblyName.Name");
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\FrameworkName.cs (2)
97ArgumentException.ThrowIfNullOrEmpty(identifier); 111ArgumentException.ThrowIfNullOrEmpty(frameworkName);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (1)
149/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Span.cs (2)
100/// <exception cref="ArgumentException"> 321/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\String.cs (1)
434/// <exception cref="ArgumentException">The destination span is shorter than the source string.</exception>
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (2)
1208ArgumentException.ThrowIfNullOrEmpty(oldValue); 1329ArgumentException.ThrowIfNullOrEmpty(oldValue);
src\libraries\System.Private.CoreLib\src\System\StringNormalizationExtensions.cs (3)
43/// <exception cref="ArgumentException">The specified character span contains an invalid code point or the normalization form is invalid.</exception> 79/// <exception cref="ArgumentException">The specified character span contains an invalid code point or the normalization form is invalid.</exception> 89/// <exception cref="ArgumentException">The specified character span contains an invalid code point or the normalization form is invalid.</exception>
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.Internal.cs (12)
166/// <exception cref="ArgumentException"> 220/// <exception cref="ArgumentException"> 251/// <exception cref="ArgumentException"> 306/// <exception cref="ArgumentException"> 484/// <exception cref="ArgumentException"> 517/// <exception cref="ArgumentException"> 761/// <exception cref="ArgumentException"> 814/// <exception cref="ArgumentException"> 845/// <exception cref="ArgumentException"> 906/// <exception cref="ArgumentException"> 1080/// <exception cref="ArgumentException"> 1113/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (2)
748/// <exception cref="ArgumentException"> 766/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (1)
2065ArgumentException.ThrowIfNullOrEmpty(oldValue);
src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (4)
145/// <exception cref="ArgumentException"> 173/// <exception cref="ArgumentException"> 215/// <exception cref="ArgumentException"> 253/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (8)
104/// <exception cref="ArgumentException"> 122/// <exception cref="ArgumentException"> 145/// <exception cref="ArgumentException"> 169/// <exception cref="ArgumentException"> 192/// <exception cref="ArgumentException"> 210/// <exception cref="ArgumentException"> 234/// <exception cref="ArgumentException"> 261/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (32)
1344/// <exception cref="ArgumentException">The exception that is thrown when the 1346/// <exception cref="ArgumentException">The exception that is thrown when the 1369/// <exception cref="ArgumentException">The exception that is thrown when the 1371/// <exception cref="ArgumentException">The exception that is thrown when the 1398/// <exception cref="ArgumentException">The exception that is thrown when the 1400/// <exception cref="ArgumentException">The exception that is thrown when the 1439/// <exception cref="ArgumentException">The exception that is thrown when the 1441/// <exception cref="ArgumentException">The exception that is thrown when the 1475/// <exception cref="ArgumentException">The exception that is thrown when the 1477/// <exception cref="ArgumentException">The exception that is thrown when the 1501/// <exception cref="ArgumentException">The exception that is thrown when the 1503/// <exception cref="ArgumentException">The exception that is thrown when the 1532/// <exception cref="ArgumentException">The exception that is thrown when the 1534/// <exception cref="ArgumentException">The exception that is thrown when the 1575/// <exception cref="ArgumentException">The exception that is thrown when the 1577/// <exception cref="ArgumentException">The exception that is thrown when the 1714/// <exception cref="ArgumentException">The exception that is thrown when the 1716/// <exception cref="ArgumentException">The exception that is thrown when the 1739/// <exception cref="ArgumentException">The exception that is thrown when the 1741/// <exception cref="ArgumentException">The exception that is thrown when the 1768/// <exception cref="ArgumentException">The exception that is thrown when the 1770/// <exception cref="ArgumentException">The exception that is thrown when the 1809/// <exception cref="ArgumentException">The exception that is thrown when the 1811/// <exception cref="ArgumentException">The exception that is thrown when the 1845/// <exception cref="ArgumentException">The exception that is thrown when the 1847/// <exception cref="ArgumentException">The exception that is thrown when the 1871/// <exception cref="ArgumentException">The exception that is thrown when the 1873/// <exception cref="ArgumentException">The exception that is thrown when the 1902/// <exception cref="ArgumentException">The exception that is thrown when the 1904/// <exception cref="ArgumentException">The exception that is thrown when the 1945/// <exception cref="ArgumentException">The exception that is thrown when the 1947/// <exception cref="ArgumentException">The exception that is thrown when the
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (25)
4757/// <exception cref="ArgumentException"> 4805/// <exception cref="ArgumentException"> 4843/// <exception cref="ArgumentException"> 4888/// <exception cref="ArgumentException"> 4921/// <exception cref="ArgumentException">The <paramref name="tasks"/> argument contains a null element.</exception> 5178/// <exception cref="ArgumentException"> 5206/// <exception cref="ArgumentException"> 5241/// <exception cref="ArgumentException"> 5270/// <exception cref="ArgumentException"> 5303/// <exception cref="ArgumentException"> 5926/// <exception cref="ArgumentException"> 5992/// <exception cref="ArgumentException"> 6026/// <exception cref="ArgumentException">The <paramref name="tasks"/> array contained a null task.</exception> 6232/// <exception cref="ArgumentException"> 6315/// <exception cref="ArgumentException"> 6353/// <exception cref="ArgumentException"> 6505/// <exception cref="ArgumentException"> 6524/// <exception cref="ArgumentException"> 6539/// <exception cref="ArgumentException"> 6697/// <exception cref="ArgumentException"> 6713/// <exception cref="ArgumentException"> 6791/// <exception cref="ArgumentException"> 6811/// <exception cref="ArgumentException"> 6845/// <exception cref="ArgumentException"> 6861/// <exception cref="ArgumentException"><paramref name="tasks"/> contains a null.</exception>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (5)
98/// <exception cref="ArgumentException">There are one or more null elements in <paramref name="exceptions"/>.</exception> 153/// <exception cref="ArgumentException">There are one or more null elements in <paramref name="exceptions"/>.</exception> 154/// <exception cref="ArgumentException">The <paramref name="exceptions"/> collection is empty.</exception> 294/// <exception cref="ArgumentException"><paramref name="completedTask"/> is not completed.</exception> 317/// <exception cref="ArgumentException"><paramref name="completedTask"/> is not completed.</exception>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (5)
98/// <exception cref="ArgumentException">There are one or more null elements in <paramref name="exceptions"/>.</exception> 153/// <exception cref="ArgumentException">There are one or more null elements in <paramref name="exceptions"/>.</exception> 154/// <exception cref="ArgumentException">The <paramref name="exceptions"/> collection is empty.</exception> 296/// <exception cref="ArgumentException"><paramref name="completedTask"/> is not completed.</exception> 319/// <exception cref="ArgumentException"><paramref name="completedTask"/> is not completed.</exception>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (64)
1694/// <exception cref="ArgumentException">The exception that is thrown when the 1696/// <exception cref="ArgumentException">The exception that is thrown when the 1719/// <exception cref="ArgumentException">The exception that is thrown when the 1721/// <exception cref="ArgumentException">The exception that is thrown when the 1748/// <exception cref="ArgumentException">The exception that is thrown when the 1750/// <exception cref="ArgumentException">The exception that is thrown when the 1789/// <exception cref="ArgumentException">The exception that is thrown when the 1791/// <exception cref="ArgumentException">The exception that is thrown when the 1825/// <exception cref="ArgumentException">The exception that is thrown when the 1827/// <exception cref="ArgumentException">The exception that is thrown when the 1852/// <exception cref="ArgumentException">The exception that is thrown when the 1854/// <exception cref="ArgumentException">The exception that is thrown when the 1883/// <exception cref="ArgumentException">The exception that is thrown when the 1885/// <exception cref="ArgumentException">The exception that is thrown when the 1926/// <exception cref="ArgumentException">The exception that is thrown when the 1928/// <exception cref="ArgumentException">The exception that is thrown when the 1965/// <exception cref="ArgumentException">The exception that is thrown when the 1967/// <exception cref="ArgumentException">The exception that is thrown when the 1995/// <exception cref="ArgumentException">The exception that is thrown when the 1997/// <exception cref="ArgumentException">The exception that is thrown when the 2028/// <exception cref="ArgumentException">The exception that is thrown when the 2030/// <exception cref="ArgumentException">The exception that is thrown when the 2073/// <exception cref="ArgumentException">The exception that is thrown when the 2075/// <exception cref="ArgumentException">The exception that is thrown when the 2114/// <exception cref="ArgumentException">The exception that is thrown when the 2116/// <exception cref="ArgumentException">The exception that is thrown when the 2144/// <exception cref="ArgumentException">The exception that is thrown when the 2146/// <exception cref="ArgumentException">The exception that is thrown when the 2179/// <exception cref="ArgumentException">The exception that is thrown when the 2181/// <exception cref="ArgumentException">The exception that is thrown when the 2226/// <exception cref="ArgumentException">The exception that is thrown when the 2228/// <exception cref="ArgumentException">The exception that is thrown when the 2410/// <exception cref="ArgumentException">The exception that is thrown when the 2412/// <exception cref="ArgumentException">The exception that is thrown when the 2435/// <exception cref="ArgumentException">The exception that is thrown when the 2437/// <exception cref="ArgumentException">The exception that is thrown when the 2464/// <exception cref="ArgumentException">The exception that is thrown when the 2466/// <exception cref="ArgumentException">The exception that is thrown when the 2505/// <exception cref="ArgumentException">The exception that is thrown when the 2507/// <exception cref="ArgumentException">The exception that is thrown when the 2545/// <exception cref="ArgumentException">The exception that is thrown when the 2547/// <exception cref="ArgumentException">The exception that is thrown when the 2574/// <exception cref="ArgumentException">The exception that is thrown when the 2576/// <exception cref="ArgumentException">The exception that is thrown when the 2607/// <exception cref="ArgumentException">The exception that is thrown when the 2609/// <exception cref="ArgumentException">The exception that is thrown when the 2652/// <exception cref="ArgumentException">The exception that is thrown when the 2654/// <exception cref="ArgumentException">The exception that is thrown when the 2692/// <exception cref="ArgumentException">The exception that is thrown when the 2694/// <exception cref="ArgumentException">The exception that is thrown when the 2722/// <exception cref="ArgumentException">The exception that is thrown when the 2724/// <exception cref="ArgumentException">The exception that is thrown when the 2757/// <exception cref="ArgumentException">The exception that is thrown when the 2759/// <exception cref="ArgumentException">The exception that is thrown when the 2804/// <exception cref="ArgumentException">The exception that is thrown when the 2806/// <exception cref="ArgumentException">The exception that is thrown when the 2841/// <exception cref="ArgumentException">The exception that is thrown when the 2843/// <exception cref="ArgumentException">The exception that is thrown when the 2867/// <exception cref="ArgumentException">The exception that is thrown when the 2869/// <exception cref="ArgumentException">The exception that is thrown when the 2898/// <exception cref="ArgumentException">The exception that is thrown when the 2900/// <exception cref="ArgumentException">The exception that is thrown when the 2941/// <exception cref="ArgumentException">The exception that is thrown when the 2943/// <exception cref="ArgumentException">The exception that is thrown when the
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Unix.cs (2)
50/// <exception cref="ArgumentException"> 197/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (5)
307private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 718private static ArgumentException GetArgumentException(ExceptionResource resource) 728private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 733private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType) 748private static ArgumentException GetArgumentException(ExceptionResource resource, ExceptionArgument argument)
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
682/// <exception cref="ArgumentException">
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.AdjustmentRule.cs (1)
257catch (ArgumentException e)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (2)
1134catch (ArgumentException e) 2159ArgumentException.ThrowIfNullOrEmpty(id);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.StringSerializer.cs (4)
112catch (ArgumentException ex) 483catch (ArgumentException e) 550catch (ArgumentException e) 564catch (ArgumentException e)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.TransitionTime.cs (1)
122catch (ArgumentException e)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (2)
333catch (ArgumentException) { } 340catch (ArgumentException) { }
src\libraries\System.Private.CoreLib\src\System\Type.cs (2)
268/// <exception cref="ArgumentException"><paramref name="member"/> does not match a member on the current <see cref="Type"/>.</exception> 288private protected static ArgumentException CreateGetMemberWithSameMetadataDefinitionAsNotFoundException(MemberInfo member) =>
src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
310/// <exception cref="ArgumentException"><paramref name="utf8Text" /> has fewer than two or more than four version components.</exception>
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\AssemblyNameInfo.cs (1)
203/// <exception cref="ArgumentException">Provided assembly name was invalid.</exception>
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (1)
512/// <exception cref="ArgumentException">Provided type name was invalid.</exception>
src\System\Reflection\Emit\RuntimeILGenerator.cs (1)
1202ArgumentException.ThrowIfNullOrEmpty(usingNamespace);
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (1)
64ArgumentException.ThrowIfNullOrEmpty(name);
src\System\Reflection\Emit\RuntimePropertyBuilder.cs (1)
36ArgumentException.ThrowIfNullOrEmpty(name);
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (1)
472ArgumentException.ThrowIfNullOrEmpty(name);
src\System\Reflection\Metadata\MetadataUpdater.cs (1)
33/// <exception cref="ArgumentException">The assembly argument is not a runtime assembly.</exception>
src\System\Reflection\RuntimeAssembly.cs (1)
240ArgumentException.ThrowIfNullOrEmpty(name);
src\System\Reflection\RuntimeModule.cs (1)
397ArgumentException.ThrowIfNullOrEmpty(className);
src\System\Reflection\TypeNameResolver.CoreCLR.cs (1)
114ArgumentException.ThrowIfNullOrEmpty(typeName);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (2)
555/// <exception cref="ArgumentException">The specified type cannot have a boxed instance of itself created.</exception> 574/// <exception cref="ArgumentException">The passed-in type is not a valid type to get the size of.</exception>
src\System\Runtime\InteropServices\ComWrappers.CoreCLR.cs (1)
79catch (ArgumentException)
src\System\RuntimeType.ActivatorCache.cs (1)
65case ArgumentException: throw new ArgumentException(friendlyMessage);
src\System\Threading\Mutex.CoreCLR.Unix.cs (1)
72ArgumentException.ThrowIfNullOrEmpty(name);
System.Private.DataContractSerialization (40)
System\Runtime\Serialization\DateTimeOffsetAdapter.cs (1)
56catch (ArgumentException exception)
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (4)
176catch (Exception exception) when (exception is ArgumentException or FormatException or OverflowException) 198catch (ArgumentException exception) 273catch (ArgumentException exception) 306catch (ArgumentException exception)
System\Runtime\Serialization\Json\XmlJsonReader.cs (3)
691catch (Exception exception) when (exception is ArgumentException or FormatException or OverflowException) 709catch (Exception exception) when (exception is ArgumentException or FormatException or OverflowException) 948catch (Exception exception) when (exception is ArgumentException or FormatException or OverflowException)
System\Runtime\Serialization\XmlReaderDelegator.cs (5)
486catch (ArgumentException exception) 687catch (ArgumentException exception) 708catch (ArgumentException exception) 732catch (ArgumentException exception) 749catch (ArgumentException exception)
System\Xml\XmlBaseWriter.cs (2)
540ArgumentException.ThrowIfNullOrEmpty(localName); 830ArgumentException.ThrowIfNullOrEmpty(localName);
System\Xml\XmlBufferReader.cs (2)
429catch (ArgumentException exception) 451catch (ArgumentException exception)
System\Xml\XmlConverter.cs (13)
43catch (ArgumentException exception) 72catch (ArgumentException exception) 100catch (ArgumentException exception) 128catch (ArgumentException exception) 156catch (ArgumentException exception) 184catch (ArgumentException exception) 209catch (ArgumentException exception) 221catch (ArgumentException exception) 245catch (ArgumentException exception) 266catch (ArgumentException exception) 295catch (ArgumentException exception) 316catch (ArgumentException exception) 934catch (ArgumentException)
System\Xml\XmlDictionaryReader.cs (10)
836catch (ArgumentException exception) 867catch (ArgumentException exception) 898catch (ArgumentException exception) 1661catch (ArgumentException exception) 1682catch (ArgumentException exception) 1702catch (ArgumentException exception) 1722catch (ArgumentException exception) 1742catch (ArgumentException exception) 1762catch (ArgumentException exception) 1782catch (ArgumentException exception)
System.Private.Uri (6)
System\DomainNameHelper.cs (3)
212catch (ArgumentException) 250catch (ArgumentException) 267catch (ArgumentException)
System\Uri.cs (3)
4028catch (ArgumentException) 4072catch (ArgumentException) 4112catch (ArgumentException)
System.Private.Windows.Core (13)
System\IO\BinaryReaderExtensions.cs (1)
39catch (ArgumentException ex)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (3)
289/// <exception cref="ArgumentException"> 576/// <exception cref="ArgumentException"> 803Debug.Assert(ex is ArgumentException or SerializationException, "Unexpected write exception.");
System\Private\Windows\BinaryFormat\Serializer\MemberPrimitiveTyped.cs (1)
30/// <exception cref="ArgumentException"><paramref name="value"/> is not primitive.</exception>
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
31catch (Exception ex) when (ex is ArgumentException or InvalidCastException or ArithmeticException or IOException or TargetInvocationException)
System\Private\Windows\Ole\DataObjectCore.cs (2)
13/// <exception cref="ArgumentException"> 19ArgumentException.ThrowIfNullOrWhiteSpace(format);
System\Private\Windows\Ole\DataStore.cs (1)
84ArgumentException.ThrowIfNullOrWhiteSpace(format, nameof(format));
System\Private\Windows\Ole\DragDropHelper.cs (1)
188ArgumentException.ThrowIfNullOrEmpty(format);
System\Private\Windows\Ole\TypeBinder.cs (2)
57ArgumentException.ThrowIfNullOrWhiteSpace(assemblyName); 58ArgumentException.ThrowIfNullOrWhiteSpace(typeName);
Windows\Win32\System\Variant\VARIANT.cs (1)
270catch (ArgumentException)
System.Private.Windows.Core.Tests (3)
System\Private\Windows\Ole\ClipboardCoreTests.cs (3)
340action.Should().Throw<ArgumentException>().WithParameterName("format"); 354action.Should().Throw<ArgumentException>(); 367action.Should().Throw<ArgumentException>();
System.Private.Xml (59)
System\Xml\Core\XmlCharCheckingWriter.cs (3)
112ArgumentException.ThrowIfNullOrEmpty(localName); 129ArgumentException.ThrowIfNullOrEmpty(localName); 293ArgumentException.ThrowIfNullOrEmpty(name);
System\Xml\Core\XmlCharCheckingWriterAsync.cs (3)
62ArgumentException.ThrowIfNullOrEmpty(localName); 78ArgumentException.ThrowIfNullOrEmpty(localName); 239ArgumentException.ThrowIfNullOrEmpty(name);
System\Xml\Core\XmlReader.cs (8)
915ArgumentException.ThrowIfNullOrEmpty(name); 934ArgumentException.ThrowIfNullOrEmpty(localName); 955ArgumentException.ThrowIfNullOrEmpty(name); 995ArgumentException.ThrowIfNullOrEmpty(localName); 1037ArgumentException.ThrowIfNullOrEmpty(name); 1062ArgumentException.ThrowIfNullOrEmpty(localName); 1412ArgumentException.ThrowIfNullOrEmpty(localName); 1611ArgumentException.ThrowIfNullOrEmpty(inputUri);
System\Xml\Core\XmlReaderSettings.cs (1)
321ArgumentException.ThrowIfNullOrEmpty(inputUri);
System\Xml\Core\XmlTextReaderImpl.cs (5)
567ArgumentException.ThrowIfNullOrEmpty(url); 3265catch (ArgumentException innerEx) 3506catch (ArgumentException) 3539catch (ArgumentException) 7806catch (ArgumentException e)
System\Xml\Core\XmlTextWriter.cs (3)
1099ArgumentException.ThrowIfNullOrEmpty(ns); 1150ArgumentException.ThrowIfNullOrEmpty(name); 1689ArgumentException.ThrowIfNullOrEmpty(name);
System\Xml\Core\XmlWellFormedWriter.cs (6)
363ArgumentException.ThrowIfNullOrEmpty(name); 428ArgumentException.ThrowIfNullOrEmpty(localName); 889ArgumentException.ThrowIfNullOrEmpty(name); 934ArgumentException.ThrowIfNullOrEmpty(name); 1282ArgumentException.ThrowIfNullOrEmpty(localName); 2060private static ArgumentException InvalidCharsException(string name, int badCharIndex)
System\Xml\Core\XmlWellFormedWriterAsync.cs (5)
63ArgumentException.ThrowIfNullOrEmpty(name); 182ArgumentException.ThrowIfNullOrEmpty(localName); 790ArgumentException.ThrowIfNullOrEmpty(name); 835ArgumentException.ThrowIfNullOrEmpty(name); 1133ArgumentException.ThrowIfNullOrEmpty(localName);
System\Xml\Core\XmlWriter.cs (1)
215ArgumentException.ThrowIfNullOrEmpty(name);
System\Xml\Core\XmlWriterAsync.cs (1)
201ArgumentException.ThrowIfNullOrEmpty(name);
System\Xml\Dom\XmlProcessingInstruction.cs (1)
19ArgumentException.ThrowIfNullOrEmpty(target);
System\Xml\Schema\DataTypeImplementation.cs (8)
613catch (ArgumentException e) 1081catch (ArgumentException e) 1336catch (ArgumentException e) 2050catch (ArgumentException e) 2426catch (ArgumentException e) 2524catch (ArgumentException e) 2719catch (ArgumentException e) 3052catch (ArgumentException e)
System\Xml\Schema\DtdParser.cs (1)
272ArgumentException.ThrowIfNullOrEmpty(docTypeName);
System\Xml\Schema\Preprocessor.cs (1)
2066catch (ArgumentException)
System\Xml\XmlConvert.cs (3)
314ArgumentException.ThrowIfNullOrEmpty(name); 372ArgumentException.ThrowIfNullOrEmpty(name); 1276catch (ArgumentException)
System\Xml\XPath\Internal\CompiledXPathExpr.cs (1)
173catch (System.ArgumentException)
System\Xml\Xsl\Runtime\XmlCollation.cs (1)
195catch (ArgumentException)
System\Xml\Xsl\Runtime\XsltFunctions.cs (3)
381catch (ArgumentException) 438catch (ArgumentException) 542catch (System.ArgumentException)
System\Xml\Xsl\Runtime\XsltLibrary.cs (2)
256catch (ArgumentException) 305catch (System.ArgumentException)
System\Xml\Xsl\Xslt\XsltLoader.cs (1)
672catch (ArgumentException)
System\Xml\Xsl\XsltOld\XsltOutput.cs (1)
146catch (System.ArgumentException) { }
System.Private.Xml.Linq (8)
System\Xml\Linq\XDocument.cs (3)
598catch (ArgumentException) 631catch (ArgumentException) 775catch (ArgumentException)
System\Xml\Linq\XElement.cs (3)
482ArgumentException.ThrowIfNullOrEmpty(prefix); 1212/// <exception cref="ArgumentException"> 1252/// <exception cref="ArgumentException">
System\Xml\Linq\XName.cs (1)
74ArgumentException.ThrowIfNullOrEmpty(expandedName);
System\Xml\Linq\XNodeDocumentOrderComparer.cs (1)
49/// <exception cref="ArgumentException">
System.Reflection.DispatchProxy (2)
System\Reflection\DispatchProxy.cs (2)
34/// <exception cref="System.ArgumentException"><typeparamref name="T"/> is a class, 54/// <exception cref="System.ArgumentException"><paramref name="interfaceType"/> is a class,
System.Reflection.Emit (5)
System\Reflection\Emit\ILGeneratorImpl.cs (1)
849ArgumentException.ThrowIfNullOrEmpty(usingNamespace);
System\Reflection\Emit\PersistedAssemblyBuilder.cs (1)
37ArgumentException.ThrowIfNullOrEmpty(name.Name, "AssemblyName.Name");
System\Reflection\Emit\PropertyBuilderImpl.cs (1)
31ArgumentException.ThrowIfNullOrEmpty(name);
System\Reflection\Emit\TypeBuilderImpl.cs (2)
358private ArgumentException ArgumentExceptionInvalidMethodOverride(string methodName) => 433ArgumentException.ThrowIfNullOrEmpty(name);
System.Reflection.Metadata (81)
System\Reflection\Internal\Utilities\StreamExtensions.cs (1)
76/// <exception cref="ArgumentException">size is 0 and distance from current position to end-of-stream can't fit in Int32.</exception>
System\Reflection\Metadata\AssemblyNameInfo.cs (1)
203/// <exception cref="ArgumentException">Provided assembly name was invalid.</exception>
System\Reflection\Metadata\BlobBuilder.cs (1)
1159/// <exception cref="ArgumentException"><paramref name="value"/> is not of a constant type.</exception>
System\Reflection\Metadata\BlobWriter.cs (1)
524/// <exception cref="ArgumentException"><paramref name="value"/> is not of a constant type.</exception>
System\Reflection\Metadata\Ecma335\CodedIndex.cs (15)
35/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 42/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 49/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 56/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 63/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 70/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 77/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 84/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 97/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 104/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 111/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 118/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 125/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 132/// <exception cref="ArgumentException">Unexpected handle kind.</exception> 167/// <exception cref="ArgumentException">Unexpected handle kind.</exception>
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (6)
596/// <exception cref="ArgumentException">Unexpected constant type.</exception> 614/// <exception cref="ArgumentException"><paramref name="serializedTypeName"/> is empty.</exception> 1064/// <exception cref="ArgumentException"><paramref name="type"/> doesn't have the expected handle kind.</exception> 1081/// <exception cref="ArgumentException"><paramref name="attributes"/> is invalid.</exception> 1121/// <exception cref="ArgumentException"><paramref name="genericType"/> doesn't have the expected handle kind.</exception> 1224/// <exception cref="ArgumentException"><paramref name="type"/> is nil or of an unexpected kind.</exception>
System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs (5)
178/// <exception cref="ArgumentException">A label was not defined by an instruction encoder this builder is associated with.</exception> 190/// <exception cref="ArgumentException">A label was not defined by an instruction encoder this builder is associated with.</exception> 203/// <exception cref="ArgumentException">A label was not defined by an instruction encoder this builder is associated with.</exception> 204/// <exception cref="ArgumentException"><paramref name="catchType"/> is not a valid type handle.</exception> 224/// <exception cref="ArgumentException">A label was not defined by an instruction encoder this builder is associated with.</exception>
System\Reflection\Metadata\Ecma335\Encoding\ExceptionRegionEncoder.cs (2)
153/// <exception cref="ArgumentException"><paramref name="catchType"/> is invalid.</exception> 197/// <exception cref="ArgumentException"><paramref name="catchType"/> is invalid.</exception>
System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs (3)
413/// <exception cref="ArgumentException"><paramref name="code"/> is not a branch instruction.</exception> 414/// <exception cref="ArgumentException"><paramref name="label"/> was not defined by this encoder.</exception> 473/// <exception cref="ArgumentException"><paramref name="label"/> was not defined by this encoder.</exception>
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
74/// <exception cref="ArgumentException"><paramref name="guidHeapStartOffset"/> is not a multiple of size of GUID.</exception>
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (17)
459/// <exception cref="ArgumentException"><paramref name="baseType"/> doesn't have the expected handle kind.</exception> 523/// <exception cref="ArgumentException"><paramref name="implementedInterface"/> doesn't have the expected handle kind.</exception> 565/// <exception cref="ArgumentException"><paramref name="resolutionScope"/> doesn't have the expected handle kind.</exception> 634/// <exception cref="ArgumentException"><paramref name="type"/> doesn't have the expected handle kind.</exception> 664/// <exception cref="ArgumentException"><paramref name="parent"/> doesn't have the expected handle kind.</exception> 689/// <exception cref="ArgumentException"><paramref name="association"/> doesn't have the expected handle kind.</exception> 746/// <exception cref="ArgumentException"><paramref name="parent"/> doesn't have the expected handle kind.</exception> 770/// <exception cref="ArgumentException"><paramref name="method"/> doesn't have the expected handle kind.</exception> 827/// <exception cref="ArgumentException"><paramref name="parent"/> doesn't have the expected handle kind.</exception> 856/// <exception cref="ArgumentException"><paramref name="genericParameter"/> doesn't have the expected handle kind.</exception> 918/// <exception cref="ArgumentException"><paramref name="parent"/> doesn't have the expected handle kind.</exception> 1045/// <exception cref="ArgumentException"><paramref name="methodBody"/> or <paramref name="methodDeclaration"/> doesn't have the expected handle kind.</exception> 1073/// <exception cref="ArgumentException"><paramref name="parent"/> doesn't have the expected handle kind.</exception> 1096/// <exception cref="ArgumentException"><paramref name="implementation"/> doesn't have the expected handle kind.</exception> 1137/// <exception cref="ArgumentException"><paramref name="implementation"/> doesn't have the expected handle kind.</exception> 1163/// <exception cref="ArgumentException"><paramref name="parent"/> doesn't have the expected handle kind.</exception> 1401/// <exception cref="ArgumentException"><paramref name="parent"/> doesn't have the expected handle kind.</exception>
System\Reflection\Metadata\Ecma335\MetadataRootBuilder.cs (1)
53/// <exception cref="ArgumentException"><paramref name="metadataVersion"/> is too long (the number of bytes when UTF-8 encoded must be less than 255).</exception>
System\Reflection\Metadata\Ecma335\MetadataTokens.cs (8)
23/// <exception cref="ArgumentException">The <paramref name="handle"/> is not a valid metadata table handle.</exception> 40/// <exception cref="ArgumentException">The <paramref name="handle"/> is invalid.</exception> 75/// <exception cref="ArgumentException"> 196/// <exception cref="ArgumentException"> 285/// <exception cref="ArgumentException"> 302/// <exception cref="ArgumentException"><paramref name="token"/> is not a valid metadata entity token.</exception> 316/// <exception cref="ArgumentException"> 326/// <exception cref="ArgumentException">
System\Reflection\Metadata\IL\ILOpCodeExtensions.cs (3)
54/// <exception cref="ArgumentException">Specified <paramref name="opCode"/> is not a branch op-code.</exception> 100/// <exception cref="ArgumentException">Specified <paramref name="opCode"/> is not a branch op-code.</exception> 172/// <exception cref="ArgumentException">Specified <paramref name="opCode"/> is not a branch op-code.</exception>
System\Reflection\Metadata\MetadataReader.cs (1)
67/// <exception cref="ArgumentException">The encoding of <paramref name="utf8Decoder"/> is not <see cref="UTF8Encoding"/>.</exception>
System\Reflection\Metadata\MetadataReader.netstandard.cs (1)
64/// <exception cref="ArgumentException">If <paramref name="assemblyFile"/> is invalid.</exception>
System\Reflection\Metadata\MetadataReaderProvider.cs (3)
135/// <exception cref="ArgumentException"><paramref name="stream"/> doesn't support read and seek operations.</exception> 160/// <exception cref="ArgumentException"><paramref name="stream"/> doesn't support read and seek operations.</exception> 239/// <exception cref="ArgumentException">The encoding of <paramref name="utf8Decoder"/> is not <see cref="UTF8Encoding"/>.</exception>
System\Reflection\Metadata\PEReaderExtensions.cs (1)
76/// <exception cref="ArgumentException">The encoding of <paramref name="utf8Decoder"/> is not <see cref="UTF8Encoding"/>.</exception>
System\Reflection\Metadata\TypeName.cs (1)
512/// <exception cref="ArgumentException">Provided type name was invalid.</exception>
System\Reflection\PortableExecutable\DebugDirectory\DebugDirectoryBuilder.cs (3)
79/// <exception cref="ArgumentException"><paramref name="pdbPath"/> contains NUL character.</exception> 97/// <exception cref="ArgumentException"><paramref name="pdbPath"/> contains NUL character.</exception> 170/// <exception cref="ArgumentException"><paramref name="algorithmName"/> or <paramref name="checksum"/> is empty.</exception>
System\Reflection\PortableExecutable\PEHeaders.cs (3)
41/// <exception cref="ArgumentException">The stream doesn't support seek operations.</exception> 55/// <exception cref="ArgumentException">The stream doesn't support seek operations.</exception> 71/// <exception cref="ArgumentException">The stream doesn't support seek operations.</exception>
System\Reflection\PortableExecutable\PEReader.cs (2)
600/// <exception cref="ArgumentException"><paramref name="entry"/> is not a CodeView entry.</exception> 640/// <exception cref="ArgumentException"><paramref name="entry"/> is not a PDB Checksum entry.</exception>
System\Reflection\PortableExecutable\PEReader.EmbeddedPortablePdb.cs (1)
31/// <exception cref="ArgumentException"><paramref name="entry"/> is not a <see cref="DebugDirectoryEntryType.EmbeddedPortablePdb"/> entry.</exception>
System.Reflection.MetadataLoadContext (1)
System\Reflection\PathAssemblyResolver.cs (1)
31/// <exception cref="System.ArgumentException">Thrown when a path is invalid.</exception>
System.Resources.Extensions (2)
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.cs (2)
51catch (Exception ex) when (ex is ArgumentException or InvalidCastException or ArithmeticException or IOException) 72catch (Exception ex) when (ex is ArgumentException or InvalidCastException or ArithmeticException or IOException)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
36[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ArgumentException))]
System.Runtime.InteropServices (3)
System\Runtime\InteropServices\Marshalling\ComVariantMarshaller.cs (3)
31/// <exception cref="ArgumentException">The type of <paramref name="managed"/> is not supported.</exception> 118/// <exception cref="ArgumentException">The type of data stored in <paramref name="unmanaged"/> is not supported.</exception> 242/// <exception cref="ArgumentException">When the managed value must be propagated back to the unmanaged variant, but the managed value type cannot be converted to the variant's type.</exception>
System.Runtime.Numerics (3)
System\Number.BigInteger.cs (3)
40internal static bool TryValidateParseStyleInteger(NumberStyles style, [NotNullWhen(false)] out ArgumentException? e) 62if (!TryValidateParseStyleInteger(style, out ArgumentException? e)) 126if (!TryValidateParseStyleInteger(style, out ArgumentException? e))
System.Security.Claims (3)
System\Security\Claims\ClaimsIdentity.cs (3)
217/// <exception cref="ArgumentException"> 246/// <exception cref="ArgumentException"> 269/// <exception cref="ArgumentException">
System.Security.Cryptography (503)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
308catch (ArgumentException ex)
src\libraries\Common\src\System\Security\Cryptography\AesGcm.cs (6)
58/// <exception cref="ArgumentException"> 94/// <exception cref="ArgumentException"> 145/// <exception cref="ArgumentException"> 186/// <exception cref="ArgumentException"> 221/// <exception cref="ArgumentException"> 262/// <exception cref="ArgumentException">
src\libraries\Common\src\System\Security\Cryptography\Asn1\AlgorithmIdentifierAsn.xml.cs (2)
30catch (ArgumentException e) 41catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (2)
31catch (ArgumentException e) 43catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
82catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\ECDomainParameters.xml.cs (1)
58catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\FieldID.xml.cs (2)
30catch (ArgumentException e) 38catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (3)
99catch (ArgumentException e) 116catch (ArgumentException e) 160catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\OtherNameAsn.xml.cs (2)
30catch (ArgumentException e) 39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\CertBagAsn.xml.cs (2)
30catch (ArgumentException e) 39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SafeBagAsn.xml.cs (2)
32catch (ArgumentException e) 41catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SecretBagAsn.xml.cs (2)
30catch (ArgumentException e) 39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (4)
64catch (ArgumentException e) 89catch (ArgumentException e) 114catch (ArgumentException e) 139catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.xml.cs (2)
30catch (ArgumentException e) 39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncapsulatedContentInfoAsn.xml.cs (2)
30catch (ArgumentException e) 42catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedContentInfoAsn.xml.cs (1)
31catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\IssuerAndSerialNumberAsn.xml.cs (1)
39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\OtherCertificateFormat.xml.cs (2)
30catch (ArgumentException e) 38catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignedDataAsn.xml.cs (1)
65catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerInfoAsn.xml.cs (1)
51catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\SpecifiedECDomain.xml.cs (1)
49catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (1)
45catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (2)
231catch (ArgumentException e) 245catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (3)
395/// <exception cref="ArgumentException"> 482/// <exception cref="ArgumentException"> 563/// <exception cref="ArgumentException">
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (2)
24ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 44ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (7)
95/// <exception cref="ArgumentException"> 806/// <exception cref="ArgumentException"> 861/// <exception cref="ArgumentException"> 909/// <exception cref="ArgumentException"> 1201/// <exception cref="ArgumentException"> 1261/// <exception cref="ArgumentException"> 1330/// <exception cref="ArgumentException">
src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.cs (1)
38/// <exception cref="ArgumentException">
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (15)
105/// <exception cref="ArgumentException"> 189/// <exception cref="ArgumentException"> 225/// <exception cref="ArgumentException"> 266/// <exception cref="ArgumentException"> 322/// <exception cref="ArgumentException"> 353/// <exception cref="ArgumentException"> 382/// <exception cref="ArgumentException"> 412/// <exception cref="ArgumentException"> 439/// <exception cref="ArgumentException"> 469/// <exception cref="ArgumentException"> 497/// <exception cref="ArgumentException"> 553/// <exception cref="ArgumentException"> 1405/// <exception cref="ArgumentException"> 1459/// <exception cref="ArgumentException"> 1522/// <exception cref="ArgumentException">
src\libraries\Common\src\System\Security\Cryptography\MLKemCng.cs (1)
39/// <exception cref="ArgumentException">
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
790catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (3)
730ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 756ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 788ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (10)
113/// <exception cref="ArgumentException"> 293/// <exception cref="ArgumentException"> 1062/// <exception cref="ArgumentException"> 1115/// <exception cref="ArgumentException"> 1443/// <exception cref="ArgumentException"> 1503/// <exception cref="ArgumentException"> 1572/// <exception cref="ArgumentException"> 1666/// <exception cref="ArgumentException"> 1716/// <exception cref="ArgumentException"> 2033catch (ArgumentException ae)
src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (8)
52/// <exception cref="ArgumentException"> 81/// <exception cref="ArgumentException"> 127/// <exception cref="ArgumentException"> 180/// <exception cref="ArgumentException"> 227/// <exception cref="ArgumentException"> 260/// <exception cref="ArgumentException"> 291/// <exception cref="ArgumentException"> 332/// <exception cref="ArgumentException">
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (8)
103/// <exception cref="ArgumentException"> 162/// <exception cref="ArgumentException"> 230/// <exception cref="ArgumentException"> 292/// <exception cref="ArgumentException"> 356/// <exception cref="ArgumentException"> 404/// <exception cref="ArgumentException"> 464/// <exception cref="ArgumentException"> 516/// <exception cref="ArgumentException">
System\Security\Cryptography\Aes.cs (7)
84/// <exception cref="ArgumentException"><paramref name="plaintext"/> is <see langword="null" /> or empty.</exception> 99/// <exception cref="ArgumentException"><paramref name="plaintext"/> is empty.</exception> 118/// <exception cref="ArgumentException"> 159/// <exception cref="ArgumentException"> 175/// <exception cref="ArgumentException"> 197/// <exception cref="ArgumentException"> 243/// <exception cref="ArgumentException">
System\Security\Cryptography\AsymmetricAlgorithm.cs (3)
173/// <exception cref="ArgumentException"> 249/// <exception cref="ArgumentException"> 323/// <exception cref="ArgumentException">
System\Security\Cryptography\CngAlgorithm.cs (1)
20ArgumentException.ThrowIfNullOrEmpty(algorithm);
System\Security\Cryptography\CngAlgorithmGroup.cs (1)
21ArgumentException.ThrowIfNullOrEmpty(algorithmGroup);
System\Security\Cryptography\CngKeyBlobFormat.cs (1)
21ArgumentException.ThrowIfNullOrEmpty(format);
System\Security\Cryptography\CngProvider.cs (1)
20ArgumentException.ThrowIfNullOrEmpty(provider);
System\Security\Cryptography\CryptoConfig.cs (2)
325ArgumentException.ThrowIfNullOrEmpty(name, nameof(names)); 532ArgumentException.ThrowIfNullOrEmpty(name, nameof(names));
System\Security\Cryptography\CryptographicOperations.cs (19)
82/// <exception cref="ArgumentException"> 107/// <exception cref="ArgumentException"> 134/// <exception cref="ArgumentException"> 172/// <exception cref="ArgumentException"> 215/// <exception cref="ArgumentException"> 249/// <exception cref="ArgumentException"> 292/// <exception cref="ArgumentException"> 343/// <exception cref="ArgumentException"> 384/// <exception cref="ArgumentException"> 411/// <exception cref="ArgumentException"> 439/// <exception cref="ArgumentException"> 482/// <exception cref="ArgumentException"> 531/// <exception cref="ArgumentException"> 563/// <exception cref="ArgumentException"> 599/// <exception cref="ArgumentException"> 640/// <exception cref="ArgumentException"> 683/// <exception cref="ArgumentException"> 732/// <exception cref="ArgumentException"> 773ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\DSA.cs (24)
119/// <exception cref="ArgumentException"> 129ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 146ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 182/// <exception cref="ArgumentException"> 203ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 244ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 265/// <exception cref="ArgumentException"> 274ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 317ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 354/// <exception cref="ArgumentException"> 377ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 388ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 543ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 574/// <exception cref="ArgumentException"> 587ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 631ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 652/// <exception cref="ArgumentException"> 666ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 689/// <exception cref="ArgumentException"> 703ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 755ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 1124/// <exception cref="ArgumentException"> 1169/// <exception cref="ArgumentException"> 1240/// <exception cref="ArgumentException">
System\Security\Cryptography\DSAOpenSsl.cs (2)
30/// <exception cref="ArgumentException"> 67/// <exception cref="ArgumentException"><paramref name="handle" /> is invalid</exception>
System\Security\Cryptography\ECAlgorithm.cs (3)
673/// <exception cref="ArgumentException"> 724/// <exception cref="ArgumentException"> 795/// <exception cref="ArgumentException">
System\Security\Cryptography\ECDiffieHellman.cs (6)
57/// <exception cref="ArgumentException"><paramref name="otherPartyPublicKey"/> is over a different curve than this key</exception> 72/// <exception cref="ArgumentException"><paramref name="otherPartyPublicKey"/> is over a different curve than this key</exception> 90/// <exception cref="ArgumentException"><paramref name="otherPartyPublicKey"/> is over a different curve than this key</exception> 109/// <exception cref="ArgumentException"><paramref name="otherPartyPublicKey"/> is over a different curve than this key</exception> 127/// <exception cref="ArgumentException"><paramref name="otherPartyPublicKey"/> is over a different curve than this key</exception> 148/// <exception cref="ArgumentException">
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (2)
18/// <exception cref="ArgumentException"><paramref name="pkeyHandle"/> <see cref="SafeHandle.IsInvalid" /></exception> 52/// <exception cref="ArgumentException"><paramref name="handle" /> is invalid</exception>
System\Security\Cryptography\ECDsa.cs (31)
60ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 96/// <exception cref="ArgumentException"> 117ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 195/// <exception cref="ArgumentException"> 204ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 226/// <exception cref="ArgumentException"> 235ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 360/// <exception cref="ArgumentException"> 392/// <exception cref="ArgumentException"> 468ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 494/// <exception cref="ArgumentException"> 507ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 549ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 567/// <exception cref="ArgumentException"> 581ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 601/// <exception cref="ArgumentException"> 613ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 639/// <exception cref="ArgumentException"> 661ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 689/// <exception cref="ArgumentException"> 709ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 737ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 774/// <exception cref="ArgumentException"> 797ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 824/// <exception cref="ArgumentException"> 834ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 843ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 872ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 919ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 941/// <exception cref="ArgumentException"> 956ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\ECDsaOpenSsl.cs (2)
18/// <exception cref="ArgumentException"><paramref name="pkeyHandle"/> <see cref="SafeHandle.IsInvalid" /></exception> 52/// <exception cref="ArgumentException"><paramref name="handle" /> is invalid</exception>
System\Security\Cryptography\HKDF.cs (2)
117/// <exception cref="ArgumentException"><paramref name="output"/> is empty, or is larger than the maximum allowed length.</exception> 174/// <exception cref="ArgumentException"><paramref name="ikm"/> is empty, or is larger than the maximum allowed length.</exception>
System\Security\Cryptography\HMACMD5.cs (7)
121/// <exception cref="ArgumentException"> 174/// <exception cref="ArgumentException"> 207/// <exception cref="ArgumentException"> 230/// <exception cref="ArgumentException"> 254/// <exception cref="ArgumentException"> 281/// <exception cref="ArgumentException"> 306/// <exception cref="ArgumentException">
System\Security\Cryptography\HMACSHA1.cs (7)
125/// <exception cref="ArgumentException"> 176/// <exception cref="ArgumentException"> 208/// <exception cref="ArgumentException"> 230/// <exception cref="ArgumentException"> 253/// <exception cref="ArgumentException"> 279/// <exception cref="ArgumentException"> 303/// <exception cref="ArgumentException">
System\Security\Cryptography\HMACSHA256.cs (7)
117/// <exception cref="ArgumentException"> 168/// <exception cref="ArgumentException"> 200/// <exception cref="ArgumentException"> 222/// <exception cref="ArgumentException"> 245/// <exception cref="ArgumentException"> 271/// <exception cref="ArgumentException"> 295/// <exception cref="ArgumentException">
System\Security\Cryptography\HMACSHA3_256.cs (7)
153/// <exception cref="ArgumentException"> 206/// <exception cref="ArgumentException"> 239/// <exception cref="ArgumentException"> 262/// <exception cref="ArgumentException"> 285/// <exception cref="ArgumentException"> 312/// <exception cref="ArgumentException"> 336/// <exception cref="ArgumentException">
System\Security\Cryptography\HMACSHA3_384.cs (7)
153/// <exception cref="ArgumentException"> 206/// <exception cref="ArgumentException"> 239/// <exception cref="ArgumentException"> 262/// <exception cref="ArgumentException"> 285/// <exception cref="ArgumentException"> 312/// <exception cref="ArgumentException"> 336/// <exception cref="ArgumentException">
System\Security\Cryptography\HMACSHA3_512.cs (7)
153/// <exception cref="ArgumentException"> 206/// <exception cref="ArgumentException"> 239/// <exception cref="ArgumentException"> 262/// <exception cref="ArgumentException"> 285/// <exception cref="ArgumentException"> 312/// <exception cref="ArgumentException"> 336/// <exception cref="ArgumentException">
System\Security\Cryptography\HMACSHA384.cs (7)
134/// <exception cref="ArgumentException"> 185/// <exception cref="ArgumentException"> 217/// <exception cref="ArgumentException"> 239/// <exception cref="ArgumentException"> 262/// <exception cref="ArgumentException"> 288/// <exception cref="ArgumentException"> 312/// <exception cref="ArgumentException">
System\Security\Cryptography\HMACSHA512.cs (7)
131/// <exception cref="ArgumentException"> 182/// <exception cref="ArgumentException"> 214/// <exception cref="ArgumentException"> 236/// <exception cref="ArgumentException"> 259/// <exception cref="ArgumentException"> 285/// <exception cref="ArgumentException"> 309/// <exception cref="ArgumentException">
System\Security\Cryptography\IncrementalHash.cs (8)
81/// <exception cref="ArgumentException"> 145/// <exception cref="ArgumentException"> 217/// <exception cref="ArgumentException"> 318/// <exception cref="ArgumentException"> 325ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 348/// <exception cref="ArgumentException"> 377/// <exception cref="ArgumentException"> 384ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\Kmac128.cs (6)
290/// <exception cref="ArgumentException"> 327/// <exception cref="ArgumentException"> 362/// <exception cref="ArgumentException"> 403/// <exception cref="ArgumentException"> 450/// <exception cref="ArgumentException"> 494/// <exception cref="ArgumentException">
System\Security\Cryptography\Kmac256.cs (6)
290/// <exception cref="ArgumentException"> 327/// <exception cref="ArgumentException"> 362/// <exception cref="ArgumentException"> 403/// <exception cref="ArgumentException"> 450/// <exception cref="ArgumentException"> 494/// <exception cref="ArgumentException">
System\Security\Cryptography\KmacXof128.cs (6)
290/// <exception cref="ArgumentException"> 327/// <exception cref="ArgumentException"> 362/// <exception cref="ArgumentException"> 403/// <exception cref="ArgumentException"> 450/// <exception cref="ArgumentException"> 494/// <exception cref="ArgumentException">
System\Security\Cryptography\KmacXof256.cs (6)
290/// <exception cref="ArgumentException"> 327/// <exception cref="ArgumentException"> 362/// <exception cref="ArgumentException"> 403/// <exception cref="ArgumentException"> 450/// <exception cref="ArgumentException"> 494/// <exception cref="ArgumentException">
System\Security\Cryptography\MD5.cs (5)
82/// <exception cref="ArgumentException"> 131/// <exception cref="ArgumentException"> 163/// <exception cref="ArgumentException"> 189/// <exception cref="ArgumentException"> 216/// <exception cref="ArgumentException">
System\Security\Cryptography\PemEncoding.cs (8)
28/// <exception cref="ArgumentException"> 55/// <exception cref="ArgumentException"> 361/// <exception cref="ArgumentException"> 451/// <exception cref="ArgumentException"> 508/// <exception cref="ArgumentException"> 566/// <exception cref="ArgumentException"> 652/// <exception cref="ArgumentException"> 695/// <exception cref="ArgumentException">
System\Security\Cryptography\RandomNumberGenerator.cs (3)
174/// <exception cref="ArgumentException"> 194/// <exception cref="ArgumentException"> 220/// <exception cref="ArgumentException">
System\Security\Cryptography\Rfc2898DeriveBytes.OneShot.cs (7)
31/// <exception cref="ArgumentException"> 66/// <exception cref="ArgumentException"> 103/// <exception cref="ArgumentException"> 142/// <exception cref="ArgumentException"> 185/// <exception cref="ArgumentException"> 230/// <exception cref="ArgumentException"> 323ArgumentException.ThrowIfNullOrEmpty(hashAlgorithmName, nameof(hashAlgorithm));
System\Security\Cryptography\RSA.cs (19)
188/// <exception cref="ArgumentException"> 275/// <exception cref="ArgumentException"> 394ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 404ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 413ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 436/// <exception cref="ArgumentException"> 458ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 489/// <exception cref="ArgumentException"> 521ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 542/// <exception cref="ArgumentException"> 564ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 591/// <exception cref="ArgumentException"> 623ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 658ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 669ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 678ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 1051/// <exception cref="ArgumentException"> 1104/// <exception cref="ArgumentException"> 1175/// <exception cref="ArgumentException">
System\Security\Cryptography\RSAEncryptionPadding.cs (1)
68ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\RSAOpenSsl.cs (2)
35/// <exception cref="ArgumentException"><paramref name="handle" /> is invalid</exception> 59/// <exception cref="ArgumentException">
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (9)
107/// <exception cref="ArgumentException"> 133ArgumentException.ThrowIfNullOrEmpty(engineName); 134ArgumentException.ThrowIfNullOrEmpty(keyId); 159/// <exception cref="ArgumentException"> 186ArgumentException.ThrowIfNullOrEmpty(engineName); 187ArgumentException.ThrowIfNullOrEmpty(keyId); 212/// <exception cref="ArgumentException"> 238ArgumentException.ThrowIfNullOrEmpty(providerName); 239ArgumentException.ThrowIfNullOrEmpty(keyUri);
System\Security\Cryptography\SHA1.cs (5)
79/// <exception cref="ArgumentException"> 126/// <exception cref="ArgumentException"> 157/// <exception cref="ArgumentException"> 182/// <exception cref="ArgumentException"> 208/// <exception cref="ArgumentException">
System\Security\Cryptography\SHA256.cs (5)
78/// <exception cref="ArgumentException"> 126/// <exception cref="ArgumentException"> 157/// <exception cref="ArgumentException"> 182/// <exception cref="ArgumentException"> 208/// <exception cref="ArgumentException">
System\Security\Cryptography\SHA3_256.cs (5)
104/// <exception cref="ArgumentException"> 159/// <exception cref="ArgumentException"> 194/// <exception cref="ArgumentException"> 223/// <exception cref="ArgumentException"> 253/// <exception cref="ArgumentException">
System\Security\Cryptography\SHA3_384.cs (5)
104/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 195/// <exception cref="ArgumentException"> 224/// <exception cref="ArgumentException"> 254/// <exception cref="ArgumentException">
System\Security\Cryptography\SHA3_512.cs (5)
104/// <exception cref="ArgumentException"> 159/// <exception cref="ArgumentException"> 194/// <exception cref="ArgumentException"> 223/// <exception cref="ArgumentException"> 253/// <exception cref="ArgumentException">
System\Security\Cryptography\SHA384.cs (5)
78/// <exception cref="ArgumentException"> 125/// <exception cref="ArgumentException"> 156/// <exception cref="ArgumentException"> 181/// <exception cref="ArgumentException"> 207/// <exception cref="ArgumentException">
System\Security\Cryptography\SHA512.cs (5)
78/// <exception cref="ArgumentException"> 125/// <exception cref="ArgumentException"> 156/// <exception cref="ArgumentException"> 181/// <exception cref="ArgumentException"> 207/// <exception cref="ArgumentException">
System\Security\Cryptography\Shake128.cs (4)
337/// <exception cref="ArgumentException"> 369/// <exception cref="ArgumentException"> 405/// <exception cref="ArgumentException"> 440/// <exception cref="ArgumentException">
System\Security\Cryptography\Shake256.cs (4)
337/// <exception cref="ArgumentException"> 369/// <exception cref="ArgumentException"> 405/// <exception cref="ArgumentException"> 440/// <exception cref="ArgumentException">
System\Security\Cryptography\SymmetricAlgorithm.cs (23)
309/// <exception cref="ArgumentException"> 353/// <exception cref="ArgumentException"> 427/// <exception cref="ArgumentException"> 552/// <exception cref="ArgumentException"> 670/// <exception cref="ArgumentException"> 724/// <exception cref="ArgumentException"> 752/// <exception cref="ArgumentException"> 802/// <exception cref="ArgumentException"> 809/// <exception cref="ArgumentException"> 844/// <exception cref="ArgumentException"> 879/// <exception cref="ArgumentException"> 907/// <exception cref="ArgumentException"> 955/// <exception cref="ArgumentException"> 962/// <exception cref="ArgumentException"> 997/// <exception cref="ArgumentException"> 1043/// <exception cref="ArgumentException"> 1093/// <exception cref="ArgumentException"> 1161/// <exception cref="ArgumentException"> 1228/// <exception cref="ArgumentException"> 1283/// <exception cref="ArgumentException"> 1333/// <exception cref="ArgumentException"> 1401/// <exception cref="ArgumentException"> 1460/// <exception cref="ArgumentException">
System\Security\Cryptography\X509Certificates\Asn1\AccessDescriptionAsn.xml.cs (1)
30catch (ArgumentException e)
System\Security\Cryptography\X509Certificates\Asn1\CertificatePolicyMappingAsn.xml.cs (2)
30catch (ArgumentException e) 38catch (ArgumentException e)
System\Security\Cryptography\X509Certificates\Asn1\CertificateTemplateAsn.xml.cs (1)
31catch (ArgumentException e)
System\Security\Cryptography\X509Certificates\Asn1\CertificationRequestInfoAsn.xml.cs (1)
43catch (ArgumentException e)
System\Security\Cryptography\X509Certificates\Asn1\DistributionPointNameAsn.xml.cs (1)
75catch (ArgumentException e)
System\Security\Cryptography\X509Certificates\Asn1\PolicyInformationAsn.xml.cs (2)
30catch (ArgumentException e) 41catch (ArgumentException e)
System\Security\Cryptography\X509Certificates\Asn1\TbsCertificateAsn.xml.cs (2)
84catch (ArgumentException e) 102catch (ArgumentException e)
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (19)
76ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 103ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 134ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 170ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 622/// <exception cref="ArgumentException"> 690/// <exception cref="ArgumentException"> 693/// <exception cref="ArgumentException"> 696/// <exception cref="ArgumentException"> 699/// <exception cref="ArgumentException"><paramref name="serialNumber"/> is null or has length 0.</exception> 700/// <exception cref="ArgumentException"> 748/// <exception cref="ArgumentException"> 751/// <exception cref="ArgumentException"> 754/// <exception cref="ArgumentException"> 757/// <exception cref="ArgumentException"><paramref name="serialNumber"/> has length 0.</exception> 758/// <exception cref="ArgumentException"> 904/// <exception cref="ArgumentException"> 907/// <exception cref="ArgumentException"><paramref name="serialNumber"/> is null or has length 0.</exception> 949/// <exception cref="ArgumentException"> 952/// <exception cref="ArgumentException"><paramref name="serialNumber"/> has length 0.</exception>
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (4)
56/// <exception cref="ArgumentException"> 145ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 290/// <exception cref="ArgumentException"> 343ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.CdpExtension.cs (1)
30/// <exception cref="ArgumentException">
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.cs (2)
96/// <exception cref="ArgumentException"> 129/// <exception cref="ArgumentException">
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (20)
49/// <exception cref="ArgumentException"> 65ArgumentException.ThrowIfNullOrEmpty(oidValue); 83/// <exception cref="ArgumentException"> 100ArgumentException.ThrowIfNullOrEmpty(oid.Value); 113/// <exception cref="ArgumentException"> 133ArgumentException.ThrowIfNullOrEmpty(emailAddress); 150/// <exception cref="ArgumentException"> 162ArgumentException.ThrowIfNullOrEmpty(commonName); 173/// <exception cref="ArgumentException"> 185ArgumentException.ThrowIfNullOrEmpty(localityName); 196/// <exception cref="ArgumentException"> 217ArgumentException.ThrowIfNullOrEmpty(twoLetterCode); 247/// <exception cref="ArgumentException"> 259ArgumentException.ThrowIfNullOrEmpty(organizationName); 270/// <exception cref="ArgumentException"> 282ArgumentException.ThrowIfNullOrEmpty(organizationalUnitName); 293/// <exception cref="ArgumentException"> 305ArgumentException.ThrowIfNullOrEmpty(stateOrProvinceName); 316/// <exception cref="ArgumentException"> 331ArgumentException.ThrowIfNullOrEmpty(domainComponent);
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (1)
520catch (ArgumentException e)
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (3)
85/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 172ArgumentException.ThrowIfNullOrEmpty(accessMethodOid.Value);
System\Security\Cryptography\X509Certificates\X509AuthorityKeyIdentifierExtension.cs (6)
269/// <exception cref="ArgumentException"> 301/// <exception cref="ArgumentException"> 325catch (ArgumentException) 358/// <exception cref="ArgumentException"> 399/// <exception cref="ArgumentException"> 426catch (ArgumentException)
System\Security\Cryptography\X509Certificates\X509Certificate.cs (2)
356/// <exception cref="ArgumentException"> 387/// <exception cref="ArgumentException">
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (7)
749/// <exception cref="ArgumentException"> 842/// <exception cref="ArgumentException"> 943/// <exception cref="ArgumentException"> 1035/// <exception cref="ArgumentException"> 1609/// <exception cref="ArgumentException"> 1821catch (ArgumentException ae) 1851catch (ArgumentException ae)
System\Security\Cryptography\X509Certificates\X509Certificate2Collection.cs (7)
122/// <exception cref="ArgumentException"> 149/// <exception cref="ArgumentException"> 662/// <exception cref="ArgumentException"> 699/// <exception cref="ArgumentException"> 726ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm)); 759/// <exception cref="ArgumentException"> 776ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\X509Certificates\X509CertificateLoader.netcore.cs (1)
32ArgumentException.ThrowIfNullOrEmpty(path);
System\Security\Cryptography\X509Certificates\X509Extension.cs (2)
41ArgumentException.ThrowIfNullOrEmpty(base.Oid?.Value, "oid.Value"); 71ArgumentException.ThrowIfNullOrEmpty(base.Oid?.Value, "oid.Value");
System.Security.Cryptography.Cose (52)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (4)
69/// <exception cref="ArgumentException">The property is set and the encoded bytes in the specified <see cref="CoseHeaderValue"/> contain trailing data or more than one CBOR value.</exception> 114/// <exception cref="ArgumentException"><paramref name="destination"/> is too small to hold the value.</exception> 125/// <exception cref="ArgumentException"><paramref name="value"/> is not a valid CBOR value.</exception> 138/// <exception cref="ArgumentException"><paramref name="item"/>'s value is not a valid CBOR value.</exception>
System\Security\Cryptography\Cose\CoseHeaderValue.cs (1)
207/// <exception cref="ArgumentException"><paramref name="destination"/> is too small to hold the value.</exception>
System\Security\Cryptography\Cose\CoseMessage.cs (1)
608/// <exception cref="ArgumentException"><paramref name="destination"/> is too small to hold the value.</exception>
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (14)
54/// <exception cref="ArgumentException"> 84/// <exception cref="ArgumentException"> 114/// <exception cref="ArgumentException"> 141/// <exception cref="ArgumentException"> 167/// <exception cref="ArgumentException"> 231/// <exception cref="ArgumentException"> 299/// <exception cref="ArgumentException"> 327/// <exception cref="ArgumentException"> 636/// <exception cref="ArgumentException"> 655/// <exception cref="ArgumentException"> 684/// <exception cref="ArgumentException"> 708/// <exception cref="ArgumentException"> 737/// <exception cref="ArgumentException"> 813/// <exception cref="ArgumentException">
System\Security\Cryptography\Cose\CoseSign1Message.cs (19)
42/// <exception cref="ArgumentException"> 67/// <exception cref="ArgumentException"> 92/// <exception cref="ArgumentException"> 116/// <exception cref="ArgumentException"> 140/// <exception cref="ArgumentException"> 191/// <exception cref="ArgumentException"> 240/// <exception cref="ArgumentException"> 262/// <exception cref="ArgumentException"> 364/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 407/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 450/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 491/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 536/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 573/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 616/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 657/// <exception cref="ArgumentException"> 719/// <exception cref="ArgumentException"> 824/// <exception cref="ArgumentException"> 887/// <exception cref="ArgumentException">
System\Security\Cryptography\Cose\CoseSignature.cs (11)
79/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 122/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 162/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 206/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 252/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 289/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 333/// <exception cref="ArgumentException"><paramref name="key"/> is of an unsupported type.</exception> 374/// <exception cref="ArgumentException"> 438/// <exception cref="ArgumentException"> 498/// <exception cref="ArgumentException"> 562/// <exception cref="ArgumentException">
System\Security\Cryptography\Cose\CoseSigner.cs (2)
50/// <exception cref="ArgumentException"> 97/// <exception cref="ArgumentException">
System.Security.Cryptography.Pkcs (45)
src\libraries\Common\src\Internal\Cryptography\PkcsHelpers.cs (1)
308catch (ArgumentException ex)
src\libraries\Common\src\System\Security\Cryptography\Asn1\AlgorithmIdentifierAsn.xml.cs (2)
30catch (ArgumentException e) 41catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\AttributeAsn.xml.cs (2)
31catch (ArgumentException e) 43catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\DirectoryStringAsn.xml.cs (1)
82catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\GeneralNameAsn.xml.cs (3)
99catch (ArgumentException e) 116catch (ArgumentException e) 160catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\OtherNameAsn.xml.cs (2)
30catch (ArgumentException e) 39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\CertBagAsn.xml.cs (2)
30catch (ArgumentException e) 39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SafeBagAsn.xml.cs (2)
32catch (ArgumentException e) 41catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\SecretBagAsn.xml.cs (2)
30catch (ArgumentException e) 39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\CertificateChoiceAsn.xml.cs (4)
64catch (ArgumentException e) 89catch (ArgumentException e) 114catch (ArgumentException e) 139catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\ContentInfoAsn.xml.cs (2)
30catch (ArgumentException e) 39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncapsulatedContentInfoAsn.xml.cs (2)
30catch (ArgumentException e) 42catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\EncryptedContentInfoAsn.xml.cs (1)
31catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\IssuerAndSerialNumberAsn.xml.cs (1)
39catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\OtherCertificateFormat.xml.cs (2)
30catch (ArgumentException e) 38catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignedDataAsn.xml.cs (1)
65catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs7\SignerInfoAsn.xml.cs (1)
51catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1\X509ExtensionAsn.xml.cs (1)
45catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\Asn1Reader\AsnValueReader.cs (2)
231catch (ArgumentException e) 245catch (ArgumentException e)
src\libraries\Common\src\System\Security\Cryptography\PasswordBasedEncryption.cs (1)
790catch (ArgumentException e)
System\Security\Cryptography\Pkcs\Asn1\OriginatorInfoAsn.xml.cs (1)
51catch (ArgumentException e)
System\Security\Cryptography\Pkcs\Asn1\OtherKeyAttributeAsn.xml.cs (2)
30catch (ArgumentException e) 41catch (ArgumentException e)
System\Security\Cryptography\Pkcs\Asn1\PkiStatusInfo.xml.cs (1)
44catch (ArgumentException e)
System\Security\Cryptography\Pkcs\Asn1\PolicyInformation.xml.cs (1)
31catch (ArgumentException e)
System\Security\Cryptography\Pkcs\Asn1\PolicyQualifierInfo.xml.cs (2)
30catch (ArgumentException e) 38catch (ArgumentException e)
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TimeStampReq.xml.cs (1)
54catch (ArgumentException e)
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TimeStampResp.xml.cs (1)
34catch (ArgumentException e)
System\Security\Cryptography\Pkcs\Asn1\Rfc3161TstInfo.xml.cs (1)
54catch (ArgumentException e)
System.Security.Cryptography.ProtectedData (4)
System\Security\Cryptography\ProtectedData.cs (4)
92/// <exception cref="ArgumentException"> 132/// <exception cref="ArgumentException"> 245/// <exception cref="ArgumentException"> 285/// <exception cref="ArgumentException">
System.ServiceModel.Federation (1)
System\ServiceModel\Federation\WSTrustChannelSecurityTokenProvider.cs (1)
52/// <exception cref="ArgumentException">thrown if <see cref="SecurityTokenRequirement.GetProperty{TValue}(string)"/> (IssuedSecurityTokenParameters) is not a <see cref="WSTrustTokenParameters"/>.</exception>
System.ServiceModel.Http.Tests (4)
ServiceModel\BasicHttpBindingTest.cs (2)
177Assert.Throws<ArgumentException>(() => binding.Name = value); 302Assert.Throws<ArgumentException>(() => binding.TextEncoding = encoding);
ServiceModel\BasicHttpsBindingTest.cs (2)
167Assert.Throws<ArgumentException>(() => binding.Name = value); 292Assert.Throws<ArgumentException>(() => binding.TextEncoding = encoding);
System.ServiceModel.Primitives.Tests (6)
Channels\CustomBindingTest.cs (1)
56Assert.Throws<ArgumentException>(() =>
Channels\TextMessageEncodingBindingElementTest.cs (1)
37Assert.Throws<ArgumentException>(() => element.WriteEncoding = encoding);
Security\SecurityTokenRequirementTest.cs (1)
47Assert.Throws<ArgumentException>(() => tokenrequirement.TryGetProperty(tokenrequirement.TokenType, out int Tvalue));
ServiceModel\DuplexChannelFactoryTest.cs (2)
72Assert.Throws<ArgumentException>("via", () => 87Assert.Throws<ArgumentException>("via", () =>
ServiceModel\DuplexClientBaseTest.cs (1)
72Assert.Throws<ArgumentException>("via", () =>
System.ServiceModel.Syndication (6)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (2)
789catch (ArgumentException e) 870catch (ArgumentException e)
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (1)
150catch (ArgumentException e)
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (1)
478catch (ArgumentException e)
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (2)
466catch (ArgumentException e) 771catch (ArgumentException e)
System.Text.Encodings.Web (1)
System\ThrowHelper.cs (1)
54private static ArgumentException GetArgumentException(ExceptionResource resource, ExceptionArgument argument)
System.Text.Json (147)
System\Text\Json\Document\JsonDocument.Parse.cs (10)
44/// <exception cref="ArgumentException"> 74/// <exception cref="ArgumentException"> 119/// <exception cref="ArgumentException"> 205/// <exception cref="ArgumentException"> 279/// <exception cref="ArgumentException"> 346/// <exception cref="ArgumentException"> 385/// <exception cref="ArgumentException"> 388/// <exception cref="ArgumentException"> 425/// <exception cref="ArgumentException"> 428/// <exception cref="ArgumentException">
System\Text\Json\Document\JsonElement.Parse.cs (7)
38/// <exception cref="ArgumentException"> 41/// <exception cref="ArgumentException"> 83/// <exception cref="ArgumentException"><paramref name="options"/> contains unsupported options.</exception> 97/// <exception cref="ArgumentException"><paramref name="options"/> contains unsupported options.</exception> 112/// <exception cref="ArgumentException"><paramref name="options"/> contains unsupported options.</exception> 150/// <exception cref="ArgumentException"> 153/// <exception cref="ArgumentException">
System\Text\Json\Document\JsonProperty.cs (1)
106/// <exception cref="ArgumentException">
System\Text\Json\JsonEncodedText.cs (3)
48/// <exception cref="ArgumentException"> 63/// <exception cref="ArgumentException"> 110/// <exception cref="ArgumentException">
System\Text\Json\Nodes\JsonArray.IList.cs (2)
151/// <exception cref="ArgumentException"> 204/// <exception cref="ArgumentException">
System\Text\Json\Nodes\JsonNode.Parse.cs (2)
38/// <exception cref="ArgumentException"> 41/// <exception cref="ArgumentException">
System\Text\Json\Nodes\JsonObject.IDictionary.cs (3)
23/// <exception cref="ArgumentException"> 80/// <exception cref="ArgumentException"> 177/// <exception cref="ArgumentException">
System\Text\Json\Nodes\JsonObject.IList.cs (2)
22/// <exception cref="ArgumentException"><paramref name="propertyName"/> is already specified in a different index.</exception> 65/// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="JsonObject"/>.</exception>
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (1)
314catch (ArgumentException)
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (4)
58/// This method will throw <see cref="ArgumentException"/> if the destination buffer is too small to hold the unescaped value. 68/// <exception cref="ArgumentException">The destination buffer is too small to hold the unescaped value.</exception> 122/// This method will throw <see cref="ArgumentException"/> if the destination buffer is too small to hold the unescaped value. 132/// <exception cref="ArgumentException">The destination buffer is too small to hold the unescaped value.</exception>
System\Text\Json\Serialization\JsonSerializer.Read.Utf8JsonReader.cs (5)
26/// <exception cref="ArgumentException"> 80/// <exception cref="ArgumentException"> 132/// <exception cref="ArgumentException"> 178/// <exception cref="ArgumentException"> 228/// <exception cref="ArgumentException">
System\Text\Json\Serialization\JsonSerializer.Write.ByteArray.cs (2)
40/// <exception cref="ArgumentException"> 106/// <exception cref="ArgumentException">
System\Text\Json\Serialization\JsonSerializer.Write.Document.cs (1)
39/// <exception cref="ArgumentException">
System\Text\Json\Serialization\JsonSerializer.Write.Element.cs (1)
39/// <exception cref="ArgumentException">
System\Text\Json\Serialization\JsonSerializer.Write.Node.cs (1)
40/// <exception cref="ArgumentException">
System\Text\Json\Serialization\JsonSerializer.Write.Pipe.cs (2)
106/// <exception cref="ArgumentException"> 141/// <exception cref="ArgumentException">
System\Text\Json\Serialization\JsonSerializer.Write.Stream.cs (4)
89/// <exception cref="ArgumentException"> 122/// <exception cref="ArgumentException"> 254/// <exception cref="ArgumentException"> 286/// <exception cref="ArgumentException">
System\Text\Json\Serialization\JsonSerializer.Write.String.cs (1)
43/// <exception cref="ArgumentException">
System\Text\Json\Serialization\JsonSerializer.Write.Utf8JsonWriter.cs (2)
46/// <exception cref="ArgumentException"> 118/// <exception cref="ArgumentException">
System\Text\Json\Serialization\JsonSerializerOptions.Caching.cs (2)
49/// <exception cref="ArgumentException"><paramref name="type"/> is not valid for serialization.</exception> 74/// <exception cref="ArgumentException"><paramref name="type"/> is not valid for serialization.</exception>
System\Text\Json\Serialization\JsonSerializerOptions.cs (2)
324/// <exception cref="System.ArgumentException">Thrown when the buffer size is less than 1.</exception> 417/// <exception cref="ArgumentException">
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (3)
292/// <exception cref="ArgumentException"> 924/// <exception cref="ArgumentException"><paramref name="type"/> cannot be used for serialization.</exception> 982/// <exception cref="ArgumentException"><paramref name="propertyType"/> cannot be used for serialization.</exception>
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolver.cs (1)
16/// <exception cref="ArgumentException"><paramref name="resolvers"/> is null.</exception>
System\Text\Json\ThrowHelper.cs (2)
87private static ArgumentException GetArgumentException(string message) 580public static ArgumentException GetArgumentException_ReadInvalidUTF16(EncoderFallbackException innerException)
System\Text\Json\Writer\Utf8JsonWriter.cs (6)
739/// <exception cref="ArgumentException"> 764/// <exception cref="ArgumentException"> 842/// <exception cref="ArgumentException"> 865/// <exception cref="ArgumentException"> 888/// <exception cref="ArgumentException"> 913/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (3)
36/// <exception cref="ArgumentException"> 59/// <exception cref="ArgumentException"> 83/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (3)
40/// <exception cref="ArgumentException"> 64/// <exception cref="ArgumentException"> 89/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (3)
39/// <exception cref="ArgumentException"> 63/// <exception cref="ArgumentException"> 88/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (3)
39/// <exception cref="ArgumentException"> 63/// <exception cref="ArgumentException"> 88/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (3)
41/// <exception cref="ArgumentException"> 65/// <exception cref="ArgumentException"> 91/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (3)
41/// <exception cref="ArgumentException"> 65/// <exception cref="ArgumentException"> 91/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (4)
16/// <exception cref="ArgumentException"> 19/// <exception cref="ArgumentException"> 46/// <exception cref="ArgumentException"> 49/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (3)
39/// <exception cref="ArgumentException"> 63/// <exception cref="ArgumentException"> 88/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (6)
62/// <exception cref="ArgumentException"> 84/// <exception cref="ArgumentException"> 109/// <exception cref="ArgumentException"> 157/// <exception cref="ArgumentException"> 180/// <exception cref="ArgumentException"> 206/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (6)
39/// <exception cref="ArgumentException"> 63/// <exception cref="ArgumentException"> 88/// <exception cref="ArgumentException"> 127/// <exception cref="ArgumentException"> 151/// <exception cref="ArgumentException"> 168/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (18)
58/// <exception cref="ArgumentException"> 80/// <exception cref="ArgumentException"> 229/// <exception cref="ArgumentException"> 441/// <exception cref="ArgumentException"> 464/// <exception cref="ArgumentException"> 501/// <exception cref="ArgumentException"> 525/// <exception cref="ArgumentException"> 549/// <exception cref="ArgumentException"> 581/// <exception cref="ArgumentException"> 621/// <exception cref="ArgumentException"> 644/// <exception cref="ArgumentException"> 668/// <exception cref="ArgumentException"> 708/// <exception cref="ArgumentException"> 731/// <exception cref="ArgumentException"> 755/// <exception cref="ArgumentException"> 795/// <exception cref="ArgumentException"> 827/// <exception cref="ArgumentException"> 867/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (6)
40/// <exception cref="ArgumentException"> 65/// <exception cref="ArgumentException"> 91/// <exception cref="ArgumentException"> 132/// <exception cref="ArgumentException"> 157/// <exception cref="ArgumentException"> 176/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (1)
15/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Comment.cs (3)
18/// <exception cref="ArgumentException"> 37/// <exception cref="ArgumentException"> 157/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.FormattedNumber.cs (1)
15/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Raw.cs (4)
18/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than 715,827,882 (<see cref="int.MaxValue"/> / 3).</exception> 51/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than 715,827,882 (<see cref="int.MaxValue"/> / 3).</exception> 82/// <exception cref="ArgumentException">Thrown if the length of the input is zero or greater than or equal to <see cref="int.MaxValue"/>.</exception> 118/// <exception cref="ArgumentException">Thrown if the length of the input is zero or equal to <see cref="int.MaxValue"/>.</exception>
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (3)
33/// <exception cref="ArgumentException"> 63/// <exception cref="ArgumentException"> 210/// <exception cref="ArgumentException">
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.StringSegment.cs (3)
17/// <exception cref="ArgumentException"> 185/// <exception cref="ArgumentException"> 352/// <exception cref="ArgumentException">
System\ThrowHelper.cs (1)
54private static ArgumentException GetArgumentException(ExceptionResource resource, ExceptionArgument argument)
System.Text.RegularExpressions (5)
System\Text\RegularExpressions\Regex.Match.cs (3)
22/// <exception cref="ArgumentException">A regular expression parsing error occurred.</exception> 43/// <exception cref="ArgumentException">A regular expression parsing error occurred.</exception> 61/// <exception cref="ArgumentException">A regular expression parsing error occurred.</exception>
System\Text\RegularExpressions\RegexCompilationInfo.cs (1)
50ArgumentException.ThrowIfNullOrEmpty(value, nameof(Name));
System\Text\RegularExpressions\RegexParseException.cs (1)
42info.SetType(typeof(ArgumentException)); // To maintain serialization support with .NET Framework.
System.Text.RegularExpressions.Generator (1)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParseException.cs (1)
42info.SetType(typeof(ArgumentException)); // To maintain serialization support with .NET Framework.
System.Threading.RateLimiting (2)
System\Threading\RateLimiting\PartitionedRateLimiter.cs (1)
53/// <exception cref="ArgumentException"><paramref name="limiters"/> is an empty array.</exception>
System\Threading\RateLimiting\RateLimiter.cs (1)
32/// <exception cref="ArgumentException"><paramref name="limiters"/> is an empty array.</exception>
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\Parallel.cs (2)
147/// <exception cref="System.ArgumentException">The exception that is thrown when the 173/// <exception cref="System.ArgumentException">The exception that is thrown when the
System.Transactions.Local (1)
System\Transactions\TransactionState.cs (1)
4478catch (ArgumentException e)
System.Windows.Forms (21)
System\Resources\ResXDataNode.cs (2)
79ArgumentException.ThrowIfNullOrEmpty(name); 162ArgumentException.ThrowIfNullOrEmpty(value);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
218catch (ArgumentException)
System\Windows\Forms\ComponentModel\COM2Interop\COM2FontConverter.cs (1)
56catch (ArgumentException)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
11463catch (ArgumentException)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
861catch (ArgumentException)
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
114catch (ArgumentException)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButtonCollection.cs (2)
49/// <exception cref="ArgumentException"> 89/// <exception cref="ArgumentException">
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogRadioButtonCollection.cs (2)
48/// <exception cref="ArgumentException"> 88/// <exception cref="ArgumentException">
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
317catch (ArgumentException)
System\Windows\Forms\FeatureSupport.cs (2)
32catch (ArgumentException) 56catch (ArgumentException)
System\Windows\Forms\Form.cs (2)
5443/// <exception cref="ArgumentException"> 5576/// <exception cref="ArgumentException">
System\Windows\Forms\OLE\Clipboard.cs (2)
435ArgumentException.ThrowIfNullOrWhiteSpace(format); 446ArgumentException.ThrowIfNullOrWhiteSpace(format);
System\Windows\Forms\OLE\DataFormats.cs (1)
128ArgumentException.ThrowIfNullOrWhiteSpace(format);
System\Windows\Forms\SystemInformation.cs (1)
158catch (ArgumentException)
System\Windows\Forms\ToolTip\ToolTip.cs (1)
2333catch (ArgumentException)
System.Windows.Forms.Analyzers.CSharp.Tests (1)
FontConverterTests.cs (1)
95Assert.Throws<ArgumentException>(() => FontConverter.ConvertFrom(input));
System.Windows.Forms.Design (14)
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (1)
359catch (ArgumentException e)
System\Resources\Tools\StronglyTypedResourceBuilder.cs (3)
92/// <exception cref="ArgumentException"> 145/// <exception cref="ArgumentException"> 298/// <exception cref="ArgumentException">
System\Windows\Forms\Design\Behavior\AdornerCollection.cs (2)
153/// <exception cref="ArgumentException"> 226/// <exception cref="ArgumentException"><paramref name="value"/> is not found in the Collection.</exception>
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
717catch (ArgumentException)
System\Windows\Forms\Design\DataGridViewComboBoxColumnDesigner.cs (1)
89catch (ArgumentException)
System\Windows\Forms\Design\DataGridViewDesigner.cs (2)
393catch (ArgumentException ex) 570catch (ArgumentException ex)
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
664catch (ArgumentException e)
System\Windows\Forms\Design\MaskDesignerDialog.cs (1)
691catch (ArgumentException)
System\Windows\Forms\Design\OleDragDropHandler.cs (1)
204catch (ArgumentException argumentEx)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
623catch (ArgumentException argumentEx)
System.Windows.Forms.Design.Tests (31)
System\ComponentModel\Design\ByteViewerTests.cs (2)
624Assert.Throws<ArgumentException>("path", () => control.SaveToFile(path)); 893Assert.Throws<ArgumentException>("path", () => control.SetFile(path));
System\ComponentModel\Design\ExceptionCollectionTests.cs (1)
43Assert.Throws<ArgumentException>(() => new ExceptionCollection(exceptions));
System\ComponentModel\Design\ExtenderProviderServiceTests.cs (1)
58Assert.Throws<ArgumentException>("provider", () => providerService.AddExtenderProvider(mockExtenderProvider.Object));
System\ComponentModel\Design\Serialization\DesignerSerializationManagerTests.cs (3)
1958Assert.Throws<ArgumentException>("name", () => iManager.SetName(new object(), name)); 1971Assert.Throws<ArgumentException>("name", () => iManager.SetName(instance, name)); 1972Assert.Throws<ArgumentException>("instance", () => iManager.SetName(instance, "OtherName"));
System\ComponentModel\Design\SiteNestedContainerTests.cs (1)
419Assert.Throws<ArgumentException>("provider", () => container.Add(component));
System\Drawing\Design\ImageEditorTests.cs (1)
148Assert.Throws<ArgumentException>(() => editor.LoadFromStream(stream));
System\Drawing\Design\ToolboxItemTests.cs (14)
97Assert.Throws<ArgumentException>("value", () => item.Properties.Add("AssemblyName", new object())); 127Assert.Throws<ArgumentException>("value", () => item.Properties.Add("Bitmap", new object())); 151Assert.Throws<ArgumentException>("value", () => item.Properties.Add("Company", new object())); 203Assert.Throws<ArgumentException>("value", () => item.Properties.Add("DependentAssemblies", new object())); 227Assert.Throws<ArgumentException>("value", () => item.Properties.Add("Description", new object())); 251Assert.Throws<ArgumentException>("value", () => item.Properties.Add("DisplayName", new object())); 283Assert.Throws<ArgumentException>("value", () => item.Properties.Add("Filter", new object())); 314Assert.Throws<ArgumentException>("value", () => item.Properties.Add("IsTransient", new object())); 338Assert.Throws<ArgumentException>("value", () => item.Properties.Add("OriginalBitmap", new object())); 362Assert.Throws<ArgumentException>("value", () => item.Properties.Add("TypeName", new object())); 1323Assert.Throws<ArgumentException>(() => item.GetType(mockDesignerHost.Object, new AssemblyName(), "typeName", false)); 1324Assert.Throws<ArgumentException>(() => item.GetType(null, new AssemblyName(), "typeName", false)); 1600Assert.Throws<ArgumentException>("value", () => item.ValidatePropertyValue(propertyName, new object())); 1636Assert.Throws<ArgumentException>("value", () => item.ValidatePropertyType(propertyName, new object(), typeof(int), allowNull));
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (1)
182Assert.Throws<ArgumentException>(() => StronglyTypedResourceBuilder.Create(
System\Windows\Forms\Design\DesignBindingValueUIHandlerTests.cs (1)
26action.Should().Throw<ArgumentException>();
System\Windows\Forms\Design\ListControlStringCollectionEditorTests.cs (2)
65ArgumentException exception = ((Action)(() => editor.EditValue(context.Object, provider, value))).Should().Throw<ArgumentException>().Which;
System\Windows\Forms\Design\ParentControlDesignerTests.cs (2)
202.WithInnerException<ArgumentException>() 207.WithInnerException<ArgumentException>()
System\Windows\Forms\Design\TableLayoutPanelDesignerTests.cs (2)
42rowCountAct.Should().Throw<ArgumentException>(); 55columnCountAct.Should().Throw<ArgumentException>();
System.Windows.Forms.IntegrationTests.Common (1)
TestHelpers.cs (1)
409/// <exception cref="ArgumentException">
System.Windows.Forms.Primitives.Tests (31)
Interop\Oleaut32\VARIANTTests.cs (24)
385AssertToObjectThrows<ArgumentException>(variant); 705AssertToObjectEqualExtension<ArgumentException>(expected, variant); 713AssertToObjectEqualExtension<ArgumentException>(expected, variant); 726AssertToObjectEqualExtension<ArgumentException>(new DateTime(2020, 05, 13, 13, 3, 12), variant); 861AssertToObjectEqualExtension<ArgumentException>(text, variant); 868AssertToObjectEqualExtension<ArgumentException>(null, variant); 880AssertToObjectEqualExtension<ArgumentException>(text, variant); 891AssertToObjectEqualExtension<ArgumentException>(text, variant); 898AssertToObjectEqualExtension<ArgumentException>(null, variant); 910AssertToObjectEqualExtension<ArgumentException>(text, variant); 1047AssertToObjectThrows<ArgumentException>(variant); 1119AssertToObjectEqualExtension<ArgumentException>(guid, variant); 1143AssertToObjectThrows<ArgumentException>(variant); 1184AssertToObjectThrows<ArgumentException>(variant); 1976Assert.Throws<ArgumentException>(variant.ToObject); 5306Assert.Throws<ArgumentException>(variant.ToObject); 5379AssertToObjectThrows<ArgumentException>(variant); 5507AssertToObjectThrows<ArgumentException>(variant); 5529AssertToObjectThrows<ArgumentException>(variant); 5590AssertToObjectThrows<ArgumentException>(variant); 5638AssertToObjectThrows<ArgumentException>(variant); 5662Assert.Throws<ArgumentException>(() => Marshal.GetObjectForNativeVariant(pv)); 5663Assert.Throws<ArgumentException>(variant.ToObject); 5685AssertToObjectThrows<ArgumentException>(variant);
Windows\Win32\System\Com\ComSafeArrayScopeTests.cs (1)
17Assert.Throws<ArgumentException>(() => new ComSafeArrayScope<IUnknown>(array));
Windows\Win32\System\Com\SafeArrayScopeTests.cs (6)
32Assert.Throws<ArgumentException>(() => new SafeArrayScope<short>(size: 1)); 73ArgumentException e = Assert.Throws<ArgumentException>(() => new SafeArrayScope<IUnknown>(size: 1)); 78e = Assert.Throws<ArgumentException>(() => new SafeArrayScope<IUnknown>(array)); 93ArgumentException e = Assert.Throws<ArgumentException>(() => new SafeArrayScope<string>(array));
System.Windows.Forms.Primitives.TestUtilities (10)
Extensions\AssertExtensions.cs (10)
40where T : ArgumentException 59where T : ArgumentException 77where T : ArgumentException 129where T : ArgumentException 139where T : ArgumentException 149where TNetCoreExceptionType : ArgumentException 156if (typeof(ArgumentException).IsAssignableFrom(typeof(TNetFxExceptionType))) 159Assert.Equal(expectedParamName, ((ArgumentException)exception).ParamName); 192where TNetCoreExceptionType : ArgumentException 193where TNetFxExceptionType : ArgumentException
System.Windows.Forms.Tests (316)
CheckedListBoxTests.cs (2)
113ArgumentException ex = Assert.Throws<ArgumentException>(() => box.SelectionMode = expected);
MaskedTextBoxTests.cs (2)
806act.Should().Throw<ArgumentException>(); 809act2.Should().Throw<ArgumentException>();
misc\CollectionHelperTests.cs (3)
25Assert.Throws<ArgumentException>(() => source.HashtableCopyTo(target, index: 0)); 52Assert.Throws<ArgumentException>(() => source.HashtableCopyTo(target, index: 0)); 65Assert.Throws<ArgumentException>(() => source.HashtableCopyTo(target, index: 2));
System\Resources\ResXFileRef.ConverterTests.cs (1)
37Assert.Throws<ArgumentException>(() => ResXFileRef.Converter.ParseResxFileRefString(resxFileRefString));
System\Resources\ResXResourceReaderTests.cs (5)
52Assert.Throws<ArgumentException>(resxReader.GetEnumerator); 194ArgumentException exception = Assert.Throws<ArgumentException>(() => { IDictionaryEnumerator enumerator = resXReader.GetEnumerator(); }); 216ArgumentException exception = Assert.Throws<ArgumentException>(() =>
System\Windows\Forms\AccessibleObjects\Button.ButtonAccessibleObjectTests.cs (1)
17Assert.Throws<ArgumentException>(() => new ButtonAccessibleObject(null));
System\Windows\Forms\AccessibleObjects\ButtonBase.ButtonBaseAccessibleObjectTests.cs (2)
16Assert.Throws<ArgumentException>(() => new ButtonBase.ButtonBaseAccessibleObject(null)); 23Assert.Throws<ArgumentException>(() => new ButtonBase.ButtonBaseAccessibleObject(textBox));
System\Windows\Forms\AccessibleObjects\CheckBox.CheckBoxAccessibleObjectTests.cs (2)
17Assert.Throws<ArgumentException>(() => new CheckBoxAccessibleObject(null)); 24Assert.Throws<ArgumentException>(() => new CheckBoxAccessibleObject(textBox));
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (4)
1456Assert.Throws<ArgumentException>(() => toolStrip.Items.Add(host)); 1523Assert.Throws<ArgumentException>(() => toolStrip.Items.Add(host)); 1560Assert.Throws<ArgumentException>(() => toolStrip.Items.Add(host)); 1597Assert.Throws<ArgumentException>(() => toolStrip.Items.Add(host));
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (6)
1112Assert.Throws<ArgumentException>(() => property.SetValue(control, new object())); 1121Assert.Throws<ArgumentException>(() => property.SetValue(control, new object())); 1160Assert.Throws<ArgumentException>(() => property.SetValue(control, new object())); 1169Assert.Throws<ArgumentException>(() => property.SetValue(control, new object())); 1208Assert.Throws<ArgumentException>("value", () => property.SetValue(control, new object())); 1217Assert.Throws<ArgumentException>("value", () => property.SetValue(control, new object()));
System\Windows\Forms\AxHostTests.cs (2)
1512Assert.Throws<ArgumentException>("font", () => SubAxHost.GetIFontDispFromFont(font)); 1573Assert.Throws<ArgumentException>("font", () => SubAxHost.GetIFontFromFont(font));
System\Windows\Forms\BindingContextTests.cs (4)
540Assert.Throws<ArgumentException>(() => context[dataSource, "Property"]); 568Assert.Throws<ArgumentException>(() => context[dataSource, dataMember]); 982Assert.Throws<ArgumentException>("dataBinding", () => BindingContext.UpdateBinding(context, binding)); 1010Assert.Throws<ArgumentException>("dataBinding", () => BindingContext.UpdateBinding(context, binding));
System\Windows\Forms\BindingManagerBaseTests.cs (4)
47Assert.Throws<ArgumentException>("dataBinding", () => collection.Add(binding)); 60Assert.Throws<ArgumentException>("dataBinding", () => collection2.Add(binding)); 120Assert.Throws<ArgumentException>("dataBinding", () => collection.Remove(binding2)); 136Assert.Throws<ArgumentException>("dataBinding", () => collection2.Remove(binding1));
System\Windows\Forms\BindingSourceTests.cs (1)
473Assert.Throws<ArgumentException>(() => new BindingSource(new DataClass(), "NoSuchProperty"));
System\Windows\Forms\ButtonBaseTests.cs (1)
3029Assert.Throws<ArgumentException>(() => control.Parent = control);
System\Windows\Forms\ClipboardTests.cs (6)
153action.Should().Throw<ArgumentException>().WithParameterName("format"); 330action.Should().Throw<ArgumentException>(); 343action.Should().Throw<ArgumentException>(); 808action.Should().Throw<ArgumentException>(); 816action.Should().Throw<ArgumentException>(); 818clipboardSet2.Should().Throw<ArgumentException>();
System\Windows\Forms\ColumnHeaderCollectionTests.cs (3)
146Assert.Throws<ArgumentException>("ch", () => collection.Add(header)); 158Assert.Throws<ArgumentException>("ch", () => collection.Add(header)); 352Assert.Throws<ArgumentException>("value", () => collection.Add(value));
System\Windows\Forms\ColumnHeaderConverterTests.cs (1)
109Assert.Throws<ArgumentException>(() => converter.ConvertTo(value, typeof(InstanceDescriptor)));
System\Windows\Forms\Combobox.ObjectCollectionTests.cs (7)
118Assert.Throws<ArgumentException>(() => comboBoxObjectCollection.Add("a")); 398Assert.Throws<ArgumentException>(() => comboBoxObjectCollection.AddRange(new string[] { "a", "b" })); 466Assert.Throws<ArgumentException>(comboBoxObjectCollection.Clear); 828Assert.Throws<ArgumentException>(() => comboBoxObjectCollection.Insert(3, 1)); 929Assert.Throws<ArgumentException>(() => comboBoxObjectCollection.RemoveAt(0)); 1074Assert.Throws<ArgumentException>(() => comboBoxObjectCollection.Remove("a")); 1375Assert.Throws<ArgumentException>(() => comboBoxObjectCollection[0] = 1);
System\Windows\Forms\ContainerControlTests.cs (2)
177Assert.Throws<ArgumentException>("value", () => control.ActiveControl = control); 178Assert.Throws<ArgumentException>("value", () => control.ActiveControl = new Control());
System\Windows\Forms\ControlBindingsCollectionTests.cs (18)
243Assert.Throws<ArgumentException>("PropertyName", () => collection.Add(new Binding("NoSuchProperty", new object(), "dataMember"))); 244Assert.Throws<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember")); 245Assert.Throws<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true)); 246Assert.Throws<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged)); 247Assert.Throws<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null")); 248Assert.Throws<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString")); 249Assert.Throws<ArgumentException>("PropertyName", () => collection.Add("NoSuchProperty", new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture)); 260Assert.Throws<ArgumentException>("binding", () => collection.Add(new Binding(nameof(Control.Text), new object(), "dataMember"))); 261Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember")); 262Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true)); 263Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged)); 264Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null")); 265Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString")); 266Assert.Throws<ArgumentException>("binding", () => collection.Add(nameof(Control.Text), new object(), "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture)); 285Assert.Throws<ArgumentException>("dataBinding", () => collection.Add(binding)); 298Assert.Throws<ArgumentException>("dataBinding", () => collection2.Add(binding)); 358Assert.Throws<ArgumentException>("dataBinding", () => collection.Remove(binding2)); 374Assert.Throws<ArgumentException>("dataBinding", () => collection2.Remove(binding1));
System\Windows\Forms\ControlPaintTests.cs (16)
867Assert.Throws<ArgumentException>(() => ControlPaint.DrawButton(graphics, new Rectangle(0, 0, width, height), state)); 868Assert.Throws<ArgumentException>(() => ControlPaint.DrawButton(graphics, 0, 0, width, height, state)); 950Assert.Throws<ArgumentException>(() => ControlPaint.DrawCaptionButton(graphics, new Rectangle(0, 0, width, height), CaptionButton.Close, state)); 951Assert.Throws<ArgumentException>(() => ControlPaint.DrawCaptionButton(graphics, 0, 0, width, height, CaptionButton.Close, state)); 1031Assert.Throws<ArgumentException>(() => ControlPaint.DrawCheckBox(graphics, new Rectangle(0, 0, width, height), state)); 1032Assert.Throws<ArgumentException>(() => ControlPaint.DrawCheckBox(graphics, 0, 0, width, height, state)); 1111Assert.Throws<ArgumentException>(() => ControlPaint.DrawComboButton(graphics, new Rectangle(0, 0, width, height), state)); 1112Assert.Throws<ArgumentException>(() => ControlPaint.DrawComboButton(graphics, 0, 0, width, height, state)); 1490Assert.Throws<ArgumentException>(() => ControlPaint.DrawMenuGlyph(graphics, new Rectangle(0, 0, width, height), glyph)); 1491Assert.Throws<ArgumentException>(() => ControlPaint.DrawMenuGlyph(graphics, 0, 0, width, height, glyph)); 1572Assert.Throws<ArgumentException>(() => ControlPaint.DrawMixedCheckBox(graphics, new Rectangle(0, 0, width, height), state)); 1573Assert.Throws<ArgumentException>(() => ControlPaint.DrawMixedCheckBox(graphics, 0, 0, width, height, state)); 1652Assert.Throws<ArgumentException>(() => ControlPaint.DrawRadioButton(graphics, new Rectangle(0, 0, width, height), state)); 1653Assert.Throws<ArgumentException>(() => ControlPaint.DrawRadioButton(graphics, 0, 0, width, height, state)); 1790Assert.Throws<ArgumentException>(() => ControlPaint.DrawScrollButton(graphics, new Rectangle(0, 0, width, height), ScrollButton.Up, state)); 1791Assert.Throws<ArgumentException>(() => ControlPaint.DrawScrollButton(graphics, 0, 0, width, height, ScrollButton.Up, state));
System\Windows\Forms\ControlTests.ControlCollection.cs (12)
83Assert.Throws<ArgumentException>(() => collection.Add(control2)); 410Assert.Throws<ArgumentException>(() => collection.Add(control)); 1117Assert.Throws<ArgumentException>(() => collection.Add(control)); 1136Assert.Throws<ArgumentException>(() => collection.Add(control)); 1160Assert.Throws<ArgumentException>(() => collection.Add(control)); 1173Assert.Throws<ArgumentException>(() => collection.Add(owner)); 1185Assert.Throws<ArgumentException>(() => collection.Add(parent)); 1201Assert.Throws<ArgumentException>(() => collection.Add(grandparent)); 1583Assert.Throws<ArgumentException>(() => collection.GetChildIndex(child)); 1584Assert.Throws<ArgumentException>(() => collection.GetChildIndex(child)); 3509Assert.Throws<ArgumentException>("control", () => collection.Add(new object())); 3510Assert.Throws<ArgumentException>("control", () => collection.Add(null));
System\Windows\Forms\ControlTests.Methods.cs (4)
1901Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(x, y, width, height))); 1915Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(1, 2, 3, 4))); 1929Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(1, 2, 3, 4))); 10091Assert.Throws<ArgumentException>("value", () => control.SetTopLevel(true));
System\Windows\Forms\ControlTests.Properties.cs (8)
1600Assert.Throws<ArgumentException>(() => control.BackColor = Color.FromArgb(254, 1, 2, 3)); 9810Assert.Throws<ArgumentException>(() => control.Parent = control); 9821Assert.Throws<ArgumentException>(() => control.Parent = child); 9832Assert.Throws<ArgumentException>(() => control.Parent = parent); 9906Assert.Throws<ArgumentException>(oldValue.MakeEmpty); 9912Assert.Throws<ArgumentException>(oldValue.MakeEmpty); 9965Assert.Throws<ArgumentException>(oldValue.MakeEmpty); 9974Assert.Throws<ArgumentException>(oldValue.MakeEmpty);
System\Windows\Forms\CursorConverterTests.cs (1)
61Assert.Throws<ArgumentException>("stream", () => converter.ConvertFrom(Array.Empty<byte>()));
System\Windows\Forms\CursorTests.cs (7)
55Assert.Throws<ArgumentException>("handle", () => new Cursor(IntPtr.Zero)); 88Assert.Throws<ArgumentException>("stream", () => new Cursor(new MemoryStream())); 113Assert.Throws<ArgumentException>("stream", () => new Cursor(stream)); 138Assert.Throws<ArgumentException>("path", () => new Cursor(fileName)); 151Assert.Throws<ArgumentException>("fileName", () => new Cursor(fileName)); 410Assert.Throws<ArgumentException>(() => cursor.Draw(graphics, new Rectangle(Point.Empty, cursor.Size))); 447Assert.Throws<ArgumentException>(() => cursor.DrawStretched(graphics, new Rectangle(Point.Empty, cursor.Size)));
System\Windows\Forms\DataFormatsTests.cs (1)
110Assert.Throws<ArgumentException>("format", () => DataFormats.GetFormat(""));
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (1)
74Assert.Throws<ArgumentException>("paintParts", () => new DataGridViewCellPaintingEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, paintParts));
System\Windows\Forms\DataGridViewCellTests.cs (3)
4638Assert.Throws<ArgumentException>(() => cell.GetInheritedState(rowIndex)); 4649Assert.Throws<ArgumentException>(() => cell.GetInheritedState(rowIndex)); 6217Assert.Throws<ArgumentException>("formattedValue", () => cell.ParseFormattedValue(formattedValue, new DataGridViewCellStyle(), new Int32Converter(), new Int32Converter()));
System\Windows\Forms\DataGridViewColumnTests.cs (4)
1002Assert.Throws<ArgumentException>("value", () => column.DefaultHeaderCellType = value); 1013Assert.Throws<ArgumentException>("value", () => column.DefaultHeaderCellType = value); 1774Assert.Throws<ArgumentException>(() => column.GetPreferredWidth(autoSizeColumnMode, fixedHeight: true)); 1775Assert.Throws<ArgumentException>(() => column.GetPreferredWidth(autoSizeColumnMode, fixedHeight: false));
System\Windows\Forms\DataGridViewComboBoxCell.ObjectCollectionTests.cs (2)
224actionOutOfRangeIndex.Should().Throw<ArgumentException>(); 236action.Should().Throw<ArgumentException>();
System\Windows\Forms\DataGridViewDataErrorEventArgsTests.cs (1)
63Assert.Throws<ArgumentException>(() => e.ThrowException = true);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (6)
3005Assert.Throws<ArgumentException>("rowIndex", () => cell.GetInheritedState(-1)); 3016Assert.Throws<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex)); 3027Assert.Throws<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex)); 3055Assert.Throws<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex)); 3075Assert.Throws<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex)); 3121Assert.Throws<ArgumentException>("rowIndex", () => cell.GetInheritedState(rowIndex));
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (1)
108Assert.Throws<ArgumentException>("value", () => e.PaintParts = value);
System\Windows\Forms\DataGridViewRowTests.cs (5)
724Assert.Throws<ArgumentException>("value", () => row.DefaultHeaderCellType = value); 735Assert.Throws<ArgumentException>("value", () => row.DefaultHeaderCellType = value); 1778Assert.Throws<ArgumentException>("value", () => row.HeaderCellCore = value); 4551Assert.Throws<ArgumentException>("rowIndex", () => row.GetState(rowIndex)); 5339Assert.Throws<ArgumentException>(() => row.PaintCells(graphics, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, paintParts));
System\Windows\Forms\DataGridViewTests.cs (1)
948Assert.Throws<ArgumentException>(() => control.Parent = control);
System\Windows\Forms\DataObjectTests.cs (9)
1583action.Should().Throw<ArgumentException>().WithParameterName("format"); 1586action.Should().Throw<ArgumentException>().WithParameterName("format"); 1589action.Should().Throw<ArgumentException>().WithParameterName("format"); 2554((Action)(() => iComDataObject.GetDataHere(ref formatetc, ref stgMedium))).Should().Throw<ArgumentException>(); 2576((Action)(() => iComDataObject.GetDataHere(ref formatetc, ref stgMedium))).Should().Throw<ArgumentException>(); 2675((Action)(() => iComDataObject.GetDataHere(ref formatetc, ref stgMedium))).Should().Throw<ArgumentException>(); 2937action.Should().Throw<ArgumentException>(); 2940dataObjectSet2.Should().Throw<ArgumentException>(); 3103action.Should().Throw<ArgumentException>();
System\Windows\Forms\DateTimePickerTests.cs (5)
192act.Should().Throw<ArgumentException>(); 214act.Should().Throw<ArgumentException>(); 236act.Should().Throw<ArgumentException>(); 258act.Should().Throw<ArgumentException>(); 280act.Should().Throw<ArgumentException>();
System\Windows\Forms\Design\PropertyTabTests.cs (4)
58Assert.Throws<ArgumentException>(() => bitmap.Size); 63Assert.Throws<ArgumentException>(() => bitmap.Size); 102Assert.Throws<ArgumentException>(() => bitmap.Size); 114Assert.Throws<ArgumentException>(() => bitmap.Size);
System\Windows\Forms\Design\WindowsFormsComponentEditorTests.cs (3)
87Assert.Throws<ArgumentException>("component", () => editor.EditComponent(component, null)); 88Assert.Throws<ArgumentException>("component", () => editor.EditComponent(null, component)); 89Assert.Throws<ArgumentException>("component", () => editor.EditComponent(null, component, null));
System\Windows\Forms\ErrorProviderTests.cs (2)
363Assert.Throws<ArgumentException>(() => provider.DataMember = "NoSuchValue"); 842Assert.Throws<ArgumentException>(() => provider.BindToDataAndErrors(newDataSource, "NoSuchValue"));
System\Windows\Forms\FileDialogTests.cs (1)
334Assert.Throws<ArgumentException>("value", () => dialog.Filter = value);
System\Windows\Forms\FontDialogTests.cs (1)
720Assert.Throws<ArgumentException>(() => dialog.HookProc(IntPtr.Zero, (int)PInvokeCore.WM_COMMAND, 0x402, IntPtr.Zero));
System\Windows\Forms\FormTests.cs (3)
1236Assert.Throws<ArgumentException>(() => control.Parent = control); 1245Assert.Throws<ArgumentException>(() => control.Parent = parent); 1261Assert.Throws<ArgumentException>("value", () => control.Parent = parent);
System\Windows\Forms\HelpProviderTests.cs (1)
552Assert.Throws<ArgumentException>("url", () => control.OnHelpRequested(e));
System\Windows\Forms\HtmlDocumentTests.cs (4)
672Assert.Throws<ArgumentException>(() => document.Encoding = value); 1567Assert.Throws<ArgumentException>(() => document.CreateElement(null)); 1738Assert.Throws<ArgumentException>(() => document.GetElementById(null)); 1814Assert.Throws<ArgumentException>(() => document.GetElementsByTagName(null));
System\Windows\Forms\HtmlElementTests.cs (4)
1919Assert.Throws<ArgumentException>(() => element.GetAttribute(null)); 1959Assert.Throws<ArgumentException>(() => element.GetElementsByTagName(null)); 2337Assert.Throws<ArgumentException>(() => element.InsertAdjacentElement(orient, newElement)); 2474Assert.Throws<ArgumentException>(() => element.SetAttribute(null, "value"));
System\Windows\Forms\ImageList.ImageCollectionTests.cs (9)
342Assert.Throws<ArgumentException>(() => collection[0] = value); 809Assert.Throws<ArgumentException>(() => collection.Add(value)); 810Assert.Throws<ArgumentException>(() => collection.Add(value, Color.Transparent)); 811Assert.Throws<ArgumentException>(() => collection.Add("Key", value)); 886Assert.Throws<ArgumentException>(() => collection.AddRange([value])); 955Assert.Throws<ArgumentException>("value", () => collection.AddStrip(image)); 967Assert.Throws<ArgumentException>("value", () => collection.AddStrip(image)); 1714Assert.Throws<ArgumentException>("value", () => collection[0] = value); 1726Assert.Throws<ArgumentException>(() => collection[0] = value);
System\Windows\Forms\ImageListTests.cs (1)
404Assert.Throws<ArgumentException>("value", () => list.ImageSize = Size.Empty);
System\Windows\Forms\InputLanguageChangedEventArgsTests.cs (1)
45Assert.Throws<ArgumentException>("culture", () => new InputLanguageChangedEventArgs(culture, 0));
System\Windows\Forms\InputLanguageChangingEventArgsTests.cs (1)
46Assert.Throws<ArgumentException>("culture", () => new InputLanguageChangingEventArgs(culture, true));
System\Windows\Forms\InputLanguageTests.cs (2)
68Assert.Throws<ArgumentException>("value", () => InputLanguage.CurrentInputLanguage = language); 172Assert.ThrowsAny<ArgumentException>(() => language.Culture);
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
127Assert.Throws<ArgumentException>(() => converter.ConvertFrom($@"<?xml version=""1.0"" encoding=""utf-16""?><Root><Columns Styles=""{style}"" /></Root>"));
System\Windows\Forms\LinkAreaConverterTests.cs (2)
59Assert.Throws<ArgumentException>(() => converter.ConvertFrom(value)); 191Assert.Throws<ArgumentException>("propertyValues", () => converter.CreateInstance(null, propertyValues));
System\Windows\Forms\LinkCollectionTests.cs (1)
55act.Should().Throw<ArgumentException>();
System\Windows\Forms\LinkConverterTests.cs (1)
57Assert.Throws<ArgumentException>(() => converter.ConvertFrom(value));
System\Windows\Forms\ListBindingHelperTests.cs (2)
88Assert.Throws<ArgumentException>(() => ListBindingHelper.GetList(dataSource, dataMember)); 452Assert.Throws<ArgumentException>(() => ListBindingHelper.GetListItemProperties(list, dataMember, null));
System\Windows\Forms\ListBox.IntegerCollectionTests.cs (3)
1742Assert.Throws<ArgumentException>(() => collection[index] = item); 1962Assert.Throws<ArgumentException>(() => collection.Add(item)); 2562Assert.Throws<ArgumentException>(() => collection.Remove(item));
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (18)
72Assert.Throws<ArgumentException>(() => new ListBox.ObjectCollection(owner, Array.Empty<object>())); 73Assert.Throws<ArgumentException>(() => new ListBox.ObjectCollection(owner, otherCollection)); 2197Assert.Throws<ArgumentException>(() => collection.Add(1)); 3672Assert.Throws<ArgumentException>(() => collection.AddRange(Array.Empty<object>())); 3673Assert.Throws<ArgumentException>(() => collection.AddRange(otherCollection)); 5035Assert.Throws<ArgumentException>(() => collection.Insert(0, 1)); 5987Assert.Throws<ArgumentException>(() => collection.Remove(1)); 5998Assert.Throws<ArgumentException>(() => collection.Remove(1)); 5999Assert.Throws<ArgumentException>(() => collection.Remove(2)); 6867Assert.Throws<ArgumentException>(() => collection.RemoveAt(1)); 6878Assert.Throws<ArgumentException>(() => collection.RemoveAt(1)); 9002Assert.Throws<ArgumentException>(() => collection.Add(1)); 10357Assert.Throws<ArgumentException>(() => collection.Insert(0, 1)); 11309Assert.Throws<ArgumentException>(() => collection.Remove(1)); 11320Assert.Throws<ArgumentException>(() => collection.Remove(1)); 11321Assert.Throws<ArgumentException>(() => collection.Remove(2)); 12189Assert.Throws<ArgumentException>(() => collection.RemoveAt(1)); 12200Assert.Throws<ArgumentException>(() => collection.RemoveAt(1));
System\Windows\Forms\ListBoxTests.cs (6)
1039Assert.Throws<ArgumentException>("value", () => control.DrawMode = DrawMode.OwnerDrawVariable); 1963Assert.Throws<ArgumentException>("value", () => control.MultiColumn = true); 2755Assert.Throws<ArgumentException>("value", () => control.SelectedIndex = -1); 3279AssertExtensions.Throws<ArgumentException>("value", () => control.SelectedItem = "item"); 3285AssertExtensions.Throws<ArgumentException>("value", () => control.SelectedItem = null); 6332action.Should().Throw<ArgumentException>()
System\Windows\Forms\ListControlTests.cs (3)
1067Assert.Throws<ArgumentException>("value", () => control.DataSource = new object()); 1798Assert.Throws<ArgumentException>("newDisplayMember", (() => control.ValueMember = "NoSuchValue")); 1847Assert.Throws<ArgumentException>("value", (() => control.ValueMember = "NoSuchValue"));
System\Windows\Forms\ListViewGroupCollectionTests.cs (4)
166Assert.Throws<ArgumentException>(() => collection[0] = group); 497Assert.Throws<ArgumentException>(() => collection.Add(group)); 534Assert.Throws<ArgumentException>("value", () => collection.Add(value)); 853Assert.Throws<ArgumentException>(() => collection.Insert(0, group));
System\Windows\Forms\ListViewSubItemCollectionTests.cs (3)
160Assert.Throws<ArgumentException>("value", () => collection[0] = value); 307Assert.Throws<ArgumentException>("item", () => collection.Add(value)); 687Assert.Throws<ArgumentException>("item", () => collection.Insert(0, value));
System\Windows\Forms\ListViewTests.cs (2)
271Assert.Throws<ArgumentException>("value", () => listView.Activation = value); 2358Assert.Throws<ArgumentException>("value", () => listView.HoverSelection = false);
System\Windows\Forms\ListViewVirtualItemsSelectionRangeChangedEventArgsTests.cs (1)
28Assert.Throws<ArgumentException>(() => new ListViewVirtualItemsSelectionRangeChangedEventArgs(1, 0, false));
System\Windows\Forms\MonthCalendar.SelectionRangeConverterTests.cs (2)
81act.Should().Throw<ArgumentException>(); 137func.Should().Throw<ArgumentException>();
System\Windows\Forms\MonthCalendarTests.cs (3)
2770Assert.Throws<ArgumentException>("value", () => calendar.TitleBackColor = Color.Empty); 2829Assert.Throws<ArgumentException>("value", () => calendar.TitleForeColor = Color.Empty); 2983Assert.Throws<ArgumentException>("value", () => calendar.TrailingForeColor = Color.Empty);
System\Windows\Forms\NativeToWinFormsAdapterTests.cs (1)
462action.Should().Throw<ArgumentException>();
System\Windows\Forms\NotifyIconTests.cs (2)
967Assert.Throws<ArgumentException>(() => notifyIcon.ShowBalloonTip(0)); 968Assert.Throws<ArgumentException>(() => notifyIcon.ShowBalloonTip(0, "Title", tipText, ToolTipIcon.Error));
System\Windows\Forms\PaddingConverterTests.cs (2)
61Assert.Throws<ArgumentException>("value", () => converter.ConvertFrom(value)); 364Assert.Throws<ArgumentException>("propertyValues", () => converter.CreateInstance(mockContext.Object, propertyValues));
System\Windows\Forms\PageSetupDialogTests.cs (1)
445Assert.Throws<ArgumentException>(() => dialog.ShowDialog());
System\Windows\Forms\PictureBoxTests.cs (1)
1215Assert.Throws<ArgumentException>(() => control.Parent = control);
System\Windows\Forms\PropertyGridTests.cs (4)
1028Assert.Throws<ArgumentException>(() => control.CommandsBackColor = Color.FromArgb(254, 1, 2, 3)); 1816Assert.Throws<ArgumentException>(() => control.HelpBackColor = Color.FromArgb(254, 1, 2, 3)); 2710Assert.Throws<ArgumentException>(() => control.SelectedObjects = [null]); 3286Assert.Throws<ArgumentException>(() => control.ViewBackColor = Color.FromArgb(254, 1, 2, 3));
System\Windows\Forms\PropertyManagerTests.cs (1)
47Assert.Throws<ArgumentException>(manager.GetListName);
System\Windows\Forms\RichTextBoxTests.cs (7)
2873Assert.Throws<ArgumentException>(() => control.Rtf = "text"); 3380Assert.Throws<ArgumentException>(() => control.SelectedRtf = "text"); 8546Assert.Throws<ArgumentException>(() => control.Find("s", 1, 0, RichTextBoxFinds.None)); 8547Assert.Throws<ArgumentException>(() => control.Find("s", 1, 0, RichTextBoxFinds.Reverse)); 8782Assert.Throws<ArgumentException>(() => control.LoadFile(stream, fileType)); 8791Assert.Throws<ArgumentException>(() => control.LoadFile(stream, RichTextBoxStreamType.RichText)); 8805Assert.Throws<ArgumentException>(() => control.LoadFile(stream, RichTextBoxStreamType.RichText));
System\Windows\Forms\SplitterTests.cs (1)
731Assert.Throws<ArgumentException>(() => control.Dock = value);
System\Windows\Forms\TabControl.ControlCollectionTests.cs (1)
878Assert.Throws<ArgumentException>(() => collection.Add(value));
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (3)
1096Assert.Throws<ArgumentException>(() => iList.Add(value)); 3145Assert.Throws<ArgumentException>(() => iList.Insert(0, value)); 3944Assert.Throws<ArgumentException>(() => iList[0] = value);
System\Windows\Forms\TabControlTests.cs (1)
3989Assert.Throws<ArgumentException>("item", () => control.GetToolTipText(new object()));
System\Windows\Forms\TableLayoutPanelCellPositionTests.cs (2)
144Assert.Throws<ArgumentException>("value", () => converter.ConvertFrom(value)); 281Assert.Throws<ArgumentException>("propertyValues", () => converter.CreateInstance(null, propertyValues));
System\Windows\Forms\TableLayoutStyleCollectionTests.cs (8)
76Assert.Throws<ArgumentException>("style", () => collection.Add(style)); 77Assert.Throws<ArgumentException>("style", () => ((IList)collection).Add(style)); 109Assert.Throws<ArgumentException>(() => collection.Insert(0, new object())); 120Assert.Throws<ArgumentException>("style", () => ((IList)collection).Insert(0, style)); 171Assert.Throws<ArgumentException>(() => collection[0] = new object()); 182Assert.Throws<ArgumentException>("style", () => collection[0] = style); 183Assert.Throws<ArgumentException>("style", () => ((IList)collection)[0] = style); 219Assert.Throws<ArgumentException>(() => collection.Remove(new object()));
System\Windows\Forms\TabPageTests.cs (2)
2608Assert.Throws<ArgumentException>(() => control.Parent = control); 2617Assert.Throws<ArgumentException>(() => control.Parent = parent);
System\Windows\Forms\TabPageTests.TabPageControlCollection.cs (1)
109Assert.Throws<ArgumentException>(() => collection.Add(control));
System\Windows\Forms\ToolStripContainer.ToolStripContainerTypedControlCollectionTests.cs (1)
40act.Should().Throw<ArgumentException>();
System\Windows\Forms\ToolStripDropDownTests.cs (2)
343Assert.Throws<ArgumentException>(() => control.AllowItemReorder = true); 2918Assert.Throws<ArgumentException>("value", () => control.TopLevel = true);
System\Windows\Forms\ToolStripPanel.ToolStripPanelRowCollectionTests.cs (2)
285action.Should().Throw<ArgumentException>() 304action.Should().Throw<ArgumentException>()
System\Windows\Forms\ToolStripTests.cs (2)
579Assert.Throws<ArgumentException>(() => control.AllowDrop = true); 680Assert.Throws<ArgumentException>(() => control.AllowItemReorder = true);
System\Windows\Forms\ToolTipTests.cs (1)
355Assert.Throws<ArgumentException>("value", () => toolTip.ForeColor = Color.Empty);
System\Windows\Forms\TreeNodeCollectionTests.cs (2)
110Assert.Throws<ArgumentException>(() => collection[1] = node); 123Assert.Throws<ArgumentException>(() => collection[0] = nodeOfAnotherTreeView);
System\Windows\Forms\TreeViewTests.cs (1)
4747Assert.Throws<ArgumentException>(() => node.Nodes.Add(node));
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (4)
57Assert.Throws<ArgumentException>(() => new VisualStyleRenderer(element.ClassName, element.Part, element.State)); 82Assert.Throws<ArgumentException>(() => new VisualStyleRenderer(element)); 531Assert.Throws<ArgumentException>(() => renderer.SetParameters(element.ClassName, element.Part, element.State)); 559Assert.Throws<ArgumentException>(() => renderer.SetParameters(element));
System\Windows\Forms\WebBrowserTests.cs (7)
1313Assert.Throws<ArgumentException>("value", () => control.ObjectForScripting = new PrivateClass()); 1580Assert.Throws<ArgumentException>(() => control.Parent = control); 2090Assert.Throws<ArgumentException>(() => control.Url = relativeUri); 3461Assert.Throws<ArgumentException>(() => control.Navigate(relativeUri)); 3462Assert.Throws<ArgumentException>(() => control.Navigate(relativeUri, "targetFrameName")); 3463Assert.Throws<ArgumentException>(() => control.Navigate(relativeUri, false)); 3464Assert.Throws<ArgumentException>(() => control.Navigate(relativeUri, "targetFrameName", null, null));
WebBrowserBaseTests.cs (3)
726Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(x, y, width, height))); 740Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(1, 2, 3, 4))); 754Assert.Throws<ArgumentException>(() => control.DrawToBitmap(bitmap, new Rectangle(1, 2, 3, 4)));
System.Windows.Forms.UI.IntegrationTests (1)
PropertyGridTests.cs (1)
317act.Should().Throw<ArgumentException>();
System.Xaml (4)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (1)
112catch (ArgumentException)
System\Xaml\AttachablePropertyServices.cs (1)
190catch (ArgumentException)
System\Xaml\InfosetObjects\XamlObjectWriter.cs (1)
1892if (!(ex.InnerException is ArgumentException) &&
System\Xaml\MS\Impl\XmlNsInfo.cs (1)
290catch (ArgumentException ex)
System.Xaml.Tests (29)
System\Windows\Markup\StaticExtensionTests.cs (5)
112Assert.Throws<ArgumentException>(() => extension.ProvideValue(provider)); 132Assert.Throws<ArgumentException>(() => extension.ProvideValue(provider)); 143Assert.Throws<ArgumentException>(() => extension.ProvideValue(null)); 165Assert.Throws<ArgumentException>(() => extension.ProvideValue(provider)); 235Assert.Throws<ArgumentException>(() => converter.ConvertTo(1, typeof(InstanceDescriptor)));
System\Windows\Markup\TypeExtensionTests.cs (1)
196Assert.Throws<ArgumentException>(() => converter.ConvertTo(1, typeof(InstanceDescriptor)));
System\Windows\Markup\ValueSerializerTests.cs (2)
213Assert.Throws<ArgumentException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithEmptyTypeConverterAttribute))); 214Assert.Throws<ArgumentException>(() => ValueSerializer.GetSerializerFor(typeof(ClassWithEmptyTypeConverterAttribute), null!));
System\Xaml\Schema\XamlValueConverterTests.cs (2)
52Assert.Throws<ArgumentException>(() => new XamlValueConverter<string>(null, null)); 53Assert.Throws<ArgumentException>(() => new XamlValueConverter<string>(null, null, null));
System\Xaml\XamlDirectiveTests.cs (1)
56Assert.Throws<ArgumentException>("xamlNamespaces", () => new XamlDirective(new string?[] { null }, "name", type, null, AllowedMemberLocations.Any));
System\Xaml\XamlMemberTests.cs (8)
233Assert.Throws<ArgumentException>("getter", () => new XamlMember("name", getter, null, new XamlSchemaContext())); 234Assert.Throws<ArgumentException>("getter", () => new XamlMember("name", getter, null, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker)); 243Assert.Throws<ArgumentException>("setter", () => new XamlMember("name", null, setter, new XamlSchemaContext())); 244Assert.Throws<ArgumentException>("setter", () => new XamlMember("name", null, setter, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker)); 317Assert.Throws<ArgumentException>("adder", () => new XamlMember("name", adder, new XamlSchemaContext())); 318Assert.Throws<ArgumentException>("adder", () => new XamlMember("name", adder, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker)); 1399Assert.Throws<ArgumentException>(() => member.LookupMarkupExtensionBracketCharactersEntry()); 1400Assert.Throws<ArgumentException>(() => member.MarkupExtensionBracketCharacters);
System\Xaml\XamlSchemaContextTests.cs (3)
971Assert.Throws<ArgumentException>("xamlTypeName", () => context.GetXamlType(new XamlTypeName(null, "name"))); 978Assert.Throws<ArgumentException>("xamlTypeName", () => context.GetXamlType(new XamlTypeName("xamlNamespace", null))); 987Assert.Throws<ArgumentException>(() => context.GetXamlType(xamlTypeName));
System\Xaml\XamlServicesTests.cs (1)
72Assert.Throws<ArgumentException>("fileName", () => XamlServices.Save("", 1));
System\Xaml\XamlTypeTests.cs (6)
138Assert.Throws<ArgumentException>(() => new XamlType("unknownTypeNamespace", "unknownTypeName", new XamlType?[] { null }, new XamlSchemaContext())); 139Assert.Throws<ArgumentException>(() => new SubXamlType("typeName", new XamlType?[] { null }, new XamlSchemaContext())); 3885Assert.Throws<ArgumentException>(() => type.LookupSetMarkupExtensionHandlerEntry()); 3892Assert.Throws<ArgumentException>("target", () => type.LookupSetMarkupExtensionHandlerEntry()); 4084Assert.Throws<ArgumentException>(() => type.LookupSetTypeConverterHandlerEntry()); 4091Assert.Throws<ArgumentException>("target", () => type.LookupSetTypeConverterHandlerEntry());
Test.Utilities (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
Text.Analyzers (19)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (2)
256catch (ArgumentException e) 372catch (ArgumentException e)
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
775ex is ArgumentException || // The file name is empty, contains only white spaces, or contains invalid characters.
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (2)
228/// <exception cref="ArgumentException"> 290/// <exception cref="ArgumentException">
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
89/// <exception cref="ArgumentException"><paramref name="destination"/> is shorter than <see cref="HashLengthInBytes"/> (16 bytes).</exception>
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
130private static ArgumentException GetAddingDuplicateWithKeyArgumentException(object? key) 214private static ArgumentException GetArgumentException(ExceptionResource resource) 219private static ArgumentException GetWrongKeyTypeArgumentException(object? key, Type targetType) 224private static ArgumentException GetWrongValueTypeArgumentException(object? value, Type targetType)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (1)
781/// <exception cref="ArgumentException"><paramref name="start" /> and <paramref name="length" /> do not denote a valid range of elements in the <see cref="SegmentedList{T}" />.</exception>
src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (6)
73/// <exception cref="ArgumentException"> 96/// <exception cref="ArgumentException"> 133/// <exception cref="ArgumentException"> 160/// <exception cref="ArgumentException"> 199/// <exception cref="ArgumentException"> 233/// <exception cref="ArgumentException">
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BuiltinOperatorSymbolKey.cs (1)
66catch (ArgumentException ex)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
79=> compilation.GetTypeByMetadataName(typeof(ArgumentException).FullName!);
UIAutomationClientSideProviders (3)
MS\Internal\AutomationProxies\Misc.cs (1)
1826if (ex is ArgumentException || ex is SystemException)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (1)
195ArgumentException.ThrowIfNullOrEmpty(text);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (1)
123ArgumentException.ThrowIfNullOrEmpty(text);
WindowsBase.Tests (139)
System\IO\Packaging\EncryptedPackageEnvelopeTests.cs (1)
20Assert.Throws<ArgumentException>(() => EncryptedPackageEnvelope.Open(stream));
System\IO\Packaging\PackageDigitalSignatureManagerTests.cs (2)
72Assert.Throws<ArgumentException>("handle", () => PackageDigitalSignatureManager.VerifyCertificate(c)); 136Assert.Throws<ArgumentException>("value", () => manager.HashAlgorithm = string.Empty);
System\Windows\Converters\RectValueSerializerTests.cs (2)
113Assert.Throws<ArgumentException>(() => serializer.ConvertFromString(value, null)); 114Assert.Throws<ArgumentException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Converters\SizeValueSerializerTests.cs (2)
113Assert.Throws<ArgumentException>(() => serializer.ConvertFromString(value, null)); 114Assert.Throws<ArgumentException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\DependencyObjectTests.cs (11)
1190Assert.Throws<ArgumentException>(() => obj.CoerceValue(property)); 1229Assert.Throws<ArgumentException>(() => obj.CoerceValue(property)); 1752Assert.Throws<ArgumentException>(() => obj.InvalidateProperty(property)); 1757Assert.Throws<ArgumentException>(() => obj.InvalidateProperty(property)); 2406Assert.Throws<ArgumentException>(() => obj.SetValue(property, value)); 2417Assert.Throws<ArgumentException>(() => obj.SetValue(property, value)); 2433Assert.Throws<ArgumentException>(() => obj.SetValue(property, value)); 2829Assert.Throws<ArgumentException>(() => obj.SetValue(key, value)); 2840Assert.Throws<ArgumentException>(() => obj.SetValue(key, value)); 2856Assert.Throws<ArgumentException>(() => obj.SetValue(key, value)); 2919Assert.Throws<ArgumentException>("e", () => obj.OnPropertyChanged(e));
System\Windows\DependencyObjectTypeTests.cs (1)
52Assert.Throws<ArgumentException>(() => DependencyObjectType.FromSystemType(systemType));
System\Windows\DependencyPropertyKeyTests.cs (3)
43Assert.Throws<ArgumentException>(() => key.OverrideMetadata(forType, new PropertyMetadata())); 58Assert.Throws<ArgumentException>(() => key.OverrideMetadata(typeof(int), property.DefaultMetadata)); 65Assert.Throws<ArgumentException>(() => key.OverrideMetadata(typeof(DependencyObject), new PropertyMetadata()));
System\Windows\DependencyPropertyTests.cs (56)
222Assert.Throws<ArgumentException>("name", () => DependencyProperty.Register(string.Empty, typeof(int), typeof(DependencyPropertyTests))); 249Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata)); 250Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata, value => true)); 266Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata())); 267Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata { DefaultValue = 1 })); 268Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata(), value => true)); 269Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata { DefaultValue = 1 }, value => true)); 276Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata)); 277Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true)); 284Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata)); 285Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true)); 292Assert.Throws<ArgumentException>(() => DependencyProperty.Register(property.Name, typeof(int), typeof(DependencyPropertyTests))); 293Assert.Throws<ArgumentException>(() => DependencyProperty.Register(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata())); 294Assert.Throws<ArgumentException>(() => DependencyProperty.Register(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true)); 318Assert.Throws<ArgumentException>(() => DependencyProperty.Register(name, propertyType, ownerType, typeMetadata, validateValueCallback)); 537Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttached(string.Empty, typeof(int), typeof(DependencyPropertyTests))); 538Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttached(string.Empty, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata())); 539Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttached(string.Empty, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true)); 566Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata)); 567Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata, value => true)); 582Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata)); 583Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true)); 590Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata)); 591Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true)); 598Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(property.Name, typeof(int), typeof(DependencyPropertyTests))); 599Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata())); 600Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true)); 624Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(name, propertyType, ownerType, typeMetadata, validateValueCallback)); 822Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterReadOnly(string.Empty, typeof(int), typeof(DependencyObject), new PropertyMetadata())); 823Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterReadOnly(string.Empty, typeof(int), typeof(DependencyObject), new PropertyMetadata(), value => true)); 848Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyProperty), metadata)); 849Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyProperty), metadata, value => true)); 864Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, null)); 865Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata())); 866Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata { DefaultValue = 1 })); 867Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, null, value => true)); 868Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata(), value => true)); 869Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata { DefaultValue = 1 }, value => true)); 876Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata)); 877Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true)); 884Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata)); 885Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true)); 892Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(property.Name, typeof(int), typeof(DependencyObject), new PropertyMetadata())); 893Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(property.Name, typeof(int), typeof(DependencyObject), new PropertyMetadata(), value => true)); 917Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(name, propertyType, ownerType, typeMetadata, validateValueCallback)); 1117Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttachedReadOnly(string.Empty, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata())); 1118Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttachedReadOnly(string.Empty, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true)); 1143Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata)); 1144Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata, value => true)); 1158Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata)); 1159Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true)); 1166Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata)); 1167Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true)); 1174Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata())); 1175Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true)); 1199Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(name, propertyType, ownerType, typeMetadata, validateValueCallback));
System\Windows\FreezableTests.cs (7)
38Assert.Throws<ArgumentException>("handler", () => freezable.Changed -= handler); 3593Assert.Throws<ArgumentException>(() => obj.CoerceValue(property)); 3632Assert.Throws<ArgumentException>(() => obj.CoerceValue(property)); 6694Assert.Throws<ArgumentException>("e", () => obj.OnPropertyChanged(e)); 6819Assert.Throws<ArgumentException>(() => obj.SetValue(property, value)); 6830Assert.Throws<ArgumentException>(() => obj.SetValue(property, value)); 6846Assert.Throws<ArgumentException>(() => obj.SetValue(property, value));
System\Windows\Input\KeyConverterTests.cs (3)
401Assert.Throws<ArgumentException>(() => converter.ConvertFrom(value)); 402Assert.Throws<ArgumentException>(() => converter.ConvertFrom(null, null, value)); 403Assert.Throws<ArgumentException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\Input\KeyValueSerializerTests.cs (2)
121Assert.Throws<ArgumentException>(() => serializer.ConvertFromString(value, null)); 122Assert.Throws<ArgumentException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Markup\ServiceProvidersTests.cs (1)
47Assert.Throws<ArgumentException>("serviceType", () => serviceProviders.AddService(typeof(object), new object()));
System\Windows\NameScopeTests.cs (21)
190Assert.Throws<ArgumentException>(() => nameScope.Add(string.Empty, scopedElement)); 201Assert.Throws<ArgumentException>(() => nameScope[name] = scopedElement); 217Assert.Throws<ArgumentException>(() => nameScope["name"] = new object()); 311Assert.Throws<ArgumentException>(() => nameScope.Add(string.Empty, scopedElement)); 322Assert.Throws<ArgumentException>(() => nameScope.Add(name, scopedElement)); 397Assert.Throws<ArgumentException>("item", () => nameScope.Add(new KeyValuePair<string, object>(null!, scopedElement))); 405Assert.Throws<ArgumentException>(() => nameScope.Add(new KeyValuePair<string, object>(string.Empty, scopedElement))); 416Assert.Throws<ArgumentException>(() => nameScope.Add(new KeyValuePair<string, object>(name, scopedElement))); 423Assert.Throws<ArgumentException>("item", () => nameScope.Add(new KeyValuePair<string, object>("name", null!))); 432Assert.Throws<ArgumentException>(() => nameScope.Add("name", new object())); 433Assert.Throws<ArgumentException>(() => nameScope.Add(new KeyValuePair<string, object>("name", new object()))); 614Assert.Throws<ArgumentException>("item", () => nameScope.Contains(new KeyValuePair<string, object>(null!, new object()))); 615Assert.Throws<ArgumentException>("item", () => nameScope.Contains(default)); 908Assert.Throws<ArgumentException>(() => nameScope.RegisterName(string.Empty, scopedElement)); 919Assert.Throws<ArgumentException>(() => nameScope.RegisterName(name, scopedElement)); 935Assert.Throws<ArgumentException>(() => nameScope.RegisterName("name", new object())); 1018Assert.Throws<ArgumentException>("item", () => nameScope.Remove(new KeyValuePair<string, object>(null!, new object()))); 1136Assert.Throws<ArgumentException>(() => nameScope.UnregisterName("name")); 1152Assert.Throws<ArgumentException>(() => nameScope.UnregisterName(string.Empty)); 1168Assert.Throws<ArgumentException>(() => nameScope.UnregisterName(name)); 1186Assert.Throws<ArgumentException>(() => nameScope.UnregisterName(name));
System\Windows\PropertyMetadataTests.cs (4)
121Assert.Throws<ArgumentException>(() => new PropertyMetadata(DependencyProperty.UnsetValue)); 122Assert.Throws<ArgumentException>(() => new PropertyMetadata(DependencyProperty.UnsetValue, null)); 123Assert.Throws<ArgumentException>(() => new PropertyMetadata(DependencyProperty.UnsetValue, null, null)); 200Assert.Throws<ArgumentException>(() => metadata.DefaultValue = DependencyProperty.UnsetValue);
System\Windows\RectConverterTests.cs (3)
162Assert.Throws<ArgumentException>(() => converter.ConvertFrom(value)); 163Assert.Throws<ArgumentException>(() => converter.ConvertFrom(null, null, value)); 164Assert.Throws<ArgumentException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\RectTests.cs (5)
131Assert.Throws<ArgumentException>(() => new Rect(0, 0, width, 0)); 141Assert.Throws<ArgumentException>(() => new Rect(0, 0, 0, height)); 801Assert.Throws<ArgumentException>(() => rect.Width = width); 883Assert.Throws<ArgumentException>(() => rect.Height = height); 2843Assert.Throws<ArgumentException>(() => Rect.Parse(source));
System\Windows\SizeConverterTests.cs (3)
162Assert.Throws<ArgumentException>(() => converter.ConvertFrom(value)); 163Assert.Throws<ArgumentException>(() => converter.ConvertFrom(null, null, value)); 164Assert.Throws<ArgumentException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\SizeTests.cs (5)
49Assert.Throws<ArgumentException>(() => new Size(width, 0)); 59Assert.Throws<ArgumentException>(() => new Size(0, height)); 101Assert.Throws<ArgumentException>(() => size.Width = value); 143Assert.Throws<ArgumentException>(() => size.Height = value); 391Assert.Throws<ArgumentException>(() => Size.Parse(source));
System\Windows\Threading\DispatcherTimerTests.cs (3)
100Assert.Throws<ArgumentException>("priority", () => new DispatcherTimer(DispatcherPriority.Inactive)); 101Assert.Throws<ArgumentException>("priority", () => new DispatcherTimer(DispatcherPriority.Inactive, Dispatcher.CurrentDispatcher)); 102Assert.Throws<ArgumentException>("priority", () => new DispatcherTimer(TimeSpan.Zero, DispatcherPriority.Inactive, (s, e) => {}, Dispatcher.CurrentDispatcher));
System\Windows\WeakEventManagerTTests.cs (4)
213Assert.Throws<ArgumentException>(() => WeakEventManager<object, EventArgs>.AddHandler(source, eventName, handler)); 216Assert.Throws<ArgumentException>(() => WeakEventManager<object, EventArgs>.AddHandler(source, eventName, handler)); 372Assert.Throws<ArgumentException>(() => WeakEventManager<object, EventArgs>.RemoveHandler(source, eventName, handler)); 375Assert.Throws<ArgumentException>(() => WeakEventManager<object, EventArgs>.RemoveHandler(source, eventName, handler));
xunit.assert (8)
ExceptionAsserts.cs (7)
127 /// derives from <see cref="ArgumentException"/> and has the given parameter name. 139 where T : ArgumentException 151 /// derives from <see cref="ArgumentException"/> and has the given parameter name. 164 where T : ArgumentException 184 where T : ArgumentException 277 /// derives from <see cref="ArgumentException"/> and has the given parameter name. 289 where T : ArgumentException
Sdk\Exceptions\ThrowsException.cs (1)
61 /// an <see cref="ArgumentException"/> is thrown with the wrong parameter name.
xunit.console (1)
ConsoleRunner.cs (1)
118return ex is ArgumentException ? 3 : 4;