4959 references to ArgumentException
aspire (11)
NuGet\BundleNuGetService.cs (1)
99throw new ArgumentException("At least one package is required", nameof(packages));
Packaging\PackageChannel.cs (1)
665throw new ArgumentException("At least one package ID must be provided.", nameof(packageIds));
Packaging\PackageSourceOverrideMappings.cs (1)
49throw new ArgumentException("Credential-bearing HTTP sources cannot be persisted.", nameof(packageSourceOverride));
Projects\LanguageService.cs (1)
129throw new ArgumentException($"Unknown language: '{explicitLanguageId}'", nameof(explicitLanguageId));
src\Shared\BackchannelConstants.cs (1)
670throw new ArgumentException(
src\Shared\CircularBuffer.cs (1)
33throw new ArgumentException("Circular buffer must have a capacity greater than 0.", nameof(capacity));
src\Shared\DateFormatStringsHelpers.cs (1)
124_ => throw new ArgumentException($"Unexpected {nameof(MillisecondsDisplay)} value: {millisecondsDisplay}.", nameof(millisecondsDisplay))
src\Shared\FormatHelpers.cs (1)
102_ => throw new ArgumentException("Unexpected value.", nameof(maxDecimalPlaces))
Templating\TemplateProvider.cs (1)
16throw new ArgumentException(TemplatingStrings.AtLeastOneTemplateFactoryMustBeProvided, nameof(factories));
Utils\ReparsePoint.cs (2)
43throw new ArgumentException("Link path is required.", nameof(linkPath)); 48throw new ArgumentException("Target path is required.", nameof(target));
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.Cli.EndToEnd.Tests (4)
Helpers\CliE2EAutomatorHelpers.cs (1)
623throw new ArgumentException($"Commit SHA must be exactly 40 characters, got {commitSha.Length}: '{commitSha}'", nameof(commitSha));
tests\Shared\CliInstallStrategy.cs (3)
328throw new ArgumentException($"Invalid version format: '{version}'. Must contain only alphanumeric characters, dots, and dashes.", nameof(version)); 380throw new ArgumentException($"Invalid version format: '{version}'. Must contain only alphanumeric characters, dots, and dashes.", nameof(version)); 407throw new ArgumentException($"Invalid version format: '{version}'. Must contain only alphanumeric characters, dots, and dashes.", nameof(version));
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 (8)
Model\SpanType.cs (3)
91throw new ArgumentException("At least one attribute name is required.", nameof(attributeNames)); 132throw new ArgumentException("At least one filter is required.", nameof(filters)); 173throw new ArgumentException("At least one scope prefix is required.", nameof(scopePrefixes));
Otlp\Model\OtlpTrace.cs (1)
177throw new ArgumentException("Span does not belong to this trace.", nameof(span));
Otlp\Model\Serialization\OtlpJsonProtobufConverter.cs (1)
871throw new ArgumentException("Hex string must have an even length.", nameof(hex));
src\Shared\CircularBuffer.cs (1)
33throw new ArgumentException("Circular buffer must have a capacity greater than 0.", nameof(capacity));
src\Shared\DateFormatStringsHelpers.cs (1)
124_ => throw new ArgumentException($"Unexpected {nameof(MillisecondsDisplay)} value: {millisecondsDisplay}.", nameof(millisecondsDisplay))
src\Shared\FormatHelpers.cs (1)
102_ => throw new ArgumentException("Unexpected value.", nameof(maxDecimalPlaces))
Aspire.Deployment.EndToEnd.Tests (3)
tests\Shared\CliInstallStrategy.cs (3)
328throw new ArgumentException($"Invalid version format: '{version}'. Must contain only alphanumeric characters, dots, and dashes.", nameof(version)); 380throw new ArgumentException($"Invalid version format: '{version}'. Must contain only alphanumeric characters, dots, and dashes.", nameof(version)); 407throw new ArgumentException($"Invalid version format: '{version}'. Must contain only alphanumeric characters, dots, and dashes.", nameof(version));
Aspire.Hosting (67)
ApplicationModel\AspireStore.cs (1)
31throw new ArgumentException($"An absolute path is required: '${basePath}'", nameof(basePath));
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (2)
34throw 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)); 211throw 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\DebugSupportExtensions.cs (1)
174throw new ArgumentException(
ApplicationModel\Docker\DockerfileStage.cs (2)
201throw new ArgumentException("Command array cannot be empty.", nameof(command)); 218throw new ArgumentException("Command array cannot be empty.", nameof(command));
ApplicationModel\EndpointAnnotation.cs (1)
446throw new ArgumentException($"AllocatedEndpoint must use the same network as the {nameof(networkId)} parameter", nameof(endpoint));
ApplicationModel\ExecutableLaunchRecipe.cs (1)
211: throw new ArgumentException("The executable command cannot be null, empty, or whitespace.", nameof(command));
ApplicationModel\HttpsCertificateAnnotation.cs (4)
30throw new ArgumentException("Cannot set both UseDeveloperCertificate and Certificate properties.", nameof(value)); 35throw new ArgumentException("The provided certificate must have a private key.", nameof(value)); 42throw new ArgumentException("The provided certificate must have a valid public key.", nameof(value)); 65throw new ArgumentException("Cannot set both UseDeveloperCertificate and Certificate properties.", nameof(value));
ApplicationModel\ModelName.cs (2)
35throw new ArgumentException(validationMessage, nameof(name)); 55throw new ArgumentException(validationMessage, nameof(name));
ApplicationModel\ProcessCommandOptions.cs (1)
69throw new ArgumentException("At least one process command success exit code must be specified.", nameof(value));
ApplicationModel\ProcessCommandSpec.cs (1)
27: throw new ArgumentException("The executable path cannot be null, empty, or whitespace.", nameof(executablePath));
ApplicationModel\ProjectLaunchArgsOverrideAnnotation.cs (2)
66throw new ArgumentException("Launch arguments must contain at least one entry.", nameof(arguments)); 76throw new ArgumentException("The leading resource argument to remove cannot be empty.", nameof(leadingResourceArgumentToRemove));
ApplicationModel\ReferenceExpression.cs (2)
600throw new ArgumentException($"Object must implement IValueProvider", nameof(valueProvider)); 604throw new ArgumentException($"Object must implement IManifestExpressionProvider", nameof(valueProvider));
ApplicationModel\RequiredCommandValidationResult.cs (1)
19throw new ArgumentException("A validation message must be provided for a failed validation.", nameof(validationMessage));
ApplicationModel\ResourceUrlsEditor.cs (2)
40throw new ArgumentException( 71throw new ArgumentException(
ApplicationModel\TerminalAnnotation.cs (2)
75throw new ArgumentException("At least one terminal host is required.", nameof(terminalHosts)); 82throw new ArgumentException($"Terminal host at index {i} is null.", nameof(terminalHosts));
Ats\AspireUnionAttribute.cs (1)
50throw new ArgumentException("Union must have at least 2 types", nameof(types));
Ats\AspireValueAttribute.cs (1)
33: throw new ArgumentException("Catalog name cannot be null or whitespace.", nameof(catalogName));
Ats\InteractionExports.cs (1)
160var input = inputs[i] ?? throw new ArgumentException($"The input at index {i} cannot be null.", nameof(inputs));
Ats\ResourceCommandExports.cs (1)
52_ => throw new ArgumentException("Resource must be a resource id or resource handle.", nameof(resource))
ContainerRegistryResourceBuilderExtensions.cs (1)
140_ => throw new ArgumentException(
ContainerResourceBuilderExtensions.cs (3)
164_ => throw new ArgumentException("Image must be a string or AddContainerOptions.", nameof(image)) 1235_ => throw new ArgumentException( 1850throw new ArgumentException($"At least one of {nameof(buildImage)} or {nameof(runtimeImage)} must be specified.", nameof(buildImage));
Dcp\PortRange.cs (1)
48throw new ArgumentException("Port range start must be less than or equal to the range end.", rangeStartParamName);
Dcp\Process\ProcessUtil.cs (1)
26throw new ArgumentException($"Specify either {nameof(ProcessSpec.Arguments)} or {nameof(ProcessSpec.ArgumentList)}, not both.", nameof(processSpec));
Dcp\ResourceLogSource.cs (1)
40throw new ArgumentException("Cancellation token must be cancellable in order to prevent leaking resources when following logs.", nameof(cancellationToken));
DistributedApplication.cs (1)
267_ => throw new ArgumentException("Options must be omitted, a string array, or a CreateBuilderOptions instance.", nameof(argsOrOptions))
ExternalServiceBuilderExtensions.cs (5)
35throw new ArgumentException($"The external service URL '{url}' is invalid: {message}", nameof(url)); 59_ => throw new ArgumentException("URL must be a string, Uri, or parameter resource builder.", nameof(url)) 224throw new ArgumentException($"The path '{path}' is not a valid relative URL.", nameof(path)); 231throw new ArgumentException($"The URL for external service '{builder.Resource.Name}' is null.", nameof(builder)); 235throw 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)
87return new ArgumentException("The URI for the external service must be absolute.", nameof(uri)); 91return new ArgumentException("The URI cannot contain a fragment.", nameof(uri)); 95return new ArgumentException("The URI cannot contain a query string.", nameof(uri));
IInteractionService.cs (1)
857throw new ArgumentException("Error message cannot be null or empty.", nameof(errorMessage));
ParameterResourceBuilderExtensions.cs (3)
54throw new ArgumentException("A parameter value is required when publishValueAsDefault is true.", nameof(publishValueAsDefault)); 109throw new ArgumentException("A parameter cannot be both secret and published as a default value.", nameof(secret)); 353_ => throw new ArgumentException("Connection string must be omitted, an environment variable name, or a reference expression.", nameof(environmentVariableNameOrExpression))
Pipelines\DistributedApplicationPipeline.cs (2)
503throw new ArgumentException( 524throw new ArgumentException(
Pipelines\Internal\FileDeploymentStateManager.cs (1)
68throw new ArgumentException($"The environment name '{environment}' contains invalid characters. Environment names must only contain alphanumeric characters, underscores, and hyphens ([a-zA-Z0-9_-]+).", "EnvironmentName");
ProjectResourceBuilderExtensions.cs (1)
129_ => throw new ArgumentException("Launch profile must be a string or ProjectResourceOptions.", nameof(launchProfileOrOptions))
Publishing\DockerContainerRuntime.cs (2)
26: options?.ImageName ?? throw new ArgumentException("ImageName must be provided in options.", nameof(options)); 37throw new ArgumentException("OutputPath must be provided when ImageFormat is Oci.", nameof(options));
Publishing\PodmanContainerRuntime.cs (2)
149: options?.ImageName ?? throw new ArgumentException("ImageName must be provided in options.", nameof(options)); 153throw new ArgumentException("OutputPath must be provided when ImageFormat is Oci.", nameof(options));
ResourceBuilderExtensions.cs (5)
268_ => throw new ArgumentException( 649_ => throw new ArgumentException( 931_ => throw new ArgumentException("Source must be a resource builder, endpoint reference, or URI string.", nameof(source)) 2084_ => throw new ArgumentException("URL must be a string or a reference expression.", nameof(url)) 4868throw new ArgumentException(
src\Shared\BackchannelConstants.cs (1)
670throw new ArgumentException(
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 (2)
src\Aspire.Hosting\ApplicationModel\ModelName.cs (2)
35throw new ArgumentException(validationMessage, nameof(name)); 55throw new ArgumentException(validationMessage, nameof(name));
Aspire.Hosting.Azure (4)
AzureBicepResourceExtensions.cs (1)
167_ => throw new ArgumentException(
AzureRoleAssignmentResource.cs (1)
59throw new ArgumentException(
ExistingAzureResourceExtensions.cs (1)
760throw new ArgumentException("Value must be a string or ParameterResource.", paramName);
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
26throw new ArgumentException($"Specify either {nameof(ProcessSpec.Arguments)} or {nameof(ProcessSpec.ArgumentList)}, not both.", nameof(processSpec));
Aspire.Hosting.Azure.AppConfiguration (1)
AzureAppConfigurationExtensions.cs (1)
240_ => throw new ArgumentException($"Role '{roles[i]}' at index {i} is not a valid {nameof(AzureAppConfigurationRole)} value.", nameof(roles))
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.AppService (2)
AzureAppServiceEnvironmentExtensions.cs (2)
380_ => throw new ArgumentException( 459_ => throw new ArgumentException("Deployment slot must be a string or a parameter resource builder.", nameof(deploymentSlot))
Aspire.Hosting.Azure.CognitiveServices (1)
AzureOpenAIExtensions.cs (1)
286_ => throw new ArgumentException($"'{roles[i]}' is not a valid {nameof(AzureOpenAIRole)} value.", nameof(roles))
Aspire.Hosting.Azure.ContainerRegistry (2)
AzureContainerRegistryExtensions.cs (2)
202throw new ArgumentException($"A purge task with the name '{taskName}' already exists.", nameof(taskName)); 299_ => throw new ArgumentException($"'{roles[i]}' is not a valid {nameof(AzureContainerRegistryRole)} value.", nameof(roles))
Aspire.Hosting.Azure.CosmosDB (10)
AzureCosmosDBContainerResource.cs (4)
35throw new ArgumentException("At least one partition key path should be provided.", nameof(partitionKeyPaths)); 39throw new ArgumentException("Partition key paths cannot contain null or empty strings.", nameof(partitionKeyPaths)); 95throw new ArgumentException("At least one partition key path should be provided.", nameof(value)); 99throw new ArgumentException("Partition key paths cannot contain null or empty strings.", nameof(value));
AzureCosmosDBExtensions.cs (3)
416_ => throw new ArgumentException("Partition key paths must be a string or a string collection.", nameof(partitionKeyPaths)) 437throw new ArgumentException("At least one partition key path should be provided.", nameof(partitionKeyPaths)); 442throw 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.EventHubs (1)
AzureEventHubsExtensions.cs (1)
561_ => throw new ArgumentException($"Invalid Event Hubs role: {roles[i]}.", nameof(roles))
Aspire.Hosting.Azure.Functions (2)
DurableTask\DurableTaskResourceExtensions.cs (2)
116_ => throw new ArgumentException($"Unexpected connection string type: {connectionString.GetType().Name}", nameof(connectionString)) 304_ => throw new ArgumentException($"Unexpected task hub name type: {taskHubName.GetType().Name}", nameof(taskHubName))
Aspire.Hosting.Azure.KeyVault (4)
AzureKeyVaultResourceExtensions.cs (4)
223_ => throw new ArgumentException($"'{roles[i]}' is not a valid {nameof(AzureKeyVaultRole)} value.", nameof(roles)) 279_ => throw new ArgumentException("Value must be a parameter resource builder or reference expression.", nameof(value)) 391throw new ArgumentException("Secret name cannot be longer than 127 characters.", nameof(secretName)); 396throw new ArgumentException("Secret name can only contain ASCII letters (a-z, A-Z), digits (0-9), and dashes (-).", nameof(secretName));
Aspire.Hosting.Azure.Kubernetes (1)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
26throw new ArgumentException($"Specify either {nameof(ProcessSpec.Arguments)} or {nameof(ProcessSpec.ArgumentList)}, not both.", nameof(processSpec));
Aspire.Hosting.Azure.Network (5)
AzureNetworkSecurityGroupExtensions.cs (1)
101throw new ArgumentException(
AzureNetworkSecurityPerimeterExtensions.cs (2)
89throw new ArgumentException( 148throw new ArgumentException(
AzureVirtualNetworkExtensions.cs (2)
93_ => throw new ArgumentException( 259_ => throw new ArgumentException(
Aspire.Hosting.Azure.Search (1)
AzureSearchExtensions.cs (1)
173_ => throw new ArgumentException($"Invalid Azure AI Search role: {roles[i]}.", nameof(roles))
Aspire.Hosting.Azure.ServiceBus (1)
AzureServiceBusExtensions.cs (1)
717_ => throw new ArgumentException($"'{roles[i]}' is not a valid {nameof(AzureServiceBusRole)} value.", nameof(roles))
Aspire.Hosting.Azure.SignalR (1)
AzureSignalRExtensions.cs (1)
241_ => throw new ArgumentException($"'{roles[i]}' is not a valid {nameof(AzureSignalRRole)} value.", nameof(roles))
Aspire.Hosting.Azure.Storage (1)
AzureStorageExtensions.cs (1)
789_ => throw new ArgumentException($"'{roles[i]}' is not a valid {nameof(AzureStorageRole)} value.", nameof(roles))
Aspire.Hosting.Azure.Tests (2)
AzureManifestUtils.cs (2)
36throw new ArgumentException("Specified resource does not contain a path property.", nameof(resource)); 41throw new ArgumentException("Path node in resource is null, empty, or does not exist.", nameof(resource));
Aspire.Hosting.Azure.WebPubSub (3)
AzureWebPubSubExtensions.cs (1)
358_ => throw new ArgumentException($"'{roles[i]}' is not a valid {nameof(AzureWebPubSubRole)} value.", nameof(roles))
src\Aspire.Hosting\ApplicationModel\ModelName.cs (2)
35throw new ArgumentException(validationMessage, nameof(name)); 55throw new ArgumentException(validationMessage, nameof(name));
Aspire.Hosting.DevTunnels (9)
DevTunnelCli.cs (1)
29throw new ArgumentException("CLI path must be provided", nameof(filePath));
DevTunnelCliClient.cs (1)
278_ => throw new ArgumentException("Unsupported provider. Supported providers are 'microsoft' and 'github'.", nameof(provider)),
DevTunnelOptions.cs (1)
52_ => throw new ArgumentException("Invalid region specified", nameof(Region)),
DevTunnelResourceBuilderExtensions.cs (6)
64throw new ArgumentException($""" 79throw new ArgumentException(errorMessage, nameof(options)); 543throw new ArgumentException($"Target endpoint '{targetEndpoint.EndpointName}' on resource '{targetEndpoint.Resource.Name}' has already been added to dev tunnel '{tunnel.Name}'.", nameof(targetEndpoint)); 553throw new ArgumentException($"Cannot tunnel endpoint '{targetEndpointAnnotation.Name}' with host '{targetEndpointAnnotation.TargetHost}' on resource '{targetResource.Name}' because it is not a localhost endpoint.", nameof(targetEndpoint)); 560throw new ArgumentException($"Invalid protocol '{proto}' specified in port options. Supported protocols are 'http', 'https', or 'auto'. Set protocol to null to use the endpoint's scheme.", nameof(portOptions)); 576throw new ArgumentException(errorMessage, nameof(portOptions));
Aspire.Hosting.Docker (2)
EnvVarEscaper.cs (1)
37throw new ArgumentException("Input string exceeds maximum allowed length", nameof(input));
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
26throw new ArgumentException($"Specify either {nameof(ProcessSpec.Arguments)} or {nameof(ProcessSpec.ArgumentList)}, not both.", nameof(processSpec));
Aspire.Hosting.EntityFrameworkCore (1)
EFMigrationResourceBuilderExtensions.cs (1)
284_ => throw new ArgumentException("Migrations project must be omitted, a project path string, or a project resource builder.", nameof(migrationsProject))
Aspire.Hosting.Foundry (12)
FoundryExtensions.cs (4)
104FoundryModel => throw new ArgumentException("Model version and format must be omitted when using a FoundryModel.", nameof(modelVersion)), 106string => throw new ArgumentException("Model version and format are required when the model is provided as a string.", nameof(modelVersion)), 107_ => throw new ArgumentException("Model must be a FoundryModel or a string model name.", nameof(model)) 278_ => throw new ArgumentException($"'{roles[i]}' is not a valid {nameof(FoundryRole)} value.", nameof(roles))
HostedAgent\HostedAgentConfiguration.cs (2)
69throw new ArgumentException("CPU must be between 0.5 and 3.5 in increments of 0.25 vCPU.", nameof(Cpu)); 92throw new ArgumentException("Memory must be between 1 and 7 in increments of 0.5 Gi.", nameof(Memory));
Project\ConnectionBuilderExtensions.cs (1)
303_ => throw new ArgumentException(
Project\ProjectBuilderExtension.cs (4)
268_ => throw new ArgumentException("Resource must be a supported capability host resource.", nameof(resource)) 308FoundryModel => throw new ArgumentException("Model version and format must be omitted when using a FoundryModel.", nameof(modelVersion)), 310string => throw new ArgumentException("Model version and format are required when the model is provided as a string.", nameof(modelVersion)), 311_ => throw new ArgumentException("Model must be a FoundryModel or a string model name.", nameof(model))
PromptAgent\PromptAgentBuilderExtensions.cs (1)
473throw new ArgumentException(
Aspire.Hosting.GitHub.Models (1)
GitHubModelsExtensions.cs (1)
162throw new ArgumentException("The API key parameter must be marked as secret. Use AddParameter with secret: true when creating the parameter.", nameof(apiKey));
Aspire.Hosting.JavaScript (8)
JavaScriptHostingExtensions.cs (8)
908throw new ArgumentException("apiTarget is required when apiPath is specified.", nameof(apiTarget)); 913throw new ArgumentException("apiPath is required when apiTarget is specified.", nameof(apiPath)); 920throw new ArgumentException("The apiPath must start with '/'.", nameof(apiPath)); 927throw new ArgumentException("The apiPath must not be '/' — it would match all requests and make the static site unreachable.", nameof(apiPath)); 2428_ => throw new ArgumentException("Cannot find a http or https endpoint for this resource.", nameof(resource)) 2479throw new ArgumentException($"The apiPath must contain only URL-safe path characters (alphanumeric, '/', '-', '_'). Invalid character: '{c}'", nameof(apiPath)); 2520throw new ArgumentException("The path must be a relative path.", nameof(path)); 2532throw new ArgumentException("The path must not contain \"..\" segments.", nameof(path));
Aspire.Hosting.Kubernetes (27)
CertManagerExtensions.cs (1)
95throw new ArgumentException(
HelmChartOptions.cs (11)
78_ => throw new ArgumentException("Namespace must be a string or a parameter resource builder.", nameof(@namespace)) 125_ => throw new ArgumentException("Release name must be a string or a parameter resource builder.", nameof(releaseName)) 177_ => throw new ArgumentException("Chart version must be a string or a parameter resource builder.", nameof(version)) 224_ => throw new ArgumentException("Chart name must be a string or a parameter resource builder.", nameof(name)) 271_ => throw new ArgumentException("Chart description must be a string or a parameter resource builder.", nameof(description)) 279throw new ArgumentException($"{target} '{value}' is invalid. It must be {maxLength} characters or fewer.", paramName); 284throw new ArgumentException($"{target} '{value}' is invalid. Use lowercase letters, numbers, and hyphens, and start and end with an alphanumeric character.", paramName); 304throw new ArgumentException($"Helm chart version '{version}' is invalid. Helm accepts versions such as '1.2.3', '1.2.3-beta.1+ef365', '1', '1.2', or 'v1.2.3'.", paramName); 312throw new ArgumentException($"Helm chart name '{name}' is invalid. It must be {HelmChartNameMaxLength} characters or fewer.", paramName); 317throw new ArgumentException($"Helm chart name '{name}' is invalid. Use alphanumeric characters, '-', '_', or '.'.", paramName); 325throw new ArgumentException($"Helm chart description is invalid. It must be {HelmChartDescriptionMaxLength} characters or fewer.", paramName);
KubernetesGatewayExtensions.cs (2)
116throw new ArgumentException("Path must start with '/'.", nameof(path)); 155throw new ArgumentException("Path must start with '/'.", nameof(path));
KubernetesHelmChartExtensions.cs (3)
512throw new ArgumentException( 522throw new ArgumentException( 537throw new ArgumentException(
KubernetesIngressExtensions.cs (2)
131throw new ArgumentException("Path must start with '/'.", nameof(path)); 175throw new ArgumentException("Path must start with '/'.", nameof(path));
KubernetesManifestResource.cs (8)
103throw new ArgumentException("Manifest field path must contain at least one segment.", nameof(path)); 108throw new ArgumentException("Use the dedicated manifest API to configure apiVersion, kind, and metadata fields.", nameof(path)); 125throw new ArgumentException($"Cannot set nested manifest field '{path}' because '{segment}' already has a scalar value.", nameof(path)); 156_ => throw new ArgumentException($"Manifest field values must be JSON-compatible primitives, dictionaries, or arrays. Type '{value.GetType()}' is not supported.", nameof(value)) 166throw new ArgumentException("Manifest field numeric values must be finite.", nameof(value)); 181throw new ArgumentException("Manifest field numeric values must be finite.", nameof(value)); 206throw new ArgumentException($"Whole-number manifest field values must be between {long.MinValue} and {long.MaxValue}.", nameof(value)); 231_ => throw new ArgumentException($"Unsupported JSON value kind '{element.ValueKind}'.", nameof(element))
Aspire.Hosting.OpenAI (1)
OpenAIExtensions.cs (1)
167throw 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 (1)
PythonAppResourceBuilderExtensions.cs (1)
745throw new ArgumentException($"Array params contains empty item: [{values}]", nameof(scriptArgs));
Aspire.Hosting.Radius (10)
Annotations\RadiusRecipeParametersAnnotation.cs (1)
70throw new ArgumentException(
CloudProviders\CloudProviderValidation.cs (3)
21throw new ArgumentException($"Value '{value}' is not a valid GUID.", paramName); 33throw new ArgumentException( 43throw new ArgumentException(
RadiusExtensions.cs (1)
73throw new ArgumentException(
Secrets\RadiusSecretStoreExtensions.cs (5)
311throw new ArgumentException( 333throw new ArgumentException( 356throw new ArgumentException( 387throw new ArgumentException( 429throw new ArgumentException(
Aspire.Hosting.Redis (1)
RedisBuilderExtensions.cs (1)
565throw new ArgumentException("The Redis module path must be an absolute container path.", nameof(path));
Aspire.Hosting.RemoteHost.Tests (2)
CapabilityDispatcherTests.cs (2)
162new ArgumentException("A parameter value is required when publishValueAsDefault is true.", "publishValueAsDefault"))); 2161throw new ArgumentException("The value is invalid", nameof(value));
Aspire.Hosting.Testing (6)
DistributedApplicationFactory.cs (1)
163throw new ArgumentException($"Array params contains empty item: [{values}]", nameof(args));
DistributedApplicationHostingTestingExtensions.cs (4)
179throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.ResourceDoesNotExposeConnectionStringExceptionMessage, resourceName), nameof(resourceName)); 259throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.ResourceNotFoundExceptionMessage, resourceName), nameof(resourceName)); 270throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.ResourceHasNoAllocatedEndpointsExceptionMessage, resourceName), nameof(resourceName)); 287throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Properties.Resources.EndpointForResourceNotFoundExceptionMessage, endpointName, resourceName), nameof(endpointName));
DistributedApplicationTestingBuilder.cs (1)
450throw new ArgumentException($"Array params contains empty item: [{values}]", nameof(args));
Aspire.Hosting.Tests (4)
ExecutableResourceBuilderExtensionTests.cs (1)
334return new ArgumentException(guidance, parameterName).Message;
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 (7)
ConfigurationBuilder\IYarpConfigurationBuilder.cs (1)
283_ => throw new ArgumentException($"Unsupported YARP route target type '{target.GetType().FullName}'.", nameof(target)),
ConfigurationBuilder\YarpCluster.cs (3)
139throw new ArgumentException("Cannot find a http or https endpoint for this resource.", nameof(resource)); 153_ => throw new ArgumentException("Cannot find a http or https endpoint for this resource.", nameof(resource)) 302throw new ArgumentException(
ConfigurationBuilder\YarpConfigurationBuilder.cs (2)
61throw new ArgumentException("At least one destination must be provided.", nameof(destinations)); 69throw new ArgumentException(
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.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.Extensions.Configuration.AzureAppConfiguration (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.Playground.Tests (1)
tests\Aspire.TestUtilities\RequiresToolsAttribute.cs (1)
17throw new ArgumentException("At least one executable must be provided", nameof(executablesOnPath));
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\PropertyFetcher.cs (1)
48? throw new ArgumentException("Supplied object was null or did not match the expected type.", nameof(obj))
Aspire.TerminalHost (1)
DcpUpstreamAdapter.cs (1)
282throw new ArgumentException(
Aspire.TestTools (1)
TrxReader.cs (1)
96throw new ArgumentException($"{nameof(filePath)} cannot be null or empty.", nameof(filePath));
Aspire.TestUtilities (1)
RequiresToolsAttribute.cs (1)
17throw new ArgumentException("At least one executable must be provided", nameof(executablesOnPath));
Aspire.TypeSystem (2)
ApiReferenceExportOptions.cs (2)
52throw new ArgumentException("At least one exporting assembly name is required.", nameof(exportingAssemblyNames)); 56throw new ArgumentException("Exporting assembly names cannot be null or white-space.", nameof(exportingAssemblyNames));
ConfigurationSchemaGenerator (1)
RuntimeSource\Configuration.Binder\Specs\InterceptorInfo.cs (1)
176throw new ArgumentException(InvalidInvocationErrMsg, nameof(invocation));
Crossgen2Tasks (1)
CommonFilePulledFromSdkRepo\LogAdapter.cs (1)
68throw new ArgumentException(
datacollector (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (3)
30throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 124throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 150throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable));
datacollector.arm64 (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (3)
30throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 124throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 150throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable));
dotnet (11)
Commands\New\MSBuildEvaluation\CapabilityExpressionEvaluator.cs (2)
182throw new ArgumentException($"'{nameof(input)}' cannot be null or empty.", nameof(input)); 280return new ArgumentException(
Commands\New\MSBuildEvaluation\ProjectCapabilityConstraint.cs (1)
69throw new ArgumentException($"{nameof(args)} cannot be null or whitespace.", nameof(args));
Commands\NuGet\NuGetVirtualProjectBuilder.cs (1)
29throw new ArgumentException($"'{entryPointFilePath}' is not a fully qualified path.", paramName: nameof(entryPointFilePath));
Commands\Tool\Install\LocalToolsResolverCacheExtensions.cs (1)
31throw new ArgumentException("targetFrameworkToInstall cannot be null or whitespace",
Commands\Tool\Restore\ToolRestoreCommand.cs (1)
230throw new ArgumentException("message", nameof(message));
NugetPackageDownloader\NuGetPackageDownloader.cs (4)
648throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", 734throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", 828throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", 912throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty",
PrintableTable.cs (1)
33throw new ArgumentException(
dotnet-aot (5)
src\sdk\src\Cli\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (4)
648throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", 734throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", 828throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", 912throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty",
src\sdk\src\Cli\dotnet\PrintableTable.cs (1)
33throw new ArgumentException(
dotnet-dev-certs (2)
src\aspnetcore\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-format (1)
Workspaces\FolderWorkspace.cs (1)
34throw new ArgumentException($"Folder '{folderPath}' does not exist.", nameof(folderPath));
dotnet-getdocument (2)
src\aspnetcore\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-Microsoft.XmlSerializer.Generator (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
dotnet-openapi (2)
src\aspnetcore\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\aspnetcore\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-suggest (2)
SuggestionStore.cs (2)
17throw new ArgumentException("Value cannot be null, empty, or consist entirely of whitespace.", nameof(exeFileName)); 22throw new ArgumentException("Value cannot be null, empty, or consist entirely of whitespace.", nameof(suggestionTargetArguments));
dotnet-svcutil-lib (133)
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.CodeDom\Microsoft\VBCodeProvider.cs (1)
572throw new ArgumentException("SRCodeDom.NullOrEmpty_Value_in_Property" + "ReferencedAssemblies", "options");
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\aspnetcore\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\aspnetcore\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));
EventSourceGenerator (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
GenerateDocumentationAndConfigFiles (31)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
383throw new ArgumentException(e.Message, paramName);
src\roslyn\src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
45throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (3)
49throw new ArgumentException("Offset cannot be negative", nameof(offset)); 52throw new ArgumentException("Width must be greater than zero.", nameof(width)); 82throw new ArgumentException("Token start must be non-negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (1)
132throw new ArgumentException("tokenStart cannot be negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\roslyn\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\aspnetcore\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));
ILCompiler.Compiler (3)
src\runtime\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));
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\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\AssemblyNameInfo.cs (1)
207: throw new ArgumentException(SR.InvalidAssemblyName, nameof(assemblyName));
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
351throw new ArgumentException(SR.Argument_InvalidTypeName, $"typeName@{errorIndex}");
src\runtime\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));
libmscordaccore_universal (3)
Entrypoints.cs (3)
375ICLRContractLocator contractLocator = legacyTarget as ICLRContractLocator ?? throw new ArgumentException( 394ICLRDataTarget dataTarget = legacyTarget as ICLRDataTarget ?? throw new ArgumentException( 492ICorDebugDataTarget dataTarget = targetObject as ICorDebugDataTarget ?? throw new ArgumentException(
Microsoft.Analyzers.Local.Tests (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.AspNetCore.Antiforgery (4)
Internal\DefaultAntiforgeryTokenGenerator.cs (1)
45throw new ArgumentException(
src\aspnetcore\src\Shared\WebEncoders\WebEncoders.cs (3)
159throw new ArgumentException( 331throw new ArgumentException( 504throw 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)
parent\parent\parent\eng\MSBuild\parent\parent\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.DeviceBoundSessions (5)
DeviceBoundSessionOptions.cs (5)
106=> new( 114throw new ArgumentException( 122throw new ArgumentException( 129throw new ArgumentException( 136throw new ArgumentException(
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 (7)
DefaultComponentActivator.cs (1)
30throw new ArgumentException($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", nameof(componentType));
NavigationManager.cs (1)
176throw new ArgumentException(
RenderTree\Renderer.cs (3)
628throw new ArgumentException($"The frame's {nameof(RenderTreeFrame.FrameType)} property must equal {RenderTreeFrameType.Component}", nameof(frameIndex)); 633throw new ArgumentException($"The frame already has a non-null component instance", nameof(frameIndex)); 785throw 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\aspnetcore\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)
58_ => throw new ArgumentException($"Server-side rendering does not support the render mode '{renderMode}'.", nameof(renderMode))
src\aspnetcore\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)
66throw new ArgumentException($"Property '{nameof(CircuitId.Secret)}' cannot be null.", nameof(circuitId));
src\aspnetcore\src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
36?? throw new ArgumentException("Could not deserialize state correctly", nameof(existingState));
Microsoft.AspNetCore.Components.WebAssembly (2)
Hosting\RootComponentMapping.cs (1)
26throw new ArgumentException(
src\aspnetcore\src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
36?? throw new ArgumentException("Could not deserialize state correctly", nameof(existingState));
Microsoft.AspNetCore.Components.WebAssembly.Authentication (1)
Services\AuthorizationMessageHandler.cs (1)
110throw new ArgumentException("At least one URL must be configured.", nameof(authorizedUrls));
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.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\aspnetcore\src\Shared\WebEncoders\WebEncoders.cs (3)
159throw new ArgumentException( 331throw new ArgumentException( 504throw 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.Diagnostics.Middleware.PerformanceTests (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.AspNetCore.HeaderParsing (1)
parent\parent\parent\eng\MSBuild\parent\parent\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\aspnetcore\src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
235throw 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)
44throw new ArgumentException(Resources.FormatException_PathMustStartWithSlashOrBackslash(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\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Http.Connections (3)
src\aspnetcore\src\Shared\WebEncoders\WebEncoders.cs (3)
159throw new ArgumentException( 331throw new ArgumentException( 504throw new ArgumentException(
Microsoft.AspNetCore.Http.Connections.Client (6)
HttpConnection.cs (2)
149throw new ArgumentException("Options does not have a URL specified.", nameof(httpConnectionOptions)); 165throw 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.InternalTesting (1)
TestFileOutputContext.cs (1)
61throw new ArgumentException("The extension must start with '.' if one is provided.", nameof(extension));
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.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.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 (1)
RecyclableArrayBufferWriter.cs (1)
47throw new ArgumentException(null, nameof(count));
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.Razor.Utilities.Shared (4)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ThrowHelper.cs (2)
27=> throw new ArgumentException(message, paramName); 49=> throw new ArgumentException(message, paramName);
Utilities\Checksum.Builder.cs (1)
209throw new ArgumentException(
Utilities\Hashing\NonCryptographicHashAlgorithm.cs (1)
352throw new ArgumentException("Destination is too short", "destination");
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingFeature.cs (1)
26throw new ArgumentException($"When {nameof(value)} contains more than one value, it cannot contain a null or empty value.", nameof(value));
Microsoft.AspNetCore.ResponseCompression (1)
CompressionProviderCollection.cs (1)
39throw new ArgumentException($"The provider must implement {nameof(ICompressionProvider)}.", nameof(providerType));
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.Kestrel.Core (11)
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)
592throw new ArgumentException(CoreStrings.UnixSocketPathMustBeAbsolute, nameof(socketPath));
Middleware\HttpsConnectionMiddleware.cs (1)
69throw new ArgumentException(CoreStrings.ServerCertificateRequired, nameof(options));
src\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
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)
parent\parent\parent\eng\MSBuild\parent\parent\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\aspnetcore\src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
src\aspnetcore\src\Shared\WebEncoders\WebEncoders.cs (3)
159throw new ArgumentException( 331throw new ArgumentException( 504throw new ArgumentException(
Microsoft.Bcl.AsyncInterfaces (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
Microsoft.Bcl.Numerics (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
Microsoft.Build (14)
BuildCheck\API\WorkerNodeCheck.cs (1)
25throw new ArgumentException("The registration context for InternalBuildAnalyzer must be of type IInternalBuildCheckRegistrationContext.", nameof(registrationContext));
src\5057ed6cf5d6323b\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\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\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\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\msbuild\artifacts\.packages\microsoft.codeanalysis.collections\5.0.0-1.25277.114\contentFiles\cs\net9.0\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
Microsoft.Build.Framework (10)
ErrorUtilities.cs (2)
61throw new ArgumentException(SR.CollectionCopyToFailureProvidedArrayIsTooSmall, collectionParamName); 95=> throw new ArgumentException(SR.Argument_EmptyString, parameterName);
PathHelpers\AbsolutePath.cs (1)
94throw new ArgumentException(SR.PathMustBeRooted, nameof(path));
TaskItem_T.cs (1)
61throw new ArgumentException($"Cannot create TaskItem<{typeof(T).Name}> from an item with empty identity.", nameof(item));
Utilities\ArgumentExceptionExtensions.cs (1)
37throw new ArgumentException(SR.Argument_EmptyCollection, paramName);
Utilities\TaskFactoryUtilities.cs (4)
81throw new ArgumentException("Assembly path cannot be null or empty.", nameof(assemblyPath)); 105throw new ArgumentException("Assembly path cannot be null or empty.", nameof(assemblyPath)); 164throw new ArgumentException("Assembly path cannot be null or empty.", nameof(assemblyPath)); 184throw new ArgumentException("Task location cannot be null or empty.", nameof(taskLocation));
ValueTypeParser.cs (1)
104throw new ArgumentException($"'{value}' is not a defined value of enum type {targetType.Name}.", nameof(value));
Microsoft.Build.Tasks.CodeAnalysis (1)
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
884throw new ArgumentException(e.Message, "Sources");
Microsoft.Build.Tasks.Core (2)
GenerateManifestBase.cs (1)
469throw new ArgumentException(String.Empty /* no message */, nameof(manifestType));
ManifestUtil\SecurityUtil.cs (1)
578throw new ArgumentException(resources.GetString("CertNotInStore"), nameof(certThumbprint));
Microsoft.Build.Tasks.Git (3)
GitDataReader\GitIgnore.Matcher.cs (3)
77throw new ArgumentException(Resources.PathMustBeAbsolute, nameof(fullPath)); 82throw new ArgumentException(Resources.PathMustBeFilePath, nameof(fullPath)); 97throw new ArgumentException(Resources.PathMustBeAbsolute, nameof(fullPath));
Microsoft.Build.Utilities.Core (6)
ToolLocationHelper.cs (6)
3747throw new ArgumentException("Invalid frameworkReferenceRoot", nameof(frameworkReferenceRoot)); 3816throw new ArgumentException("Invalid frameworkReferenceRoot", nameof(frameworkReferenceRoot)); 3821throw new ArgumentException("Invalid frameworkIdentifier", nameof(frameworkIdentifier)); 3883throw new ArgumentException("Invalid frameworkReferenceRoot", nameof(frameworkReferenceRoot)); 3888throw new ArgumentException("Invalid frameworkIdentifier", nameof(frameworkIdentifier)); 3893throw new ArgumentException("Invalid frameworkVersion", nameof(frameworkVersion));
Microsoft.CodeAnalysis (131)
CommandLine\AnalyzerConfig.cs (1)
191throw new ArgumentException("Must be an absolute path to an editorconfig file", nameof(pathToFile));
Compilation\Compilation.cs (28)
113throw new ArgumentException(CodeAnalysisResources.InconsistentSyntaxTreeFeature, nameof(trees)); 254throw new ArgumentException(CodeAnalysisResources.ReturnTypeCannotBeValuePointerbyRefOrOpen, nameof(globalsType)); 259throw new ArgumentException(CodeAnalysisResources.ReturnTypeCannotBeVoidByRefOrOpen, nameof(returnType)); 270throw new ArgumentException(CodeAnalysisResources.TypeMustBeSameAsHostObjectTypeOfPreviousSubmission, nameof(globalsType)); 294throw new ArgumentException(CodeAnalysisResources.InvalidOutputKindForSubmission, nameof(options)); 303throw new ArgumentException(CodeAnalysisResources.InvalidCompilationOptions, nameof(options)); 375throw new ArgumentException($"{nameof(arity)} must be >= 0", nameof(arity)); 705throw new ArgumentException(string.Format(CodeAnalysisResources.ReferenceOfTypeIsInvalid1, reference.GetType()), 865throw new ArgumentException(string.Format(CodeAnalysisResources.MetadataRefNotFoundToRemove1, r), 1330throw new ArgumentException(CodeAnalysisResources.TuplesNeedAtLeastTwoElements, nameof(elementNames)); 1373throw new ArgumentException(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, nameof(elementNullableAnnotations)); 1388throw new ArgumentException(CodeAnalysisResources.TupleElementNameCountMismatch, nameof(elementNames)); 1395throw new ArgumentException(CodeAnalysisResources.TupleElementNameEmpty, $"{nameof(elementNames)}[{i}]"); 1416throw new ArgumentException(CodeAnalysisResources.TupleElementLocationCountMismatch, nameof(elementLocations)); 1663throw new ArgumentException(string.Format(CodeAnalysisResources.IsSymbolAccessibleBadWithin, nameof(within)), nameof(within)); 1679throw new ArgumentException(string.Format(CodeAnalysisResources.IsSymbolAccessibleWrongAssembly, parameterName), parameterName); 2853throw new ArgumentException(CodeAnalysisResources.StreamMustSupportWrite, nameof(peStream)); 2860throw new ArgumentException(CodeAnalysisResources.PdbStreamUnexpectedWhenEmbedding, nameof(pdbStream)); 2865throw new ArgumentException(CodeAnalysisResources.StreamMustSupportWrite, nameof(pdbStream)); 2870throw new ArgumentException(CodeAnalysisResources.PdbStreamUnexpectedWhenEmittingMetadataOnly, nameof(pdbStream)); 2876throw new ArgumentException(CodeAnalysisResources.MetadataPeStreamUnexpectedWhenEmittingMetadataOnly, nameof(metadataPEStream)); 2881throw new ArgumentException(CodeAnalysisResources.IncludingPrivateMembersUnexpectedWhenEmittingToMetadataPeStream, nameof(metadataPEStream)); 2893throw new ArgumentException(CodeAnalysisResources.EmbeddingPdbUnexpectedWhenEmittingMetadata, nameof(metadataPEStream)); 2900throw new ArgumentException(CodeAnalysisResources.CannotTargetNetModuleWhenEmittingRefAssembly, nameof(metadataPEStream)); 2904throw new ArgumentException(CodeAnalysisResources.CannotTargetNetModuleWhenEmittingRefAssembly, nameof(options.EmitMetadataOnly)); 2912throw new ArgumentException(CodeAnalysisResources.StreamMustSupportReadAndSeek, nameof(win32Resources)); 2918throw new ArgumentException(CodeAnalysisResources.StreamMustSupportRead, nameof(sourceLinkStream)); 2926throw 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)
250throw new ArgumentException("Path not registered: " + originalPath, nameof(originalPath)); 269throw 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 (9)
137throw new ArgumentException(CodeAnalysisResources.ArgumentElementCannotBeNull, nameof(analyzers)); 143throw new ArgumentException(CodeAnalysisResources.DuplicateAnalyzerInstances, nameof(analyzers)); 153throw new ArgumentException(CodeAnalysisResources.UnsupportedAnalyzerInstance, nameof(analyzer)); 161throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(analyzer)); 171throw new ArgumentException(CodeAnalysisResources.UnsupportedAnalyzerInstance, nameof(_analyzers)); 177throw new ArgumentException(CodeAnalysisResources.DuplicateAnalyzerInstances, nameof(analyzers)); 190throw new ArgumentException(CodeAnalysisResources.InvalidTree, nameof(model)); 203throw new ArgumentException(CodeAnalysisResources.InvalidTree, nameof(tree)); 216throw new ArgumentException(CodeAnalysisResources.InvalidAdditionalFile, nameof(file));
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (2)
1374throw new ArgumentException(CodeAnalysisResources.InvalidOperationBlockForAnalysisContext, nameof(operationBlock)); 1507throw 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)
573throw new ArgumentException($"{context.Symbol.Kind} is not supported.", nameof(context));
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
115throw 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)
383throw 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)
203throw new ArgumentException(CodeAnalysisResources.AssemblyMustHaveAtLeastOneModule, nameof(modules)); 215throw 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)
72throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameInvalidChar, hintName, c, i), nameof(hintName)); 80throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameInvalidSegment, hintName, match.Value, match.Index), nameof(hintName)); 86throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameUniquePerGenerator, hintName), nameof(hintName)); 91throw new ArgumentException(string.Format(CodeAnalysisResources.SourceTextRequiresEncoding, hintName), nameof(source)); 141throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameUniquePerGenerator, source.HintName), "hintName");
SourceGeneration\GeneratorDriverOptions.cs (1)
53throw new ArgumentException(message: CodeAnalysisResources.AbsolutePathExpected, nameof(baseDirectory));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\roslyn\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\roslyn\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)
97if (annotation == null) throw new ArgumentException(paramName: nameof(annotations), message: "" /*CSharpResources.ElementsCannotBeNull*/); 112if (annotation == null) throw new ArgumentException(paramName: nameof(annotations), message: "" /*CSharpResources.ElementsCannotBeNull*/);
Syntax\SeparatedSyntaxList.cs (3)
576throw new ArgumentException(CodeAnalysisResources.MissingListItem, nameof(separatorToken)); 581throw new ArgumentException(CodeAnalysisResources.SeparatorTokenMustHaveSameRawKind, nameof(newSeparator)); 586throw new ArgumentException(CodeAnalysisResources.SeparatorTokenMustHaveSameLanguage, nameof(newSeparator));
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)
58throw new ArgumentException(CodeAnalysisResources.InvalidHash, nameof(checksum)); 88throw new ArgumentException(CodeAnalysisResources.UnsupportedHashAlgorithm, nameof(checksumAlgorithm)); 214throw new ArgumentException(CodeAnalysisResources.StreamMustSupportReadAndSeek, nameof(stream)); 806throw new ArgumentException(CodeAnalysisResources.ChangesMustBeWithinBoundsOfSourceText, nameof(changes)); 823throw new ArgumentException(CodeAnalysisResources.ChangesMustNotOverlap, nameof(changes));
Text\SourceTextStream.cs (1)
102throw 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 (31)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
383throw new ArgumentException(e.Message, paramName);
src\roslyn\src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
45throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (3)
49throw new ArgumentException("Offset cannot be negative", nameof(offset)); 52throw new ArgumentException("Width must be greater than zero.", nameof(width)); 82throw new ArgumentException("Token start must be non-negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (1)
132throw new ArgumentException("tokenStart cannot be negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\roslyn\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.AnalyzerUtilities (29)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
383throw new ArgumentException(e.Message, paramName);
src\roslyn\src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
45throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\HazardousUsageEvaluator.cs (1)
73throw new ArgumentException(
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\HazardousUsageEvaluatorCollection.cs (1)
31throw new ArgumentException("No HazardUsageEvaluators specified", nameof(hazardousUsageEvaluators));
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (3)
49throw new ArgumentException("Offset cannot be negative", nameof(offset)); 52throw new ArgumentException("Width must be greater than zero.", nameof(width)); 82throw new ArgumentException("Token start must be non-negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (1)
132throw new ArgumentException("tokenStart cannot be negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
Microsoft.CodeAnalysis.CodeStyle (22)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
383throw new ArgumentException(e.Message, paramName);
src\roslyn\src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (3)
49throw new ArgumentException("Offset cannot be negative", nameof(offset)); 52throw new ArgumentException("Width must be greater than zero.", nameof(width)); 82throw new ArgumentException("Token start must be non-negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (1)
132throw new ArgumentException("tokenStart cannot be negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\roslyn\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.CSharp (47)
Compilation\CSharpCompilation.cs (21)
629throw new ArgumentException(CodeAnalysisResources.InconsistentLanguageVersions, nameof(syntaxTrees)); 957throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, $"{nameof(trees)}[{i}]"); 962throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, $"{nameof(trees)}[{i}]"); 967throw new ArgumentException(CSharpResources.SubmissionCanOnlyInclude, $"{nameof(trees)}[{i}]"); 979throw new ArgumentException(CSharpResources.SubmissionCanHaveAtMostOne, nameof(trees)); 1030throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, $"{nameof(trees)}[{i}]"); 1033throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, $"{nameof(trees)}[{i}]"); 1087throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, nameof(newTree)); 1098throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, nameof(oldTree)); 1101throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, nameof(oldTree)); 1106throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, nameof(newTree)); 2626throw new ArgumentException(CSharpResources.SyntaxTreeNotFound, nameof(syntaxTree)); 4384throw new ArgumentException(CodeAnalysisResources.TupleUnderlyingTypeMustBeTupleCompatible, nameof(underlyingType)); 4453throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name)); 4457throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name)); 4679throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name)); 4683throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name)); 4801throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4819throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4840throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter)); 4866throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
Compilation\CSharpDeterministicKeyBuilder.cs (2)
23throw new ArgumentException(null, nameof(options)); 44throw new ArgumentException(null, nameof(parseOptions));
Compilation\CSharpSemanticModel.cs (1)
1618throw new ArgumentException(
Compilation\MemberSemanticModel.cs (3)
940throw new ArgumentException(CSharpResources.NodeIsNotAwaitUsingDeclaration, nameof(node)); 952throw new ArgumentException(CSharpResources.NodeIsNotAwaitUsingStatement, nameof(node)); 2342throw 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)
888throw new ArgumentException(CSharpResources.TypeArgumentCannotBeNull, nameof(typeArguments)); 893throw new ArgumentException(CSharpResources.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\NamedTypeSymbol.cs (2)
1521throw new ArgumentException(CSharpResources.TypeArgumentCannotBeNull, nameof(typeArguments)); 1526throw new ArgumentException(CSharpResources.WrongNumberOfTypeArguments, nameof(typeArguments));
Symbols\PublicModel\Symbol.cs (1)
190throw new ArgumentException(CSharpResources.WrongSemanticModelType, LanguageNames.CSharp);
Symbols\SymbolExtensions.cs (2)
380throw new ArgumentException(CSharpResources.NotACSharpSymbol, paramName); 539_ => 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)); 1449throw new ArgumentException($"{nameof(nodes)} must not be empty.", nameof(nodes)); 1462throw new ArgumentException($"{nameof(separators)} must have 1 fewer element than {nameof(nodes)}", nameof(separators)); 1471throw new ArgumentException($"When {nameof(nodes)} is null, {nameof(separators)} must also be null.", nameof(separators));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\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\roslyn\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.Workspaces (3)
Simplification\CSharpSimplificationService.cs (1)
72throw new ArgumentException(CSharpWorkspaceResources.Only_attributes_constructor_initializers_expressions_or_statements_can_be_made_explicit, nameof(node));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
334throw new ArgumentException(CSharpCompilerExtensionsResources.Expected_string_or_char_literal, nameof(token));
src\roslyn\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.Extensions.Package (13)
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
Microsoft.CodeAnalysis.ExternalAccess.Extensions (2)
Internal\ExtensionMessageHandlerWrapper.cs (2)
24Name = handler.GetType().FullName ?? throw new ArgumentException(string.Format(ExternalAccessExtensionsResources.The_handler_of_type_0_must_have_a_full_name, handler.GetType().Name), nameof(handler)); 29_executeAsyncMethod = customMessageHandlerInterface.GetMethod(nameof(ExecuteAsync)) ?? throw new ArgumentException(string.Format(ExternalAccessExtensionsResources.The_interface_0_does_not_contain_a_method_named_1, customMessageHandlerInterface.FullName, nameof(ExecuteAsync)), nameof(customMessageHandlerInterface));
Microsoft.CodeAnalysis.Features (11)
CodeLens\CodeLensReferencesService.cs (1)
116throw 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)
138throw 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)
90throw new ArgumentException(FeaturesResources.The_symbol_does_not_have_an_icon, nameof(symbol)); 161throw 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.NetAnalyzers (10)
Microsoft.NetCore.Analyzers\Security\Helpers\ObjectGraphOptions.cs (1)
149throw new ArgumentException("ObjectGraphOptions should specify at least one type serialization", parameterName);
src\11b41c7305441175\HazardousUsageEvaluator.cs (1)
72throw new ArgumentException(
src\11b41c7305441175\HazardousUsageEvaluatorCollection.cs (1)
30throw new ArgumentException("No HazardUsageEvaluators specified", nameof(hazardousUsageEvaluators));
src\11b41c7305441175\PropertyMapperCollection.cs (3)
25throw new ArgumentException("No PropertyMappers specified", nameof(propertyMappers)); 32throw new ArgumentException( 42throw new ArgumentException(
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\IMethodSymbolExtensions.cs (1)
633throw new ArgumentException("Invalid parameter", nameof(parameterSymbol));
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
59throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\Extensions\StringExtensions.cs (1)
40throw new ArgumentException(
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\WordParser.cs (1)
102throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
Microsoft.CodeAnalysis.Razor.Compiler (4)
Language\CodeGeneration\CodeWriter.cs (1)
142throw new ArgumentException(Resources.FormatCodeWriter_InvalidNewLine(value), nameof(value));
Language\DocumentationObject.cs (1)
20throw new ArgumentException(
Language\RazorLanguageVersion.cs (1)
86throw new ArgumentException(
Language\RazorProjectFileSystem.cs (1)
157throw new ArgumentException(Resources.RazorProjectFileSystem_PathMustStartWithForwardSlash, nameof(path));
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 (24)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
383throw new ArgumentException(e.Message, paramName);
src\roslyn\src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
45throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (3)
49throw new ArgumentException("Offset cannot be negative", nameof(offset)); 52throw new ArgumentException("Width must be greater than zero.", nameof(width)); 82throw new ArgumentException("Token start must be non-negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (1)
132throw new ArgumentException("tokenStart cannot be negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\roslyn\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)
566throw new ArgumentException(ScriptingResources.StartingStateIncompatible, nameof(previousState)); 593throw new ArgumentException(ScriptingResources.ScriptRequiresGlobalVariables, nameof(globals)); 601throw new ArgumentException(string.Format(ScriptingResources.GlobalsNotAssignable, runtimeType, globalsTypeInfo), nameof(globals)); 606throw new ArgumentException(ScriptingResources.GlobalVariablesWithoutGlobalType, nameof(globals));
src\roslyn\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.Workspaces (71)
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\RefactorAllProvider.cs (1)
92throw new ArgumentException(WorkspacesResources.FixAllScope_Custom_is_not_supported_with_this_API, nameof(supportedRefactorAllScopes));
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)
332throw 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)
2031throw new ArgumentException("Tuples must have at least two elements.", nameof(elements)); 2059throw new ArgumentException("The number of element names must match the cardinality of the tuple.", nameof(elementNames));
PatternMatching\PatternMatcher.cs (1)
83_ => throw new ArgumentException($"{nameof(kind)} must specify at least one matching strategy.", nameof(kind)),
Rename\Renamer.cs (1)
51throw new ArgumentException(WorkspacesResources._0_must_be_a_non_null_and_non_empty_string, nameof(newName));
src\roslyn\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\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (2)
250throw new ArgumentException("Path not registered: " + originalPath, nameof(originalPath)); 269throw new ArgumentException("Path not registered: " + originalPath, nameof(originalPath));
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
115throw new ArgumentException($"Must be a full path: {baseDirectory}", nameof(baseDirectory));
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
383throw new ArgumentException(e.Message, paramName);
src\roslyn\src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (3)
49throw new ArgumentException("Offset cannot be negative", nameof(offset)); 52throw new ArgumentException("Width must be greater than zero.", nameof(width)); 82throw new ArgumentException("Token start must be non-negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (1)
132throw new ArgumentException("tokenStart cannot be negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\roslyn\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 (6)
86throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 103throw new ArgumentException($"'{fullPath}' has already been added to this project.", nameof(fullPath)); 155throw new ArgumentException($"{nameof(textContainer)} is already added to this project.", nameof(textContainer)); 192throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 309throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 383throw new ArgumentException("The specified files do not equal the project document count.", nameof(filePaths));
Workspace\ProjectSystem\ProjectSystemProject.cs (5)
915throw new ArgumentException($"'{fullPath}' has already been added to this project.", nameof(fullPath)); 936throw new ArgumentException("message", nameof(fullPath)); 961throw new ArgumentException($"'{fullPath}' is not an analyzer of this project.", nameof(fullPath)); 1062throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath)); 1108throw new ArgumentException($"{nameof(fullPath)} isn't a valid path.", nameof(fullPath));
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
791throw 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)
699throw new ArgumentException(WorkspacesResources.Project_does_not_contain_specified_reference, nameof(projectReference)); 1757_ => throw new ArgumentException(WorkspacesResources.Options_did_not_come_from_specified_Solution, paramName: nameof(options))
Workspace\Solution\SolutionState.cs (1)
850throw 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)
543_ => 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 (2)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
30throw new ArgumentException(WorkspaceMSBuildBuildHostResources.Parameter_cannot_be_null_empty_or_contain_whitespace, nameof(name));
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
383throw new ArgumentException(e.Message, paramName);
Microsoft.CSharp (2)
Microsoft\CSharp\RuntimeBinder\Error.cs (2)
31new ArgumentException(SR.TypeArgumentRequiredForStaticCall, paramName); 49new ArgumentException(SR.DynamicArgumentNeedsValue, paramName);
Microsoft.Data.Analysis (86)
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 (17)
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); 743throw new ArgumentException(Strings.ParameterMustNotBeNullOrWhitespace, nameof(variableName)); 748throw new ArgumentException(Strings.ParameterMustNotBeNullOrWhitespace, nameof(valueName)); 773throw new ArgumentException(Strings.MissingIdColumns, nameof(idColumns)); 778throw new ArgumentException(Strings.MissingValueColumns, nameof(valueColumns)); 783throw new ArgumentException(Strings.DuplicateColumnsInIdAndValueLists, nameof(valueColumns)); 793throw new ArgumentException(string.Format(Strings.VariableNameAlreadyExists, variableName), nameof(variableName)); 798throw new ArgumentException(string.Format(Strings.ValueNameAlreadyExists, valueName), nameof(valueName)); 803throw new ArgumentException(string.Format(Strings.VariableNameAndValueNameMustBeDifferent, nameof(variableName), nameof(valueName)), nameof(valueName)); 810throw new ArgumentException(string.Format(Strings.InvalidColumnName, columnName), nameof(idColumns)); 818throw new ArgumentException(string.Format(Strings.InvalidColumnName, columnName), nameof(valueColumns));
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.Deployment.DotNet.Releases (4)
ProductCollection.cs (1)
63throw new ArgumentException(ReleasesResources.ValueCannotBeEmpty, nameof(releasesIndexUri));
ReleaseFile.cs (1)
113throw new ArgumentException(ReleasesResources.ValueCannotBeEmpty, nameof(destinationPath));
Utils.cs (2)
90throw new ArgumentException(ReleasesResources.ValueCannotBeEmpty, nameof(fileName)); 132throw new ArgumentException(ReleasesResources.ValueCannotBeEmpty, nameof(path));
Microsoft.Diagnostics.DataContractReader.Contracts (12)
Contracts\EcmaMetadata_1.cs (1)
151throw new ArgumentException("Module does not have read/write metadata.", nameof(handle));
Contracts\GCInfo\GCInfo_1.cs (1)
91throw new ArgumentException("Invalid GC info handle", nameof(gcInfoHandle));
Contracts\GCInfo\GCInfoX86_1.cs (1)
64throw new System.ArgumentException("Invalid GC info handle", nameof(gcInfoHandle));
Contracts\Object_1.cs (3)
47throw new ArgumentException("Address does not represent a string object", nameof(address)); 65throw new ArgumentException("Address does not represent a string object", nameof(address)); 81throw new ArgumentException("Address does not represent an array object", nameof(address));
Contracts\RuntimeTypeSystem_1.cs (5)
491throw new ArgumentException("Invalid type handle pointer", nameof(typeHandlePointer)); 530throw new ArgumentException("Invalid method table pointer", nameof(typeHandlePointer)); 1576throw new ArgumentException("Invalid method desc pointer", nameof(methodDescPointer)); 2116throw new ArgumentException(nameof(slot), "Slot number is greater than the number of slots"); 2121throw new ArgumentException(nameof(slot), "Slot number is greater than the number of slots");
Contracts\StackWalk\StackWalk_1.cs (1)
1406throw new ArgumentException("Invalid stack data frame handle", nameof(stackDataFrameHandle));
Microsoft.Diagnostics.DataContractReader.Legacy (57)
ClrDataMethodDefinition.cs (4)
521throw new ArgumentException("Extent enumeration has not been started or has already ended.", nameof(handle)); 525throw new ArgumentException("Handle does not reference a method definition extent enumeration.", nameof(handle)); 574throw new ArgumentException("Handle does not reference a method definition extent enumeration.", nameof(handle)); 631throw new ArgumentException("Invalid code notification flags", nameof(flags));
ClrDataMethodInstance.cs (3)
637throw new ArgumentException("Invalid extent handle.", nameof(handle)); 641throw new ArgumentException("Invalid extent handle.", nameof(handle)); 688throw new ArgumentException("Invalid extent handle.", nameof(handle));
ClrDataTypeInstance.cs (1)
130throw new ArgumentException("GetName requires flags=0.", nameof(flags));
ClrDataValue.cs (3)
784throw new ArgumentException("Invalid field handle.", nameof(handle)); 788throw new ArgumentException("Invalid field handle.", nameof(handle)); 859throw new ArgumentException("Invalid field handle.", nameof(handle));
ConversionExtensions.cs (2)
60throw new ArgumentException($"ClrDataAddress 0x{address.Value:x} out of range for the target platform.", nameof(address)); 80throw new ArgumentException($"ClrDataAddress 0x{address.Value:x} out of range for the target platform.", nameof(address));
Dbi\DacDbiImpl.cs (33)
446throw new ArgumentException("Module pointer must be non-zero.", nameof(vmModule)); 484throw new ArgumentException("Module pointer must be non-zero.", nameof(vmModule)); 535throw new ArgumentException("Module pointer must be non-zero.", nameof(vmModule)); 576throw new ArgumentException("Module pointer must be non-zero.", nameof(vmModule)); 1215throw new ArgumentException("Invalid debug state value.", nameof(debugState)); 1857throw new ArgumentException("Invalid stack walk handle", nameof(ppSFIHandle)); 1889throw new ArgumentException("Invalid stack walk handle", nameof(pSFIHandle)); 1946throw new ArgumentException("Invalid stack walk handle", nameof(pSFIHandle)); 1980throw new ArgumentException("Invalid stack walk handle", nameof(pSFIHandle)); 2068throw new ArgumentException("Invalid stack walk handle", nameof(pSFIHandle)); 3740throw new ArgumentException("MethodDesc cannot be null", nameof(vmMethodDesc)); 4965throw new ArgumentException("Invalid heap walk handle", nameof(handle)); 5001throw new ArgumentException("Invalid heap walk handle", nameof(handle)); 5276throw new ArgumentException("Handle does not reference a valid RefWalk instance.", nameof(handle)); 5305throw new ArgumentException("Handle is invalid.", nameof(handle)); 5308throw new ArgumentException("Handle does not reference a valid RefWalk instance.", nameof(handle)); 5465throw new ArgumentException("TypeDescs are not supported", nameof(id)); 5785throw new ArgumentException("Output pointer cannot be null.", nameof(pHasReadWriteMetadata)); 5815throw new ArgumentException("Module pointer cannot be null.", nameof(vmModule)); 5818throw new ArgumentException("Output pointer cannot be null.", nameof(pOptimizationsDisabled)); 5821throw new ArgumentException("methodTk must be a MethodDef token.", nameof(methodTk)); 5871throw new ArgumentException("Output pointer cannot be null.", nameof(pVmILCodeVersionNode)); 5883throw new ArgumentException("methodTk must be a MethodDef token.", nameof(methodTk)); 5938throw new ArgumentException("methodTk must be a MethodDef token.", nameof(methodTk)); 6001throw new ArgumentException("Output pointer cannot be null.", nameof(pVmNativeCodeVersionNode)); 6040throw new ArgumentException("Output pointer cannot be null.", nameof(pVmILCodeVersionNode)); 6078throw new ArgumentException("Output pointer cannot be null.", nameof(pData)); 6202throw new ArgumentException("Unable to find MethodDesc for the delegate's target method.", nameof(delegateObject)); 6287throw new ArgumentException("Module pointer must not be zero.", nameof(pModule)); 6358throw new ArgumentException("Module pointer must not be zero.", nameof(vmModule)); 6444throw new ArgumentException("vmMethod must not be zero.", nameof(vmMethod)); 6527throw new ArgumentException("vmMethod must not be zero.", nameof(vmMethod)); 6529throw new ArgumentException("pIndex must not be null.", nameof(pIndex));
MetaDataImportImpl.cs (3)
84throw new ArgumentException("Invalid enum handle.", nameof(hEnum)); 86return (MetadataEnum)(handle.Target ?? throw new ArgumentException("Enum handle target is null.", nameof(hEnum))); 404throw new ArgumentException(null, nameof(tk));
SOSDacImpl.cs (2)
6741throw new ArgumentException("loaderAllocator cannot be zero.", nameof(loaderAllocator)); 6754throw new ArgumentException($"The count parameter ({count}) is less than the number of loader heaps ({loaderHeapCount}).", nameof(count));
SOSDacImpl.IXCLRDataProcess.cs (5)
281throw new ArgumentException("Flags are not supported", nameof(flags)); 287throw new ArgumentException("Address is not readable", nameof(address)); 1705throw new ArgumentException("Invalid enumeration handle", nameof(handle)); 1766throw new ArgumentException("Invalid enumeration handle", nameof(handle)); 1770throw new ArgumentException("Invalid enumeration handle", nameof(handle));
TypeNameBuilder.cs (1)
115throw new ArgumentException($"Unkown ArrayFunctionType: {functionType}.", nameof(method));
Microsoft.Diagnostics.NETCore.Client (2)
DiagnosticsClient\DiagnosticsClient.cs (2)
181throw new ArgumentException($"Only {nameof(WriteDumpFlags.LoggingEnabled)} flag is supported by this runtime version", nameof(flags)); 221throw new ArgumentException($"Only {nameof(WriteDumpFlags.LoggingEnabled)} flag is supported by this runtime version", nameof(flags));
Microsoft.DiaSymReader (2)
Extensions\SymUnmanagedStreamFactory.cs (1)
23throw new ArgumentException("Stream must support seek operation.", nameof(stream));
Utilities\ComMemoryStream.cs (1)
192throw new ArgumentException($"{nameof(origin)} ({origin}) is invalid.", nameof(origin));
Microsoft.DotNet.ApiCompat.Task (1)
src\sdk\src\Tasks\Common\LogAdapter.cs (1)
68throw new ArgumentException(
Microsoft.DotNet.ApiSymbolExtensions (1)
AssemblySymbolLoader.cs (1)
251throw new ArgumentException(Resources.StreamPositionGreaterThanLength, nameof(stream));
Microsoft.DotNet.Build.Tasks.FileCatalog (4)
CatalogBuilder.cs (2)
53throw new ArgumentException( 101throw new ArgumentException("Path must not be null or empty.", nameof(path));
CatalogEntry.cs (2)
31throw new ArgumentException("File path must not be null or empty.", nameof(filePath)); 71throw new ArgumentException("Name must not be null or empty.", nameof(name));
Microsoft.DotNet.Build.Tasks.Installers (5)
src\RpmBuilder.cs (5)
72_ => throw new ArgumentException("Unsupported architecture", nameof(architecture)) 90_ => throw new ArgumentException("Unsupported architecture", nameof(architecture)) 124throw new ArgumentException("Unsupported OS", nameof(os)); 196_ => throw new ArgumentException( 203throw new ArgumentException("A file trigger must specify at least one path.", nameof(paths));
Microsoft.DotNet.Build.Tasks.Packaging (1)
GeneratePackageReport.cs (1)
360throw new ArgumentException($"Could not find source item for {targetPath}", nameof(targetPath));
Microsoft.DotNet.Cli.Utils (3)
PathUtility.cs (2)
148throw new ArgumentException("Path must have a value", nameof(path1)); 153throw new ArgumentException("Path must have a value", nameof(path2));
ToolCommandName.cs (1)
17throw new ArgumentException(message: "cannot be empty", paramName: nameof(name));
Microsoft.DotNet.GenFacades (1)
TypeParser.cs (1)
23throw new ArgumentException($"Invalid C# language version value '{langVersion}'", nameof(langVersion));
Microsoft.DotNet.TemplateLocator (12)
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\ManifestVersion.cs (1)
17throw new ArgumentException(Strings.InvalidManifestVersion, version);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (2)
73throw new ArgumentException($"'{nameof(sdkVersion)}' cannot be null or whitespace", nameof(sdkVersion)); 78throw new ArgumentException($"'{nameof(sdkRootPath)}' cannot be null or whitespace",
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadId.cs (1)
18throw new ArgumentException($"'{nameof(id)}' cannot be null or empty", nameof(id));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadPackId.cs (1)
24throw new ArgumentException($"'{nameof(id)}' cannot be null or whitespace", nameof(id));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (4)
345throw new ArgumentException($"The package kind '{kind}' is not known", nameof(kind)); 390throw new ArgumentException($"'{nameof(workloadId)}' cannot be null or empty", nameof(workloadId)); 492throw new ArgumentException($"'{nameof(packId)}' cannot be null or empty", nameof(packId)); 719throw new ArgumentException($"Workload '{workloadId}' not found", nameof(workloadId));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSuggestionFinder.cs (1)
31throw new ArgumentException("requestedPacks may only contain packs that exist in expandedWorkloads", "requestedPacks");
TemplateLocator.cs (2)
45throw new ArgumentException($"'{nameof(sdkVersion)}' cannot be null or whitespace", nameof(sdkVersion)); 50throw new ArgumentException($"'{nameof(dotnetRootPath)}' cannot be null or whitespace", nameof(dotnetRootPath));
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.Extensions.AI (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Abstractions (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Console (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.NLP (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Quality (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Reporting (1)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Evaluation.Safety (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Integration.Tests (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.OpenAI (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AI.Tests (1)
Functions\AIFunctionFactoryTest.cs (1)
1402throw new ArgumentException($"Unable to resolve argument for '{p.Name}'.", "arguments.Services"),
Microsoft.Extensions.AmbientMetadata.Application (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AmbientMetadata.Build (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.AsyncState (1)
parent\parent\parent\eng\MSBuild\parent\parent\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");
parent\parent\parent\eng\MSBuild\parent\parent\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));
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Compliance.Redaction (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Compliance.Testing (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Configuration (1)
ChainedConfigurationProvider.cs (1)
27_config = source.Configuration ?? throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "source.Configuration"), nameof(source));
Microsoft.Extensions.Configuration.Binder.SourceGeneration (2)
Specs\InterceptorInfo.cs (1)
178throw new ArgumentException(InvalidInvocationErrMsg, nameof(invocation));
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
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.DataIngestion (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.DataIngestion.Abstractions (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.DataIngestion.Markdig (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.DataIngestion.MarkItDown (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\CallSiteFactory.cs (2)
46throw new ArgumentException( 61throw new ArgumentException(
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Extensions\ServiceCollectionDescriptorExtensions.cs (1)
483throw new ArgumentException(
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
parent\parent\parent\eng\MSBuild\parent\parent\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.Abstractions (1)
Tracing\TracingRule.cs (1)
50throw new ArgumentException("Only one '*' wildcard is allowed in an activity source name pattern.", nameof(sourceName));
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Diagnostics.Probes (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Diagnostics.Testing (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalFileProvider.cs (1)
56throw new ArgumentException("The path must be absolute.", nameof(root));
PhysicalFilesWatcher.cs (1)
128throw new ArgumentException(SR.Format(SR.FileSystemWatcherPathError, watcherFullPath, _root), nameof(fileSystemWatcher));
Microsoft.Extensions.Hosting (1)
Internal\Host.cs (1)
56throw new ArgumentException(SR.IHostApplicationLifetimeReplacementNotSupported, nameof(applicationLifetime));
Microsoft.Extensions.Hosting.Testing (1)
parent\parent\parent\eng\MSBuild\parent\parent\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)
parent\parent\parent\eng\MSBuild\parent\parent\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.Logging.Generators (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Options.Contextual (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Primitives (1)
StringTokenizer.cs (1)
41throw new ArgumentException(SR.Argument_StringSegmentHasNoValue, nameof(value));
Microsoft.Extensions.Resilience (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.ServiceDiscovery (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
parent\parent\Shared\FxPolyfills\ArgumentException.cs (1)
26throw new ArgumentException("The value cannot be an empty string.", paramName);
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.Abstractions (2)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
parent\parent\Shared\FxPolyfills\ArgumentException.cs (1)
26throw new ArgumentException("The value cannot be an empty string.", paramName);
Microsoft.Extensions.ServiceDiscovery.Dns (3)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Resolver\DnsResolver.cs (2)
46throw new ArgumentException("At least one DNS server is required.", nameof(options)); 915throw new ArgumentException($"'{name}' is not a valid DNS name.", nameof(name));
Microsoft.Extensions.ServiceDiscovery.Yarp (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Telemetry (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.Telemetry.Abstractions (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.TimeProvider.Testing (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.VectorData.Abstractions (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (1)
370=> throw new ArgumentException(message, paramName);
Microsoft.Extensions.VectorData.ConformanceTests (2)
TypeTests\DataTypeTests.cs (2)
161throw new ArgumentException($"The property name '{propertyName}' is reserved and cannot be used for testing.", nameof(propertyName)); 165?? throw new ArgumentException($"The type '{typeof(TRecord).Name}' does not have a property named '{propertyName}'.", nameof(propertyName));
Microsoft.Interop.ComInterfaceGenerator (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
Microsoft.Interop.JavaScript.JSImportGenerator (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
Microsoft.Interop.LibraryImportGenerator (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
Microsoft.Interop.SourceGeneration (4)
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)),
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
TypeSymbolExtensions.cs (1)
333throw new ArgumentException($"Cannot handle type name in the format provided: {typeName}", nameof(typeName));
Microsoft.JSInterop (1)
JSRuntime.cs (1)
376: 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)
54throw new ArgumentException("Dimension must be divisible by 2", nameof(headDim)); 129_ => throw new ArgumentException("Invalid activation function", actFn), 174throw 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)); 240throw new ArgumentException($"Path has invalid image file extension.", nameof(imagePath)); 246throw new ArgumentException($"Saving image with the format '{ext}' is not supported. Try save it with `Jpeg`, `Png`, or `Webp` format.", nameof(imagePath)); 301_ => 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 (7)
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)
30_ => throw new ArgumentException($"The model type '{modelProto.TrainerSpec.ModelType}' is not supported.", nameof(modelProto))
Model\SentencePieceUnigramModel.cs (1)
366throw new ArgumentException($"The vocabulary does not contain the required special token.", paramName);
Model\TiktokenTokenizer.cs (1)
1571throw 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)
43throw new ArgumentException($"Too many pre-tokenizers provided. Maximum is {MaxPreTokenizersCount}.", nameof(preTokenizers)); 50throw 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.Build.Containers (4)
AuthHandshakeMessageHandler.cs (1)
576throw new ArgumentException(Resource.GetString(nameof(Strings.NoRequestUriSpecified)), nameof(request));
DigestUtils.cs (1)
58throw new ArgumentException(
FallbackToHttpMessageHandler.cs (1)
34throw new ArgumentException(Resource.GetString(nameof(Strings.NoRequestUriSpecified)), nameof(request));
ImageConfig.cs (1)
50_config = config as JsonObject ?? throw new ArgumentException($"{nameof(config)} should be a JSON object.", nameof(config));
Microsoft.NET.Build.Extensions.Tasks (1)
src\sdk\src\Tasks\Common\LogAdapter.cs (1)
68throw new ArgumentException(
Microsoft.NET.Build.Tasks (12)
ProcessFrameworkReferences.cs (1)
814_ => throw new ArgumentException($"Unknown package type {toolPackType}", nameof(toolPackType))
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\ManifestVersion.cs (1)
17throw new ArgumentException(Strings.InvalidManifestVersion, version);
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkDirectoryWorkloadManifestProvider.cs (2)
73throw new ArgumentException($"'{nameof(sdkVersion)}' cannot be null or whitespace", nameof(sdkVersion)); 78throw new ArgumentException($"'{nameof(sdkRootPath)}' cannot be null or whitespace",
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadId.cs (1)
18throw new ArgumentException($"'{nameof(id)}' cannot be null or empty", nameof(id));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadPackId.cs (1)
24throw new ArgumentException($"'{nameof(id)}' cannot be null or whitespace", nameof(id));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadResolver.cs (4)
345throw new ArgumentException($"The package kind '{kind}' is not known", nameof(kind)); 390throw new ArgumentException($"'{nameof(workloadId)}' cannot be null or empty", nameof(workloadId)); 492throw new ArgumentException($"'{nameof(packId)}' cannot be null or empty", nameof(packId)); 719throw new ArgumentException($"Workload '{workloadId}' not found", nameof(workloadId));
src\sdk\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\WorkloadSuggestionFinder.cs (1)
31throw new ArgumentException("requestedPacks may only contain packs that exist in expandedWorkloads", "requestedPacks");
src\sdk\src\Tasks\Common\LogAdapter.cs (1)
68throw new ArgumentException(
Microsoft.NET.HostModel (3)
Bundle\Bundler.cs (2)
55throw new ArgumentException("Host name must be a file name, not a path", nameof(hostName)); 65throw new ArgumentException("Compression requires framework version 6.0 or above", nameof(options));
MachO\MachObjectFile.cs (1)
332throw new ArgumentException($"File is too small. File capacity is '{file.Capacity}' bytes, but the Mach-O requires '{GetFileSize()}' bytes. ", nameof(file));
Microsoft.Net.Http.Headers (6)
ContentDispositionHeaderValue.cs (1)
337throw 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)
662throw new ArgumentException("An empty string is not allowed.", parameterName);
Microsoft.NET.Sdk.WorkloadManifestReader (10)
ManifestVersion.cs (1)
17throw new ArgumentException(Strings.InvalidManifestVersion, version);
SdkDirectoryWorkloadManifestProvider.cs (2)
73throw new ArgumentException($"'{nameof(sdkVersion)}' cannot be null or whitespace", nameof(sdkVersion)); 78throw new ArgumentException($"'{nameof(sdkRootPath)}' cannot be null or whitespace",
WorkloadId.cs (1)
18throw new ArgumentException($"'{nameof(id)}' cannot be null or empty", nameof(id));
WorkloadPackId.cs (1)
24throw new ArgumentException($"'{nameof(id)}' cannot be null or whitespace", nameof(id));
WorkloadResolver.cs (4)
345throw new ArgumentException($"The package kind '{kind}' is not known", nameof(kind)); 390throw new ArgumentException($"'{nameof(workloadId)}' cannot be null or empty", nameof(workloadId)); 492throw new ArgumentException($"'{nameof(packId)}' cannot be null or empty", nameof(packId)); 719throw new ArgumentException($"Workload '{workloadId}' not found", nameof(workloadId));
WorkloadSuggestionFinder.cs (1)
31throw new ArgumentException("requestedPacks may only contain packs that exist in expandedWorkloads", "requestedPacks");
Microsoft.Private.Windows.Core (13)
_generated\165\Windows.Win32.ITypeLib.g.cs (2)
219 if (szNameBuf != null && szNameBuf.LastIndexOf('\0') == -1) throw new ArgumentException("Required null terminator missing.", "szNameBuf"); 252 if (szNameBuf != null && szNameBuf.LastIndexOf('\0') == -1) throw new ArgumentException("Required null terminator missing.", "szNameBuf");
_generated\253\Windows.Win32.System_Com_ITypeLib_Extensions.g.cs (2)
85 if (szNameBuf != null && szNameBuf.LastIndexOf('\0') == -1) throw new ArgumentException("Required null terminator missing.", "szNameBuf"); 101 if (szNameBuf != null && szNameBuf.LastIndexOf('\0') == -1) throw new ArgumentException("Required null terminator missing.", "szNameBuf");
src\winforms\src\Microsoft.Private.Windows.Polyfills\Exceptions\ArgumentExtensions.cs (2)
55throw new ArgumentException(SRF.Argument_EmptyString, paramName); 62throw new ArgumentException(SRF.Argument_EmptyOrWhiteSpaceString, paramName);
src\winforms\src\Microsoft.Private.Windows.Polyfills\System\StringExtensions.cs (1)
22throw new ArgumentException(SRF.String_DestinationSpanTooSmall, nameof(destination));
System\IO\BinaryReaderExtensions.cs (2)
99throw new ArgumentException($"Cannot read primitives of {typeof(T).Name}.", nameof(T)); 230throw new ArgumentException($"Cannot write primitives of {typeof(T).Name}.", nameof(T));
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
592throw 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));
Microsoft.SourceLink.Common (1)
GenerateSourceLinkFile.cs (1)
123throw new ArgumentException($"The path '{OutputFile}' must be fully qualified.", nameof(OutputFile));
Microsoft.TemplateEngine.Abstractions (7)
Constraints\TemplateConstraintInfo.cs (1)
21throw new ArgumentException($"'{nameof(type)}' cannot be null or whitespace.", nameof(type));
Constraints\TemplateConstraintResult.cs (4)
78throw new ArgumentException($"'{nameof(localizedErrorMessage)}' cannot be null or whitespace.", nameof(localizedErrorMessage)); 99throw new ArgumentException($"'{nameof(localizedErrorMessage)}' cannot be null or whitespace.", nameof(localizedErrorMessage)); 121throw new ArgumentException($"'{nameof(type)}' cannot be null or whitespace.", nameof(type)); 126throw new ArgumentException($"'{nameof(localizedErrorMessage)}' cannot be null or whitespace.", nameof(localizedErrorMessage));
Installer\InstallRequest.cs (1)
15throw new ArgumentException("identifier cannot be null or empty", nameof(identifier));
Installer\UpdateRequest.cs (1)
23throw new ArgumentException("Version cannot be null or empty", nameof(targetVersion));
Microsoft.TemplateEngine.Cli (13)
Commands\BaseFilterableArgs.cs (1)
29throw new ArgumentException($"{nameof(filter)} is not available in parse result.", nameof(filter));
Commands\CliPathInfo.cs (2)
19throw new ArgumentException($"{nameof(host.HostIdentifier)} of {nameof(host)} cannot be null or whitespace.", nameof(host)); 24throw new ArgumentException($"{nameof(host.Version)} of {nameof(host)} cannot be null or whitespace.", nameof(host));
Commands\details\DetailsCommandArgs.cs (1)
14?? throw new ArgumentException($"{nameof(parseResult)} should contain one argument for {detailsCommand.Definition.NameArgument.Name}", nameof(parseResult));
Commands\install\InstallCommandArgs.cs (2)
16throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {installCommand.Definition.NameArgument.Name}", nameof(parseResult)); 29throw new ArgumentException($"{nameof(parseResult)} should contain at least one argument for {installCommand.Definition.NameArgument.Name}", nameof(parseResult));
PostActionProcessors\PostActionProcessorBase.cs (1)
24throw new ArgumentException($"'{nameof(outputBasePath)}' cannot be null or whitespace.", nameof(outputBasePath));
TabularOutput\TabularOutput.cs (2)
205throw new ArgumentException($"{nameof(columnToken)} is not of type {nameof(ColumnDefinition)}", nameof(columnToken)); 223throw new ArgumentException($"{nameof(columnToken)} is not of type {nameof(ColumnDefinition)}", nameof(columnToken));
TemplateGroup.cs (2)
34throw new ArgumentException(paramName: nameof(templates), message: "The templates collection cannot be empty"); 46throw new ArgumentException(paramName: nameof(templates), message: "The templates should have same group identity");
TemplatePackageCoordinator.cs (1)
184throw new ArgumentException($"{nameof(args.TemplatePackages)} should have at least one item to continue.", nameof(args.TemplatePackages));
TemplatePackageDisplay.cs (1)
102throw new ArgumentException($"{nameof(result.TemplatePackage)} cannot be null when {nameof(result.Success)} is 'true'", nameof(result));
Microsoft.TemplateEngine.Core (2)
VariableCollection.cs (2)
32throw new ArgumentException($"The {nameof(values)} should not contain null.", nameof(values)); 111throw new ArgumentException($"The value of key-value pair {nameof(item)} should not be null.", nameof(item));
Microsoft.TemplateEngine.Edge (44)
BuiltInManagedProvider\GlobalSettingsTemplatePackageProvider.cs (1)
120throw new ArgumentException($"{nameof(installRequests)} has duplicate install requests", nameof(installRequest));
Constraints\HostConstraint.cs (1)
101throw new ArgumentException($"'{nameof(host)}' cannot be null or whitespace.", nameof(host));
DefaultPathInfo.cs (5)
110throw new ArgumentException($"{nameof(host.HostIdentifier)} of {nameof(host)} cannot be null or whitespace.", nameof(host)); 114throw new ArgumentException($"both {nameof(userDir)} and {nameof(globalDir)} cannot be null or whitespace.", nameof(userDir)); 123throw new ArgumentException($"{nameof(host.HostIdentifier)} of {nameof(host)} cannot be null or whitespace.", nameof(host)); 127throw new ArgumentException($"{nameof(host.Version)} of {nameof(host)} cannot be null or whitespace.", nameof(host)); 131throw new ArgumentException($"both {nameof(userDir)} and {nameof(globalDir)} cannot be null or whitespace.", nameof(userDir));
EngineEnvironmentSettings.cs (1)
40throw new ArgumentException($"{nameof(settingsLocation)} won't be used if {nameof(pathInfo)} is specified.", nameof(settingsLocation));
Installers\Folder\FolderInstaller.cs (3)
34throw new ArgumentException($"{nameof(FolderInstaller)} can only deserialize packages with {nameof(data.InstallerId)} {Factory.Id}", nameof(data)); 77throw new ArgumentException($"{nameof(templatePackage)} should be of type {nameof(FolderManagedTemplatePackage)}", nameof(templatePackage)); 81?? throw new ArgumentException($"{nameof(templatePackage)} should be of type {nameof(FolderManagedTemplatePackage)}", nameof(templatePackage));
Installers\Folder\FolderManagedTemplatePackage.cs (1)
22throw new ArgumentException($"{nameof(mountPointUri)} cannot be null or empty", nameof(mountPointUri));
Installers\NuGet\NugetApiPackageManager.cs (6)
53throw new ArgumentException($"{nameof(identifier)} cannot be null or empty", nameof(identifier)); 57throw new ArgumentException($"{nameof(downloadPath)} cannot be null or empty", nameof(downloadPath)); 201throw new ArgumentException($"{nameof(identifier)} cannot be null or empty", nameof(identifier)); 255throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", nameof(packageIdentifier)); 319throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", nameof(packageIdentifier)); 372throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", nameof(packageIdentifier));
Installers\NuGet\NuGetInstaller.cs (6)
29throw new ArgumentException($"{nameof(installPath)} should not be null or empty", nameof(installPath)); 52throw new ArgumentException($"{nameof(installPath)} should not be null or empty", nameof(installPath)); 102throw new ArgumentException($"{nameof(NuGetInstaller)} can only deserialize packages with {nameof(data.InstallerId)} {Factory.Id}", nameof(data)); 104_ = data.Details ?? throw new ArgumentException($"{nameof(data)} should contain {nameof(data.Details)} with package identifier.", nameof(data)); 327?? throw new ArgumentException($"{nameof(templatePackage)} should be of type {nameof(NuGetManagedTemplatePackage)}", nameof(templatePackage)); 368throw new ArgumentException("Version cannot be null or empty", nameof(updateRequest.Version));
Installers\NuGet\NuGetManagedTemplatePackage.cs (5)
34throw new ArgumentException($"{nameof(mountPointUri)} cannot be null or empty", nameof(mountPointUri)); 38throw new ArgumentException($"{nameof(packageIdentifier)} cannot be null or empty", nameof(packageIdentifier)); 64throw new ArgumentException($"{nameof(mountPointUri)} cannot be null or empty", nameof(mountPointUri)); 75throw new ArgumentException($"{nameof(details)} should contain key {PackageIdKey} with non-empty value", nameof(details)); 80throw new ArgumentException($"{nameof(details)} should contain key {PackageIdKey}", nameof(details));
Settings\ComponentManager.cs (1)
277throw new ArgumentException($"{component.GetType().Name} should be assignable from {type.Name} type", nameof(type));
Settings\TemplateInfo.cs (6)
26throw new ArgumentException($"'{nameof(identity)}' cannot be null or whitespace.", nameof(identity)); 31throw new ArgumentException($"'{nameof(name)}' cannot be null or whitespace.", nameof(name)); 40throw new ArgumentException($"'{nameof(shortNames)}' should contain at least one entry.", nameof(shortNames)); 44throw new ArgumentException($"'{nameof(shortNames)}' should not contain empty values.", nameof(shortNames)); 49throw new ArgumentException($"'{nameof(mountPointUri)}' cannot be null or whitespace.", nameof(mountPointUri)); 54throw new ArgumentException($"'{nameof(configPlace)}' cannot be null or whitespace.", nameof(configPlace));
Settings\TemplateInfoReader.cs (6)
19string identity = entry.ToString(nameof(Identity)) ?? throw new ArgumentException($"{nameof(entry)} doesn't have {nameof(Identity)} property.", nameof(entry)); 20string name = entry.ToString(nameof(Name)) ?? throw new ArgumentException($"{nameof(entry)} doesn't have {nameof(Name)} property.", nameof(entry)); 21string mountPointUri = entry.ToString(nameof(MountPointUri)) ?? throw new ArgumentException($"{nameof(entry)} doesn't have {nameof(MountPointUri)} property.", nameof(entry)); 22string configPlace = entry.ToString(nameof(ConfigPlace)) ?? throw new ArgumentException($"{nameof(entry)} doesn't have {nameof(ConfigPlace)} property.", nameof(entry)); 129throw new ArgumentException($"{nameof(entry)} has {nameof(info.Constraints)} property which item doesn't have {nameof(TemplateConstraintInfo.Type)}.", nameof(entry)); 148throw new ArgumentException($"{nameof(ITemplateParameter.Name)} property should not be null or whitespace", nameof(jObject));
Template\TemplateCreationResult.cs (2)
31throw new ArgumentException($"'{nameof(templateName)}' cannot be null or whitespace.", nameof(templateName)); 38throw new ArgumentException($"{nameof(localizedErrorMessage)} cannot be null or empty when {nameof(status)} is not {CreationResultStatus.Success}", nameof(localizedErrorMessage));
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (29)
BindSymbolEvaluator.cs (1)
144throw new ArgumentException($"'{nameof(configuredBinding)}' cannot be null or whitespace.", nameof(configuredBinding));
ConfigModel\BaseSymbol.cs (1)
12throw new ArgumentException($"'{nameof(name)}' cannot be null or whitespace.", nameof(name));
ConfigModel\BindSymbol.cs (1)
20throw new ArgumentException($"'{nameof(binding)}' cannot be null or whitespace.", nameof(binding));
ConfigModel\ComputedSymbol.cs (1)
20throw new ArgumentException($"'{nameof(value)}' cannot be null or whitespace.", nameof(value));
ConfigModel\DerivedSymbol.cs (2)
20throw new ArgumentException($"'{nameof(valueTransform)}' cannot be null or whitespace.", nameof(valueTransform)); 25throw new ArgumentException($"'{nameof(valueSource)}' cannot be null or whitespace.", nameof(valueSource));
ConfigModel\GeneratedSymbol.cs (1)
21throw new ArgumentException($"'{nameof(generator)}' cannot be null or whitespace.", nameof(generator));
ConfigModel\PrimaryOutputModel.cs (1)
19throw new System.ArgumentException($"'{nameof(path)}' cannot be null or whitespace.", nameof(path));
ConfigModel\TemplateConfigModel.cs (2)
40throw new ArgumentException($"'{nameof(identity)}' cannot be null or whitespace.", nameof(identity)); 424throw new ArgumentException($"'{nameof(content)}' cannot be null or whitespace.", nameof(content));
Macros\BaseMacroConfig.cs (2)
21throw new ArgumentException($"'{nameof(type)}' cannot be null or whitespace.", nameof(type)); 26throw new ArgumentException($"'{nameof(variableName)}' cannot be null or whitespace.", nameof(variableName));
Macros\CaseChangeMacroConfig.cs (1)
15throw new System.ArgumentException($"'{nameof(sourceVariable)}' cannot be null or whitespace.", nameof(sourceVariable));
Macros\CoalesceMacroConfig.cs (2)
21throw new ArgumentException($"'{nameof(sourceVariableName)}' cannot be null or whitespace.", nameof(sourceVariableName)); 26throw new ArgumentException($"'{nameof(fallbackVariableName)}' cannot be null or whitespace.", nameof(fallbackVariableName));
Macros\EvaluateMacroConfig.cs (1)
18throw new ArgumentException($"'{nameof(condition)}' cannot be null or whitespace.", nameof(condition));
Macros\GeneratePortNumberConfig.cs (3)
49throw new ArgumentException($"{nameof(low)} should be greater than {LowPortDefault}.", nameof(low)); 54throw new ArgumentException($"{nameof(high)} should be less than {HighPortDefault}.", nameof(high)); 59throw new ArgumentException($"{nameof(low)} should be greater than {nameof(high)}.", nameof(low));
Macros\ProcessValueFormMacroConfig.cs (2)
18throw new ArgumentException($"'{nameof(sourceSymbol)}' cannot be null or whitespace.", nameof(sourceSymbol)); 23throw new ArgumentException($"'{nameof(valueForm)}' cannot be null or whitespace.", nameof(valueForm));
Macros\RegexMacroConfig.cs (1)
21throw new ArgumentException($"'{nameof(sourceVariable)}' cannot be null or whitespace.", nameof(sourceVariable));
Macros\RegexMatchMacroConfig.cs (2)
15throw new ArgumentException($"'{nameof(sourceVariable)}' cannot be null or whitespace.", nameof(sourceVariable)); 20throw new ArgumentException($"'{nameof(pattern)}' cannot be null or empty.", nameof(pattern));
Parameter.cs (1)
16throw new ArgumentException($"{nameof(Name)} property should not be null or whitespace", nameof(name));
PrimaryOutput.cs (1)
16throw new System.ArgumentException($"'{nameof(path)}' cannot be null or whitespace.", nameof(path));
Validation\ValidationManager.cs (2)
24throw new ArgumentException($"{nameof(scope)} cannot be '{ValidationScope.None}'.", nameof(scope)); 28throw new ArgumentException($"{nameof(scope)} should be one of {string.Join(", ", Enum.GetNames(typeof(ValidationScope)).Skip(1))}.", nameof(scope));
ValueForms\BaseValueFormFactory.cs (1)
18throw new ArgumentException($"'{nameof(identifier)}' cannot be null or whitespace.", nameof(identifier));
Microsoft.TemplateEngine.Utils (1)
InstallRequestPathResolution.cs (1)
30throw new ArgumentException($"'{nameof(maskedPath)}' cannot be null or whitespace.", nameof(maskedPath));
Microsoft.TemplateSearch.Common (16)
Abstractions\TemplatePackageSearchData.cs (1)
27: throw new ArgumentException($"{nameof(packInfo.Name)} should not be null or empty", nameof(packInfo));
SearchResult.cs (2)
22throw new ArgumentException($"{nameof(errorMessage)} cannot be empty when {nameof(success)} is false", nameof(errorMessage)); 26throw new ArgumentException($"{nameof(hits)} cannot be null when {nameof(success)} is true", nameof(hits));
TemplateDiscoveryMetadata\BlobStorageTemplateInfo.cs (11)
25throw new ArgumentException($"'{nameof(templateInfo.Identity)}' cannot be null or whitespace.", nameof(templateInfo)); 30throw new ArgumentException($"'{nameof(templateInfo.Name)}' cannot be null or whitespace.", nameof(templateInfo)); 35throw new ArgumentException($"'{nameof(templateInfo.ShortNameList)}' should have at least one entry", nameof(templateInfo)); 58throw new ArgumentException($"'{nameof(identity)}' cannot be null or whitespace.", nameof(identity)); 63throw new ArgumentException($"'{nameof(name)}' cannot be null or whitespace.", nameof(name)); 68throw new ArgumentException($"'{nameof(shortNameList)}' should have at least one entry", nameof(shortNameList)); 151?? throw new ArgumentException($"{nameof(entry)} doesn't have {nameof(Identity)} property.", nameof(entry)); 153?? throw new ArgumentException($"{nameof(entry)} doesn't have {nameof(Name)} property.", nameof(entry)); 157?? throw new ArgumentException($"{nameof(entry)} doesn't have {nameof(ShortNameList)} property.", nameof(entry)); 326throw new ArgumentException($"{nameof(Name)} property should not be null or whitespace", nameof(parameter)); 355throw new ArgumentException($"{nameof(Name)} property should not be null or whitespace", nameof(jObject));
TemplateSearchCache\TemplatePackageSearchData.Json.cs (2)
30: throw new ArgumentException($"{nameof(jObject)} doesn't have {nameof(Name)} property or it is not a string.", nameof(jObject)); 40?? throw new ArgumentException($"{nameof(jObject)} doesn't have {nameof(Templates)} property or it is not an array.", nameof(jObject));
Microsoft.TestPlatform.CoreUtilities (7)
Output\OutputExtensions.cs (1)
105throw new ArgumentException(Resources.CannotBeNullOrEmpty, nameof(format));
Utilities\JobQueue.cs (1)
106throw new ArgumentException(Resources.CannotBeNullOrEmpty, nameof(displayName));
ValidateArg.cs (5)
128throw new ArgumentException(message, parameterName); 147throw new ArgumentException(message, parameterName); 185throw new ArgumentException(message, parameterName); 203throw new ArgumentException(message, parameterName); 223throw new ArgumentException(message, parameterName);
Microsoft.TestPlatform.CrossPlatEngine (1)
TestEngine.cs (1)
513throw new ArgumentException(null, nameof(testRuntimeProviders));
Microsoft.TestPlatform.Extensions.BlameDataCollector (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (3)
30throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 124throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 150throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable));
Microsoft.TestPlatform.PlatformAbstractions (1)
common\Tracing\RollingFileTraceListener.cs (1)
36throw new ArgumentException("fileName was null or whitespace", nameof(fileName));
Microsoft.VisualStudio.TestPlatform.Common (5)
Interfaces\Engine\IDataCollectorAttachmentsProcessorsFactory.cs (1)
44? throw new ArgumentException($"'{nameof(friendlyName)}' cannot be null or empty.", nameof(friendlyName))
Logging\TestSessionMessageLogger.cs (1)
69throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, nameof(message));
RunSettings.cs (2)
61throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, nameof(settingsName)); 79throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, settings);
SettingsProvider\SettingsProviderExtensionManager.cs (1)
173throw new ArgumentException(ObjectModelCommonResources.CannotBeNullOrEmpty, nameof(settingsName));
Microsoft.VisualStudio.TestPlatform.Extensions.Html.TestLogger (1)
HtmlLogger.cs (1)
145throw new ArgumentException("No default parameters added", nameof(parameters));
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
TrxLogger.cs (1)
145throw new ArgumentException("No default parameters added", nameof(parameters));
Microsoft.VisualStudio.TestPlatform.ObjectModel (3)
DataCollector\Common\RequestId.cs (1)
136? throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Resources.Common_ObjectMustBeOfType, [typeof(RequestId).Name]), nameof(obj))
Nuget.Frameworks\FallbackFramework.cs (1)
36throw new ArgumentException("Empty fallbackFrameworks is invalid", nameof(fallbackFrameworks));
Nuget.Frameworks\NuGetFrameworkFactory.cs (1)
75if (string.IsNullOrEmpty(targetFrameworkMoniker)) throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(targetFrameworkMoniker));
Microsoft.Web.Xdt.Extensions (3)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
49throw new ArgumentException("Must not be null or empty", paramName);
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
39throw new ArgumentException("The value cannot be an empty string.", paramName); 68throw new ArgumentException("The value cannot be an empty or whitespace string.", paramName);
Microsoft.Win32.Registry (10)
Microsoft\Win32\Registry.cs (1)
64throw new ArgumentException(SR.Arg_RegInvalidKeyName, nameof(keyName));
Microsoft\Win32\RegistryKey.cs (8)
981throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 1239throw new ArgumentException(SR.Arg_RegValStrLenBug, nameof(name)); 1244throw new ArgumentException(SR.Arg_RegBadKeyKind, nameof(valueKind)); 1517throw new ArgumentException(SR.Arg_RegKeyStrLenBug, nameof(name)); 1525throw new ArgumentException(SR.Arg_RegKeyStrLenBug, nameof(name)); 1533throw new ArgumentException(SR.Argument_InvalidRegistryKeyPermissionCheck, nameof(mode)); 1541throw new ArgumentException(SR.Argument_InvalidRegistryOptionsCheck, nameof(options)); 1549throw new ArgumentException(SR.Argument_InvalidRegistryViewCheck, nameof(view));
System\Security\AccessControl\RegistrySecurity.cs (1)
109exception = new ArgumentException(SR.Arg_RegInvalidKeyName, nameof(name));
Mono.Cecil (1)
Mono\Empty.cs (1)
24 : base ("Argument null or empty", paramName)
NuGet.Build.Tasks (5)
BuildTasksUtility.cs (5)
375throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(projectDirectory)); 380throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(projectName)); 708throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(projectFullPath)); 725throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(projectDirectory)); 730throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(projectName));
NuGet.CommandLine.XPlat (2)
Commands\Package\Update\PackageUpdateCommandRunner.cs (1)
470throw new ArgumentException(Strings.ArgumentNullOrEmpty, nameof(packages));
Commands\Package\Update\PackageUpdateIO.cs (1)
350throw new ArgumentException("The allowedSources list must contain at least one source if specified.", nameof(allowedSources));
NuGet.Commands (10)
RestoreCommand\Utility\PackageSpecFactory.cs (4)
407throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(projectDirectory)); 412throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(projectName)); 431throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(projectDirectory)); 436throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(projectName));
TrustedSignersCommand\TrustedSignerActionsProvider.cs (6)
48throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(name)); 90throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(name)); 169throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(name)); 174throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(fingerprint)); 224throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(name)); 271throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(serviceIndex));
NuGet.Common (19)
CryptoHashProvider.cs (1)
53throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Strings.UnsupportedHashAlgorithm, hashAlgorithm), nameof(hashAlgorithm));
CryptoHashUtility.cs (5)
203throw new ArgumentException( 252throw new ArgumentException( 273throw new ArgumentException( 306throw new ArgumentException( 327throw new ArgumentException(
PathUtil\FileUtility.cs (2)
98throw new ArgumentException(paramName: destFilePath, message: "Path.GetDirectoryName(destFilePath) returned null"); 136throw new ArgumentException(paramName: destFilePath, message: "Path.GetDirectoryName(destFilePath) returned null");
PathUtil\PathResolver.cs (1)
184throw new ArgumentException(paramName: nameof(searchPath), message: "Path.GetDirectoryName(searchPath) returned null");
PathUtil\PathUtility.cs (5)
177throw new ArgumentException(paramName: filePath, message: "Path.GetDirectoryName(filePath) returned null"); 200throw new ArgumentException("Path must have a value", nameof(path1)); 205throw new ArgumentException("Path must have a value", nameof(path2)); 302throw new ArgumentException(paramName: nameof(path), message: "Path.GetDirectoryName(path) returned null"); 385throw new ArgumentException(paramName: nameof(path), message: "Path.GetPathRoot(path) returned null");
PathUtil\ProjectJsonPathUtilities.cs (4)
35throw new ArgumentException(Strings.ArgumentNullOrEmpty, nameof(projectName)); 57throw new ArgumentException(Strings.ArgumentNullOrEmpty, nameof(projectName)); 70throw new ArgumentException(Strings.ArgumentNullOrEmpty, nameof(projectName)); 89throw new ArgumentException(paramName: nameof(configFilePath), message: "Couldn't calculate directory path");
Telemetry\TelemetryActivity.cs (1)
40throw new ArgumentException(paramName: nameof(telemetryEvent), message: "Property 'Name' must not be null");
NuGet.Configuration (48)
ClientCertificate\ClientCertificateProvider.cs (1)
38throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(items));
PackageSource\MinPublishAgeExceptions.cs (1)
41throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(items));
PackageSource\PackageSourceProvider.cs (7)
219throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(exceptions)); 510throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(name)); 555throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(source)); 575throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(name)); 635throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(name)); 680throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(name)); 1140throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(name));
PackageSourceMapping\PackageSourceMappingProvider.cs (1)
51throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(packageSourceMappingSourceItems));
PackageSourceMapping\SearchTree.cs (3)
38throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Empty_Or_WhiteSpaceOnly, nameof(packagePattern)); 109throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Empty_Or_WhiteSpaceOnly, nameof(term)); 153throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Empty_Or_WhiteSpaceOnly, nameof(term));
Settings\Items\AddItem.cs (1)
54throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(key));
Settings\Items\CertificateItem.cs (1)
66throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(fingerprint));
Settings\Items\ClientCertItem.cs (1)
19throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(packageSource));
Settings\Items\CredentialsItem.cs (4)
48throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(password)); 111throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(name)); 116throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(username)); 121throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(password));
Settings\Items\FileClientCertItem.cs (2)
36throw new ArgumentException(message: Resources.Argument_Cannot_Be_Null_Empty_Or_WhiteSpaceOnly, paramName: nameof(settingsFilePath)); 46throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(filePath));
Settings\Items\MinPublishAgeExceptionItem.cs (1)
31throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Empty_Or_WhiteSpaceOnly, nameof(value));
Settings\Items\OwnersItem.cs (1)
30throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(owners));
Settings\Items\PackagePatternItem.cs (1)
28throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(pattern));
Settings\Items\PackageSourceMappingSourceItem.cs (1)
57throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(name));
Settings\Items\StoreClientCertItem.cs (1)
66throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(findValue));
Settings\Items\TrustedSignerItem.cs (1)
35throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(name));
Settings\Items\UnknownItem.cs (1)
45throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(name));
Settings\NuGetConfiguration.cs (3)
76throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(sectionName)); 101throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(sectionName)); 124throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(sectionName));
Settings\SettingElement.cs (2)
145throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(attributeName)); 174throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(attributeName));
Settings\Settings.cs (4)
62throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(sectionName)); 96throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(sectionName)); 168throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(sectionName)); 380throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(configFileName));
Settings\SettingsFile.cs (3)
93throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(directoryPath)); 98throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(fileName)); 103throw new ArgumentException(Resources.Settings_FileName_Cannot_Be_A_Path, nameof(fileName));
Settings\SettingsLoadingContext.cs (1)
62throw new ArgumentException("SettingsLoadingContext requires a rooted path", nameof(filePath));
Settings\SettingText.cs (2)
20throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(value)); 32throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(value));
Utility\SettingsUtility.cs (4)
133throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(section)); 138throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(key)); 169throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(section)); 174throw new ArgumentException(Resources.Argument_Cannot_Be_Null_Or_Empty, nameof(key));
NuGet.Frameworks (3)
AssetTargetFallbackFramework.cs (1)
40throw new ArgumentException("Empty fallbackFrameworks is invalid", nameof(fallbackFrameworks));
FallbackFramework.cs (1)
36throw new ArgumentException("Empty fallbackFrameworks is invalid", nameof(fallbackFrameworks));
NuGetFrameworkFactory.cs (1)
72if (string.IsNullOrEmpty(targetFrameworkMoniker)) throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(targetFrameworkMoniker));
NuGet.PackageManagement (19)
BuildIntegration\BuildIntegratedProjectAction.cs (1)
135throw new ArgumentException("Must contain at least 1 element.", nameof(originalActionsAndInstallationContexts));
FileModifiers\FileTransformExtensions.cs (2)
20throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(installExtension)); 25throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(uninstallExtension));
IDE\PackageRestoreContext.cs (1)
80throw new ArgumentException(Strings.ParameterCannotBeZeroOrNegative, nameof(maxNumberOfParallelTasks));
NuGetPackageManager.cs (7)
1520throw new ArgumentException( 1529throw new ArgumentException( 1768throw new ArgumentException( 1775throw new ArgumentException( 2162throw new ArgumentException( 2195throw new ArgumentException( 2965throw new ArgumentException(
Projects\FolderNuGetProject.cs (1)
137throw new ArgumentException(Strings.PackageStreamShouldBeSeekable, nameof(downloadResourceResult));
Resolution\GatherCacheResult.cs (1)
28throw new ArgumentException("Values in packages must not be null", nameof(packages));
Utility\FileSystemUtility.cs (5)
129throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(fullPath)); 144throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(fullPath)); 157throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(fullPath)); 323throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(path)); 354throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(path));
Utility\PackagesFolderPathUtility.cs (1)
40throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(solutionDirectory));
NuGet.Packaging (54)
Core\PackageDependency.cs (1)
67throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id));
Core\PackageType.cs (1)
28throw new ArgumentException(Strings.StringCannotBeNullOrEmpty, nameof(name));
PackageArchiveReader.cs (2)
163throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(path)); 186throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(nupkgFilePath));
PackageCreation\Authoring\FrameworkAssemblyReference.cs (1)
16throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(assemblyName));
PackageExtraction\PackagePathHelper.cs (1)
113throw new ArgumentException(
PackagePathResolver.cs (2)
32throw new ArgumentException( 38throw new ArgumentException(
Rules\UpholdBuildConventionRule.cs (2)
159throw new ArgumentException("Path must end with directory separator", nameof(filePath)); 164throw new ArgumentException("Extension must include period character", nameof(extension));
Signing\Archive\ReadOnlyBufferedStream.cs (2)
103throw new ArgumentException(Strings.StreamMustBeReadable, nameof(stream)); 108throw new ArgumentException(Strings.StreamMustBeSeekable, nameof(stream));
Signing\Archive\SignedPackageArchiveIOUtility.cs (2)
131throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(bytes)); 207throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(bytes));
Signing\Archive\SignedPackageArchiveUtility.cs (1)
450throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(reader));
Signing\Authoring\RepositorySignPackageRequest.cs (3)
67throw new ArgumentException(Strings.InvalidUrl, nameof(v3ServiceIndexUrl)); 72throw new ArgumentException(Strings.InvalidUrl, nameof(v3ServiceIndexUrl)); 79throw new ArgumentException(Strings.NuGetPackageOwnersInvalidValue, nameof(packageOwners));
Signing\Authoring\SigningOptions.cs (2)
119throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(inputPackageFilePath)); 124throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(outputPackageFilePath));
Signing\Authoring\SignPackageRequest.cs (2)
69throw new ArgumentException(Strings.InvalidArgument, nameof(signatureHashAlgorithm)); 75throw new ArgumentException(Strings.InvalidArgument, nameof(timestampHashAlgorithm));
Signing\Content\KeyPairFileWriter.cs (2)
62throw new ArgumentException(null, nameof(key)); 67throw new ArgumentException(null, nameof(value));
Signing\Content\SignatureContent.cs (1)
40throw new ArgumentException(Strings.StringCannotBeNullOrEmpty, nameof(hashValue));
Signing\Signatures\NuGetPackageOwners.cs (2)
25throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageOwners)); 30throw new ArgumentException(Strings.NuGetPackageOwnersInvalidValue, nameof(packageOwners));
Signing\Signatures\NuGetV3ServiceIndexUrl.cs (2)
27throw new ArgumentException(Strings.InvalidUrl, nameof(v3ServiceIndexUrl)); 32throw new ArgumentException(Strings.InvalidUrl, nameof(v3ServiceIndexUrl));
Signing\Signatures\Signature.cs (1)
350throw new ArgumentException(
Signing\Timestamp\Rfc3161TimestampRequestNetstandard21Wrapper.cs (2)
46throw new ArgumentException( 52throw new ArgumentException(
Signing\TrustedSigners\TrustedSignersProvider.cs (1)
37throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(trustedSigners));
Signing\TrustStore\FallbackCertificateBundleX509ChainFactory.cs (1)
41_ => throw new ArgumentException(Strings.InvalidX509StorePurpose, nameof(storePurpose))
Signing\TrustStore\X509TrustStore.cs (1)
90throw new ArgumentException(Strings.InvalidX509StorePurpose, nameof(storePurpose));
Signing\Utility\AttributeUtility.cs (6)
87throw new ArgumentException(Strings.InvalidUrl, nameof(v3ServiceIndexUrl)); 92throw new ArgumentException(Strings.InvalidUrl, nameof(v3ServiceIndexUrl)); 157throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageOwners)); 162throw new ArgumentException(Strings.NuGetPackageOwnersInvalidValue, nameof(packageOwners)); 326throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(oid)); 362throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(oid));
Signing\Utility\CertificateChainUtility.cs (1)
82throw new ArgumentException(Strings.InvalidArgument, nameof(certificateType));
Signing\Utility\SignatureUtility.cs (2)
80throw new ArgumentException(Strings.UnrelatedSignatures, nameof(repositoryCountersignature)); 213throw new ArgumentException(Strings.UnrelatedSignatures, nameof(repositoryCountersignature));
Signing\Utility\SigningUtility.cs (2)
67throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(chainList)); 97throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(chainList));
Signing\Verification\CertificateHashAllowListEntry.cs (3)
22throw new ArgumentException( 32throw new ArgumentException( 43throw new ArgumentException(
Signing\Verification\SignedPackageVerifierSettings.cs (5)
92throw new ArgumentException( 102throw new ArgumentException( 112throw new ArgumentException( 123throw new ArgumentException( 137throw new ArgumentException(
NuGet.ProjectModel (2)
DependencyGraphSpec.cs (1)
148throw new ArgumentException(Strings.ArgumentNullOrEmpty, nameof(projectUniqueName));
src\nuget-client\build\Shared\Utf8JsonStreamReader.cs (1)
53throw new ArgumentException($"Buffer size must be at least {MinBufferSize} bytes", nameof(bufferSize));
NuGet.Protocol (107)
DownloadResourceResult.cs (1)
32throw new ArgumentException("A stream should be provided when the result is available.",
LegacyFeed\V2FeedParser.cs (1)
157throw new ArgumentException(Strings.Argument_Cannot_Be_Null_Or_Empty, nameof(id));
LocalPackageArchiveDownloader.cs (3)
97throw new ArgumentException( 163throw new ArgumentException( 234throw new ArgumentException(
LocalRepositories\LocalV2FindPackageByIdResource.cs (4)
80throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 143throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 223throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 365throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id));
LocalRepositories\LocalV3FindPackageByIdResource.cs (4)
116throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 177throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 269throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 407throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id));
Plugins\InboundRequestContext.cs (1)
74throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(requestId));
Plugins\JsonSerializationUtilities.cs (1)
61throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(json));
Plugins\Logging\PluginLogger.cs (1)
128throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(message));
Plugins\Logging\PluginLogMessage.cs (1)
23throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(type));
Plugins\Messages\CopyFilesInPackageRequest.cs (5)
74throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository)); 79throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageId)); 84throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageVersion)); 89throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(filesInPackage)); 94throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(destinationFolderPath));
Plugins\Messages\CopyFilesInPackageResponse.cs (2)
43throw new ArgumentException( 53throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(copiedFiles));
Plugins\Messages\CopyNupkgFileRequest.cs (4)
62throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository)); 67throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageId)); 72throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageVersion)); 77throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(destinationFilePath));
Plugins\Messages\CopyNupkgFileResponse.cs (1)
32throw new ArgumentException(
Plugins\Messages\Fault.cs (1)
31throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(message));
Plugins\Messages\GetCredentialsRequest.cs (2)
38throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository)); 43throw new ArgumentException(
Plugins\Messages\GetCredentialsResponse.cs (1)
50throw new ArgumentException(
Plugins\Messages\GetFilesInPackageRequest.cs (3)
52throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository)); 57throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageId)); 62throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageVersion));
Plugins\Messages\GetFilesInPackageResponse.cs (2)
43throw new ArgumentException( 53throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(files));
Plugins\Messages\GetOperationClaimsResponse.cs (1)
42throw new ArgumentException(
Plugins\Messages\GetPackageHashRequest.cs (4)
62throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository)); 67throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageId)); 72throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageVersion)); 77throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(hashAlgorithm));
Plugins\Messages\GetPackageHashResponse.cs (2)
40throw new ArgumentException( 50throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(hash));
Plugins\Messages\GetPackageVersionsRequest.cs (2)
42throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository)); 47throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageId));
Plugins\Messages\GetPackageVersionsResponse.cs (2)
43throw new ArgumentException( 53throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(versions));
Plugins\Messages\GetServiceIndexRequest.cs (1)
29throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository));
Plugins\Messages\GetServiceIndexResponse.cs (1)
55throw new ArgumentException(
Plugins\Messages\HandshakeResponse.cs (3)
56throw new ArgumentException( 68throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(protocolVersion)); 73throw new ArgumentException(
Plugins\Messages\InitializeRequest.cs (2)
50throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(clientVersion)); 55throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(culture));
Plugins\Messages\InitializeResponse.cs (1)
32throw new ArgumentException(
Plugins\Messages\LogRequest.cs (2)
42throw new ArgumentException( 52throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(message));
Plugins\Messages\LogResponse.cs (1)
32throw new ArgumentException(
Plugins\Messages\Message.cs (3)
70throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(requestId)); 75throw new ArgumentException( 85throw new ArgumentException(
Plugins\Messages\MonitorNuGetProcessExitResponse.cs (1)
32throw new ArgumentException(
Plugins\Messages\PrefetchPackageRequest.cs (3)
52throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository)); 57throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageId)); 62throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageVersion));
Plugins\Messages\PrefetchPackageResponse.cs (1)
32throw new ArgumentException(
Plugins\Messages\Progress.cs (1)
28throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(percentage));
Plugins\Messages\SetCredentialsRequest.cs (1)
57throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository));
Plugins\Messages\SetCredentialsResponse.cs (1)
32throw new ArgumentException(
Plugins\Messages\SetLogLevelRequest.cs (1)
33throw new ArgumentException(
Plugins\Messages\SetLogLevelResponse.cs (1)
32throw new ArgumentException(
Plugins\MessageUtilities.cs (2)
34throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(requestId)); 61throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(requestId));
Plugins\Plugin.cs (1)
92throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(filePath));
Plugins\PluginCreationResult.cs (1)
93throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(message));
Plugins\PluginFactory.cs (1)
136throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(pluginFile.Path));
Plugins\PluginFile.cs (1)
38throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(filePath));
Plugins\PluginMulticlientUtilities.cs (1)
46throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(key));
Plugins\PluginPackageDownloader.cs (3)
103throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository)); 148throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(destinationFilePath)); 189throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(hashAlgorithm));
Plugins\PluginPackageReader.cs (4)
63throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(packageSourceRepository)); 101throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(path)); 251throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(destination)); 920throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(nupkgFilePath));
Plugins\RequestHandlers\SymmetricHandshake.cs (1)
87throw new ArgumentException(Strings.Plugin_HandshakeRequestHandlerAlreadyExists, nameof(connection));
RemotePackageArchiveDownloader.cs (2)
163throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(destinationFilePath)); 229throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(hashAlgorithm));
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (5)
74throw new ArgumentException(Strings.OneOrMoreUrisMustBeSpecified, nameof(baseUris)); 117throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 177throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 259throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 389throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id));
RemoteRepositories\PluginFindPackageByIdResource.cs (3)
178throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 245throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 340throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id));
RemoteRepositories\RemoteV2FindPackageByIdResource.cs (4)
103throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 163throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 243throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 388throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id));
RemoteRepositories\RemoteV3FindPackageByIdResource.cs (4)
94throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 154throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 233throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id)); 378throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id));
Resources\RegistrationResourceV3.cs (1)
70throw new ArgumentException(Strings.ArgumentCannotBeNullOrEmpty, nameof(id));
NuGet.Versioning (4)
NuGetVersionFactory.cs (2)
27throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Argument_Cannot_Be_Null_Or_Empty, value), nameof(value)); 32throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Invalidvalue, value), nameof(value));
ResourcesFormatter.cs (1)
17return new ArgumentException(
SemanticVersionFactory.cs (1)
22throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Invalidvalue, value), nameof(value));
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\wpf\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)); 625throw 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)
372throw new ArgumentException(SR.GetResourceString(srid), nameof(dp)); 423throw 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\wpf\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)); 347throw new ArgumentException(SR.ParameterMustBeLogicalNode, nameof(element)); 382throw 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)
171throw 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 (31)
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
383throw new ArgumentException(e.Message, paramName);
src\roslyn\src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
353throw new ArgumentException("Destination is too short", "destination");
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ConcurrentDictionaryExtensions.cs (1)
24throw new ArgumentException("adding a duplicate", nameof(key));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (2)
475throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 489throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
src\roslyn\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\roslyn\src\Dependencies\Collections\Segmented\SegmentedArray`1.cs (1)
315throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\Extensions\INamedTypeSymbolExtensions.cs (1)
45throw new ArgumentException($"The type {nameof(parentType)} is not a definition; it is a constructed type", nameof(parentType));
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\WordParser.cs (1)
103throw new ArgumentException($"'{(int)options}' is invalid for enum type '{nameof(WordParserOptions)}'", nameof(options));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (3)
49throw new ArgumentException("Offset cannot be negative", nameof(offset)); 52throw new ArgumentException("Width must be greater than zero.", nameof(width)); 82throw new ArgumentException("Token start must be non-negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualCharSequence.cs (1)
132throw new ArgumentException("tokenStart cannot be negative", nameof(tokenStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
21throw new ArgumentException(CompilerExtensionsResources.Absolute_path_expected, argumentName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (1)
152: new ArgumentException(CompilerExtensionsResources.Specified_sequence_has_duplicate_items, argumentName);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
165throw new ArgumentException( 183throw new ArgumentException( 204throw new ArgumentException( 222throw new ArgumentException(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationContext.cs (1)
172throw new ArgumentException(WorkspaceExtensionsResources.Location_must_be_null_or_from_source, name);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationSymbolFactory.cs (1)
208throw new ArgumentException(message, nameof(parameters));
src\roslyn\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.CSharp.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
334throw new ArgumentException(CSharpCompilerExtensionsResources.Expected_string_or_char_literal, nameof(token));
src\roslyn\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));
rzc (5)
CommandLine\CommandOption.cs (2)
42throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 48throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
ConcurrentLruCache.cs (1)
178throw new ArgumentException("Key already exists", nameof(key));
Json\ThrowHelper.cs (2)
26=> throw new ArgumentException(message, paramName); 48=> throw new ArgumentException(message, paramName);
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);
Stress.ApiService (1)
LargeTelemetryGenerator.cs (1)
44throw new ArgumentException(validationError, nameof(options));
System.CodeDom (23)
Microsoft\CSharp\CSharpCodeGenerator.cs (5)
611throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 748throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e)); 912throw new ArgumentException(SR.Format(SR.Argument_NullComment, nameof(e)), nameof(e)); 1232throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 2681throw new ArgumentException(SR.Format(SR.InvalidIdentifier, value), nameof(value));
src\runtime\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)
62throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 97throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 458throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 644throw new ArgumentException(SR.Format(SR.ArityDoesntMatch, baseType, e.TypeArguments.Count), nameof(e)); 653throw new ArgumentException(message, nameof(e)); 662throw new ArgumentException(message, nameof(e)); 771throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 941throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e)); 948throw new ArgumentException(SR.Format(SR.InvalidPathCharsInChecksum, e.FileName), nameof(e)); 954throw new ArgumentException(SR.Format(SR.InvalidRegion, e.RegionText), nameof(e));
System.Collections (63)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (4)
16throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 21throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 58throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 70throw 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)); 1243throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 1251throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 1286throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1291throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 1311throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1321throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1331throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 1360throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value)); 1511throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array)); 1529throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1534throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 1554throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1564throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1700throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array)); 1838throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1843throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 1863throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1873throw 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)); 1512throw 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 (10)
System\Collections\Concurrent\BlockingCollection.cs (9)
994throw new ArgumentException(SR.BlockingCollection_CantAddAnyWhenCompleted, nameof(collections)); //case#4 1379throw new ArgumentException(SR.BlockingCollection_CantTakeAnyWhenAllDone, nameof(collections)); 1579throw new ArgumentException(SR.Collection_CopyTo_TooManyElems, nameof(index)); 1583throw new ArgumentException(SR.BlockingCollection_CopyTo_MultiDim, nameof(array)); 1587throw new ArgumentException(SR.BlockingCollection_CopyTo_IncorrectType, nameof(array)); 1591throw new ArgumentException(SR.BlockingCollection_CopyTo_IncorrectType, nameof(array)); 1660throw new ArgumentException( 1675throw new ArgumentException( 1685throw new ArgumentException(
System\Collections\Concurrent\ConcurrentBag.cs (1)
291throw new ArgumentException(SR.Collection_CopyTo_TooManyElems, nameof(index));
System.Collections.Immutable (15)
System\Collections\Frozen\FrozenDictionary.cs (5)
407throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 412throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 422throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array)); 443throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 455throw 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.CommandLine (2)
Parsing\ParseError.cs (1)
17throw new ArgumentException("Value cannot be null or whitespace.", nameof(message));
Symbol.cs (1)
95throw new ArgumentException($"Names and aliases cannot contain whitespace: \"{value}\"", paramName);
System.ComponentModel.Annotations (6)
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
184throw new ArgumentException(SR.Format(SR.AttributeStore_Unknown_Property, _type.Name, propertyName),
System\ComponentModel\DataAnnotations\Validator.cs (5)
142throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 286throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 457throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 597throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 989throw 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)
2787throw 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\runtime\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)
262throw 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\runtime\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\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
57ArgumentException e = new ArgumentException(error, parameter);
System.Data.OleDb (1)
System\Data\Common\AdapterUtil.cs (1)
78ArgumentException e = new ArgumentException(error, parameter);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\InstrumentAdvice.cs (1)
47throw new ArgumentException(SR.InvalidHistogramExplicitBucketBoundaries, nameof(value));
System.Diagnostics.EventLog (1)
System\Diagnostics\EventLog.cs (1)
366throw new ArgumentException(SR.Format(SR.InvalidParameterFormat, nameof(machineName)), nameof(machineName));
System.Diagnostics.PerformanceCounter (25)
System\Diagnostics\PerformanceCounter.cs (1)
296throw new ArgumentException(SR.Format(SR.InvalidProperty, nameof(MachineName), value), nameof(value));
System\Diagnostics\PerformanceCounterCategory.cs (11)
49throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(categoryName), categoryName), nameof(categoryName)); 52throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName)); 74throw new ArgumentException(SR.Format(SR.InvalidProperty, nameof(CategoryName), value), nameof(value)); 132throw new ArgumentException(SR.Format(SR.InvalidProperty, nameof(MachineName), value), nameof(value)); 168throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(categoryName), categoryName), nameof(categoryName)); 171throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName)); 411throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(categoryName), categoryName), nameof(categoryName)); 414throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName)); 488throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName)); 542throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(categoryName), categoryName), nameof(categoryName)); 545throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(machineName), machineName), nameof(machineName));
System\Diagnostics\PerformanceData\CounterSet.cs (8)
38throw new ArgumentException(SR.Format(SR.Perflib_Argument_InvalidCounterSetInstanceType, instanceType), nameof(instanceType)); 99throw new ArgumentException(SR.Format(SR.Perflib_Argument_InvalidCounterType, counterType), nameof(counterType)); 114throw new ArgumentException(SR.Format(SR.Perflib_Argument_CounterAlreadyExists, counterId, _counterSet), nameof(counterId)); 133throw new ArgumentException(SR.Perflib_Argument_EmptyCounterName, nameof(counterName)); 137throw new ArgumentException(SR.Format(SR.Perflib_Argument_InvalidCounterType, counterType), nameof(counterType)); 156throw new ArgumentException(SR.Format(SR.Perflib_Argument_CounterNameAlreadyExists, counterName, _counterSet), nameof(counterName)); 160throw new ArgumentException(SR.Format(SR.Perflib_Argument_CounterAlreadyExists, counterId, _counterSet), nameof(counterId)); 179throw new ArgumentException(SR.Perflib_Argument_EmptyInstanceName, nameof(instanceName));
System\Diagnostics\PerformanceData\CounterSetInstance.cs (3)
27throw new ArgumentException(SR.Perflib_Argument_EmptyInstanceName, nameof(instanceName)); 52throw new ArgumentException(SR.Format(SR.Perflib_Argument_InstanceAlreadyExists, _instName, _counterSet._counterSet), nameof(instanceName)); 60throw new ArgumentException(SR.Format(SR.Perflib_Argument_InvalidInstance, _counterSet._counterSet), nameof(instanceName));
System\Diagnostics\PerformanceData\CounterSetInstanceCounterDataSet.cs (1)
118throw new ArgumentException(SR.Format(SR.Perflib_Argument_ProviderNotFound, _instance._counterSet._providerGuid), "ProviderGuid");
System\Diagnostics\PerformanceData\PerfProviderCollection.cs (1)
100throw new ArgumentException(SR.Format(SR.Perflib_Argument_CounterSetAlreadyRegister, counterSetGuid), nameof(counterSetGuid));
System.Diagnostics.Process (7)
Microsoft\Win32\SafeHandles\SafeProcessHandle.Unix.cs (1)
312throw new ArgumentException(SR.Argument_InvalidProcessId, nameof(callback));
System\Collections\Specialized\DictionaryWrapper.cs (1)
95throw new ArgumentException(SR.Argument_NullCharInEnvVar, name);
System\Diagnostics\ProcessStartInfo.cs (5)
513throw new ArgumentException(SR.Arg_InvalidHandle, InheritedHandlesParamName(i)); 525throw new ArgumentException(SR.InheritedHandles_OnlySelectedSafeHandlesAreSupported, InheritedHandlesParamName(i)); 533throw new ArgumentException(SR.InheritedHandles_MustNotContainDuplicates, InheritedHandlesParamName(i)); 573throw new ArgumentException(SR.Arg_InvalidHandle, paramName); 603throw new ArgumentException(SR.InheritedHandles_MustNotContainStandardHandles, nameof(InheritedHandles));
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 (218)
System\DirectoryServices\ActiveDirectory\ActiveDirectoryInterSiteTransport.cs (2)
35throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 42throw new ArgumentException(SR.NotADOrADAM, nameof(context));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchema.cs (4)
96throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 225throw new ArgumentException(SR.EmptyStringParameter, nameof(commonName)); 298throw new ArgumentException(SR.EmptyStringParameter, nameof(commonName)); 331throw new ArgumentException(SR.InvalidFlags, nameof(type));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaClass.cs (6)
55throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 63throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 71throw new ArgumentException(SR.EmptyStringParameter, nameof(ldapDisplayName)); 225throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 232throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 240throw new ArgumentException(SR.EmptyStringParameter, nameof(ldapDisplayName));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaClassCollection.cs (8)
72throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, value), nameof(value)); 92throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, schemaClass), nameof(schemaClass)); 104throw new ArgumentException(null, nameof(schemaClasses)); 122throw new ArgumentException(null, nameof(schemaClasses)); 141throw new ArgumentException(null, nameof(schemaClasses)); 170throw new ArgumentException(SR.Format(SR.NotFoundInCollection, schemaClass), nameof(schemaClass)); 188throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, schemaClass), nameof(schemaClass)); 329throw new ArgumentException(null, nameof(value));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaProperty.cs (9)
109throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 117throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 125throw new ArgumentException(SR.EmptyStringParameter, nameof(ldapDisplayName)); 279throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 287throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 295throw new ArgumentException(SR.EmptyStringParameter, nameof(ldapDisplayName)); 503throw new ArgumentException(SR.EmptyStringParameter, nameof(value)); 550throw new ArgumentException(SR.EmptyStringParameter, nameof(value)); 622throw new ArgumentException(SR.EmptyStringParameter, nameof(value));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySchemaPropertyCollection.cs (8)
73throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, value), nameof(value)); 93throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, schemaProperty), nameof(schemaProperty)); 105throw new ArgumentException(null, nameof(properties)); 123throw new ArgumentException(null, nameof(properties)); 143throw new ArgumentException(null, nameof(properties)); 173throw new ArgumentException(SR.Format(SR.NotFoundInCollection, schemaProperty), nameof(schemaProperty)); 191throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, schemaProperty), nameof(schemaProperty)); 345throw new ArgumentException(null, nameof(value));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySite.cs (3)
1114throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 1121throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 1128throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteCollection.cs (5)
39throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, site), nameof(value)); 53throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, site), nameof(site)); 132throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, site), nameof(site)); 157throw new ArgumentException(SR.Format(SR.NotFoundInCollection, site), nameof(site)); 233throw new ArgumentException(null, nameof(value));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLink.cs (7)
270throw new ArgumentException(null, nameof(value)); 311throw new ArgumentException(SR.NoNegativeTime, nameof(value)); 315throw new ArgumentException(SR.ReplicationIntervalExceedMax, nameof(value)); 319throw new ArgumentException(SR.ReplicationIntervalInMinutes, nameof(value)); 674throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 681throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 688throw new ArgumentException(SR.EmptyStringParameter, nameof(siteLinkName));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLinkBridge.cs (3)
330throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 337throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 344throw new ArgumentException(SR.EmptyStringParameter, nameof(bridgeName));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySiteLinkCollection.cs (5)
33throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, link), nameof(value)); 48throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, link), nameof(link)); 132throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, link), nameof(link)); 158throw new ArgumentException(SR.Format(SR.NotFoundInCollection, link), nameof(link)); 234throw new ArgumentException(null, nameof(value));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySubnet.cs (6)
155throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName)); 164throw new ArgumentException(SR.Format(SR.SiteNotExist, siteName), nameof(siteName)); 183throw new ArgumentException(SR.Format(SR.SiteNotExist, siteName), nameof(siteName)); 383throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 391throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 398throw new ArgumentException(SR.EmptyStringParameter, nameof(subnetName));
System\DirectoryServices\ActiveDirectory\ActiveDirectorySubnetCollection.cs (6)
43throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, subnet), nameof(value)); 58throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, subnet), nameof(subnet)); 70throw new ArgumentException(null, nameof(subnets)); 150throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, subnet), nameof(subnet)); 176throw new ArgumentException(SR.Format(SR.NotFoundInCollection, subnet), nameof(subnet)); 271throw new ArgumentException(null, nameof(value));
System\DirectoryServices\ActiveDirectory\ADAMInstance.cs (14)
122throw new ArgumentException(SR.TargetShouldBeADAMServer, nameof(context)); 172throw new ArgumentException(SR.TargetShouldBeConfigSet, nameof(context)); 179throw new ArgumentException(SR.EmptyStringParameter, nameof(partitionName)); 198throw new ArgumentException(SR.TargetShouldBeConfigSet, nameof(context)); 205throw new ArgumentException(SR.EmptyStringParameter, nameof(partitionName)); 320throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 354throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 393throw new ArgumentException(SR.EmptyStringParameter, nameof(objectPath)); 410throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 416throw new ArgumentException(SR.EmptyStringParameter, nameof(sourceServer)); 432throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 448throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 632throw new ArgumentException(SR.InvalidDNFormat, nameof(value)); 639throw new ArgumentException(SR.ServerNotAReplica, nameof(value));
System\DirectoryServices\ActiveDirectory\ApplicationPartition.cs (11)
115throw new ArgumentException(SR.TargetShouldBeAppNCDnsName, nameof(context)); 167throw new ArgumentException(SR.ContextNotAssociatedWithDomain, nameof(context)); 175throw new ArgumentException(SR.NotADOrADAM, nameof(context)); 184throw new ArgumentException(SR.EmptyStringParameter, nameof(distinguishedName)); 187throw new ArgumentException(SR.InvalidDNFormat, nameof(distinguishedName)); 857throw new ArgumentException(SR.TargetShouldBeServer, nameof(context)); 865throw new ArgumentException(SR.EmptyStringParameter, nameof(distinguishedName)); 900throw new ArgumentException(SR.EmptyStringParameter, nameof(objectClass)); 1149throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName)); 1191throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName)); 1214throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName));
System\DirectoryServices\ActiveDirectory\ConfigSet.cs (6)
82throw new ArgumentException(SR.TargetShouldBeServerORConfigSet, nameof(context)); 390throw new ArgumentException(SR.TargetShouldBeServerORConfigSet, nameof(context)); 481throw new ArgumentException(SR.EmptyStringParameter, nameof(partitionName)); 486throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName)); 504throw new ArgumentException(SR.EmptyStringParameter, nameof(partitionName)); 509throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName));
System\DirectoryServices\ActiveDirectory\DirectoryContext.cs (4)
111throw new ArgumentException(SR.OnlyDomainOrForest, nameof(contextType)); 128throw new ArgumentException(SR.EmptyStringParameter, nameof(name)); 142throw new ArgumentException(SR.OnlyDomainOrForest, nameof(contextType)); 159throw new ArgumentException(SR.EmptyStringParameter, nameof(name));
System\DirectoryServices\ActiveDirectory\DirectoryServer.cs (7)
85throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName)); 354throw new ArgumentException(ExceptionHelper.GetErrorMessage(result, false), "objectPath"); 365throw new ArgumentException(SR.DSNoObject, "objectPath"); 368throw new ArgumentException(SR.DSInvalidPath, "objectPath"); 374throw new ArgumentException(SR.ServerNotAReplica, nameof(partition)); 632throw new ArgumentException(SR.ServerNotAReplica, nameof(partition)); 733throw new ArgumentException(SR.ServerNotAReplica, nameof(partition));
System\DirectoryServices\ActiveDirectory\DirectoryServerCollection.cs (14)
59throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, server), nameof(value)); 74throw new ArgumentException(SR.ServerShouldBeDC, nameof(server)); 80throw new ArgumentException(SR.ServerShouldBeW2K3, nameof(server)); 90throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, server), nameof(server)); 105throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, server), nameof(server)); 118throw new ArgumentException(null, nameof(servers)); 175throw new ArgumentException(SR.ServerShouldBeDC, nameof(server)); 181throw new ArgumentException(SR.ServerShouldBeW2K3, nameof(server)); 191throw new ArgumentException(SR.Format(SR.AlreadyExistingInCollection, server), nameof(server)); 201throw new ArgumentException(SR.NotWithinSite, nameof(server)); 228throw new ArgumentException(SR.Format(SR.NotFoundInCollection, server), nameof(server)); 383throw new ArgumentException(SR.ServerShouldBeAI, nameof(value)); 389throw new ArgumentException(SR.ServerShouldBeDC, nameof(value)); 395throw new ArgumentException(null, nameof(value));
System\DirectoryServices\ActiveDirectory\Domain.cs (25)
71throw new ArgumentException(SR.TargetShouldBeServerORDomain, nameof(context)); 156throw new ArgumentException(SR.InvalidMode, nameof(domainMode)); 164throw new ArgumentException(SR.InvalidMode, nameof(domainMode)); 198throw new ArgumentException(SR.InvalidMode, nameof(domainMode)); 211throw new ArgumentException(SR.InvalidMode, nameof(domainMode)); 237throw new ArgumentException(SR.NoW2K3DCs, nameof(domainMode)); 310throw new ArgumentException(SR.InvalidMode, nameof(domainMode)); 325throw new ArgumentException(SR.InvalidMode, nameof(domainMode)); 340throw new ArgumentException(SR.InvalidMode, nameof(domainMode)); 365throw new ArgumentException(SR.InvalidMode, nameof(domainMode)); 392throw new ArgumentException(SR.NoW2K3DCs, nameof(domainMode)); 476throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName)); 505throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 529throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 542throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 555throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 568throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 581throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 609throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 659throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 668throw new ArgumentException(SR.EmptyStringParameter, nameof(trustPassword)); 711throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 717throw new ArgumentException(SR.EmptyStringParameter, nameof(newTrustPassword)); 730throw new ArgumentException(SR.EmptyStringParameter, nameof(targetDomainName)); 739throw new ArgumentException(SR.EmptyStringParameter, nameof(newTrustPassword));
System\DirectoryServices\ActiveDirectory\DomainController.cs (18)
133throw new ArgumentException(SR.TargetShouldBeDC, nameof(context)); 180throw new ArgumentException(SR.TargetShouldBeDomain, nameof(context)); 192throw new ArgumentException(SR.TargetShouldBeDomain, nameof(context)); 206throw new ArgumentException(SR.TargetShouldBeDomain, nameof(context)); 218throw new ArgumentException(SR.TargetShouldBeDomain, nameof(context)); 232throw new ArgumentException(SR.TargetShouldBeDomain, nameof(context)); 247throw new ArgumentException(SR.TargetShouldBeDomain, nameof(context)); 444throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 478throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 517throw new ArgumentException(SR.EmptyStringParameter, nameof(objectPath)); 534throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 540throw new ArgumentException(SR.EmptyStringParameter, nameof(sourceServer)); 556throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 572throw new ArgumentException(SR.EmptyStringParameter, nameof(partition)); 965throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName)); 971throw new ArgumentException(SR.InvalidFlags, nameof(flag)); 986throw new ArgumentException(SR.InvalidFlags, nameof(flag)); 1009throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName));
System\DirectoryServices\ActiveDirectory\Forest.cs (19)
98throw new ArgumentException(SR.TargetShouldBeServerORForest, nameof(context)); 171throw new ArgumentException(SR.InvalidMode, nameof(forestMode)); 177throw new ArgumentException(SR.InvalidMode, nameof(forestMode)); 194throw new ArgumentException(SR.NoW2K3DCsInForest, nameof(forestMode)); 223throw new ArgumentException(SR.InvalidMode, nameof(forestMode)); 297throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName)); 318throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 341throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 354throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 367throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 380throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 393throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 421throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 471throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 480throw new ArgumentException(SR.EmptyStringParameter, nameof(trustPassword)); 523throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 529throw new ArgumentException(SR.EmptyStringParameter, nameof(newTrustPassword)); 542throw new ArgumentException(SR.EmptyStringParameter, nameof(targetForestName)); 551throw new ArgumentException(SR.EmptyStringParameter, nameof(newTrustPassword));
System\DirectoryServices\ActiveDirectory\GlobalCatalog.cs (11)
41throw new ArgumentException(SR.TargetShouldBeGC, nameof(context)); 95throw new ArgumentException(SR.TargetShouldBeForest, nameof(context)); 107throw new ArgumentException(SR.TargetShouldBeForest, nameof(context)); 121throw new ArgumentException(SR.TargetShouldBeForest, nameof(context)); 133throw new ArgumentException(SR.TargetShouldBeForest, nameof(context)); 147throw new ArgumentException(SR.TargetShouldBeForest, nameof(context)); 162throw new ArgumentException(SR.TargetShouldBeForest, nameof(context)); 349throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName)); 355throw new ArgumentException(SR.InvalidFlags, nameof(flag)); 388throw new ArgumentException(SR.InvalidFlags, nameof(flag)); 412throw new ArgumentException(SR.EmptyStringParameter, nameof(siteName));
System\DirectoryServices\ActiveDirectory\ReplicationConnection.cs (6)
921throw new ArgumentException(SR.EmptyStringParameter, nameof(name)); 941throw new ArgumentException(SR.DirectoryContextNeedHost, nameof(context)); 947throw new ArgumentException(SR.ConnectionSourcServerShouldBeDC, nameof(sourceServer)); 952throw new ArgumentException(SR.ConnectionSourcServerShouldBeADAM, nameof(sourceServer)); 964throw new ArgumentException(SR.ConnectionSourcServerSameForest, nameof(sourceServer)); 973throw new ArgumentException(SR.ConnectionSourcServerSameConfigSet, nameof(sourceServer));
System\DirectoryServices\ActiveDirectory\Utils.cs (7)
141throw new ArgumentException(SR.InvalidDNFormat, nameof(distinguishedName)); 182throw new ArgumentException(SR.InvalidDNFormat, nameof(distinguishedName)); 280throw new ArgumentException(SR.InvalidDNFormat, nameof(dn)); 473throw new ArgumentException(SR.InvalidDNFormat, nameof(distinguishedName)); 479throw new ArgumentException(SR.InvalidDNFormat, nameof(distinguishedName)); 485throw new ArgumentException(SR.InvalidDNFormat, nameof(distinguishedName)); 574throw new ArgumentException(SR.InvalidDNFormat, nameof(distinguishedName));
System\DirectoryServices\DirectorySearcher.cs (3)
179throw new ArgumentException(SR.TimespanExceedMax, nameof(value)); 292throw new ArgumentException(SR.TimespanExceedMax, nameof(value)); 311throw new ArgumentException(SR.TimespanExceedMax, nameof(value));
System\DirectoryServices\PropertyCollection.cs (1)
158throw new ArgumentException(SR.OnlyAllowSingleDimension, nameof(array));
System.DirectoryServices.AccountManagement (1)
System\DirectoryServices\AccountManagement\PrincipalSearcher.cs (1)
25throw new ArgumentException(null, nameof(queryFilter));
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)); 284throw 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)
76throw new ArgumentException(SR.Argument_Tag_NotCharacterString, nameof(expectedTag)); 153throw new ArgumentException( 169throw 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)
240throw new ArgumentException(SR.Argument_EncodeDestinationTooSmall, nameof(destination));
System\Formats\Cbor\Writer\CborWriter.Tag.cs (1)
74throw 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 (16)
src\runtime\src\libraries\Common\src\System\IO\SubReadStream.cs (1)
32throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(superStream));
System\Formats\Tar\TarEntry.cs (2)
57throw new ArgumentException(SR.TarCannotConvertPaxGlobalExtendedAttributesEntry, nameof(other)); 280throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(value));
System\Formats\Tar\TarFile.cs (4)
65throw new ArgumentException(SR.IO_NotSupported_UnwritableStream, nameof(destination)); 133return Task.FromException(new ArgumentException(SR.IO_NotSupported_UnwritableStream, nameof(destination))); 307throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(source)); 375return Task.FromException(new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(source)));
System\Formats\Tar\TarHeader.Write.cs (6)
532throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 553throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 606throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 652throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.LinkName)), ArgNameEntry); 710throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.UserName)), ArgNameEntry); 728throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.GroupName)), ArgNameEntry);
System\Formats\Tar\TarHelpers.cs (1)
382throw new ArgumentException(SR.Format(SR.TarEntryTypeNotSupportedInFormat, entryType, archiveFormat), paramName);
System\Formats\Tar\TarReader.cs (1)
38throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(archiveStream));
System\Formats\Tar\TarWriter.cs (1)
413throw new ArgumentException(SR.TarEntryHardLinkOrSymlinkLinkNameEmpty, "entry");
System.IO.Compression (22)
src\runtime\src\libraries\Common\src\System\IO\SubReadStream.cs (1)
32throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(superStream));
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (1)
28throw new ArgumentException(SR.NotSupported_UnreadableStream, nameof(stream));
System\IO\Compression\DeflateZLib\DeflateStream.cs (3)
86throw new ArgumentException(SR.NotSupported_UnreadableStream, nameof(stream)); 99throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode)); 121throw new ArgumentException(SR.NotSupported_UnwritableStream, nameof(stream));
System\IO\Compression\ZipArchive.cs (1)
436throw new ArgumentException(SR.EntryNameAndCommentEncodingNotSupported, nameof(EntryNameAndCommentEncoding));
System\IO\Compression\ZipArchiveEntry.Async.cs (4)
83throw new ArgumentException(SR.PasswordRequired, nameof(password)); 110throw new ArgumentException(SR.PasswordRequired, nameof(password)); 133throw new ArgumentException(SR.PasswordRequired, nameof(password)); 527throw new ArgumentException(SR.PasswordRequired, nameof(password));
System\IO\Compression\ZipArchiveEntry.cs (4)
482throw new ArgumentException(SR.PasswordRequired, nameof(password)); 520throw new ArgumentException(SR.PasswordRequired, nameof(password)); 1279throw new ArgumentException(SR.PasswordRequired, nameof(password)); 1373throw new ArgumentException(SR.EmptyPassword, nameof(password));
System\IO\Compression\Zstandard\ZstandardDictionary.cs (5)
45throw new ArgumentException(SR.ZstandardDictionary_EmptyBuffer, nameof(buffer)); 93throw new ArgumentException(SR.ZstandardDictionary_EmptyBuffer, nameof(samples)); 99throw new ArgumentException(SR.Format(SR.ZstandardDictionary_Train_MinimumSampleCount, 5), nameof(sampleLengths)); 118throw new ArgumentException(SR.ZstandardDictionary_Train_InvalidSampleLength, nameof(sampleLengths)); 126throw new ArgumentException(SR.ZstandardDictionary_SampleLengthsMismatch, nameof(sampleLengths));
System\IO\Compression\Zstandard\ZstandardStream.cs (3)
38throw new ArgumentException(SR.Stream_FalseCanWrite, nameof(stream)); 45throw new ArgumentException(SR.Stream_FalseCanRead, nameof(stream)); 50throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode));
System.IO.Compression.Brotli (3)
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.ZipFile (10)
System\IO\Compression\ZipFile.Create.Async.cs (2)
447throw new ArgumentException(SR.EmptyPassword, nameof(options)); 474throw new ArgumentException(SR.EmptyPassword, nameof(options));
System\IO\Compression\ZipFile.Create.cs (3)
416throw new ArgumentException(SR.EmptyPassword, nameof(options)); 438throw new ArgumentException(SR.EmptyPassword, nameof(options)); 541throw new ArgumentException(SR.UnwritableStream, nameof(destination));
System\IO\Compression\ZipFile.Extract.Async.cs (2)
429throw new ArgumentException(SR.UnreadableStream, nameof(source)); 485throw new ArgumentException(SR.UnreadableStream, nameof(source));
System\IO\Compression\ZipFile.Extract.cs (2)
389throw new ArgumentException(SR.UnreadableStream, nameof(source)); 437throw new ArgumentException(SR.UnreadableStream, nameof(source));
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.cs (1)
163throw new ArgumentException(SR.EmptyPassword, nameof(password));
System.IO.FileSystem.AccessControl (2)
System\Security\AccessControl\DirectoryObjectSecurity.cs (1)
56throw new ArgumentException(SR.Arg_MustBeIdentityReferenceType, nameof(targetType));
System\Security\AccessControl\FileSystemSecurity.cs (1)
37exception = new ArgumentException(SR.Argument_InvalidName, nameof(name));
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)
305throw 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)
399throw new ArgumentException(SR.RelationshipTargetMustBeRelative, nameof(targetUri)); 417throw 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)
106throw 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.Management (25)
System\Management\ManagementObjectCollection.cs (1)
229throw new ArgumentException(null, nameof(index));
System\Management\ManagementOptions.cs (1)
976_ => throw new ArgumentException(null, nameof(Type)),
System\Management\ManagementQuery.cs (21)
678throw new ArgumentException(SR.InvalidQuery, nameof(queryOrClassName)); 750throw new ArgumentException(SR.InvalidQuery, nameof(isSchemaQuery)); 1039throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, keyword), nameof(query)); 1045throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, "*"), nameof(query)); 1053throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, keyword), nameof(query)); 1061throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, keyword), nameof(query)); 1072throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, keyword), nameof(query)); 1276throw new ArgumentException(SR.InvalidQuery, nameof(queryOrSourceObject)); 1350throw new ArgumentException(SR.InvalidQuery, nameof(isSchemaQuery)); 1646throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, TokenAssociators), nameof(query)); // Invalid query 1659throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, TokenOf), nameof(query)); // Invalid query 1683throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, TokenWhere), nameof(query)); // Invalid query 1903throw new ArgumentException(SR.InvalidQuery, nameof(queryOrSourceObject)); 1962throw new ArgumentException(SR.InvalidQuery, nameof(isSchemaQuery)); 2163throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, TokenReferences), nameof(query)); // Invalid query 2176throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, TokenOf), nameof(query)); // Invalid query 2200throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, TokenWhere), nameof(query)); // Invalid query 2490throw new ArgumentException(SR.InvalidQuery, nameof(queryOrEventClassName)); 3038throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, "*"), nameof(query)); 3044throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, keyword), nameof(query)); 3114throw new ArgumentException(SR.Format(SR.InvalidQueryTokenExpected, keyword), nameof(query));
System\Management\PropertySet.cs (1)
154throw new ArgumentException(null, nameof(index));
System\Management\QualifierSet.cs (1)
212throw new ArgumentException(null, nameof(index));
System.Memory (3)
src\runtime\src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (3)
49throw new ArgumentException(null, nameof(initialCapacity)); 129throw new ArgumentException(null, nameof(count)); 202throw new ArgumentException(null, nameof(sizeHint));
System.Net.Http (5)
System\Net\Http\HttpClient.cs (2)
78throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(HttpVersionPolicy)), nameof(value)); 94throw new ArgumentException(SR.net_http_client_absolute_baseaddress_required, nameof(value));
System\Net\Http\HttpRequestMessage.cs (1)
62throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(HttpVersionPolicy)), nameof(value));
System\Net\Http\MultipartContent.cs (2)
84throw new ArgumentException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, boundary), nameof(boundary)); 89throw new ArgumentException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, boundary), nameof(boundary));
System.Net.Http.WinHttpHandler (2)
System\Net\Http\WinHttpRequestStream.cs (1)
114throw new ArgumentException(SR.net_http_buffer_insufficient_length, nameof(buffer));
System\Net\Http\WinHttpResponseStream.cs (1)
188throw new ArgumentException(SR.net_http_buffer_insufficient_length, nameof(buffer));
System.Net.HttpListener (15)
src\runtime\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)
357throw 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 (11)
System\Net\Dns.cs (6)
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)); 696throw new ArgumentException(SR.net_invalid_ip_addr, nameof(hostName)); 910throw new ArgumentException(SR.net_hostname_invalid_character, nameof(hostName));
System\Net\DnsResolver.cs (2)
56throw new ArgumentException(SR.net_dns_servers_contains_null, $"{nameof(options)}.{nameof(DnsResolverOptions.Servers)}"); 554throw new ArgumentException(SR.net_dns_unsupported_address_family, nameof(address));
System\Net\DnsResolverPal.Managed.cs (3)
68throw new ArgumentException(SR.net_dns_unsupported_address_family, nameof(DnsResolverOptions.Servers)); 79_ => throw new ArgumentException(SR.net_dns_unsupported_address_family, nameof(addressFamily)), 620throw new ArgumentException(SR.Format(SR.net_invalid_dns_name, name), nameof(name));
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)
192throw new ArgumentException(SR.Format(SR.net_InvalidAddressFamily, socketAddress.Family.ToString(), GetType().FullName), nameof(socketAddress)); 198throw 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\runtime\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)); 689throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 812throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\HttpWebRequest.cs (10)
383throw new ArgumentException(SR.net_invalid_host, nameof(value)); 477throw new ArgumentException(SR.net_nochunked, nameof(value)); 615throw new ArgumentException(SR.net_connarg, nameof(value)); 664throw new ArgumentException(SR.net_no100, nameof(value)); 836throw new ArgumentException(SR.net_wrongversion, nameof(value)); 937throw new ArgumentException(SR.net_badmethod, nameof(value)); 1171throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 1444throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 1532throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier)); 1551throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier));
System.Net.Security (15)
src\runtime\src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (2)
332throw new ArgumentException(SR.net_ssl_app_protocols_invalid, nameof(applicationProtocols)); 339throw 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)
613throw 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\Security\TlsSession.cs (1)
636throw new ArgumentException(SR.net_tlssession_context_must_be_server, nameof(context));
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 (41)
System\Net\Sockets\SendPacketsElement.cs (1)
56throw new ArgumentException(SR.net_sockets_sendpackelement_FileStreamMustBeAsync, nameof(fileStream));
System\Net\Sockets\Socket.cs (29)
244throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 941throw new ArgumentException(SR.net_sockets_invalid_ipaddress_length, nameof(addresses)); 979throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses)); 1148throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 1642throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 1760throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEP.AddressFamily, _addressFamily), nameof(remoteEP)); 2132throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "LingerOption"), nameof(optionValue)); 2136throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper_Named, 0, (int)ushort.MaxValue, "optionValue.LingerTime"), nameof(optionValue)); 2145throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "MulticastOption"), nameof(optionValue)); 2155throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "IPv6MulticastOption"), nameof(optionValue)); 2161throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(optionValue)); 2318throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(level)); 2700throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2740throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2849throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 2901throw new ArgumentException(SR.net_multibuffernotsupported, "BufferList"); 3001throw new ArgumentException(SR.Format(SR.net_sockets_invalid_connect_algorithm, connectAlgorithm), nameof(connectAlgorithm)); 3006throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 3010throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3114throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, "e.RemoteEndPoint"), nameof(e)); 3119throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3123throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPointSnapshot.AddressFamily, _addressFamily), nameof(e)); 3168throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3172throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, e.RemoteEndPoint.AddressFamily, _addressFamily), nameof(e)); 3240throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.SendPacketsElements"), nameof(e)); 3278throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3360throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, nameof(remoteEP)), nameof(remoteEP)); 3975throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, remoteEndPointArgumentName), remoteEndPointArgumentName); 3980throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEndPoint.AddressFamily, _addressFamily), remoteEndPointArgumentName);
System\Net\Sockets\Socket.Tasks.cs (2)
147throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses)); 819throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
592throw 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)); 354throw new ArgumentException(SR.net_invalidAddressList, nameof(hostname)); 407throw new ArgumentException(SR.Format(SR.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr)); 491throw new ArgumentException(SR.Format(SR.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr));
System.Net.WebHeaderCollection (7)
src\runtime\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\runtime\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)); 1926throw 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 (8)
src\runtime\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\BrowserWebSockets\BrowserWebSocket.cs (1)
159throw new ArgumentException(SR.Format(SR.net_WebSockets_Argument_InvalidMessageType,
System\Net\WebSockets\BrowserWebSockets\ClientWebSocketOptions.cs (1)
109throw new ArgumentException(SR.Format(SR.net_WebSockets_NoDuplicateProtocol, subProtocol), nameof(subProtocol));
System\Net\WebSockets\ClientWebSocket.cs (2)
96throw new ArgumentException(SR.net_uri_NotAbsolute, nameof(uri)); 100throw new ArgumentException(SR.net_WebSockets_Scheme, nameof(uri));
System.Numerics.Tensors (10)
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (2)
75throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode)); 123throw 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 (452)
Internal\Reflection\Augments\ReflectionAugments.cs (8)
264throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 267throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method)); 272throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 293throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 316throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target)); 320throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 323throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target)); 405throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(flds));
Internal\Runtime\CompilerHelpers\RuntimeInteropData.cs (3)
24throw new ArgumentException(SR.Format(SR.Arg_CannotMarshal, Type.GetTypeFromHandle(structureTypeHandle)), nameof(structureTypeHandle)); 47throw new ArgumentException(SR.Format(SR.Argument_OffsetOfFieldNotFound, Type.GetTypeFromHandle(structureTypeHandle)), nameof(fieldName)); 61throw new ArgumentException(SR.Format(SR.Arg_CannotMarshal, Type.GetTypeFromHandle(structureTypeHandle)), nameof(structureTypeHandle));
src\runtime\src\libraries\Common\src\System\Threading\Tasks\TaskToAsyncResult.cs (2)
74throw new ArgumentException(null, nameof(asyncResult)); 96throw new ArgumentException(null, nameof(asyncResult));
src\runtime\src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
109throw new ArgumentException(SR.Argument_EmptyString, nameof(assemblyName));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (2)
28: base(SR.ArgumentNull_Generic, paramName) 40: base(message ?? SR.ArgumentNull_Generic, paramName)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (2)
451throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 457throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffer.cs (3)
27throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(src)); 38throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(dst)); 63throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(array));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (1)
408throw new ArgumentException(SR.Arg_BufferTooSmall, "destination");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\ConfigurableArrayPool.cs (1)
239throw new ArgumentException(SR.ArgumentException_BufferNotFromPool, nameof(array));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
161throw new ArgumentException(SR.ArgumentException_BufferNotFromPool, nameof(array));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Decoder.cs (2)
88throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 198throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Encoder.cs (2)
84throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 181throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (2)
126throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 225throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (2)
78throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 129throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1200throw new ArgumentException(SR.Format(invalidIsLow ? SR.Argument_InvalidLowSurrogate : SR.Argument_InvalidHighSurrogate, index), nameof(s));
src\runtime\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)); 827throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2281throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2295throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\BitArray.cs (4)
172throw new ArgumentException(SR.Format(SR.Argument_ArrayTooLarge, BitsPerByte), nameof(bytes)); 333throw new ArgumentException(SR.Format(SR.Argument_ArrayTooLarge, BitsPerInt32), nameof(values)); 763throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 921throw new ArgumentException(SR.Arg_BitArrayTypeUnsupported, nameof(array));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (1)
1905throw new ArgumentException(SR.ConcurrentDictionary_ArrayIncorrectType, nameof(array));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (4)
16throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 21throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 58throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 70throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
2346throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 2384throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 2420throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options));
src\runtime\src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (9)
291throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 319throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 354throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 359throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 469throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 521throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 597throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 602throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 755case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style");
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
683throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, nameof(MidpointRounding)), nameof(mode));
src\runtime\src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (4)
38throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 552throw new ArgumentException(SR.Arg_MustBeType, nameof(types)); 558throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 648throw new ArgumentException(SR.Arg_EmptyArray, nameof(match));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (1)
654throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (4)
375throw new ArgumentException(SR.Argument_InvalidTypeName, nameof(eventSourceType)); 496throw new ArgumentException(SR.EventSource_InvalidCommand, nameof(command)); 1660throw new ArgumentException(SR.EventSource_TraitEven, nameof(traits)); 3853throw new ArgumentException(SR.EventSource_InvalidEventFormat, nameof(settings));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\DuplicateWaitObjectException.cs (2)
26: base(SR.Arg_DuplicateWaitObjectException, parameterName) 32: base(message ?? SR.Arg_DuplicateWaitObjectException, parameterName)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (4)
887throw new ArgumentException(SR.Arg_MustBeEnum, nameof(TEnum)); 2148throw new ArgumentException(enumType is not RuntimeType ? SR.Arg_MustBeType : SR.Arg_MustBeEnum, nameof(enumType)); 2151throw new ArgumentException(SR.Arg_MustContainEnumInfo, "value"); 2221throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Environment.cs (2)
275throw new ArgumentException(SR.Argument_StringFirstCharIsZero, nameof(variable)); 278throw new ArgumentException(SR.Argument_IllegalEnvVarName, nameof(variable));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (1)
709throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Invariant.cs (2)
18throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); 123throw new ArgumentException(
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (1)
366throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (42)
80throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 84throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode)); 109throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 114throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode)); 158throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 185throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 265throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode)); 299throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode)); 326throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 336throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i), nameof(unicode)); 348throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 352throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 372throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 376throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 415throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 437throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 466throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 485throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 492throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 518throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(unicode)); 603throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 615throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 653throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c)); 666throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 689throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 728throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 732throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 755throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 763throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 782throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 797throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 832throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 839throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 847throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 858throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 864throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 879throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 923throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii)); 930throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii)); 936throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 948throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[^1]) ? 0 : 1)), nameof(ascii)); 971throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(cp));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (7)
39throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(unicode)); 46throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(unicode)); 66throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(unicode)); 108throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 120throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 137throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 178throw new ArgumentException(SR.Argument_IdnIllegalName, paramName);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Nls.cs (1)
176throw new ArgumentException(
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.cs (1)
95throw new ArgumentException(SR.Argument_InvalidNormalizationForm, nameof(normalizationForm));
src\runtime\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)); 204throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, paramName);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (10)
127throw new ArgumentException(SR.Argument_InvalidNativeDigitCount, propertyName); 142throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 147throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 156throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 172throw new ArgumentException(SR.Argument_InvalidDigitSubstitution, propertyName); 311throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 315throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 837throw new ArgumentException( 857throw new ArgumentException( 874throw new ArgumentException((value & InvalidNumberStyles) != 0 ? SR.Argument_InvalidNumberStyles : SR.Arg_HexBinaryStylesNotSupported, nameof(style));
src\runtime\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.Argument_CustomCultureCannotBePassedByNumber, nameof(culture)); 75throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Guid.cs (3)
104throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "16"), "b"); 130throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "8"), nameof(d)); 1117throw new ArgumentException(SR.Arg_MustBeGuid, nameof(value));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Directory.cs (1)
75throw new ArgumentException(SR.Argument_DirectorySeparatorInvalid, paramName);
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Directory.Unix.cs (1)
17throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(unixCreateMode));
src\runtime\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)); 101throw new ArgumentException(SR.Format(SR.Argument_InvalidSubPath, path, FullPath), nameof(path)); 203_ => throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(searchTarget)),
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (2)
238throw new ArgumentException(SR.Arg_InvalidFileAttrs, "Attributes"); 474throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(UnixFileMode));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (5)
71throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 174throw new ArgumentException(SR.Argument_InvalidAppendMode, nameof(options)); 180throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, options.Mode, options.Access), nameof(options)); 194throw new ArgumentException(SR.Argument_InvalidUnixCreateMode, nameof(options)); 584throw new ArgumentException(SR.Argument_InvalidSeekOrigin, nameof(origin));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStreamOptions.cs (1)
144throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(UnixCreateMode));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.cs (1)
27throw new ArgumentException(SR.Argument_NullCharInPath, argName);
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (4)
108throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, mode, access), nameof(access)); 114throw new ArgumentException(SR.Argument_InvalidAppendMode, nameof(access)); 130throw new ArgumentException(SR.Argument_InvalidPreallocateAccess, nameof(access)); 138throw new ArgumentException(SR.Argument_InvalidPreallocateMode, nameof(mode));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (1)
247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(options));
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
203throw new ArgumentException(SR.Argument_StreamNotWritable, nameof(options));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Random.cs (2)
485throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 678throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
278throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, path), nameof(path));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (4)
106throw new ArgumentException(SR.Argument_NotExceptionType, nameof(excType)); 108ConstructorInfo con = excType.GetConstructor(Type.EmptyTypes) ?? throw new ArgumentException(SR.Arg_NoDefCTorWithoutTypeName, nameof(excType)); 142throw new ArgumentException(SR.Argument_EmitWriteLineType, nameof(localBuilder)); 174throw new ArgumentException(SR.Argument_EmitWriteLineType, nameof(fld));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilder.cs (1)
27throw new ArgumentException(SR.Arg_EmptyArray, nameof(names));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (14)
92throw new ArgumentException(SR.Arg_EmptyArray, nameof(names)); 338throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 350throw new ArgumentException(SR.Argument_NeedGenericMethodDefinition, nameof(method)); 355throw new ArgumentException(SR.Argument_MethodNeedGenericDeclaringType, nameof(method)); 360throw new ArgumentException(SR.Argument_InvalidMethodDeclaringType, nameof(type)); 373throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 385throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 390throw new ArgumentException(SR.Argument_ConstructorNeedGenericDeclaringType, nameof(constructor)); 395throw new ArgumentException(SR.Argument_InvalidConstructorDeclaringType, nameof(type)); 406throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 418throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 423throw new ArgumentException(SR.Argument_FieldNeedGenericDeclaringType, nameof(field)); 428throw new ArgumentException(SR.Argument_InvalidFieldDeclaringType, nameof(type)); 439throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
src\runtime\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)); 41throw new ArgumentException(SR.Arg_MustBePointer, nameof(ptr));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
214throw new ArgumentException(SR.Arg_ResMgrNotResSet, nameof(usingResourceSet));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ContractHelper.cs (1)
36throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CurrencyWrapper.cs (1)
20throw new ArgumentException(SR.Arg_MustBeDecimal, nameof(obj));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ErrorWrapper.cs (1)
20throw new ArgumentException(SR.Arg_MustBeInt32, nameof(errorCode));
src\runtime\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\runtime\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)); 1157throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 1175throw new ArgumentException(SR.Argument_TypeMustNotBeComImport, nameof(type)); 1179throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 1201throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t)); 1205throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t)); 1213throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(t)); 1226throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(TDelegate)); 1234throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(TDelegate));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (5)
359throw new ArgumentException(SR.UnsupportedType, nameof(T)); 385throw new ArgumentException(SR.ComVariant_VT_DECIMAL_NotSupported_CreateRaw, nameof(vt)); 389throw new ArgumentException(SR.ComVariant_VT_VARIANT_In_Variant, nameof(vt)); 550throw new ArgumentException(SR.UnsupportedType, nameof(T)); 575throw new ArgumentException(SR.ComVariant_VT_DECIMAL_NotSupported_RawDataRef, nameof(T));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (5)
380throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 398throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, nativeImagePath), nameof(nativeImagePath)); 403throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 484throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, unmanagedDllPath), nameof(unmanagedDllPath)); 606throw new ArgumentException(SR.Arg_MustBeRuntimeAssembly, nameof(activating));
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.cs (1)
238throw new ArgumentException(SR.Argument_SearchValues_UnsupportedStringComparison, nameof(comparisonType));
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (5)
161throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 468throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 622throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 680throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 1091throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType));
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
1222_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)),
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (4)
126_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)), 339_ => throw (value is null ? new ArgumentNullException(nameof(value)) : new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType))), 540_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)), 669_ => throw (value is null ? new ArgumentNullException(nameof(value)) : new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType))),
src\runtime\src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (2)
42_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)), 233throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (1)
41throw new ArgumentException(
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\DecoderFallback.cs (1)
311throw new ArgumentException(
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\DecoderReplacementFallback.cs (1)
59throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(replacement));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Encoder.cs (1)
41throw new ArgumentException(
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncoderFallback.cs (1)
357throw new ArgumentException(SR.Format(SR.Argument_RecursiveFallback, charRecursive), "chars");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncoderReplacementFallback.cs (1)
59throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(replacement));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
93throw new ArgumentException(
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (1)
2143throw new ArgumentException(SR.Arg_EmptySpan, nameof(oldValue));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (2)
599throw new ArgumentException( 937throw new ArgumentException(
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.cs (1)
71throw new ArgumentException(SR.Argument_InvalidFlag, nameof(mode));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Monitor.cs (1)
110throw new ArgumentException(SR.Argument_MustBeFalse, "lockTaken");
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\NamedWaitHandleOptions.cs (1)
140throw new ArgumentException(SR.Format(SR.NamedWaitHandles_IncompatibleNamePrefix, name), nameof(name));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (1)
329throw new ArgumentException(SR.Task_MustBeCompleted, nameof(completedTask));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (1)
327throw new ArgumentException(SR.Task_MustBeCompleted, nameof(completedTask));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (1)
199throw new ArgumentException(SR.TaskExceptionHolder_UnknownExceptionType, nameof(exceptionObject));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.PlatformNotSupported.cs (1)
23throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
302throw new ArgumentException(SR.Argument_EmptyWaithandleArray, nameof(waitHandles));
src\runtime\src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (10)
101throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 107throw new ArgumentException(SR.Arg_SpanMustHaveElementsForColor, paramName); 113throw new ArgumentException(SR.Argument_InvalidTimeSpanStyles, "styles"); 119throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, value, typeof(TEnum).Name), argumentName); 143throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other"); 290throw new ArgumentException(SR.Arg_CannotBeNaN, GetArgumentName(argument)); 518throw new ArgumentException(SR.Arg_InvalidHandle, paramName); 730return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 735return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value)); 750return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (9)
460throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 488throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 522throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 527throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 638throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 690throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 766throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 771throw new ArgumentException(SR.Argument_InvalidDateStyles, nameof(style)); 924case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style");
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (7)
225throw new ArgumentException(SR.Argument_DateTimeOffsetIsNotAmbiguous, nameof(dateTimeOffset)); 239throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime)); 261throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime)); 649throw new ArgumentException(SR.Argument_ConvertMismatch, nameof(sourceTimeZone)); 656throw new ArgumentException(SR.Argument_DateTimeIsInvalid, nameof(dateTime)); 751throw new ArgumentException(SR.Format(SR.Argument_InvalidSerializedString, source), nameof(source)); 1325throw new ArgumentException(SR.Argument_TimeSpanHasSeconds, nameof(baseUtcOffset));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (3)
1311throw new ArgumentException(SR.Argument_TimeZoneInfoInvalidTZif, nameof(data)); 1337throw new ArgumentException("bad data", nameof(data)); 1345throw new ArgumentException(SR.Argument_TimeZoneInfoBadTZif, nameof(data));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Type.cs (11)
289new ArgumentException(SR.Format(SR.Arg_MemberInfoNotFound, member.Name), nameof(member)); 488throw new ArgumentException(SR.ArgumentNull_ArrayValue, nameof(args)); 623throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 627throw new ArgumentException(SR.Argument_InvalidEnum, "enumType"); 636throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 693throw new ArgumentException(SR.Format(SR.FunctionPointer_InvalidCallingConvention, fullName), nameof(callingConventions)); 707throw new ArgumentException(SR.ManagedFunctionPointer_CallingConventionsNotAllowed, nameof(callingConventions)); 719throw new ArgumentException(SR.FunctionPointer_CallingConventionsUnbalanced, nameof(returnType)); 722throw new ArgumentException(SR.FunctionPointer_CallingConventionsUnbalanced, nameof(returnType)); 730throw new ArgumentException(SR.FunctionPointer_CallingConventionsUnbalanced, nameof(returnType)); 819throw new ArgumentException(SR.Format(SR.Arg_NotGenericTypeDefinition, genericTypeDefinition), nameof(genericTypeDefinition));
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Version.cs (4)
124throw new ArgumentException(SR.Arg_MustBeVersion, nameof(version)); 223throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, "0", failureUpperBound), nameof(fieldCount)); 365if (throwOnFailure) throw new ArgumentException(SR.Arg_VersionString, nameof(input)); 382if (throwOnFailure) throw new ArgumentException(SR.Arg_VersionString, nameof(input));
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\AssemblyNameInfo.cs (1)
207: throw new ArgumentException(SR.InvalidAssemblyName, nameof(assemblyName));
src\runtime\src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
351throw new ArgumentException(SR.Argument_InvalidTypeName, $"typeName@{errorIndex}");
System\ActivatorImplementation.cs (1)
150throw new ArgumentException(SR.Arg_MustBeType, nameof(type));
System\GC.NativeAot.cs (3)
169throw new ArgumentException(SR.Argument_AggressiveGCRequiresMaxGeneration, nameof(generation)); 173throw new ArgumentException(SR.Argument_AggressiveGCRequiresBlocking, nameof(blocking)); 177throw new ArgumentException(SR.Argument_AggressiveGCRequiresCompacting, nameof(compacting));
System\Reflection\Assembly.NativeAot.cs (1)
90throw new ArgumentException(SR.Format_StringZeroLength, nameof(partialName));
System\Reflection\ConstructorInvoker.cs (1)
29throw new ArgumentException(SR.Argument_MustBeRuntimeConstructorInfo, nameof(constructor));
System\Reflection\DynamicInvokeInfo.cs (1)
569throw new ArgumentException(SR.Arg_VarMissNull, "parameters");
System\Reflection\MethodInvoker.cs (1)
46throw new ArgumentException(SR.Argument_MustBeRuntimeMethod, nameof(method));
System\Reflection\Runtime\MethodInfos\RuntimeMethodInfo.cs (1)
74throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(delegateType));
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.cs (2)
195throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(interfaceType)); 441throw new ArgumentException(SR.Format(SR.FunctionPointer_ParameterInvalid, rtType), nameof(parameterTypes));
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.GetMember.cs (1)
132throw new ArgumentException(SR.Format(SR.Arg_MemberInfoNotFound, member.Name), nameof(member));
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.InvokeMember.cs (13)
34throw new ArgumentException(SR.Arg_NoAccessSpec, nameof(bindingFlags)); 52throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 58throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 71throw new ArgumentException(SR.Arg_NamedParamNull, nameof(namedParams)); 86throw new ArgumentException(SR.Arg_CreatInstAccess, nameof(bindingFlags)); 117throw new ArgumentException(SR.Arg_FldSetGet, nameof(bindingFlags)); 121throw new ArgumentException(SR.Arg_FldGetPropSet, nameof(bindingFlags)); 131throw new ArgumentException(SR.Arg_FldSetPropGet, nameof(bindingFlags)); 135throw new ArgumentException(SR.Arg_FldSetInvoke, nameof(bindingFlags)); 209throw new ArgumentException(SR.Arg_FldGetArgErr, nameof(bindingFlags)); 218throw new ArgumentException(SR.Arg_FldSetArgErr, nameof(bindingFlags)); 246throw new ArgumentException(SR.Arg_PropSetGet, nameof(bindingFlags)); 255throw new ArgumentException(SR.Arg_PropSetInvoke, nameof(bindingFlags));
System\Runtime\CompilerServices\RuntimeHelpers.NativeAot.cs (4)
226throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(method)); 232throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(method)); 245throw new ArgumentException(SR.Arg_MustBeType, nameof(type)); 266throw new ArgumentException(SR.Arg_MustBeType, nameof(type));
System\Runtime\InteropServices\Marshal.NativeAot.cs (5)
44throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(fieldName)); 48throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t)); 57throw new ArgumentException(SR.Argument_StructMustNotBeValueClass, nameof(structure)); 98throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structuretype)); 127throw new ArgumentException(SR.Argument_NeedNonGenericObject, nameof(structure));
System\Runtime\InteropServices\PInvokeMarshal.cs (2)
56throw new ArgumentException(SR.Argument_NeedNonGenericType, "delegate"); 235throw new ArgumentException(SR.Arg_MustBeDelegate, "t");
System\RuntimeType.NativeAot.cs (7)
95throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value)); 101throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 109throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 120throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 143throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 186throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 205throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
System.Private.CoreLib.Generators (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
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)
74throw 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 (7)
System\Uri.cs (3)
519throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "RelativeUri"), nameof(serializationInfo)); 1383throw new ArgumentException(SR.Format(SR.Argument_InvalidUriSubcomponent, part), nameof(part)); 1523throw new ArgumentException(null, nameof(digit));
System\UriBuilder.cs (4)
92throw new ArgumentException(SR.Argument_ExtraNotValid, nameof(extraValue)); 127throw new ArgumentException(SR.net_uri_BadScheme, nameof(value)); 186throw new ArgumentException(SR.net_uri_BadHostName, nameof(value)); 193throw new ArgumentException(SR.net_uri_BadHostName, nameof(value));
System.Private.Windows.Core (12)
_generated\166\Windows.Win32.ITypeLib.g.cs (2)
358 if (szNameBuf != null && szNameBuf.LastIndexOf('\0') == -1) throw new ArgumentException("Required null terminator missing.", "szNameBuf"); 411 if (szNameBuf != null && szNameBuf.LastIndexOf('\0') == -1) throw new ArgumentException("Required null terminator missing.", "szNameBuf");
_generated\254\Windows.Win32.System_Com_ITypeLib_Extensions.g.cs (2)
85 if (szNameBuf != null && szNameBuf.LastIndexOf('\0') == -1) throw new ArgumentException("Required null terminator missing.", "szNameBuf"); 101 if (szNameBuf != null && szNameBuf.LastIndexOf('\0') == -1) throw new ArgumentException("Required null terminator missing.", "szNameBuf");
System\IO\BinaryReaderExtensions.cs (2)
99throw new ArgumentException($"Cannot read primitives of {typeof(T).Name}.", nameof(T)); 230throw new ArgumentException($"Cannot write primitives of {typeof(T).Name}.", nameof(T));
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
592throw 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)
25throw new ArgumentException(SR.ClipboardOrDragDrop_CannotJsonSerializePredefinedFormat, nameof(format)); 30throw 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)
390throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid)); 397throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid)); 404throw 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)), 1160throw 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)); 533throw 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)
992throw new ArgumentException(SR.Format(SR.XmlEmptyArrayType, CurrentTag()), nameof(value)); 1005throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value)); 1013throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value)); 1018throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value)); 1026throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, new string(lengthStringSpan)), nameof(value)); 1040throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value)); 1042throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value)); 1044throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value)); 1094throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, dimensions[i]), "value"); 2396throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 2402throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (2)
346throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 352throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializationWriter.cs (2)
2366throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 2372throw 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)
700throw 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)
67throw 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 (24)
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 (6)
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)); 729throw new ArgumentException(SR.Argument_MustBeFunctionPointer, nameof(functionPointerType)); 861throw 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)); 541throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, con.DeclaringType, name), nameof(binaryAttribute)); 1310throw new ArgumentException(SR.Argument_MustBeInterface, nameof(interfaceType)); 1315throw new ArgumentException(SR.Argument_InterfaceNotFound, nameof(interfaceType));
System.Reflection.Metadata (34)
System\Reflection\Internal\Utilities\StreamExtensions.cs (1)
71throw 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)
64throw new ArgumentException(SR.BaseReaderMustBeFullMetadataReader, nameof(baseReader)); 74throw new ArgumentException(SR.Format(SR.ExpectedListOfSize, MetadataTokens.TableCount), nameof(baseTableRowCounts)); 84throw new ArgumentException(SR.Format(SR.ExpectedListOfSize, MetadataTokens.HeapCount), nameof(baseTableRowCounts)); 90throw new ArgumentException(SR.ExpectedNonEmptyList, nameof(deltaReaders)); 97throw new ArgumentException(SR.ReadersMustBeDeltaReaders, nameof(deltaReaders)); 288throw new ArgumentException(SR.HandleBelongsToFutureGeneration, nameof(handle)); 321throw new ArgumentException(SR.HandleBelongsToFutureGeneration, nameof(handle));
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
110throw new ArgumentException(SR.Format(SR.ValueMustBeMultiple, BlobUtilities.SizeOfGuid), nameof(guidHeapStartOffset));
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (2)
79throw new ArgumentException(SR.Format(SR.ExpectedArrayOfSize, MetadataTokens.TableCount), nameof(typeSystemRowCounts)); 96throw 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)
351throw 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)); 67throw 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)
356throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
System.Resources.Extensions (1)
src\runtime\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)
145throw 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.InteropServices.JavaScript (4)
System\Runtime\InteropServices\JavaScript\JSMarshalerType.cs (4)
456throw new ArgumentException(SR.Format(SR.UnsupportedNullableType, underlying), nameof(underlyingType)); 470throw new ArgumentException(SR.Format(SR.UnsupportedElementType, underlying), nameof(underlyingType)); 481throw new ArgumentException(SR.Format(SR.UnsupportedElementType, underlying), nameof(underlyingType)); 496throw new ArgumentException(SR.Format(SR.UnsupportedTaskResultType, underlying), nameof(underlyingType));
System.Runtime.Numerics (3)
System\Number.BigInteger.cs (1)
50e = new ArgumentException((style & InvalidNumberStyles) != 0 ? SR.Argument_InvalidNumberStyles : SR.Argument_InvalidHexBinaryStyle, nameof(style));
System\Numerics\BigInteger.cs (1)
1415throw new ArgumentException(SR.Argument_MustBeBigInt, nameof(obj));
System\Numerics\Complex.Generic.cs (1)
2031throw 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.AccessControl (39)
System\Security\AccessControl\ACE.cs (2)
129throw new ArgumentException( 295throw new ArgumentException(
System\Security\AccessControl\ACL.cs (13)
233throw new ArgumentException(SR.ArgumentException_InvalidAclBinaryForm, nameof(binaryForm)); 276throw new ArgumentException( 1544throw new ArgumentException( 1551throw new ArgumentException( 1557throw new ArgumentException( 1577throw new ArgumentException( 1584throw new ArgumentException( 1641throw new ArgumentException( 1648throw new ArgumentException( 1719throw new ArgumentException( 1727throw new ArgumentException( 2076throw new ArgumentException( 2084throw new ArgumentException(
System\Security\AccessControl\CommonObjectSecurity.cs (2)
53throw new ArgumentException( 311throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)rule.AccessControlType), nameof(rule));
System\Security\AccessControl\NativeObjectSecurity.cs (2)
119exception = new ArgumentException(SR.Argument_InvalidName, nameof(name)); 261exception = new ArgumentException(SR.Argument_InvalidName, nameof(name));
System\Security\AccessControl\ObjectSecurity.cs (4)
532throw new ArgumentException( 578throw new ArgumentException( 608throw new ArgumentException( 631throw new ArgumentException(
System\Security\AccessControl\Rules.cs (3)
36throw new ArgumentException(SR.Argument_ArgumentZero, nameof(accessMask)); 53throw new ArgumentException( 203throw new ArgumentException(SR.Arg_EnumAtLeastOneFlag, nameof(auditFlags));
System\Security\AccessControl\SecurityDescriptor.cs (11)
378throw new ArgumentException( 468throw new ArgumentException( 478throw new ArgumentException( 613throw new ArgumentException( 623throw new ArgumentException( 635throw new ArgumentException( 645throw new ArgumentException( 790throw new ArgumentException( 799throw new ArgumentException( 836throw new ArgumentException( 845throw new ArgumentException(
System\Security\AccessControl\Win32.cs (2)
115throw new ArgumentException( 261throw new ArgumentException(
System.Security.Claims (1)
System\Security\Claims\ClaimsIdentity.cs (1)
1046throw new ArgumentException(
System.Security.Cryptography (264)
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (1)
83throw new ArgumentException(SR.Argument_Invalid_SafeHandleInvalidOrClosed, nameof(parentHandle));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\AesGcm.cs (4)
86throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tagSizeInBytes)); 308throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 317throw new ArgumentException(SR.Format(SR.Cryptography_IncorrectTagLength, tagSizeInBytes), nameof(tag)); 322throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (1)
218throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaCng.Windows.cs (1)
27throw new ArgumentException(SR.Cryptography_ArgCompositeMLDsaRequiresCompositeMLDsaKey, nameof(key));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLKem.cs (5)
172throw new ArgumentException( 179throw new ArgumentException( 240throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 277throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 282throw new ArgumentException(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (1)
40throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(values));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (1)
284throw new ArgumentException(SR.Format(SR.Argument_DestinationImprecise, expectedLength), paramName);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsa.cs (4)
578throw new ArgumentException(SR.Argument_MLDsaMuInvalidLength, nameof(externalMu)); 1807throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source)); 1857throw new ArgumentException(SR.Argument_PrivateKeyWrongSizeForAlgorithm, nameof(source)); 1907throw new ArgumentException(SR.Cryptography_KeyWrongSizeForAlgorithm, nameof(source));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLDsaCng.Windows.cs (1)
47throw new ArgumentException(SR.Cryptography_ArgMLDsaRequiresMLDsaKey, nameof(key));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (11)
113throw new ArgumentException( 120throw new ArgumentException( 205throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 210throw new ArgumentException( 251throw new ArgumentException(SR.Argument_KemInvalidCiphertextLength, nameof(ciphertext)); 293throw new ArgumentException( 355throw new ArgumentException(SR.Argument_KemInvalidSeedLength, nameof(source)); 414throw new ArgumentException(SR.Argument_KemInvalidDecapsulationKeyLength, nameof(source)); 471throw new ArgumentException(SR.Argument_KemInvalidEncapsulationKeyLength, nameof(source)); 524throw new ArgumentException( 578throw new ArgumentException(
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (1)
39throw new ArgumentException(SR.Cryptography_ArgMLKemRequiresMLKemKey, nameof(key));
src\runtime\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\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (1)
116throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents));
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\SlhDsa.cs (6)
136throw new ArgumentException( 320throw new ArgumentException( 1081throw new ArgumentException( 1132throw new ArgumentException( 1686throw new ArgumentException(SR.Argument_PublicKeyWrongSizeForAlgorithm, nameof(source)); 1736throw new ArgumentException(SR.Argument_PrivateKeyWrongSizeForAlgorithm, nameof(source));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (1)
539throw new ArgumentException(SR.Argument_EmptyString, nameof(hashAlgorithm));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellman.cs (7)
151throw new ArgumentException( 188throw new ArgumentException( 252throw new ArgumentException( 297throw new ArgumentException( 913throw new ArgumentException(SR.Argument_PrivateKeyWrongSizeForAlgorithm, nameof(source)); 969throw new ArgumentException(SR.Argument_PublicKeyWrongSizeForAlgorithm, nameof(source)); 1613throw new ArgumentException(SR.Argument_PublicKeyWrongSizeForAlgorithm, paramName);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X25519DiffieHellmanCng.Windows.cs (1)
31throw new ArgumentException(SR.Cryptography_ArgX25519RequiresX25519Key, nameof(key));
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
731throw new ArgumentException(SR.Argument_EmptyString, paramName);
System\Security\Cryptography\Aes.cs (13)
136throw new ArgumentException( 228throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 417throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(plaintext)); 432throw new ArgumentException(SR.Arg_EmptySpan, nameof(plaintext)); 460throw new ArgumentException(SR.Arg_EmptySpan, nameof(plaintext)); 466throw new ArgumentException( 510throw new ArgumentException(SR.Cryptography_KeyWrap_InvalidLength, nameof(ciphertext)); 547throw new ArgumentException(SR.Cryptography_KeyWrap_InvalidLength, nameof(ciphertext)); 554throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 585throw new ArgumentException(SR.Cryptography_KeyWrap_InvalidLength, nameof(ciphertext)); 896throw new ArgumentException( 903throw new ArgumentException( 918throw new ArgumentException(
System\Security\Cryptography\AesCcm.cs (2)
97throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 100throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag));
System\Security\Cryptography\AesImplementation.cs (2)
273throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 279throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV));
System\Security\Cryptography\CapiHelper.Windows.cs (4)
715throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, flags), nameof(flags)); 1096throw new ArgumentException(SR.Argument_InvalidValue, nameof(hashAlg)); 1112_ => throw new ArgumentException(SR.Argument_InvalidValue, nameof(hashAlg)), 1123_ => throw new ArgumentException(SR.Argument_InvalidValue, nameof(hashAlg)),
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\CngKey.OpenHandle.cs (2)
24throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(keyHandle)); 67throw new ArgumentException(SR.Cryptography_OpenEphemeralKeyHandleWithoutEphemeralFlag, nameof(keyHandleOpenOptions));
System\Security\Cryptography\CngSymmetricAlgorithmCore.cs (3)
173throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(iv)); 204throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV)); 314throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey));
System\Security\Cryptography\CryptoConfig.cs (1)
315throw new ArgumentException(SR.Cryptography_AlgorithmTypesMustBeVisible, nameof(algorithm));
System\Security\Cryptography\CryptographicOperations.cs (7)
191throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 500throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 837throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, hashSizeInBytes), nameof(hash)); 928throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, hashSizeInBytes), nameof(hash)); 1023throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, hashSizeInBytes), nameof(hash)); 1090throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 1142throw 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\DESCryptoServiceProvider.Windows.cs (1)
71throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey));
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\DSACng.cs (1)
29throw new ArgumentException(SR.Cryptography_ArgDSARequiresDSAKey, nameof(key));
System\Security\Cryptography\DSACng.Key.cs (1)
33throw new ArgumentException(SR.Cryptography_ArgDSARequiresDSAKey, nameof(value));
System\Security\Cryptography\ECDiffieHellmanCng.cs (1)
29throw new ArgumentException(SR.Cryptography_ArgECDHRequiresECDHKey, nameof(key));
System\Security\Cryptography\ECDiffieHellmanCng.Derive.cs (4)
47throw new ArgumentException(SR.Cryptography_ArgECDHRequiresECDHKey, nameof(otherPartyPublicKey)); 49throw new ArgumentException(SR.Cryptography_ArgECDHKeySizeMismatch, nameof(otherPartyPublicKey)); 132throw new ArgumentException(SR.Cryptography_ArgECDHRequiresECDHKey, nameof(otherPartyPublicKey)); 134throw new ArgumentException(SR.Cryptography_ArgECDHKeySizeMismatch, nameof(otherPartyPublicKey));
System\Security\Cryptography\ECDiffieHellmanCng.Key.cs (1)
41throw new ArgumentException(SR.Cryptography_ArgECDHRequiresECDHKey, nameof(value));
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\ECDsaCng.cs (1)
47throw new ArgumentException(SR.Cryptography_ArgECDsaRequiresECDsaKey, nameof(key));
System\Security\Cryptography\ECDsaCng.Key.cs (1)
31throw new ArgumentException(SR.Cryptography_ArgECDsaRequiresECDsaKey, nameof(value));
System\Security\Cryptography\HashStatic.cs (7)
44throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 70throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 73throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 84throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 95throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 109throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 112throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Helpers.cs (1)
486throw 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\HMACStatic.cs (12)
27throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, THMAC.HashSizeInBytes), nameof(hash)); 63throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 90throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 93throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 104throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 125throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 147throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 150throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 175throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, THMAC.HashSizeInBytes), nameof(hash)); 178throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 208throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, THMAC.HashSizeInBytes), nameof(hash)); 211throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\IncrementalHash.cs (3)
154throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 477throw new ArgumentException(SR.Format(SR.Argument_HashImprecise, ih.HashLengthInBytes), nameof(hash));
System\Security\Cryptography\Kmac128.cs (3)
213throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 251throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 775throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Kmac256.cs (3)
213throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 251throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 775throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacStatic.cs (3)
194throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 200throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 206throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof128.cs (3)
213throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 251throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 775throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof256.cs (3)
213throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 251throw new ArgumentException(SR.Argument_HashEmpty, nameof(hash)); 775throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
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\RC2CryptoServiceProvider.Windows.cs (1)
87throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey));
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\RSACng.cs (1)
29throw new ArgumentException(SR.Cryptography_ArgRSARequiresRSAKey, nameof(key));
System\Security\Cryptography\RSACng.Key.cs (1)
33throw new ArgumentException(SR.Cryptography_ArgRSARequiresRSAKey, nameof(value));
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\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\CertificatePal.Windows.cs (1)
22throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle));
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\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)); 862throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 873throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 964throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 975throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1060throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1075throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1170throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1178throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1719throw 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)
653throw 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)); 849throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 854throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 911throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 916throw 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\runtime\src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObject.cs (1)
40throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(values));
src\runtime\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\runtime\src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (1)
116throw new ArgumentException(SR.Cryptography_Pkcs12_CannotProcessEncryptedSafeContents, nameof(safeContents));
src\runtime\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)
616throw new ArgumentException(SR.Arg_EmptyOrNullString, nameof(issuerName)); 618throw new ArgumentException(SR.Arg_EmptyOrNullString, nameof(serialNumber));
System\Security\Cryptography\Xml\XmlDecryptionTransform.cs (1)
287throw 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.Security.Principal.Windows (24)
System\Security\Principal\IRCollection.cs (1)
155throw new ArgumentException(SR.IdentityReference_MustBeIdentityReference, nameof(targetType));
System\Security\Principal\NTAccount.cs (7)
40throw new ArgumentException(SR.IdentityReference_AccountNameTooLong, nameof(accountName)); 45throw new ArgumentException(SR.IdentityReference_DomainNameTooLong, nameof(domainName)); 64throw new ArgumentException(SR.IdentityReference_AccountNameTooLong, nameof(name)); 117throw new ArgumentException(SR.IdentityReference_MustBeIdentityReference, nameof(targetType)); 167throw new ArgumentException(SR.IdentityReference_MustBeIdentityReference, nameof(targetType)); 209throw new ArgumentException(SR.Arg_EmptyCollection, nameof(sourceAccounts)); 229throw new ArgumentException(SR.Argument_ImproperType, nameof(sourceAccounts));
System\Security\Principal\SID.cs (13)
424throw new ArgumentException(SR.IdentityReference_InvalidSidRevision, nameof(binaryForm)); 433throw new ArgumentException(SR.Format(SR.IdentityReference_InvalidNumberOfSubauthorities, MaxSubAuthorities), nameof(binaryForm)); 444throw new ArgumentException(SR.ArgumentOutOfRange_ArrayTooSmall, nameof(binaryForm)); 500throw new ArgumentException(SR.Argument_InvalidValue, nameof(sddlForm)); 552throw new ArgumentException(SR.IdentityReference_CannotCreateLogonIdsSid, nameof(sidType)); 561throw new ArgumentException(SR.Argument_InvalidValue, nameof(sidType)); 588throw new ArgumentException(SR.IdentityReference_NotAWindowsDomain, nameof(domainSid)); 602throw new ArgumentException(SR.IdentityReference_NotAWindowsDomain, nameof(domainSid)); 612throw new ArgumentException(Marshal.GetPInvokeErrorMessage(error), "sidType/domainSid"); 826throw new ArgumentException(SR.IdentityReference_MustBeIdentityReference, nameof(targetType)); 947throw new ArgumentException(SR.Arg_EmptyCollection, nameof(sourceSids)); 967throw new ArgumentException(SR.Argument_ImproperType, nameof(sourceSids)); 1126throw new ArgumentException(SR.IdentityReference_MustBeIdentityReference, nameof(targetType));
System\Security\Principal\Win32.cs (2)
64throw new ArgumentException(SR.IdentityReference_InvalidSidRevision, nameof(binaryForm)); 76throw new ArgumentException(SR.Format(SR.IdentityReference_InvalidNumberOfSubauthorities, SecurityIdentifier.MaxSubAuthorities), nameof(binaryForm));
System\Security\Principal\WindowsPrincipal.cs (1)
117throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)role), nameof(role));
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)
31throw new ArgumentException(SR.Format(SR.InvalidObjectTypePassed, nameof(inlineDocumentType), nameof(InlineCategoriesDocument)), nameof(inlineDocumentType)); 36throw new ArgumentException(SR.Format(SR.InvalidObjectTypePassed, nameof(referencedDocumentType), nameof(ReferencedCategoriesDocument)), nameof(referencedDocumentType));
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (1)
32throw 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)
83throw new ArgumentException(SR.OuterElementNameNotSpecified, nameof(outerElementName));
System\ServiceModel\Syndication\SyndicationElementExtension.cs (1)
70throw new ArgumentException(SR.OuterNameOfElementExtensionEmpty, nameof(outerName));
System.ServiceProcess.ServiceController (1)
System\ServiceProcess\ServiceController.cs (1)
71throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(name), name), nameof(name));
System.Speech (40)
AudioFormat\SpeechAudioFormatInfo.cs (1)
19throw new ArgumentException(SR.Get(SRID.CannotUseCustomFormat), nameof(encodingFormat));
Internal\AlphabetConverter.cs (1)
86throw new ArgumentException(SR.Get(SRID.MustBeGreaterThanZero), nameof(langId));
Internal\Helpers.cs (1)
27throw new ArgumentException(SR.Get(SRID.StringCanNotBeEmpty, paramName), paramName);
Internal\SeekableReadStream.cs (1)
208throw new ArgumentException(SR.Get(SRID.EnumInvalid, "SeekOrigin"), nameof(origin));
Internal\SrgsCompiler\AppDomainGrammarProxy.cs (2)
133throw new ArgumentException(SR.Get(SRID.RuleScriptInvalidParameters, _grammarType.FullName, rule), nameof(rule)); 151throw new ArgumentException(SR.Get(SRID.RuleScriptInvalidParameters, ruleClass.FullName, rule), nameof(rule));
Internal\SrgsCompiler\BackEnd.cs (1)
264throw new ArgumentException(SR.Get(SRID.InvalidFlagsSet), nameof(attributes));
Internal\Synthesis\TextWriterEngine.cs (1)
32throw new ArgumentException(SR.Get(SRID.InvalidSpeakAttribute, "baseUri", "speak"), nameof(baseUri));
Recognition\Grammar.cs (3)
107throw new ArgumentException(SR.Get(SRID.StreamMustBeReadable), nameof(stream)); 149throw new ArgumentException(SR.Get(SRID.StrongTypedGrammarNotAGrammar), nameof(type)); 496throw new ArgumentException(SR.Get(SRID.DictationInvalidTopic), nameof(uri));
Recognition\GrammarBuilder.cs (3)
123throw new ArgumentException(SR.Get(SRID.ArrayOfNullIllegal), nameof(builder)); 357throw new ArgumentException(SR.Get(SRID.MinGreaterThanMax), maxParamName); 371throw new ArgumentException(SR.Get(SRID.EnumInvalid, paramName), paramName);
Recognition\RecognizerBase.cs (4)
380throw new ArgumentException(SR.Get(SRID.ArrayOfNullIllegal), nameof(wordUnits)); 404throw new ArgumentException(SR.Get(SRID.ArrayOfNullIllegal), nameof(wordUnits)); 1980throw new ArgumentException(SR.Get(SRID.RecognizerRuleNotFoundStream, ruleName), nameof(ruleName)); 1991throw new ArgumentException(SR.Get(SRID.RecognizerRuleNotFound, ruleName, uri), nameof(ruleName));
Recognition\SpeechRecognitionEngine.cs (4)
32throw new ArgumentException(SR.Get(SRID.InvariantCultureInfo), nameof(culture)); 55throw new ArgumentException(SR.Get(SRID.RecognizerNotFound), nameof(culture)); 70throw new ArgumentException(SR.Get(SRID.RecognizerNotFound), nameof(recognizerId)); 531throw new ArgumentException(SR.Get(SRID.NullParamIllegal), nameof(recognizerInfo));
Recognition\SrgsGrammar\SrgsDocument.cs (1)
124throw new ArgumentException(SR.Get(SRID.InvariantCultureInfo), nameof(value));
Recognition\SrgsGrammar\SrgsGrammarCompiler.cs (1)
70throw new ArgumentException(SR.Get(SRID.ArrayOfNullIllegal), nameof(inputPaths));
Recognition\SrgsGrammar\SrgsNameValueTag.cs (1)
71throw new ArgumentException(SR.Get(SRID.InvalidValueType), nameof(value));
Recognition\SrgsGrammar\SrgsSubset.cs (2)
28throw new ArgumentException(SR.Get(SRID.InvalidSubsetAttribute), nameof(matchingMode)); 50throw new ArgumentException(SR.Get(SRID.InvalidSubsetAttribute), nameof(value));
Recognition\SrgsGrammar\SrgsToken.cs (1)
43throw new ArgumentException(SR.Get(SRID.InvalidTokenString), nameof(value));
Synthesis\Prompt.cs (3)
39throw new ArgumentException(SR.Get(SRID.SynthesizerUnknownMediaType), nameof(media)); 76throw new ArgumentException(SR.Get(SRID.SynthesizerUnknownMediaType), nameof(media)); 101throw new ArgumentException(SR.Get(SRID.SynthesizerPromptInUse), nameof(value));
Synthesis\PromptBuilder.cs (5)
29throw new ArgumentException(SR.Get(SRID.InvariantCultureInfo), nameof(culture)); 275throw new ArgumentException(SR.Get(SRID.EnumInvalid, "VoiceGender"), nameof(voice)); 280throw new ArgumentException(SR.Get(SRID.EnumInvalid, "VoiceAge"), nameof(voice)); 369throw new ArgumentException(SR.Get(SRID.InvariantCultureInfo), nameof(culture)); 405throw new ArgumentException(SR.Get(SRID.InvariantCultureInfo), nameof(culture));
Synthesis\SpeechSynthesizer.cs (3)
69throw new ArgumentException(SR.Get(SRID.EnumInvalid, "VoiceGender"), nameof(gender)); 74throw new ArgumentException(SR.Get(SRID.EnumInvalid, "VoiceAge"), nameof(age)); 253throw new ArgumentException(SR.Get(SRID.InvariantCultureInfo), nameof(culture));
Synthesis\VoiceInfo.cs (1)
34throw new ArgumentException(SR.Get(SRID.InvariantCultureInfo), nameof(culture));
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); 1144throw new ArgumentException(SR.JsonPolymorphismOptionsAssociatedWithDifferentJsonTypeInfo, paramName: parameterName);
System\Text\Json\Writer\JsonWriterHelper.cs (6)
168throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 198throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 221throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 233throw new ArgumentException( 240throw new ArgumentException(SR.RequiredDigitNotFoundEndOfData, nameof(utf8FormattedNumber)); 250throw new ArgumentException(
System\ThrowHelper.cs (2)
21throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 56return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
System.Text.RegularExpressions.Generator (1)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (1)
100throw new ArgumentException("The value cannot be an empty string.", paramName);
System.Threading.AccessControl (4)
System\Threading\EventWaitHandleAcl.cs (1)
129throw new ArgumentException(SR.Argument_EmptyName, nameof(name));
System\Threading\MutexAcl.cs (2)
51throw new ArgumentException(SR.Argument_WaitHandleNameTooLong, nameof(name)); 120throw new ArgumentException(SR.Argument_EmptyName, nameof(name));
System\Threading\SemaphoreAcl.cs (1)
135throw new ArgumentException(SR.Argument_EmptyName, nameof(name));
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)
59throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options)); 63throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options)); 67throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.Window)), nameof(options));
System\Threading\RateLimiting\PartitionedRateLimiter.cs (1)
64throw new ArgumentException("Must pass in at least 1 limiter.", nameof(limiters));
System\Threading\RateLimiting\RateLimiter.cs (1)
43throw new ArgumentException("Must pass in at least 1 limiter.", nameof(limiters));
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (4)
63throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options)); 67throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.SegmentsPerWindow)), nameof(options)); 71throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options)); 75throw 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)); 383if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 404if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 417if (!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 (21)
System\Transactions\CommittableTransaction.cs (1)
166throw new ArgumentException(SR.BadAsyncResult, nameof(asyncResult));
System\Transactions\Oletx\OletxResourceManager.cs (1)
353throw new ArgumentException(SR.InvalidArgument, nameof(prepareInfo));
System\Transactions\Oletx\OletxTransaction.cs (1)
137throw new ArgumentException(SR.InvalidArgument, nameof(serializationInfo));
System\Transactions\Oletx\OletxTransactionManager.cs (2)
495throw new ArgumentException(SR.InvalidArgument, nameof(resourceManagerIdentifier)); 555throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier));
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\TransactionInterop.cs (5)
99throw new ArgumentException(SR.InvalidArgument, nameof(cookie)); 234throw new ArgumentException(SR.InvalidArgument, nameof(propagationToken)); 455throw new ArgumentException(SR.InvalidArgument, nameof(transactionNative)); 474throw new ArgumentException(SR.InvalidArgument, "transactionManager"); 503throw new ArgumentException(SR.InvalidArgument, nameof(propagationToken));
System\Transactions\TransactionManager.cs (4)
143throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 181throw new ArgumentException(SR.UnrecognizedRecoveryInformation, nameof(recoveryInformation)); 232throw new ArgumentException(SR.InvalidRecoveryInformation, "recoveryInformation"); 241throw 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 (147)
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)
3563throw new ArgumentException(SR.AXUnknownImage, nameof(picture)); 3587throw new ArgumentException(SR.AXUnknownImage, nameof(picture)); 3675throw new ArgumentException(SR.AXFontUnitNotPoint, nameof(font)); 3730throw new ArgumentException(SR.AXFontUnitNotPoint, nameof(font));
System\Windows\Forms\Application.cs (1)
735VisualStylesMode.Inherit => throw new ArgumentException(
System\Windows\Forms\Components\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\Components\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\Control.ControlCollection.cs (1)
134throw new ArgumentException(SR.ControlBadControl, nameof(control));
System\Windows\Forms\Control.cs (3)
5210throw new ArgumentException(message: null, nameof(targetBounds)); 5261throw new ArgumentException(SR.ControlBadAsyncResult, nameof(asyncResult)); 11121throw 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)
123throw new ArgumentException( 276throw new ArgumentException( 294throw new ArgumentException(
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
3721throw 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\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)
55throw new ArgumentException(SR.BadDataSourceForComplexBinding, nameof(value)); 321throw new ArgumentException(SR.ListControlWrongValueMember, nameof(value)); 737throw 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)); 3826throw new ArgumentException(string.Format(SR.OnlyOneControl, ch.Text), nameof(ch)); 4022throw new ArgumentException(string.Format(SR.OnlyOneControl, items[i].Text), nameof(items)); 4049throw 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)
1628throw 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)
1132throw 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)
1463throw new ArgumentException(SR.AddDifferentThreads, nameof(value)); 1480throw new ArgumentException(SR.FormMDIParentAndChild, nameof(value)); 1485throw new ArgumentException(SR.MDIParentNotContainer, nameof(value)); 1638throw new ArgumentException(SR.NonTopLevelCantHaveOwner, nameof(value)); 2047throw new ArgumentException(SR.MDIContainerMustBeTopLevel, nameof(value)); 5525throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(Show)), nameof(owner)); 5700throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(ShowDialog)), nameof(owner)); 5779throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(ShowDialog)), nameof(owner));
System\Windows\Forms\Help\Help.cs (2)
190throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(param), "Integer"), nameof(param)); 199Uri? 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)
1381? 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 (4)
_generated\426\Windows.Win32.PInvoke.USER32.dll.g.cs (1)
857 if (lpchText != null && lpchText.LastIndexOf('\0') == -1) throw new ArgumentException("Required null terminator missing.", "lpchText");
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.Xaml (26)
src\wpf\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));
testhost (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (3)
30throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 124throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 150throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable));
testhost.arm64 (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (3)
30throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 124throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 150throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable));
testhost.x86 (3)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (3)
30throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 124throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 150throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable));
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\wpf\src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (1)
248throw new ArgumentException($"{osVer} is not a valid OS!", nameof(osVer));
vstest.console (5)
Internal\ConsoleLogger.cs (1)
213throw new ArgumentException("No default parameters added", nameof(parameters));
Processors\Utilities\ArgumentProcessorFactory.cs (1)
178throw new ArgumentException("Cannot be null or empty", nameof(arguments));
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (3)
30throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 124throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 150throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable));
vstest.console.arm64 (5)
src\vstest\src\Microsoft.TestPlatform.Execution.Shared\DebuggerBreakpoint.cs (3)
30throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 124throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable)); 150throw new ArgumentException($"'{nameof(environmentVariable)}' cannot be null or whitespace.", nameof(environmentVariable));
src\vstest\src\vstest.console\Internal\ConsoleLogger.cs (1)
213throw new ArgumentException("No default parameters added", nameof(parameters));
src\vstest\src\vstest.console\Processors\Utilities\ArgumentProcessorFactory.cs (1)
178throw new ArgumentException("Cannot be null or empty", nameof(arguments));