4109 references to ArgumentException
aspire (2)
src\Shared\CircularBuffer.cs (1)
33throw new ArgumentException("Circular buffer must have a capacity greater than 0.", nameof(capacity));
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.Azure.Storage.Queues (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 (3)
Otlp\Model\OtlpTrace.cs (1)
185throw new ArgumentException("Span does not belong to this trace.", nameof(span));
src\Shared\CircularBuffer.cs (1)
33throw new ArgumentException("Circular buffer must have a capacity greater than 0.", nameof(capacity));
Utils\FormatHelpers.cs (1)
137_ => throw new ArgumentException("Unexpected value.", nameof(maxDecimalPlaces))
Aspire.Hosting (19)
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(MessageStrings.ContainerMountBindMountsRequireRootedPaths, nameof(source)); 39throw new ArgumentException(MessageStrings.ContainerMountAnonymousVolumesReadOnlyExceptionMessage, nameof(isReadOnly));
ApplicationModel\ModelName.cs (1)
29throw new ArgumentException(validationMessage, nameof(name));
Dcp\ResourceLogSource.cs (1)
25throw new ArgumentException("Cancellation token must be cancellable in order to prevent leaking resources.", nameof(cancellationToken));
ExternalServiceBuilderExtensions.cs (4)
35throw new ArgumentException($"The external service URL '{url}' is invalid: {message}", nameof(url)); 189throw new ArgumentException($"The path '{path}' is not a valid relative URL.", nameof(path)); 196throw new ArgumentException($"The URL for external service '{builder.Resource.Name}' is null.", nameof(builder)); 200throw new ArgumentException($"The URL '{builder.Resource.Uri}' for external service '{builder.Resource.Name}' cannot be used for HTTP health checks because it has a non-HTTP scheme.", nameof(builder));
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));
IInteractionService.cs (1)
354throw new ArgumentException("Error message cannot be null or empty.", nameof(errorMessage));
ParameterResourceBuilderExtensions.cs (1)
79throw new ArgumentException("A parameter cannot be both secret and published as a default value.", nameof(secret));
Publishing\DockerContainerRuntime.cs (1)
25throw new ArgumentException("OutputPath must be provided when ImageFormat is Oci.", nameof(options));
src\Shared\CircularBuffer.cs (1)
33throw new ArgumentException("Circular buffer must have a capacity greater than 0.", nameof(capacity));
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)
301throw new ArgumentException("At least one partition key path should be provided.", nameof(partitionKeyPaths)); 306throw 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 (1)
EnvVarEscaper.cs (1)
37throw new ArgumentException("Input string exceeds maximum allowed length", nameof(input));
Aspire.Hosting.GitHub.Models (1)
GitHubModelsExtensions.cs (1)
116throw new ArgumentException("The API key parameter must be marked as secret. Use AddParameter with secret: true when creating the parameter.", nameof(apiKey));
Aspire.Hosting.OpenAI (1)
OpenAIExtensions.cs (1)
151throw new ArgumentException("The API key parameter must be marked as secret. Use AddParameter with secret: true when creating the parameter.", nameof(apiKey));
Aspire.Hosting.Python (2)
PythonAppResourceBuilderExtensions.cs (1)
195throw 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)
51throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.ResourceDoesNotExposeConnectionStringExceptionMessage, resourceName), nameof(resourceName)); 84throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.ResourceNotFoundExceptionMessage, resourceName), nameof(resourceName)); 95throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.ResourceHasNoAllocatedEndpointsExceptionMessage, resourceName), nameof(resourceName)); 110throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.EndpointForResourceNotFoundExceptionMessage, endpointName, resourceName), nameof(endpointName));
DistributedApplicationTestingBuilder.cs (1)
170throw new ArgumentException($"Array params contains empty item: [{values}]", nameof(args));
Aspire.Hosting.Tests (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.Hosting.Yarp (2)
ConfigurationBuilder\YarpCluster.cs (1)
82_ => throw new ArgumentException("Cannot find a http or https endpoint for this resource.", nameof(resource))
YarpJsonConfigGeneratorBuilder.cs (1)
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 (1)
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.TestUtilities (1)
RequiresToolsAttribute.cs (1)
17throw new ArgumentException("At least one executable must be provided", nameof(executablesOnPath));
BoundTreeGenerator (25)
BoundNodeClassWriter.cs (25)
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)); 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));
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Specs\InterceptorInfo.cs (1)
176throw new ArgumentException(InvalidInvocationErrMsg, nameof(invocation));
Crossgen2Tasks (1)
CommonFilePulledFromSdkRepo\LogAdapter.cs (1)
76throw new ArgumentException(
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 (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-sql-cache (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-svcutil-lib (132)
FrameworkFork\Microsoft.CodeDom\Compiler\CodeGenerator.cs (3)
824throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1143throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1911throw new ArgumentException(string.Format(SRCodeDom.Argument_NullComment, "e"), "e");
FrameworkFork\Microsoft.CodeDom\Compiler\CodeValidator.cs (7)
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"); 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");
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 (3)
1219throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e"); 1588throw new ArgumentException(string.Format(SRCodeDom.Argument_NullComment, "e"), "e"); 1969throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
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\XmlTextReaderImpl.cs (1)
585throw new ArgumentException(ResXml.Xml_EmptyUrl, "url");
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 (3)
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");
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaSet.cs (1)
717throw new ArgumentException(ResXml.Sch_SchemaDoesNotExist, "schema");
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 (1)
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\XPath\XPathNavigator.cs (1)
2130throw new ArgumentException(ResXml.Xml_InvalidOperation, "reader");
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 (19)
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")); 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"));
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\Framework\System\ComponentModel\InvalidEnumArgumentException.cs (1)
46: base(string.Format(SRServiceModel.InvalidEnumArgument,
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 (2)
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\ServiceModel\Channels\ChannelManagerBase.cs (1)
48return new ArgumentException(string.Format(SRServiceModel.ChannelTypeNotSupported, type), "TChannel");
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\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\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\ServiceReflector.cs (1)
276throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(e.Message, "name"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Diagnostics\TraceUtility.cs (1)
251return (ArgumentException)TraceUtility.ThrowHelperError(new ArgumentException(message, paramName), msg);
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\EndpointAddress.cs (1)
149throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MultipleIdentities, "extensionReader"));
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultReason.cs (1)
49throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.AtLeastOneFaultReasonMustBeSpecified, "translations"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (2)
1104throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException( 1118throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(
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\ServiceDescription.cs (3)
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");
FrameworkFork\System.Web.Services\Services\Description\ServiceDescriptions.cs (1)
185throw new ArgumentException(string.Format(ResWebServices.WebDescriptionMissing, name.ToString(), name.Namespace), "name");
Shared\Utilities\LogTag.cs (1)
39throw new ArgumentException(string.Empty, nameof(tag));
dotnet-user-jwts (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-user-secrets (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));
GenerateDocumentationAndConfigFiles (28)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
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\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));
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 (3)
ILLink.RoslynAnalyzer (9)
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));
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\TypeNameParserHelpers.cs (1)
359throw new ArgumentException(SR.Argument_InvalidTypeName, $"typeName@{errorIndex}");
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));
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));
Metrics (21)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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);
Metrics.Legacy (21)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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);
Microsoft.Analyzers.Local.Tests (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenGenerator.cs (1)
44throw new ArgumentException(
Microsoft.AspNetCore.App.Analyzers (2)
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));
Microsoft.AspNetCore.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.AspNetCore.Authentication (1)
RemoteAuthenticationOptions.cs (1)
55throw new ArgumentException(Resources.FormatException_OptionMustBeProvided(nameof(CallbackPath)), nameof(CallbackPath));
Microsoft.AspNetCore.Authentication.Abstractions (1)
TokenExtensions.cs (1)
39throw new ArgumentException("Token name cannot be null for any token.", nameof(tokens));
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 (6)
DefaultComponentActivator.cs (1)
30throw new ArgumentException($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", nameof(componentType));
RenderTree\Renderer.cs (3)
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));
Routing\RouteData.cs (1)
26throw new ArgumentException($"The value must implement {nameof(IComponent)}.", nameof(pageType));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Components.Endpoints (3)
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 (1)
FieldIdentifier.cs (1)
53throw new ArgumentException("The model must be a reference-typed object.", nameof(model));
Microsoft.AspNetCore.Components.Server (3)
BlazorPack\Requires.cs (1)
20throw new ArgumentException(message, paramName);
Circuits\CircuitHost.cs (1)
64throw new ArgumentException($"Property '{nameof(CircuitId.Secret)}' cannot be null.", nameof(circuitId));
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.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.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.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.HeaderParsing (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
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 (1)
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 (10)
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));
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.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 (1)
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 (1)
Converters\JsonPatchDocumentConverter.cs (1)
27throw new ArgumentException(Resources.FormatParameterMustMatchType(nameof(objectType), "JsonPatchDocument"), nameof(objectType));
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.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.Core (25)
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\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));
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));
Routing\DynamicControllerRouteValueTransformerMetadata.cs (1)
16throw new ArgumentException(
Microsoft.AspNetCore.Mvc.Core.Test (4)
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.NewtonsoftJson (1)
JsonHelperExtensions.cs (1)
44throw new ArgumentException(message, nameof(jsonHelper));
Microsoft.AspNetCore.Mvc.Razor (3)
RazorFileHierarchy.cs (1)
18throw new ArgumentException(Resources.RazorProject_PathMustStartWithForwardSlash, nameof(path));
RazorViewEngine.cs (2)
61throw new ArgumentException( 68throw new ArgumentException(
Microsoft.AspNetCore.Mvc.RazorPages (8)
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(
RazorPagesOptions.cs (1)
37throw new ArgumentException(Resources.PathMustBeRootRelativePath, nameof(value));
Microsoft.AspNetCore.Mvc.TagHelpers (5)
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 (16)
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(
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));
ViewDataDictionaryControllerPropertyActivator.cs (1)
58throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Microsoft.AspNetCore.OutputCaching (2)
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.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.Routing (4)
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));
Tree\TreeRouter.cs (1)
113throw new ArgumentException(
Microsoft.AspNetCore.Server.HttpSys (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.Server.IIS (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.Server.Kestrel.Core (12)
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));
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 (8)
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\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.Tests (1)
HubConnectionHandlerTests.cs (1)
5455throw new ArgumentException("Input must be greater than zero.", nameof(count));
Microsoft.AspNetCore.SpaServices.Extensions (2)
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));
Microsoft.AspNetCore.StaticFiles (1)
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 (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.AspNetCore.WebUtilities (9)
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));
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.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
855throw new ArgumentException(e.Message, "Sources");
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
855throw new ArgumentException(e.Message, "Sources");
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 (129)
CommandLine\AnalyzerConfig.cs (1)
191throw new ArgumentException("Must be an absolute path to an editorconfig file", nameof(pathToFile));
Compilation\Compilation.cs (28)
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)); 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_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 (2)
249throw new ArgumentException("Path not registered: " + originalPath, nameof(originalPath)); 268throw new ArgumentException("Path not registered: " + originalPath, nameof(originalPath));
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 (2)
1363throw new ArgumentException(CodeAnalysisResources.InvalidOperationBlockForAnalysisContext, nameof(operationBlock)); 1496throw new ArgumentException(CodeAnalysisResources.InvalidOperationBlockForAnalysisContext, nameof(operationBlock));
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 (1)
78throw new ArgumentException($"Must be a full path: {baseDirectory}", nameof(baseDirectory));
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\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));
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\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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));
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\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)); 774throw new ArgumentException(CodeAnalysisResources.ChangesMustBeWithinBoundsOfSourceText, nameof(changes)); 791throw 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));
XmlFileResolver.cs (1)
26throw new ArgumentException(CodeAnalysisResources.AbsolutePathExpected, nameof(baseDirectory));
Microsoft.CodeAnalysis.Analyzers (28)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
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\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Microsoft.CodeAnalysis.Analyzers.UnitTests (4)
MetaAnalyzers\MissingKindArgumentToRegisterActionRuleTests.cs (2)
231_ => throw new ArgumentException("Unsupported argument kind", nameof(kind)), 246_ => throw new ArgumentException("Unsupported argument kind", nameof(kind)),
MetaAnalyzers\StartActionWithNoRegisteredActionsRuleTests.cs (1)
499_ => throw new ArgumentException("Unsupported action kind", nameof(kind)),
MetaAnalyzers\StartActionWithOnlyEndActionRuleTests.cs (1)
360throw new ArgumentException("Unsupported argument kind", nameof(kind));
Microsoft.CodeAnalysis.AnalyzerUtilities (26)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
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\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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);
Microsoft.CodeAnalysis.BannedApiAnalyzers (28)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
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\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Microsoft.CodeAnalysis.CodeStyle (19)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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);
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
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\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Microsoft.CodeAnalysis.Collections.Package (13)
Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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 (45)
Compilation\CSharpCompilation.cs (21)
582throw new ArgumentException(CodeAnalysisResources.InconsistentLanguageVersions, nameof(syntaxTrees)); 910throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, $"{nameof(trees)}[{i}]"); 915throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, $"{nameof(trees)}[{i}]"); 920throw new ArgumentException(CSharpResources.SubmissionCanOnlyInclude, $"{nameof(trees)}[{i}]"); 932throw new ArgumentException(CSharpResources.SubmissionCanHaveAtMostOne, nameof(trees)); 983throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, $"{nameof(trees)}[{i}]"); 986throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, $"{nameof(trees)}[{i}]"); 1040throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, nameof(newTree)); 1051throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, nameof(oldTree)); 1054throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, nameof(oldTree)); 1059throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, nameof(newTree)); 2579throw new ArgumentException(CSharpResources.SyntaxTreeNotFound, nameof(syntaxTree)); 4263throw new ArgumentException(CodeAnalysisResources.TupleUnderlyingTypeMustBeTupleCompatible, nameof(underlyingType)); 4332throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name)); 4336throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name)); 4558throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name)); 4562throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name)); 4680throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4698throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4719throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4745throw 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 (1)
1605throw new ArgumentException(
Compilation\MemberSemanticModel.cs (1)
2293throw new ArgumentException($"The parent of {nameof(node)} must not be null unless this is a speculative semantic model.", nameof(node));
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));
Symbols\MethodSymbol.cs (2)
875throw new ArgumentException(CSharpResources.TypeArgumentCannotBeNull, nameof(typeArguments)); 880throw new ArgumentException(CSharpResources.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\NamedTypeSymbol.cs (2)
1241throw new ArgumentException(CSharpResources.TypeArgumentCannotBeNull, nameof(typeArguments)); 1246throw new ArgumentException(CSharpResources.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\PublicModel\Symbol.cs (1)
189throw new ArgumentException(CSharpResources.WrongSemanticModelType, LanguageNames.CSharp);
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\SyntaxFactory.cs (7)
252throw new ArgumentException(CSharpResources.UseVerbatimIdentifier, nameof(kind)); 255throw new ArgumentException(CSharpResources.UseLiteralForTokens, nameof(kind)); 258throw new ArgumentException(CSharpResources.UseLiteralForNumeric, nameof(kind)); 263throw new ArgumentException(string.Format(CSharpResources.ThisMethodCanOnlyBeUsedToCreateTokens, kind), nameof(kind)); 1419throw new ArgumentException($"{nameof(nodes)} must not be empty.", nameof(nodes)); 1432throw new ArgumentException($"{nameof(separators)} must have 1 fewer element than {nameof(nodes)}", nameof(separators)); 1441throw new ArgumentException($"When {nameof(nodes)} is null, {nameof(separators)} must also be null.", nameof(separators));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
334throw new ArgumentException(CSharpCompilerExtensionsResources.Expected_string_or_char_literal, nameof(token));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
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)
226_ => 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.Test.Utilities (1)
Extensions.cs (1)
51throw new ArgumentException("Specified value must be greater than zero.", nameof(occurrence));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
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\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 (5)
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 (1)
144throw new ArgumentException("SpanTrackingMode.Custom not allowed.", "spanTrackingMode");
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
ChangeSignature\AddedParameterOrExistingIndex.cs (1)
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));
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 (2)
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 (13)
src\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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.ExternalAccess.FSharp (2)
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.Features (11)
CodeLens\CodeLensReferencesService.cs (1)
117throw 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));
Debugging\DebugInformationReaderProvider.cs (1)
133throw new ArgumentException(CompilerExtensionsResources.StreamMustSupportReadAndSeek, nameof(stream));
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (3)
154throw 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"); 160throw 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"); 183throw 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");
MetadataAsSource\MetadataAsSourceFileService.cs (1)
86throw 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\SignatureHelpItems.cs (1)
74throw new ArgumentException($"{nameof(semanticParameterIndex)} < 0. {semanticParameterIndex} < 0", nameof(semanticParameterIndex));
Microsoft.CodeAnalysis.InteractiveHost (14)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
380throw new ArgumentException(e.Message, paramName);
src\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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 (1)
CustomExportAssemblyLoader.cs (1)
88throw new ArgumentException($"Code base {codeBaseUriStr} for {assemblyName} is not a file URI.", nameof(codeBaseUriStr));
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Extensions\Extensions.cs (1)
470_ => throw new ArgumentException($"Unknown glyph value: {glyph}", nameof(glyph)),
Protocol\Converters\SumConverter.cs (1)
61throw 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)
105var typeName = type.FullName ?? throw new ArgumentException($"{nameof(type)} has null {nameof(type.FullName)} property.", nameof(type)); 106var assemblyName = type.Assembly.FullName ?? throw new ArgumentException($"{nameof(type)} has null {nameof(type.Assembly)}.{nameof(type.Assembly.FullName)} property.", nameof(type));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (28)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
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\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
Microsoft.CodeAnalysis.PublicApiAnalyzers (21)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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);
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.ResxSourceGenerator (21)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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);
Microsoft.CodeAnalysis.Scripting (11)
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\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 (8)
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));
FX\DirectoryHelper.cs (1)
23throw new ArgumentException("Directory '" + path + "' does not exist.", nameof(path));
Metadata\IlasmUtilities.cs (1)
127throw new ArgumentException(
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 (13)
src\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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 (12)
Collections\ImmutablesTestBase.nonnetstandard.cs (1)
35throw new ArgumentException("Collection must contain at least two elements.", nameof(objectUnderTest));
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);
SourceFileResolverTest.cs (2)
42Assert.Equal(new ArgumentException(CodeAnalysisResources.NullValueInPathMap, "pathMap").Message, argException.Message); 65Assert.Equal(new ArgumentException(CodeAnalysisResources.AbsolutePathExpected, "baseDirectory").Message, argException.Message);
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (2)
449throw new ArgumentException(Microsoft.CodeAnalysis.CodeAnalysisResources.InvalidCharactersInAssemblyName, nameof(name)); 474throw new ArgumentException(Microsoft.CodeAnalysis.CodeAnalysisResources.InvalidCharactersInAssemblyName, nameof(name));
Microsoft.CodeAnalysis.Workspaces (69)
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\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\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 (1)
333throw new ArgumentException("The location specified is not part of the solution.", nameof(location));
Editing\SyntaxEditor.cs (1)
242throw new ArgumentException(WorkspacesResources.The_node_is_not_part_of_the_tree, nameof(node));
Editing\SyntaxGenerator.cs (2)
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));
Rename\Renamer.cs (1)
51throw new ArgumentException(WorkspacesResources._0_must_be_a_non_null_and_non_empty_string, nameof(newName));
src\Compilers\Core\Portable\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));
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (2)
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 (1)
78throw new ArgumentException($"Must be a full path: {baseDirectory}", nameof(baseDirectory));
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
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\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
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 (8)
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)); 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)); 271throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 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 (5)
1070throw new ArgumentException($"'{fullPath}' has already been added to this project.", nameof(fullPath)); 1091throw new ArgumentException("message", nameof(fullPath)); 1116throw new ArgumentException($"'{fullPath}' is not an analyzer of this project.", nameof(fullPath)); 1217throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 1263throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath));
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 (1)
63throw new ArgumentException($"{nameof(otherTextDocument)} isn't a regular document.", nameof(otherTextDocument));
Workspace\Solution\Solution.cs (2)
661throw new ArgumentException(WorkspacesResources.Project_does_not_contain_specified_reference, nameof(projectReference)); 1730_ => throw new ArgumentException(WorkspacesResources.Options_did_not_come_from_specified_Solution, paramName: nameof(options))
Workspace\Solution\SolutionState.cs (1)
851throw 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 (1)
578_ => throw new ArgumentException(WorkspacesResources.Options_did_not_come_from_specified_Solution, paramName: nameof(value))
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\DiagnosticReporter.cs (1)
43throw new ArgumentException(string.Format(WorkspaceMSBuildResources.Invalid_0_specified_1, nameof(DiagnosticReportingMode), nameof(mode)), nameof(mode));
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (17)
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\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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 (1)
Workspaces\TestWorkspace_XmlConsumption.cs (1)
291throw new ArgumentException("Unexpected language '{0}' for generating custom parse options.", language);
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
TypeRef.cs (2)
105var typeName = type.FullName ?? throw new ArgumentException($"{nameof(type)} has null {nameof(type.FullName)} property.", nameof(type)); 106var 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 (76)
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 (7)
339throw new ArgumentException(string.Format(Strings.ExceedsNumberOfRows, Rows.Count), nameof(numberOfRows)); 371throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName)); 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 (1)
576throw new ArgumentException(Strings.NonSeekableStream, nameof(csvStream));
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 (1)
275throw new ArgumentException(String.Format(Strings.MismatchedColumnValueType, this.DataType), nameof(other));
DataFrameColumnCollection.cs (6)
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));
DataFrameColumns\ArrowStringDataFrameColumn.cs (4)
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)); 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));
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));
Microsoft.DotNet.Build.Tasks.Feed (2)
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));
Microsoft.DotNet.Build.Tasks.Installers (3)
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 (1)
GeneratePackageReport.cs (1)
360throw new ArgumentException($"Could not find source item for {targetPath}", nameof(targetPath));
Microsoft.DotNet.GenFacades (1)
TypeParser.cs (1)
23throw new ArgumentException($"Invalid C# language version value '{langVersion}'", nameof(langVersion));
Microsoft.DotNet.Helix.Client (4)
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));
Microsoft.DotNet.Helix.JobSender (2)
JobDefinition.cs (1)
299return Environment.GetEnvironmentVariable(name) ?? throw new ArgumentException("Missing required environment variable", name);
Payloads\AdhocPayload.cs (1)
20throw new ArgumentException(
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 (2)
RemoteExecutor.cs (2)
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));
Microsoft.DotNet.SignCheckLibrary (1)
Utils.cs (1)
59throw new ArgumentException($"Unsupported hash algorithm name '{hashName}'", nameof(hashName));
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Modeler\ServiceClientModelFactory.cs (1)
397throw new ArgumentException("Schema must be object", nameof(schema));
Microsoft.DotNet.XliffTasks (3)
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));
Validation.cs (1)
19throw new ArgumentException("Value cannot be empty", parameterName);
Microsoft.DotNet.XUnitAssert.Tests (6)
ExceptionAssertsTests.cs (6)
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"); 782 Task testCode() => throw new ArgumentException("Hello world", "paramName"); 790 Task testCode() => throw new ArgumentException("Hello world", "paramName1");
Microsoft.Extensions.AI (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.AzureAIInference (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Console (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.NLP (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Quality (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Reporting (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Safety (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Integration.Tests (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.OpenAI (3)
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 (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Tests (1)
Functions\AIFunctionFactoryTest.cs (1)
1013throw new ArgumentException($"Unable to resolve argument for '{p.Name}'.", "arguments.Services"),
Microsoft.Extensions.AmbientMetadata.Application (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Caching.Abstractions (1)
CacheEntryExtensions.cs (1)
196throw new ArgumentException(message, paramName);
Microsoft.Extensions.Caching.Hybrid (3)
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 (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Compliance.Abstractions (2)
Classification\DataClassificationTypeConverter.cs (1)
40throw new ArgumentException("Value must be a string.", nameof(value));
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Compliance.Redaction (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Compliance.Testing (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
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 (2)
ServiceLookup\CallSiteFactory.cs (2)
46throw new ArgumentException( 61throw new ArgumentException(
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Extensions\ServiceCollectionDescriptorExtensions.cs (1)
464throw new ArgumentException(
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
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)
18throw new ArgumentException(null, nameof(path)); 22throw 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)
18throw new ArgumentException(null, nameof(path));
TargetInfo.cs (1)
16throw new ArgumentException(null, nameof(framework));
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
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 (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Diagnostics.Probes (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Diagnostics.Testing (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFileProvider.cs (1)
58throw new ArgumentException("The path must be absolute.", nameof(root));
Microsoft.Extensions.Hosting (1)
Internal\Host.cs (1)
54throw new ArgumentException(SR.IHostApplicationLifetimeReplacementNotSupported, nameof(applicationLifetime));
Microsoft.Extensions.Hosting.Testing (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
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 (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Identity.Core (3)
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));
UserClaimsPrincipalFactory.cs (1)
32throw new ArgumentException($"{nameof(optionsAccessor)} cannot wrap a null value.", nameof(optionsAccessor));
Microsoft.Extensions.Logging (1)
LoggerFactory.cs (1)
95throw new ArgumentException(SR.Format(SR.InvalidActivityTrackingOptions, _factoryOptions.ActivityTrackingOptions), nameof(options));
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Options.Contextual (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Resilience (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
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.Telemetry (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Telemetry.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.TimeProvider.Testing (1)
src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Validation (1)
TypeExtensions.cs (1)
129throw new ArgumentException($"Type {interfaceType.FullName} is not an interface.", nameof(interfaceType));
Microsoft.Interop.SourceGeneration (3)
Marshalling\MarshallerHelpers.cs (2)
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)),
TypeSymbolExtensions.cs (1)
333throw new ArgumentException($"Cannot handle type name in the format provided: {typeName}", nameof(typeName));
Microsoft.JSInterop (1)
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 (18)
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 (6)
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 (30)
AnimatableKey.cs (1)
18 throw new ArgumentException("Argument is null or empty", nameof(handle));
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");
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));
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));
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));
NavigationPage\NavigationPage.cs (1)
744 throw new ArgumentException($"{nameof(before)} must be a child of the NavigationPage", nameof(before));
NavigationPage\NavigationPage.Legacy.cs (1)
129 throw new ArgumentException($"{nameof(before)} must be a child of the NavigationPage", nameof(before));
PlatformBindingHelpers.cs (1)
171 throw new ArgumentException(Format("No declared or accessible event {0} on {1}", updateSourceEventName, target.GetType()), nameof(updateSourceEventName));
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));
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));
TemplateBinding.cs (1)
31 throw new ArgumentException("path cannot be an empty string", nameof(path));
ViewExtensions.cs (1)
301 throw new ArgumentException($"Unable to find {nameof(IAnimationManager)} for '{animatable.GetType().FullName}'.", nameof(animatable));
Microsoft.Maui.Controls.BindingSourceGen (1)
ISymbolExtensions.cs (1)
18 _ => throw new ArgumentException("Symbol is not a field or property.", nameof(symbol))
Microsoft.Maui.Controls.Xaml (1)
MarkupExtensions\StaticResourceExtension.cs (1)
22 throw new ArgumentException(null, nameof(serviceProvider));
Microsoft.Maui.Essentials (2)
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));
Microsoft.ML.AutoML (12)
Utils\UserInputValidationUtil.cs (12)
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)); 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 " +
Microsoft.ML.AutoML.Tests (2)
Utils\TaskAgnosticAutoFit.cs (2)
119throw new ArgumentException($"Unknown task type {_taskType}.", "TaskType"); 161throw new ArgumentException($"Unknown task type {_taskType}.", "TaskType");
Microsoft.ML.CodeGenerator (1)
Utils.cs (1)
143case "": throw new ArgumentException($"{nameof(input)} cannot be empty", nameof(input));
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 (4)
DataViewSchema.cs (3)
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 (3)
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.Phi (1)
Utils.cs (1)
25throw new ArgumentException("Dimension must be divisible by 2", nameof(headDim));
Microsoft.ML.ImageAnalytics (8)
MLImage.cs (8)
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)); 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.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.Tokenizers (6)
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\TiktokenTokenizer.cs (1)
1559throw 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));
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));
Microsoft.ML.Transforms (1)
PermutationFeatureImportanceExtensions.cs (1)
734throw new ArgumentException($"Type IPredictionTransformer not implemented by provided type, {type}", nameof(type));
Microsoft.Net.Http.Headers (6)
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);
Microsoft.VisualStudio.LanguageServices (6)
Interop\ComHandle.cs (1)
59throw new ArgumentException("must be null or a Com object", nameof(handle));
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
245throw new ArgumentException(ServicesVSResources.The_given_DocumentId_did_not_come_from_the_Visual_Studio_workspace, nameof(documentId));
src\Compilers\Core\Portable\InternalUtilities\ConcurrentLruCache.cs (1)
124throw new ArgumentException("Key already exists", nameof(key));
TaskList\ProjectExternalErrorReporter.cs (1)
228_ => throw new ArgumentException(ServicesVSResources.Not_a_valid_value, nameof(nPriority))
Utilities\ComEventSink.cs (1)
21throw new ArgumentException("Not an IConnectionPointContainer", nameof(obj));
Venus\ContainedLanguageCodeSupport.cs (1)
406throw new ArgumentException("InvalidValue", nameof(memberType));
Microsoft.VisualStudio.LanguageServices.CSharp (3)
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
72throw new ArgumentException("optionID was an unexpected value.", nameof(optionID));
ProjectSystemShim\CSharpProjectShim.ICSharpVenusProjectSite.cs (1)
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.VisualStudio.LanguageServices.Implementation (9)
CodeModel\AbstractCodeModelService.cs (1)
777throw new ArgumentException(ServicesVSResources.Invalid_access, nameof(access));
CodeModel\FileCodeModel.cs (1)
649throw new ArgumentException(ServicesVSResources.Element_is_not_valid, nameof(element));
CodeModel\InternalElements\AbstractCodeMember.cs (1)
197throw new ArgumentException(ServicesVSResources.Element_is_not_valid, nameof(element));
CodeModel\InternalElements\AbstractCodeType.cs (1)
187throw new ArgumentException(ServicesVSResources.Element_is_not_valid, nameof(element));
CodeModel\InternalElements\CodeNamespace.cs (1)
181throw new ArgumentException(ServicesVSResources.Element_is_not_valid, nameof(element));
CodeModel\MetadataNameHelpers.cs (1)
67throw new ArgumentException("Type parameters are not suppported", nameof(typeSymbol));
Options\Style\NamingPreferences\SymbolSpecification\SymbolSpecificationViewModel.cs (1)
132throw new ArgumentException(string.Format("Unexpected language name: {0}", languageName), nameof(languageName));
ProjectSystem\CPS\TempPECompiler.cs (2)
33throw new ArgumentException(nameof(filesToInclude), "Must specify some files to compile."); 38throw new ArgumentException(nameof(outputFileName), "Must specify an output file name.");
Microsoft.Web.Xdt.Extensions (3)
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);
PresentationCore (259)
MS\Internal\Automation\EventMap.cs (1)
110throw new ArgumentException(SR.Automation_InvalidEventId, nameof(eventId));
MS\Internal\FontCache\FontCacheUtil.cs (1)
495throw new ArgumentException(SR.FaceIndexMustBePositiveOrZero, nameof(fontUri));
MS\Internal\IListConverters.cs (1)
55throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(value));
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\CustomAttributeSerializer.cs (18)
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)); 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)); 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));
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (42)
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)); 385throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(inputStream)); 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"); 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)); 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\IO\Packaging\ByteRangeDownloader.cs (3)
57throw new ArgumentException(SR.InvalidTempFileName, nameof(tempFileName)); 404throw new ArgumentException(SR.InvalidScheme, nameof(requestedUri)); 411throw new ArgumentException(SR.InvalidEventHandle, nameof(eventHandle));
MS\Internal\IO\Packaging\NetStream.cs (1)
141throw new ArgumentException(SR.IOBufferOverflow, nameof(buffer));
MS\Internal\IO\Packaging\PreloadedPackages.cs (1)
154throw new ArgumentException(SR.UriMustBeAbsolute, nameof(uri));
MS\Internal\PartialArray.cs (2)
128throw new ArgumentException( 137throw new ArgumentException(
MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (2)
169throw new ArgumentException( 178throw new ArgumentException(
MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (2)
114throw new ArgumentException( 123throw new ArgumentException(
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\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\Duration.cs (2)
26throw new ArgumentException(SR.Timing_InvalidArgNonNegative, nameof(timeSpan)); 62throw new ArgumentException(SR.Timing_InvalidArgNonNegative, nameof(timeSpan));
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\Generated\ContentElement.cs (4)
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)); 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));
System\Windows\Generated\UIElement.cs (4)
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)); 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));
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\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 (4)
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));
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\Input\Command\RoutedCommand.cs (1)
50throw new ArgumentException(SR.StringEmpty, nameof(name));
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 (4)
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));
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\TouchDevice.cs (1)
331throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), nameof(element));
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\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 (4)
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)); 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));
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\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\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\CharacterMetricsDictionary.cs (3)
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));
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\CultureSpecificStringDictionary.cs (2)
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\ShaderEffect.cs (2)
378throw new ArgumentException(SR.GetResourceString(srid), nameof(dp)); 429throw new ArgumentException(SR.Effect_ShaderSamplerType, nameof(dp));
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 (2)
84throw new ArgumentException(SR.UriNotAbsolute, nameof(baseUri)); 92throw new ArgumentException(SR.InvalidAbsoluteUriInFontFamilyName, nameof(location));
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\GeometryConverter.cs (1)
67throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Geometry"), nameof(context));
System\Windows\Media\Generated\PathFigureCollectionConverter.cs (1)
67throw new ArgumentException(SR.Format(SR.General_Expected_Type, "PathFigureCollection"), nameof(context));
System\Windows\Media\Generated\TransformConverter.cs (1)
67throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Transform"), nameof(context));
System\Windows\Media\GlyphRun.cs (12)
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)); 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 (4)
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));
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\BitmapSizeOptions.cs (1)
176throw new ArgumentException(SR.Image_SizeOptionsAngle, nameof(rotation));
System\Windows\Media\Imaging\BitmapSource.cs (1)
643throw new ArgumentException(SR.Collection_BadRank, nameof(pixels));
System\Windows\Media\Imaging\CachedBitmap.cs (2)
116throw new ArgumentException(SR.Collection_BadRank, nameof(pixels)); 348throw new System.ArgumentException(
System\Windows\Media\Imaging\RenderTargetBitmap.cs (1)
38throw new System.ArgumentException(
System\Windows\Media\Imaging\WriteableBitmap.cs (5)
77throw new ArgumentException(SR.Effect_PixelFormat, nameof(pixelFormat)); 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\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\RequestCachePolicyConverter.cs (1)
72throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(value));
System\Windows\Media\textformatting\TextSimpleMarkerProperties.cs (1)
48throw new ArgumentException(SR.Format(SR.Enum_Invalid, typeof(TextMarkerStyle)), nameof(style));
System\Windows\Media3D\Generated\Visual3D.cs (4)
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)); 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));
System\Windows\Media3D\Viewport2DVisual3D.cs (2)
504throw new ArgumentException(SR.Viewport2DVisual3D_MaterialGroupIsInteractiveMaterial, nameof(material)); 528throw new ArgumentException(SR.Viewport2DVisual3D_MultipleInteractiveMaterials, nameof(material));
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\TextDecorationCollectionConverter.cs (1)
59throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), nameof(input));
PresentationFramework (216)
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 (8)
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)); 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));
MS\Internal\Annotations\Anchoring\LocatorManager.cs (1)
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 (5)
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)); 242throw new ArgumentException(SR.IncorrectAnchorLength, nameof(locatorPart));
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\Component\AnnotationAdorner.cs (1)
43throw new ArgumentException(SR.AnnotationAdorner_NotUIElement, nameof(component));
MS\Internal\Annotations\Component\HighlightComponent.cs (4)
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 (1)
235throw new ArgumentException(SR.InvalidAttachedAnnotation, nameof(attachedAnnotation));
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\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\Documents\ContentElementCollection.cs (2)
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\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\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\WindowsRuntime\Generated\WinRT\Projections.cs (1)
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\AnnotationHelper.cs (2)
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)); 350throw new ArgumentException(SR.ParameterMustBeLogicalNode, nameof(element)); 385throw 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 (7)
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\Controls\AdornedElementPlaceholder.cs (1)
59throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value));
System\Windows\Controls\CustomDictionarySources.cs (1)
92throw new ArgumentException(SR.CustomDictionaryItemAlreadyExists, nameof(item));
System\Windows\Controls\DataGridColumnCollection.cs (2)
45throw new ArgumentException(SR.Format(SR.DataGrid_InvalidColumnReuse, item.Header), nameof(item)); 71throw new ArgumentException(SR.Format(SR.DataGrid_InvalidColumnReuse, item.Header), nameof(item));
System\Windows\Controls\DataGridLength.cs (4)
77throw new ArgumentException( 88throw new ArgumentException( 95throw new ArgumentException( 102throw new ArgumentException(
System\Windows\Controls\Decorator.cs (1)
65throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value));
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 (1)
1921throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), nameof(value));
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
1804throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), nameof(value));
System\Windows\Controls\Grid.cs (1)
77throw (new ArgumentException(SR.Format(SR.Grid_UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value)));
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\Panel.cs (1)
91throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), nameof(value));
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
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 (1)
83throw new System.ArgumentException(SR.PrintDialogInvalidPageRange, "PageRange");
System\Windows\Controls\RichTextBox.cs (2)
153throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), nameof(value)); 576throw new ArgumentException(SR.RichTextBox_PointerNotInSameDocument, nameof(value));
System\Windows\Controls\Stack.cs (1)
852throw new ArgumentException(SR.Stack_VisualInDifferentSubTree,nameof(child));
System\Windows\Controls\ToolBarTray.cs (1)
272throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ToolBar)), nameof(value));
System\Windows\Controls\ViewPort3D.cs (1)
232throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Visual3D)), nameof(value));
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 (1)
870throw new ArgumentException(SR.AbsoluteUriOnly, nameof(source));
System\Windows\CornerRadiusConverter.cs (1)
123throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(CornerRadius)), nameof(value));
System\Windows\Data\BindingExpression.cs (1)
394throw new ArgumentException(SR.Format(SR.PropertyNotBindable, dp.Name), nameof(dp));
System\Windows\Data\BindingListCollectionView.cs (1)
955throw new ArgumentException(SR.CannotEditPlaceholder, nameof(item));
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 (4)
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)); 157throw new ArgumentException(SR.RequiresXmlNamespaceMappingUri, nameof(mapping));
System\Windows\DependencyPropertyHelper.cs (1)
203throw new ArgumentException(SR.ElementMustBelongToTemplate, nameof(elementInTemplate));
System\Windows\Documents\DocumentSequence.cs (1)
101throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(DocumentReference)), nameof(value));
System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
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 (1)
136throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PageContent)), nameof(value));
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\FixedTextPointer.cs (2)
275throw new ArgumentException(SR.BadDistance, nameof(distance)); 395throw new ArgumentException(SR.BadDistance, nameof(offset));
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 (5)
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");
System\Windows\Documents\PageContent.cs (1)
170throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FixedPage)), nameof(value));
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\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\TextElementCollection.cs (5)
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)); 564throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value));
System\Windows\Documents\TextRange.cs (3)
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));
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\DynamicResourceExtensionConverter.cs (1)
47throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "DynamicResourceExtension"), nameof(value));
System\Windows\EventSetterHandlerConverter.cs (1)
62throw new ArgumentException(SR.TextRange_InvalidParameterValue, nameof(typeDescriptorContext));
System\Windows\FrameworkPropertyMetadata.cs (2)
224throw new ArgumentException(SR.NoDefaultUpdateSourceTrigger, nameof(defaultUpdateSourceTrigger)); 483throw new ArgumentException(SR.NoDefaultUpdateSourceTrigger, nameof(value));
System\Windows\Ink\Events.cs (2)
305throw new ArgumentException(SR.InvalidEmptyStrokeCollection, nameof(strokes)); 312throw new ArgumentException(SR.InvalidEmptyArray, nameof(gestureRecognitionResults));
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (1)
49throw new ArgumentException(SR.Format(SR.RuntimeTypeRequired, type), nameof(type));
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (2)
300throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "arrayIndex", "array"), nameof(arrayIndex)); 358throw new ArgumentException(SR.Format(SR.Collection_CopyTo_ArrayCannotBeMultidimensional), nameof(array));
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
227throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, nameof(child));
System\Windows\PropertyPathConverter.cs (1)
139throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PropertyPath)), nameof(value));
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 (1)
394throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(SetterBase)), nameof(value));
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 (1)
124throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Thickness)), nameof(value));
System\Windows\Trigger.cs (1)
181throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(Setter)), nameof(o));
PresentationUI (2)
MS\Internal\Documents\Application\RestrictedTransactionalPackage.cs (1)
88throw new ArgumentException(SR.PackagePartTypeNotWritable, nameof(contentType));
MS\Internal\Documents\Application\TransactionalPackage.cs (1)
82throw new ArgumentException(
ReachFramework (5)
Packaging\XpsManager.cs (2)
300throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, contentType), nameof(contentType)); 1180throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, contentType), nameof(contentType));
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,
Roslyn.Diagnostics.Analyzers (28)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
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\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)), 90_ => throw new ArgumentException("Unexpected argument", nameof(attributeName)), 137_ => throw new ArgumentException("Unexpected argument", nameof(attributeName)), 190_ => throw new ArgumentException("Unexpected argument", nameof(attributeName)),
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
334throw new ArgumentException(CSharpCompilerExtensionsResources.Expected_string_or_char_literal, nameof(token));
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));
Shared (3)
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 (1)
370=> throw new ArgumentException(message, paramName);
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 (63)
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (4)
20throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 25throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 62throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 74throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\LinkedList.cs (4)
453throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 458throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 480throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 496throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\OrderedDictionary.cs (21)
294throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 325throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 333throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 1237throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 1250throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 1285throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1290throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 1310throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1320throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1330throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 1359throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 1510throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array)); 1528throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1533throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 1553throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1563throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1699throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array)); 1837throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1842throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 1862throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1872throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\PriorityQueue.cs (3)
955throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 960throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 979throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\SortedDictionary.cs (10)
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)); 554throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 559throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 582throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 715throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 720throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 743throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\SortedList.cs (12)
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)); 458throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 463throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 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 (5)
546throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 551throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 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 (3)
126throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 131throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 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 (11)
System\Collections\Concurrent\BlockingCollection.cs (9)
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 (1)
1905throw new ArgumentException(SR.ConcurrentDictionary_ArrayIncorrectType, nameof(array));
System.Collections.Immutable (15)
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\ImmutableList_1.Builder.cs (1)
833throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
System\Collections\Immutable\ImmutableList_1.cs (1)
404throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
System\Collections\ThrowHelper.cs (1)
14throw new ArgumentException(SR.CapacityMustBeGreaterThanOrEqualToCount, "destination");
Validation\Requires.cs (1)
117throw new ArgumentException(message, parameterName);
System.Collections.NonGeneric (5)
System\Collections\Queue.cs (1)
133throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
System\Collections\SortedList.cs (3)
339throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 941throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1044throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
System\Collections\Stack.cs (1)
119throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
System.Collections.Specialized (3)
System\Collections\Specialized\NameObjectCollectionBase.cs (2)
377throw new ArgumentException(SR.Arg_MultiRank, nameof(array)); 601throw new ArgumentException(SR.Arg_MultiRank, nameof(array));
System\Collections\Specialized\NameValueCollection.cs (1)
202throw new ArgumentException(SR.Arg_MultiRank, nameof(dest));
System.ComponentModel.Annotations (4)
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 (27)
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\ExceptionBuilder.cs (9)
25return new ArgumentException(message, parameterName); 41throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(memberName)), nameof(memberName)); 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.Primitives (1)
System\ComponentModel\InvalidEnumArgumentException.cs (1)
48: base(SR.Format(SR.InvalidEnumArgument,
System.ComponentModel.TypeConverter (11)
System\ComponentModel\CultureInfoConverter.cs (1)
127throw new ArgumentException(SR.Format(SR.CultureInfoConverterInvalidCulture, (string)value), nameof(value));
System\ComponentModel\Design\DesignerOptionService.cs (1)
37throw new ArgumentException(SR.Format(SR.InvalidArgumentValue, "name.Length"), nameof(name));
System\ComponentModel\Design\PropertyTabAttribute.cs (2)
58throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope, nameof(tabScope)); 75throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope, nameof(tabScope));
System\ComponentModel\Design\Serialization\MemberRelationshipService.cs (2)
46throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "source.Owner"), nameof(source)); 59throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "source.Owner"), nameof(source));
System\ComponentModel\Design\ServiceContainer.cs (2)
90throw new ArgumentException(SR.Format(SR.ErrorServiceExists, serviceType.FullName), nameof(serviceType)); 127throw new ArgumentException(SR.Format(SR.ErrorServiceExists, serviceType.FullName), nameof(serviceType));
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\TypeDescriptor.cs (1)
2799throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()), nameof(instance));
System.Composition.Convention (11)
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 (2)
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 (17)
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\ConfigurationFileMap.cs (1)
31throw new ArgumentException(SR.Format(SR.Machine_config_file_not_found, machineConfigFilename),
System\Configuration\ConfigurationProperty.cs (1)
266throw new ArgumentException(SR.String_null_or_empty, nameof(name));
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\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\SettingsPropertyValue.cs (2)
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\ValidatorUtils.cs (1)
16throw new ArgumentException(SR.Validator_value_type_invalid, string.Empty);
System.Data.Common (4)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
57ArgumentException e = new ArgumentException(error, parameter);
System\Data\Common\DbConnectionStringBuilder.cs (1)
354throw new ArgumentException("not a string", nameof(keyword));
System\Data\DataException.cs (1)
373public static Exception ArgumentContainsNull(string paramName) => TraceExceptionAsReturnValue(new ArgumentException(SR.Data_ArgumentContainsNull, paramName));
System\Data\SQLTypes\SQLDecimal.cs (1)
589throw new ArgumentException(SQLResource.InvalidArraySizeMessage, nameof(bits));
System.Data.Odbc (1)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
57ArgumentException e = new ArgumentException(error, parameter);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\InstrumentAdvice.cs (1)
47throw new ArgumentException(SR.InvalidHistogramExplicitBucketBoundaries, nameof(value));
System.Diagnostics.TraceSource (3)
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.DirectoryServices.Protocols (34)
System\DirectoryServices\Protocols\common\DirectoryAttribute.cs (8)
115throw new ArgumentException(SR.ValidDirectoryAttributeType, nameof(valuesType)); 147throw new ArgumentException(SR.ValidValueType, nameof(value)); 166throw new ArgumentException(SR.ValidValueType, nameof(value)); 178throw new ArgumentException(SR.ValidValuesType, nameof(values)); 185throw new ArgumentException(SR.NullValueArray, nameof(values)); 219throw new ArgumentException(SR.ValidValueType, nameof(value)); 356throw new ArgumentException(SR.Format(SR.InvalidValueType, nameof(DirectoryAttribute)), nameof(value)); 435throw new ArgumentException(SR.Format(SR.InvalidValueType, nameof(DirectoryAttributeModification)), nameof(value));
System\DirectoryServices\Protocols\common\DirectoryConnection.cs (1)
30throw new ArgumentException(SR.NoNegativeTimeLimit, nameof(value));
System\DirectoryServices\Protocols\common\DirectoryControl.cs (10)
644throw new ArgumentException(SR.ValidValue, nameof(value)); 727throw new ArgumentException(SR.ValidValue, nameof(value)); 809throw new ArgumentException(SR.NullValueArray, nameof(sortKeys)); 854throw new ArgumentException(SR.NullValueArray, nameof(value)); 964throw new ArgumentException(SR.ValidValue, nameof(value)); 978throw new ArgumentException(SR.ValidValue, nameof(value)); 992throw new ArgumentException(SR.ValidValue, nameof(value)); 1006throw new ArgumentException(SR.ValidValue, nameof(value)); 1180throw new ArgumentException(SR.ContainNullControl, nameof(controls)); 1219throw new ArgumentException(SR.Format(SR.InvalidValueType, nameof(DirectoryControl)), nameof(value));
System\DirectoryServices\Protocols\common\DirectoryRequest.cs (4)
243throw new ArgumentException(SR.ValidFilterType, nameof(value)); 285throw new ArgumentException(SR.NoNegativeSizeLimit, nameof(value)); 299throw new ArgumentException(SR.NoNegativeTimeLimit, nameof(value)); 305throw new ArgumentException(SR.TimespanExceedMax, nameof(value));
System\DirectoryServices\Protocols\ldap\LdapConnection.cs (3)
109throw new ArgumentException(SR.NoNegativeTimeLimit, nameof(value)); 115throw new ArgumentException(SR.TimespanExceedMax, nameof(value)); 287throw new ArgumentException(SR.CallBackIsNull, nameof(callback));
System\DirectoryServices\Protocols\ldap\LdapSessionOptions.cs (8)
168throw new ArgumentException(SR.ValidValue, nameof(value)); 222throw new ArgumentException(SR.NoNegativeTimeLimit, nameof(value)); 228throw new ArgumentException(SR.TimespanExceedMax, nameof(value)); 243throw new ArgumentException(SR.ValidValue, nameof(value)); 261throw new ArgumentException(SR.NoNegativeTimeLimit, nameof(value)); 267throw new ArgumentException(SR.TimespanExceedMax, nameof(value)); 403throw new ArgumentException(SR.NoNegativeTimeLimit, nameof(value)); 409throw new ArgumentException(SR.TimespanExceedMax, nameof(value));
System.Drawing.Common (25)
System\Drawing\BufferedGraphicsContext.cs (1)
54throw new ArgumentException(SR.Format(SR.InvalidArgumentValue, nameof(MaximumBuffer), value), nameof(value));
System\Drawing\Drawing2D\GraphicsPath.cs (2)
336throw new ArgumentException(null, nameof(points)); 363throw new ArgumentException(null, nameof(points));
System\Drawing\Drawing2D\HatchBrush.cs (1)
17throw new ArgumentException(SR.Format(SR.InvalidEnumArgument, nameof(hatchstyle), hatchstyle, nameof(HatchStyle)), nameof(hatchstyle));
System\Drawing\Drawing2D\LinearGradientBrush.cs (3)
185throw new ArgumentException(SR.Format(SR.InvalidArgumentValue, "value.Positions", value.Positions), nameof(value)); 249throw new ArgumentException(SR.Format(SR.InvalidArgumentValue, "value.Positions", value.Positions), nameof(value)); 251throw new ArgumentException(message: null, nameof(value));
System\Drawing\Drawing2D\PathGradientBrush.cs (4)
41throw new ArgumentException(null, nameof(points)); 82throw new ArgumentException(null, nameof(points)); 232throw new ArgumentException(SR.Format(SR.InvalidArgumentValue, "value.Positions", value.Positions), nameof(value)); 297throw new ArgumentException(SR.Format(SR.InvalidArgumentValue, "value.Positions", value.Positions), nameof(value));
System\Drawing\Font.cs (5)
206throw new ArgumentException(message: null, nameof(graphics)); 281throw new ArgumentException(null, nameof(logFont)); 410throw new ArgumentException(SR.Format(SR.InvalidBoundArgument, nameof(emSize), emSize, 0, "System.Single.MaxValue"), nameof(emSize)); 517throw new ArgumentException(SR.Format(SR.InvalidBoundArgument, nameof(emSize), emSize, 0, "System.Single.MaxValue"), nameof(emSize)); 638throw new ArgumentException(null, nameof(lf));
System\Drawing\FontConverter.cs (2)
218throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, font, $"name{separator} size[units[{separator} style=style1[{separator} style2{separator} ...]]]"), nameof(value)); 309_ => throw new ArgumentException(SR.Format(SR.InvalidArgumentValueFontConverter, units), nameof(units)),
System\Drawing\Graphics.cs (1)
133throw new ArgumentException(SR.GdiplusCannotCreateGraphicsFromIndexedPixelFormat, nameof(image));
System\Drawing\Icon.cs (2)
155throw new ArgumentException(SR.NullOrEmptyPath, nameof(filePath)); 396throw new ArgumentException(null, nameof(handle));
System\Drawing\Image.cs (1)
809throw new ArgumentException(SR.NativeHandle0, nameof(handle));
System\Drawing\Printing\PaperSize.cs (3)
60throw new ArgumentException(SR.PSizeNotCustom, nameof(value)); 86throw new ArgumentException(SR.PSizeNotCustom, nameof(value)); 112throw new ArgumentException(SR.PSizeNotCustom, nameof(value));
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 (2)
System\Formats\Cbor\Writer\CborWriter.cs (1)
194throw new ArgumentException(SR.Argument_EncodeDestinationTooSmall, nameof(destination));
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 (17)
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.Write.cs (6)
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);
System\Formats\Tar\TarHelpers.cs (1)
390throw 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 (1)
408throw new ArgumentException(SR.TarEntryHardLinkOrSymlinkLinkNameEmpty, "entry");
System.IO.Compression (5)
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 (1)
371throw new ArgumentException(SR.EntryNameAndCommentEncodingNotSupported, nameof(EntryNameAndCommentEncoding));
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 (4)
System\IO\FileSystemWatcher.cs (4)
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.MemoryMappedFiles (5)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (4)
114throw new ArgumentException(SR.Argument_NewMMFAppendModeNotAllowed, nameof(mode)); 118throw new ArgumentException(SR.Argument_NewMMFTruncateModeNotAllowed, nameof(mode)); 308throw new ArgumentException(SR.Argument_NewMMFWriteAccessNotAllowed, nameof(access)); 535throw new ArgumentException(SR.Argument_NewMMFWriteAccessNotAllowed, nameof(access));
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (1)
33throw new ArgumentException(SR.Argument_NewMMFWriteAccessNotAllowed, nameof(access));
System.IO.Packaging (5)
System\IO\Packaging\InternalRelationshipCollection.cs (2)
403throw new ArgumentException(SR.RelationshipTargetMustBeRelative, nameof(targetUri)); 421throw new ArgumentException(SR.RelationshipToRelationshipIllegal, nameof(targetUri));
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (3)
255throw new ArgumentException(SR.UriShouldBeAbsolute, nameof(packageUri)); 267throw new ArgumentException(SR.UriShouldBeAbsolute, nameof(packUri)); 270throw new ArgumentException(SR.UriShouldBePackScheme, nameof(packUri));
System.IO.Pipes (7)
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 (1)
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 (4)
System\IO\Ports\SerialPort.cs (4)
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)); 1063throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(value)), nameof(value));
System.Linq.Expressions (81)
System\Linq\Expressions\Error.cs (81)
47return new ArgumentException(Strings.SameKeyExistsInExpando(key), nameof(key)); 124return new ArgumentException(Strings.SetterHasNoParams, paramName); 131return new ArgumentException(Strings.PropertyCannotHaveRefType, paramName); 138return new ArgumentException(Strings.IndexesOfSetGetMustMatch, paramName); 159return new ArgumentException(Strings.AccessorsCannotHaveVarArgs, paramName); 166return new ArgumentException(Strings.AccessorsCannotHaveByRefArgs, paramName); 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); 268return new ArgumentException(Strings.PropertyTypeCannotBeVoid, paramName); 275return new ArgumentException(Strings.InvalidUnboxType, paramName); 282return new ArgumentException(Strings.ExpressionMustBeWriteable, paramName); 289return new ArgumentException(Strings.ArgumentMustNotHaveValueType, paramName); 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); 380return new ArgumentException(Strings.FaultCannotHaveCatchOrFinally, paramName); 408return new ArgumentException(Strings.UserDefinedOperatorMustBeStatic(p0), paramName); 415return new ArgumentException(Strings.UserDefinedOperatorMustNotBeVoid(p0), paramName); 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); 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); 670return new ArgumentException(Strings.ExpressionTypeNotInvocable(p0), paramName); 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); 827return new ArgumentException(Strings.PropertyNotDefinedForType(p0, p1), paramName); 834return new ArgumentException(Strings.InstancePropertyNotDefinedForType(p0, p1), paramName); 848return new ArgumentException(Strings.InstancePropertyWithSpecifiedParametersNotDefinedForType(p0, p1, p2), paramName); 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); 929return new ArgumentException(Strings.UnhandledUnary(p0), paramName); 936return new ArgumentException(Strings.UnknownBindingType, $"bindings[{index}]"); 992return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForFunc, paramName); 999return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForAction, paramName); 1006return new ArgumentException(Strings.ArgumentCannotBeOfTypeVoid, paramName); 1213return new ArgumentException(Strings.NonStaticConstructorRequired, paramName); 1245return new ArgumentException(Strings.TypeContainsGenericParameters(p0), paramName); 1261return new ArgumentException(Strings.TypeIsGeneric(p0), paramName); 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.Memory (2)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (2)
49throw new ArgumentException(null, nameof(initialCapacity)); 129throw new ArgumentException(null, nameof(count));
System.Net.Http (3)
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.HttpListener (15)
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.Mail (4)
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.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 (8)
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.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)
386throw 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)); 277throw new ArgumentException(SR.net_ftp_unsupported_method, nameof(value)); 327throw new ArgumentException(SR.net_ftp_no_defaultcreds, nameof(value)); 687throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 810throw 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 (13)
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\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 (40)
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)); 2892throw new ArgumentException(SR.net_multibuffernotsupported, "BufferList"); 2990throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 2994throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3098throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, "e.RemoteEndPoint"), nameof(e)); 3103throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3107throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPointSnapshot.AddressFamily, _addressFamily), nameof(e)); 3152throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3156throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, e.RemoteEndPoint.AddressFamily, _addressFamily), nameof(e)); 3224throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.SendPacketsElements"), nameof(e)); 3262throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3344throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, nameof(remoteEP)), nameof(remoteEP)); 3959throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, remoteEndPointArgumentName), remoteEndPointArgumentName); 3964throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEndPoint.AddressFamily, _addressFamily), remoteEndPointArgumentName);
System\Net\Sockets\Socket.Tasks.cs (2)
143throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses)); 815throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
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.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)
315throw 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 (11)
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (3)
75throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode)); 131throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode)); 167throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode));
System\ThrowHelper.cs (8)
16throw new ArgumentException(SR.Argument_DestinationTooShort, destinationName); 28throw new ArgumentException(SR.Argument_InputAndDestinationSpanMustNotOverlap, "destination"); 116throw new ArgumentException(SR.ThrowArgument_SetSliceNoRange, paramNames); 122throw new ArgumentException(SR.ThrowArgument_SetSliceInvalidShapes, paramNames); 140throw new ArgumentException(SR.ThrowArgument_DimensionsNotSame, paramNames); 146throw new ArgumentException(SR.ThrowArgument_1DTensorRequired, paramNames); 152throw new ArgumentException(SR.Argument_2DTensorRequired, paramNames); 158throw new ArgumentException(SR.ThrowArgument_IncorrectNumberOfFilterItems, paramNames);
System.ObjectModel (15)
System\Collections\CollectionHelpers.cs (2)
16throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 21throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
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 (500)
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\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\AppDomain.cs (1)
100throw new ArgumentException(SR.Argument_EmptyString, nameof(assemblyName));
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\ArgumentNullException.cs (2)
28: base(SR.ArgumentNull_Generic, paramName) 40: base(message ?? SR.ArgumentNull_Generic, paramName)
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (3)
31: base(SR.Arg_ArgumentOutOfRangeException, paramName) 37: base(message ?? SR.Arg_ArgumentOutOfRangeException, paramName) 49: base(message ?? SR.Arg_ArgumentOutOfRangeException, 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\Buffer.cs (3)
26throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(src)); 37throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(dst)); 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\Char.cs (1)
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 (5)
252throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 267throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 828throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2282throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2296throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (4)
137throw new ArgumentException(SR.Format(SR.Argument_ArrayTooLarge, BitsPerByte), nameof(bytes)); 241throw new ArgumentException(SR.Format(SR.Argument_ArrayTooLarge, BitsPerInt32), nameof(values)); 667throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 888throw new ArgumentException(SR.Arg_BitArrayTypeUnsupported, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (4)
272throw new ArgumentException(SR.Arg_HTCapacityOverflow, nameof(capacity)); 577throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1194throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1229throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (2)
158throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index)); 311throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index));
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (4)
20throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 25throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 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\Convert.cs (3)
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 (1)
695case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style");
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (3)
206private static void ThrowInvalidKind() => throw new ArgumentException(SR.Argument_InvalidDateTimeKind, "kind"); 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 (4)
114throw new ArgumentException(SR.Argument_OffsetLocalMismatch, nameof(offset)); 121throw new ArgumentException(SR.Argument_OffsetUtcMismatch, nameof(offset)); 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 (1)
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\Diagnostics\Contracts\Contracts.cs (1)
654throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (4)
387throw new ArgumentException(SR.Argument_InvalidTypeName, nameof(eventSourceType)); 507throw new ArgumentException(SR.EventSource_InvalidCommand, nameof(command)); 1646throw new ArgumentException(SR.EventSource_TraitEven, nameof(traits)); 3849throw new ArgumentException(SR.EventSource_InvalidEventFormat, nameof(settings));
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\DuplicateWaitObjectException.cs (2)
26: base(SR.Arg_DuplicateWaitObjectException, parameterName) 32: base(message ?? SR.Arg_DuplicateWaitObjectException, parameterName)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (4)
887throw new ArgumentException(SR.Arg_MustBeEnum, nameof(TEnum)); 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)
279throw new ArgumentException(SR.Argument_StringFirstCharIsZero, nameof(variable)); 282throw new ArgumentException(SR.Argument_IllegalEnvVarName, nameof(variable));
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 (1)
691throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
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 (1)
378throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureNotFoundException.cs (3)
28: base(message ?? DefaultMessage, paramName) 38: base(message ?? DefaultMessage, paramName) 56: base(message ?? DefaultMessage, paramName)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (11)
1065throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1090throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1110throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1132throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1153throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1321_ => throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)), 1597throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(patterns)); 1643throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); 1659throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1680throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1741throw new ArgumentException(message, styles ? nameof(styles) : nameof(style));
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)
95throw 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)
109throw new ArgumentException(SR.Argument_InvalidNativeDigitCount, propertyName); 124throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 129throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 138throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 154throw new ArgumentException(SR.Argument_InvalidDigitSubstitution, propertyName); 293throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 297throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 821throw new ArgumentException( 836throw new ArgumentException((value & InvalidNumberStyles) != 0 ? SR.Argument_InvalidNumberStyles : SR.Arg_HexBinaryStylesNotSupported, nameof(style));
src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (6)
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)); 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\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\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 (2)
31throw new ArgumentException(SR.Argument_NullCharInPath, nameof(path)); 42throw new ArgumentException(SR.Arg_BasePathNotFullyQualified, nameof(basePath));
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 (1)
221throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(options));
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
178throw new ArgumentException(SR.Argument_StreamNotWritable, nameof(options));
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (4)
303throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position)); 531throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position)); 586throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position)); 610throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position));
src\libraries\System.Private.CoreLib\src\System\ParseNumbers.cs (2)
33throw new ArgumentException(SR.Arg_InvalidBase, nameof(radix)); 121throw new ArgumentException(SR.Arg_InvalidBase, nameof(radix));
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 (1)
278throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, path), nameof(path));
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\Emit\DynamicMethod.cs (1)
351throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (4)
96throw new ArgumentException(SR.Argument_NotExceptionType, nameof(excType)); 98ConstructorInfo con = excType.GetConstructor(Type.EmptyTypes) ?? throw new ArgumentException(SR.Arg_NoDefCTorWithoutTypeName, nameof(excType)); 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\TypeBuilder.cs (14)
90throw new ArgumentException(SR.Arg_EmptyArray, nameof(names)); 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\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\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\Resources\ResourceManager.cs (1)
214throw new ArgumentException(SR.Arg_ResMgrNotResSet, nameof(usingResourceSet));
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\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)); 565throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structureType)); 569throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structureType)); 613throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T)); 1116throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 1134throw new ArgumentException(SR.Argument_TypeMustNotBeComImport, nameof(type)); 1138throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 1160throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t)); 1164throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t)); 1172throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(t)); 1185throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(TDelegate)); 1193throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(TDelegate));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (5)
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)); 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\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\Versioning\FrameworkName.cs (5)
120throw new ArgumentException(SR.Argument_FrameworkNameTooShort, nameof(frameworkName)); 131throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 148throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 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 (17)
63throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 124throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value)); 133throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 215throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 338throw new ArgumentException(SR.Arg_NoAccessSpec, nameof(bindingFlags)); 355throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 360throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 413throw new ArgumentException(SR.Arg_NamedParamNull, nameof(namedParams)); 424throw new ArgumentException(SR.Arg_CreatInstAccess, nameof(bindingFlags)); 449throw new ArgumentException(SR.Arg_FldSetGet, nameof(bindingFlags)); 452throw new ArgumentException(SR.Arg_FldGetPropSet, nameof(bindingFlags)); 461throw new ArgumentException(SR.Arg_FldSetPropGet, nameof(bindingFlags)); 464throw new ArgumentException(SR.Arg_FldSetInvoke, nameof(bindingFlags)); 538throw new ArgumentException(SR.Arg_FldGetArgErr, nameof(bindingFlags)); 545throw new ArgumentException(SR.Arg_FldSetArgErr, nameof(bindingFlags)); 567throw new ArgumentException(SR.Arg_PropSetGet, nameof(bindingFlags)); 576throw new ArgumentException(SR.Arg_PropSetInvoke, nameof(bindingFlags));
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\String.Comparison.cs (5)
241throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 555throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 664throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 722throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 1133throw 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 (2)
42_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)), 235throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (1)
40throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\DecoderFallback.cs (1)
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 (1)
40throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\EncoderFallback.cs (1)
357throw new ArgumentException(SR.Format(SR.Argument_RecursiveFallback, charRecursive), "chars");
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 (3)
222throw new ArgumentException(SR.Format(SR.Argument_CodepageNotSupported, codepage), nameof(codepage)); 1098throw new ArgumentException( 1126throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
99throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (1)
2093throw new ArgumentException(SR.Arg_EmptySpan, nameof(oldValue));
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (2)
599throw new ArgumentException( 937throw new ArgumentException(
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\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 (2)
46throw new ArgumentException(SR.Argument_PreAllocatedAlreadyAllocated, nameof(preAllocated)); 68throw new ArgumentException(SR.Argument_NativeOverlappedWrongBoundHandle, nameof(overlapped));
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 (11)
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); 137throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other"); 290throw new ArgumentException(SR.Arg_CannotBeNaN, GetArgumentName(argument)); 341throw new ArgumentException(SR.Arg_HandleNotSync, paramName); 347throw new ArgumentException(SR.Arg_HandleNotAsync, paramName); 530throw new ArgumentException(SR.Arg_InvalidHandle, paramName); 742return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 747return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value)); 762return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (1)
865case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style");
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 (8)
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)); 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 (4)
25throw new ArgumentException(SR.Arg_MustBeEnum, nameof(value)); 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 (1)
23throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(flds));
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\TypeNameParserHelpers.cs (1)
359throw new ArgumentException(SR.Argument_InvalidTypeName, $"typeName@{errorIndex}");
src\System\Attribute.CoreCLR.cs (2)
546throw new ArgumentException(SR.Argument_InvalidParameterInfo, nameof(element)); 560throw new ArgumentException(SR.Argument_InvalidParameterInfo, nameof(element));
src\System\Collections\EmptyReadOnlyDictionaryInternal.cs (1)
46throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index));
src\System\Delegate.CoreCLR.cs (16)
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)); 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)); 302throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 305throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method)); 308throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 337throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 340throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method)); 343throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 375throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 378throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
src\System\GC.CoreCLR.cs (3)
217throw new ArgumentException(SR.Argument_AggressiveGCRequiresMaxGeneration, nameof(generation)); 221throw new ArgumentException(SR.Argument_AggressiveGCRequiresBlocking, nameof(blocking)); 225throw new ArgumentException(SR.Argument_AggressiveGCRequiresCompacting, nameof(compacting));
src\System\Reflection\Assembly.CoreCLR.cs (1)
32throw new ArgumentException(SR.Format_StringZeroLength, nameof(partialName));
src\System\Reflection\Emit\CustomAttributeBuilder.cs (3)
68throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedProperties, propertyValues"); 70throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedFields, fieldValues"); 275throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, passedType), paramName);
src\System\Reflection\Emit\DynamicILGenerator.cs (7)
65throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(meth)); 114throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(con)); 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)); 409throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(methodInfo));
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 (1)
24throw new ArgumentException(SR.Argument_IllegalName, nameof(fieldName));
src\System\Reflection\Emit\RuntimeILGenerator.cs (2)
610throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 831throw new ArgumentException(SR.Argument_UnmatchedMethodForLocal, nameof(local));
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (1)
67throw new ArgumentException(SR.Argument_IllegalName, nameof(name));
src\System\Reflection\Emit\RuntimePropertyBuilder.cs (1)
38throw new ArgumentException(SR.Argument_IllegalName, nameof(name));
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (6)
384throw new ArgumentException(SR.Argument_IllegalName, nameof(name)); 387throw new ArgumentException(SR.Argument_TypeNameTooLong, nameof(name)); 402throw new ArgumentException(SR.Argument_BadNestedTypeFlags, nameof(attr)); 997throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 1010throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 1435throw new ArgumentException(SR.Argument_IllegalName, nameof(name));
src\System\Reflection\Emit\SignatureHelper.cs (11)
102throw new ArgumentException(SR.Argument_UnknownUnmanagedCallConv, nameof(unmanagedCallConv)); 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)); 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));
src\System\Reflection\FieldInfo.CoreCLR.cs (1)
11throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle));
src\System\Reflection\RuntimeAssembly.cs (2)
325throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 335throw 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 (4)
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));
src\System\Reflection\RuntimeModule.cs (11)
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), 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), 226throw new ArgumentException(SR.Format(SR.Argument_ResolveModuleType, tk), nameof(metadataToken)); 229throw new ArgumentException(SR.Format(SR.Argument_ResolveType, tk, this), nameof(metadataToken)); 291throw new ArgumentException(SR.Format(SR.Argument_ResolveMember, tk, 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 (2)
147throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 157throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (4)
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));
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\RuntimeType.CoreCLR.cs (2)
2694throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(interfaceType)); 3559throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(typeArguments));
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 (40)
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
272throw new ArgumentException(SR.Format(SR.JsonTypeNotSupportedByDataContractJsonSerializer, traditionalDataContract.UnderlyingType), nameof(traditionalDataContract));
System\Runtime\Serialization\Json\XmlJsonWriter.cs (12)
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\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 (17)
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)); 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));
System.Private.Uri (5)
System\Uri.cs (3)
517throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "RelativeUri"), nameof(serializationInfo)); 1422throw new ArgumentException(SR.Format(SR.Argument_InvalidUriSubcomponent, part), nameof(part)); 1562throw 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.Private.Windows.Core (8)
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 (1)
593throw new ArgumentException("Hashtable has custom Comparer or HashCodeProvider.", nameof(hashtable));
System\Private\Windows\BinaryFormat\Serializer\ClassRecord.cs (1)
95throw new ArgumentException("Invalid binary type.", nameof(memberTypeInfo));
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.Xml (56)
System\Xml\Core\XmlReader.cs (1)
1720throw new ArgumentException(SR.XmlBinary_NoParserContext, nameof(inputContext));
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 (3)
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));
System\Xml\Core\XmlWellFormedWriterAsync.cs (3)
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));
System\Xml\Schema\XmlSchemaSet.cs (1)
574throw new ArgumentException(SR.Sch_SchemaDoesNotExist, nameof(schema));
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\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"); 2331throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 2337throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (2)
269throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 275throw 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\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\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 (5)
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.Reflection.Context (1)
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (1)
23throw new ArgumentException("", nameof(name));
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 (23)
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 (5)
427throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 528throw new ArgumentException(SR.Argument_MustBeSwitchOpCode, nameof(opcode)); 548throw new ArgumentException(SR.Argument_UnmatchedMethodForLocal, nameof(local)); 627throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 843throw new ArgumentException(SR.InvalidOperation_InvalidDocument, nameof(document));
System\Reflection\Emit\PseudoCustomAttributesData.cs (6)
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 (7)
281throw new ArgumentException(SR.Argument_BadSizeForData, nameof(data.Length)); 317throw new ArgumentException(SR.Format(SR.Argument_MethodOverridden, methodInfoBody.Name, FullName), nameof(methodInfoDeclaration)); 358new ArgumentException(SR.Format(SR.Argument_InvalidMethodOverride, FullName, methodName), "methodInfoBody"); 420throw new ArgumentException(SR.Argument_BadSizeForData, nameof(size)); 540throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, con.DeclaringType, name), nameof(binaryAttribute)); 1309throw new ArgumentException(SR.Argument_MustBeInterface, nameof(interfaceType)); 1314throw new ArgumentException(SR.Argument_InterfaceNotFound, nameof(interfaceType));
System.Reflection.Metadata (34)
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\Ecma335\Encoding\BlobEncoders.cs (1)
1100throw 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 (1)
165throw new ArgumentException(SR.StreamMustSupportReadAndSeek, nameof(peStream));
System\Reflection\Throw.cs (9)
23throw new ArgumentException(message, parameterName); 29throw new ArgumentException(SR.CantGetOffsetForVirtualHeapHandle, "handle"); 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 (10)
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\Methods\RoDefinitionMethod.cs (1)
123throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(typeArguments));
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (1)
99throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(typeArguments));
System\Reflection\TypeLoading\Types\RoType.cs (1)
336throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
System.Resources.Extensions (1)
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.Runtime.Caching (13)
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\MemoryCache.cs (7)
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));
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 (4)
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 (1)
1209throw new ArgumentException(SR.Argument_MustBeBigInt, nameof(obj));
System\Numerics\Complex.cs (1)
2158throw new ArgumentException(SR.Argument_InvalidNumberStyles, nameof(style));
System.Runtime.Serialization.Formatters (4)
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.Security.Claims (1)
System\Security\Claims\ClaimsIdentity.cs (1)
1046throw new ArgumentException(
System.Security.Cryptography (310)
src\libraries\Common\src\System\Security\Cryptography\AesGcm.cs (4)
78throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tagSizeInBytes)); 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\CompositeMLDsa.cs (1)
218throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
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\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\Helpers.cs (1)
281throw new ArgumentException(SR.Format(SR.Argument_DestinationImprecise, expectedLength), paramName);
src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (4)
572throw new ArgumentException(SR.Argument_MLDsaMuInvalidLength, nameof(externalMu)); 1803throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source)); 1853throw new ArgumentException(SR.Argument_PrivateKeyWrongSizeForAlgorithm, nameof(source)); 1903throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source));
src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (11)
114throw new ArgumentException( 121throw new ArgumentException( 206throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 211throw new ArgumentException( 252throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 294throw new ArgumentException( 356throw new ArgumentException(SR.Argument_KemInvalidSeedLength, nameof(source)); 415throw new ArgumentException(SR.Argument_KemInvalidDecapsulationKeyLength, nameof(source)); 472throw new ArgumentException(SR.Argument_KemInvalidEncapsulationKeyLength, nameof(source)); 525throw new ArgumentException( 579throw new ArgumentException(
src\libraries\Common\src\System\Security\Cryptography\PemKeyHelpers.Factory.cs (6)
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)); 116throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(source)); 130throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(source));
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 (3)
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));
src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (6)
136throw new ArgumentException( 320throw new ArgumentException( 1081throw new ArgumentException( 1132throw new ArgumentException( 1687throw new ArgumentException(SR.Argument_PublicKeyWrongSizeForAlgorithm, nameof(source)); 1737throw new ArgumentException(SR.Argument_PrivateKeyWrongSizeForAlgorithm, 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 (2)
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\ChaCha20Poly1305.cs (2)
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\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\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\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 (2)
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)
30throw 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\PemEncoding.cs (9)
43throw new ArgumentException(SR.Argument_PemEncoding_NoPemFound, nameof(pemData)); 73throw new ArgumentException(SR.Argument_PemEncoding_NoPemFound, nameof(pemData)); 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 (6)
118throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 132throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(input)); 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));
System\Security\Cryptography\RandomNumberGenerator.cs (3)
182throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 205throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 232throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices));
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\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 (10)
829throw new ArgumentException(SR.Cryptography_CertReq_IssuerRequiresPrivateKey, nameof(issuerCertificate)); 833throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 837throw new ArgumentException( 848throw new ArgumentException( 868throw new ArgumentException( 885throw new ArgumentException(SR.Cryptography_CertReq_BasicConstraintsRequired, nameof(issuerCertificate)); 887throw new ArgumentException(SR.Cryptography_CertReq_IssuerBasicConstraintsInvalid, nameof(issuerCertificate)); 889throw new ArgumentException(SR.Cryptography_CertReq_IssuerKeyUsageInvalid, nameof(issuerCertificate)); 915throw new ArgumentException( 1019throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (5)
137throw new ArgumentException( 159throw new ArgumentException( 166throw new ArgumentException( 173throw new ArgumentException( 214throw new ArgumentException(
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 (1)
54throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (1)
45throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (1)
28throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle));
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (1)
49throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
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\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 (12)
395throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 413throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 774throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 865throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 876throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 970throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 981throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1066throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1081throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1176throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1184throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1747throw 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\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 (46)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (5)
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));
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 (7)
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)); 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 (11)
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\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 (3)
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));
System\Security\Cryptography\Pkcs\CmsSigner.cs (2)
60throw new ArgumentException(SR.Argument_InvalidRsaSignaturePadding, nameof(value)); 188throw new ArgumentException(SR.Argument_InvalidRsaSignaturePadding, nameof(signaturePadding));
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 (1)
60throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
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 (29)
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\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\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 (1)
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 (3)
System\Security\Permissions\PrincipalPermission.cs (3)
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));
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 (35)
Internals\System\Runtime\ExceptionTrace.cs (1)
232return TraceException(new ArgumentException(message, paramName));
Internals\System\Text\BinHexEncoding.cs (2)
80throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.XmlArrayTooSmall, nameof(bytes))); 146throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.XmlArrayTooSmall, "chars"));
Internals\System\Xml\XmlMtomReader.cs (1)
121throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.MtomContentTypeInvalid, nameof(contentType)));
Internals\System\Xml\XmlMtomWriter.cs (1)
106throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.MtomBoundaryInvalid, boundary), nameof(boundary)));
SMDiagnostics\System\ServiceModel\Diagnostics\ExceptionUtility.cs (2)
34return (ArgumentException)ThrowHelperError(new ArgumentException(SRP.StringNullOrEmpty, arg)); 97return (ArgumentException)ThrowHelperError(new ArgumentException(message, paramName));
System\IdentityModel\Tokens\SecurityKeyIdentifier.cs (1)
94throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.NoKeyIdentifierClauseFound, typeof(TClause)), "TClause"));
System\ServiceModel\Channels\ChannelManagerBase.cs (1)
49return new ArgumentException(SRP.Format(SRP.ChannelTypeNotSupported, type), "TChannel");
System\ServiceModel\Channels\Message.cs (4)
988throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.InvalidReaderPositionOnCreateMessage, "reader")); 1016throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.InvalidReaderPositionOnCreateMessage, "reader")); 1351Exception versionMismatchException = new ArgumentException(SRP.Format(SRP.EncoderEnvelopeVersionMismatch, envelopeVersion, desiredVersion.Envelope), "reader"); 1579Exception versionMismatchException = new ArgumentException(SRP.Format(SRP.EncoderEnvelopeVersionMismatch, envelopeVersion, desiredVersion.Envelope), "reader");
System\ServiceModel\Channels\MessageHeader.cs (2)
400throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.SFXHeaderNameCannotBeNullOrEmpty, "name")); 489throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.MessageHeaderVersionNotSupported, GetType().FullName, messageVersion.ToString()), "version"));
System\ServiceModel\Channels\MessageHeaders.cs (4)
466throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException( 570throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.MessageHeaderVersionMismatch, collection.MessageVersion.ToString(), MessageVersion.ToString()), "collection")); 1366throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.MessageHeaderVersionNotSupported, 1559throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(
System\ServiceModel\Channels\MtomMessageEncodingBindingElement.cs (2)
28throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.MtomEncoderBadMessageVersion, messageVersion.ToString()), nameof(messageVersion))); 147throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.MtomEncoderBadMessageVersion, value.ToString()), nameof(value)));
System\ServiceModel\Channels\SecurityBindingElement.cs (1)
334throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.ChannelTypeNotSupported, typeof(TChannel)), nameof(TChannel)));
System\ServiceModel\Channels\TransportDefaults.cs (1)
73throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.MessageTextEncodingNotSupported, charSet), "encoding"));
System\ServiceModel\Channels\UriGenerator.cs (1)
35throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.UriGeneratorSchemeMustNotBeEmpty, "scheme"));
System\ServiceModel\Description\ServiceReflector.cs (1)
304throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(e.Message, "name"));
System\ServiceModel\Description\TypedMessageConverter.cs (1)
51throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.SFxMessageContractAttributeRequired, messageContract), "messageContract"));
System\ServiceModel\Diagnostics\TraceUtility.cs (1)
468return (ArgumentException)ThrowHelperError(new ArgumentException(message, paramName), msg);
System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (2)
654new ArgumentException(SRP.Format(SRP.SFxParameterCountMismatch, "parts", parts.Length, "parameters", parameters.Length), "parameters")); 733new ArgumentException(SRP.Format(SRP.SFxParameterCountMismatch, "parts", parts.Length, "parameters", parameters.Length), "parameters"));
System\ServiceModel\EndpointAddress.cs (1)
135throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.MultipleIdentities, nameof(extensionReader)));
System\ServiceModel\FaultReason.cs (1)
57throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.AtLeastOneFaultReasonMustBeSpecified, "translations"));
System\ServiceModel\Security\SecurityProtocolFactory.cs (1)
534throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(
System\ServiceModel\Security\SecuritySessionClientSettings.cs (1)
272throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.Format(SRP.ChannelTypeNotSupported, typeof(TChannel)), nameof(TChannel)));
System\ServiceModel\Security\SecuritySessionSecurityTokenProvider.cs (2)
155throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.TrustDriverVersionDoesNotSupportSession, nameof(value))); 159throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRP.SecureConversationDriverVersionDoesNotSupportSession, nameof(value)));
System.ServiceModel.Primitives.Tests (1)
ServiceModel\ThrowingChannelBase.cs (1)
19throw new ArgumentException("ThrowingChannelBase requires a non-null inner channel.", "innerChannel");
System.ServiceModel.Syndication (9)
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.Text.Encoding.CodePages (4)
System\Text\EncoderFallbackBufferHelper.cs (1)
133throw new ArgumentException(SR.Format(SR.Argument_RecursiveFallback, charRecursive), "chars");
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 (2)
System\ThrowHelper.cs (2)
21throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 56return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
System.Text.Json (16)
System\Text\Json\Document\JsonDocument.cs (1)
1140throw new ArgumentException(SR.JsonDocumentDoesNotSupportComments, paramName);
System\Text\Json\ThrowHelper.cs (1)
84throw new ArgumentException(SR.ArrayTooSmall, paramName);
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 (4)
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)
169throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 199throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 222throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 234throw new ArgumentException( 241throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 251throw new ArgumentException(
System\ThrowHelper.cs (2)
21throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 56return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
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.Transactions.Local (15)
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 (4)
144throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 182throw new ArgumentException(SR.UnrecognizedRecoveryInformation, nameof(recoveryInformation)); 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 (2)
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));
System.Windows.Forms (146)
misc\CollectionHelper.cs (2)
19throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(target)); 23throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(target));
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\Windows\Forms\ActiveX\AxHost.AxContainer.cs (1)
131throw new ArgumentException(string.Format(SR.AXDuplicateControl, GetNameForControl(control)), nameof(control));
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\Control.ControlCollection.cs (1)
134throw new ArgumentException(SR.ControlBadControl, nameof(control));
System\Windows\Forms\Control.cs (3)
5002throw new ArgumentException(message: null, nameof(targetBounds)); 5053throw new ArgumentException(SR.ControlBadAsyncResult, nameof(asyncResult)); 10395throw new ArgumentException(SR.TopLevelParentedControl, nameof(value));
System\Windows\Forms\Control.MetafileDCWrapper.cs (1)
35throw new ArgumentException(SR.ControlMetaFileDCWrapperSizeInvalid, nameof(size));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (11)
16652throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17580throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17600throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17638throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17760throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 17844throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 18277throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 18361throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 18711throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 18997throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row"); 28210throw new ArgumentException(SR.DataGridView_ColumnNeedsToBeDataBoundWhenSortingDataBoundDataGridView, nameof(dataGridViewColumn));
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (3)
131throw new ArgumentException( 284throw new ArgumentException( 302throw new ArgumentException(
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
3732throw new ArgumentException(SR.DataGridViewCell_FormattedValueHasWrongType, nameof(formattedValue));
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (2)
125throw new ArgumentException(string.Format(SR.DataGridViewColumnCollection_ColumnNotFound, columnName), nameof(columnName)); 140throw new ArgumentException(string.Format(SR.DataGridViewColumnCollection_ColumnNotFound, columnName), nameof(columnName));
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\DataGridViewColumnCollection.cs (2)
993throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView, nameof(dataGridViewColumn)); 1028throw new ArgumentException(string.Format(SR.DataGridViewColumnCollection_ColumnNotFound, columnName), nameof(columnName));
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 (1)
1379throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(rowIndex), rowIndex), nameof(rowIndex));
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (5)
398throw new ArgumentException(SR.DataGridViewRowCollection_TooManyCells, nameof(dataGridViewRow)); 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\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 (4)
193throw new ArgumentException(SR.ImageListBadImage, nameof(value)); 264throw new ArgumentException(SR.ImageListBadImage, nameof(value)); 396throw new ArgumentException(SR.ImageListStripBadWidth, nameof(value)); 401throw new ArgumentException(SR.ImageListImageTooShort, nameof(value));
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\ListBox.cs (3)
406throw new ArgumentException(SR.ListBoxVarHeightMultiCol, nameof(value)); 690throw new ArgumentException(SR.ListBoxVarHeightMultiCol, nameof(value)); 854throw new ArgumentException(SR.ListBoxInvalidSelectionMode, nameof(value));
System\Windows\Forms\Controls\ListBoxes\ListBox.IntegerCollection.cs (3)
155throw new ArgumentException(null, 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\ListView.ColumnHeaderCollection.cs (1)
299throw new ArgumentException(SR.ColumnHeaderCollectionInvalidArgument, nameof(value));
System\Windows\Forms\Controls\ListView\ListView.cs (6)
258throw new ArgumentException(SR.ListViewActivationMustBeOnWhenHotTrackingIsOn, nameof(value)); 1092throw new ArgumentException(SR.ListViewHoverMustBeOnWhenHotTrackingIsOn, nameof(value)); 2266throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(value), value), nameof(value)); 3824throw new ArgumentException(string.Format(SR.OnlyOneControl, ch.Text), nameof(ch)); 4020throw new ArgumentException(string.Format(SR.OnlyOneControl, items[i].Text), nameof(items)); 4047throw new ArgumentException(string.Format(SR.OnlyOneControl, item.Text), nameof(items));
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 (1)
145throw new ArgumentException(SR.ListViewGroupCollectionBadListViewGroup, nameof(value));
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\MonthCalendar\MonthCalendar.cs (4)
486throw new ArgumentException(string.Format(SR.MonthCalendarMaxSelCount, value.ToString("D")), nameof(value)); 910throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value)), nameof(value)); 931throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value)), nameof(value)); 952throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value)), nameof(value));
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
1583throw new ArgumentException(SR.PropertyGridTabScope, nameof(tabScope));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewListBoxAccessibleObject.cs (1)
24throw new ArgumentException(null, nameof(owningGridViewListBox));
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1135throw 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\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\ToolStripPanelCell.cs (1)
52throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, string.Format(SR.TypedControlCollectionShouldBeOfType, nameof(ToolStrip))), control.GetType().Name);
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\HtmlWindowCollection.cs (1)
70throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(windowId), windowId), nameof(windowId));
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
481throw new ArgumentException(SR.WebBrowserObjectForScriptingComVisibleOnly, nameof(value));
System\Windows\Forms\Controls\WebBrowser\WebBrowserContainer.cs (1)
304throw 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 (1)
307throw new ArgumentException(string.Format(SR.DataBindingCycle, binding.PropertyName), nameof(propBinding));
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\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\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\TaskDialogProgressBar.cs (1)
316_ => throw new ArgumentException(null, nameof(state))
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)
1460throw new ArgumentException(SR.AddDifferentThreads, nameof(value)); 1477throw new ArgumentException(SR.FormMDIParentAndChild, nameof(value)); 1482throw new ArgumentException(SR.MDIParentNotContainer, nameof(value)); 1635throw new ArgumentException(SR.NonTopLevelCantHaveOwner, nameof(value)); 2044throw new ArgumentException(SR.MDIContainerMustBeTopLevel, nameof(value)); 5491throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(Show)), nameof(owner)); 5666throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(ShowDialog)), nameof(owner)); 5745throw 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 (2)
61throw new ArgumentException(string.Format(SR.InvalidGDIHandle, (typeof(Cursor)).Name), nameof(handle)); 435throw new ArgumentException(string.Format(SR.InvalidPictureType, nameof(picture), nameof(Cursor)), paramName);
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\MDI\MDIClient.ControlCollection.cs (2)
46throw new ArgumentException(SR.MDIChildAddToNonMDIParent, nameof(value)); 51throw new ArgumentException(SR.AddDifferentThreads, nameof(value));
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanelCellPositionTypeConverter.cs (1)
50throw new ArgumentException(
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\ToolTip\ToolTip.cs (1)
246throw new ArgumentException(string.Format(SR.ToolTipEmptyColor, nameof(ForeColor)), nameof(value));
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.FontConverter.cs (1)
131_ => throw new ArgumentException(string.Format(SR.InvalidArgumentValueFontConverter, units), nameof(units)),
System.Windows.Forms.Design (13)
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\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\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\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\Windows\Forms\Design\Behavior\Behavior.cs (1)
31throw new ArgumentException(null, nameof(behaviorService));
System\Windows\Forms\Design\DocumentDesigner.cs (1)
1384? 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.Primitives (3)
System\Windows\Forms\PaddingConverter.cs (1)
40: throw new ArgumentException(string.Format(SR.TextParseFailedFormat, stringValue, "left, top, right, bottom"), nameof(value));
Windows\Win32\PInvoke.SetThreadDpiAwarenessContext.cs (1)
21throw new ArgumentException(dpiContext.ToString(), nameof(dpiContext));
Windows\Win32\System\Com\StandardDispatch.cs (1)
47throw new ArgumentException("Interface guid doesn't match type info", nameof(typeInfo));
System.Windows.Forms.Tests (2)
System\Windows\Forms\ListView.CheckedListViewItemCollectionTests.cs (1)
364_ => throw new ArgumentException($"Invalid method name: {methodName}", nameof(methodName))
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 (26)
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));
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 (1)
297throw new ArgumentException(SR.SimpleFixupsMustHaveOneName, nameof(names));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (2)
62throw new ArgumentException(SR.SavedContextSchemaContextNull, nameof(savedContext)); 76throw new ArgumentException(SR.SavedContextSchemaContextMismatch, nameof(schemaContext));
System\Xaml\NameScope.cs (3)
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\Schema\XamlDirective.cs (1)
44throw new ArgumentException(SR.CollectionCannotContainNulls, nameof(xamlNamespaces));
System\Xaml\XamlMember.cs (2)
849throw new ArgumentException(SR.IncorrectGetterParamNum, argumentName); 857throw new ArgumentException(SR.IncorrectSetterParamNum, argumentName);
System\Xaml\XamlSchemaContext.cs (2)
279throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "xamlTypeName.Name"), nameof(xamlTypeName)); 284throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "xamlTypeName.Namespace"), nameof(xamlTypeName));
System\Xaml\XamlServices.cs (1)
146throw new ArgumentException(SR.StringIsNullOrEmpty, nameof(fileName));
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 (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));
Templates.Blazor.WebAssembly.Auth.Tests (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));
Templates.Blazor.WebAssembly.Tests (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));
Templates.Mvc.Tests (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));
Templates.Tests (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));
Test.Utilities (21)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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);
Text.Analyzers (28)
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\Dependencies\Collections\Internal\ThrowHelper.cs (2)
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 (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
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\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
75throw new ArgumentException("Span should not be empty.", nameof(span));
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\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
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\LayeredServiceUtilities.cs (1)
22=> (type ?? throw new ArgumentNullException(argName)).AssemblyQualifiedName ?? throw new ArgumentException("Invalid service type", argName);
UIAutomationClient (2)
MS\Internal\Automation\HwndProxyElementProvider.cs (1)
376throw new ArgumentException(SR.UnexpectedWindowState,nameof(state));
System\Windows\Automation\Text\TextRange.cs (1)
185throw new ArgumentException(SR.Format(SR.TextAttributeValueWrongType, attribute, ai.Type.Name, value.GetType().Name), nameof(value));
UIAutomationClientSideProviders (2)
MS\Internal\AutomationProxies\WindowsEditBox.cs (1)
282throw new ArgumentException(SR.Format(SR.NotAValidValue, str), "val");
MS\Internal\AutomationProxies\WindowsRichEdit.cs (1)
180throw new ArgumentException(SR.Format(SR.NotAValidValue, str), "val");
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));
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));
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 (1)
common\Json.cs (1)
53throw new ArgumentException("Token value should be either True or False.", nameof(token));