2455 references to ArgumentException
AndroidAppBuilder (1)
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
AppleAppBuilder (1)
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
ClientSample (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Crossgen2Tasks (1)
CommonFilePulledFromSdkRepo\LogAdapter.cs (1)
76throw new ArgumentException(
dotnet-dev-certs (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
dotnet-getdocument (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
dotnet-openapi (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
dotnet-sql-cache (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
dotnet-user-jwts (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
dotnet-user-secrets (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
GetDocument.Insider (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
http2cat (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IIS.Common.TestLib (1)
TestConnections.cs (1)
242throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
IIS.FunctionalTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IIS.LongTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IIS.NewHandler.FunctionalTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IIS.NewShim.FunctionalTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IIS.ShadowCopy.Tests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
IISExpress.FunctionalTests (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
illink (5)
ILLink.RoslynAnalyzer (7)
DataFlow\ControlFlowGraphProxy.cs (4)
137 throw new ArgumentException ("Must be a catch, filter, or finally region: {}", nameof (catchOrFilterOrFinallyRegion)); 164 throw new ArgumentException ("Must be a catch or filter region: {}", nameof (catchOrFilterRegion)); 168 throw new ArgumentException ("Must not be a catch block with filter: {}", nameof (catchOrFilterRegion)); 209 throw new ArgumentException ("Must be a catch region: {}", nameof (catchRegion));
src\tools\illink\src\ILLink.Shared\DataFlow\ForwardDataFlowAnalysis.cs (3)
84 throw new ArgumentException (null, nameof (tryOrCatchOrFilterRegion)); 106 throw new ArgumentException (null, nameof (finallyRegion)); 118 throw new ArgumentException (null, nameof (finallyRegion));
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
136throw new ArgumentException("Certificate was not from this issuer", nameof(certificate));
src\Servers\Kestrel\shared\test\TestConnection.cs (1)
62throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
LibraryBuilder (1)
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenGenerator.cs (1)
44throw new ArgumentException(
Microsoft.AspNetCore.App.Analyzers (2)
Infrastructure\VirtualChars\VirtualChar.cs (2)
64throw new ArgumentException("Must be a surrogate char.", nameof(surrogateChar)); 79throw new ArgumentException("Span should not be empty.", nameof(span));
Microsoft.AspNetCore.Authentication (1)
RemoteAuthenticationOptions.cs (1)
55throw new ArgumentException(Resources.FormatException_OptionMustBeProvided(nameof(CallbackPath)), nameof(CallbackPath));
Microsoft.AspNetCore.Authentication.Abstractions (1)
TokenExtensions.cs (1)
39throw new ArgumentException("Token name cannot be null for any token.", nameof(tokens));
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthOptions.cs (1)
36throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Exception_OptionMustBeProvided, nameof(CallbackPath)), nameof(CallbackPath));
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectOptions.cs (1)
104throw new ArgumentException("Options.CallbackPath must be provided.", nameof(CallbackPath));
Microsoft.AspNetCore.Components (6)
DefaultComponentActivator.cs (1)
21throw new ArgumentException($"The type {componentType.FullName} does not implement {nameof(IComponent)}.", nameof(componentType));
RenderTree\Renderer.cs (3)
524throw new ArgumentException($"The frame's {nameof(RenderTreeFrame.FrameType)} property must equal {RenderTreeFrameType.Component}", nameof(frameIndex)); 529throw new ArgumentException($"The frame already has a non-null component instance", nameof(frameIndex)); 681throw new ArgumentException($"There is no event handler associated with this event. EventId: '{eventHandlerId}'.", nameof(eventHandlerId));
Routing\RouteData.cs (1)
26throw new ArgumentException($"The value must implement {nameof(IComponent)}.", nameof(pageType));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Components.Endpoints (3)
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (1)
168_ => throw new ArgumentException(Resources.FormatUnsupportedRenderMode(mode), nameof(mode)),
Rendering\SSRRenderModeBoundary.cs (1)
48_ => throw new ArgumentException($"Server-side rendering does not support the render mode '{renderMode}'.", nameof(renderMode))
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
36?? throw new ArgumentException("Could not deserialize state correctly", nameof(existingState));
Microsoft.AspNetCore.Components.Forms (1)
FieldIdentifier.cs (1)
50throw 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)
55throw new ArgumentException($"Property '{nameof(CircuitId.Secret)}' cannot be null.", nameof(circuitId));
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
36?? throw new ArgumentException("Could not deserialize state correctly", nameof(existingState));
Microsoft.AspNetCore.Components.Server.Tests (1)
ProtectedBrowserStorageTest.cs (1)
341throw new ArgumentException($"The value is not protected with the expected purpose '{_purpose}'. Value supplied: '{protectedString}'", nameof(protectedData));
Microsoft.AspNetCore.Components.WebAssembly (2)
Hosting\RootComponentMapping.cs (1)
26throw new ArgumentException(
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
36?? throw new ArgumentException("Could not deserialize state correctly", nameof(existingState));
Microsoft.AspNetCore.ConcurrencyLimiter (3)
ConcurrencyLimiterMiddleware.cs (1)
32throw new ArgumentException("The value of 'options.OnRejected' must not be null.", nameof(options));
QueuePolicies\BasePolicy.cs (2)
26throw new ArgumentException("MaxConcurrentRequests must be a positive integer.", nameof(options)); 32throw new ArgumentException("The RequestQueueLimit cannot be a negative number.", nameof(options));
Microsoft.AspNetCore.Cors (1)
Infrastructure\CorsService.cs (1)
65throw new ArgumentException(Resources.InsecureConfiguration, nameof(policy));
Microsoft.AspNetCore.DataProtection (4)
AuthenticatedEncryption\ConfigurationModel\XmlSerializedDescriptorInfo.cs (1)
30throw new ArgumentException(
Error.cs (2)
20return new ArgumentException(Resources.Common_ArgumentCannotBeNullOrEmpty, parameterName); 26return new ArgumentException(message, parameterName);
XmlEncryption\EncryptedXmlInfo.cs (1)
29throw new ArgumentException(
Microsoft.AspNetCore.DataProtection.Abstractions (5)
DataProtectionCommonExtensions.cs (2)
42throw new ArgumentException(Resources.DataProtectionExtensions_NullPurposesCollection, nameof(purposes)); 50throw new ArgumentException(Resources.DataProtectionExtensions_NullPurposesCollection, nameof(purposes));
src\Shared\WebEncoders\WebEncoders.cs (3)
115throw new ArgumentException( 247throw new ArgumentException( 403throw 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.Hosting (3)
Internal\HostingEnvironmentExtensions.cs (2)
19throw new ArgumentException($"The content root '{contentRootPath}' does not exist.", nameof(contentRootPath)); 70throw new ArgumentException($"The content root '{contentRootPath}' does not exist.", nameof(contentRootPath));
Internal\StartupLoader.cs (1)
242throw new ArgumentException(
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingStartupAttribute.cs (1)
24throw new ArgumentException($@"""{hostingStartupType}"" does not implement {typeof(IHostingStartup)}.", nameof(hostingStartupType));
Microsoft.AspNetCore.Http (1)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
236throw new ArgumentException($"An element with the key '{key}' already exists in the {nameof(AdaptiveCapacityDictionary<TKey, TValue>)}.", nameof(key));
Microsoft.AspNetCore.Http.Abstractions (10)
CookieBuilder.cs (1)
24: throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(value));
Extensions\MapExtensions.cs (1)
56throw new ArgumentException("The path must not end with a '/'", nameof(pathMatch));
Extensions\MapMiddleware.cs (1)
28throw new ArgumentException("Branch not set on options.", nameof(options));
Extensions\MapWhenMiddleware.cs (2)
28throw new ArgumentException("Predicate not set on options.", nameof(options)); 33throw new ArgumentException("Branch not set on options.", nameof(options));
FragmentString.cs (1)
30throw new ArgumentException("The leading '#' must be included for a non-empty fragment.", nameof(value));
PathString.cs (1)
41throw new ArgumentException(Resources.FormatException_PathMustStartWithSlash(nameof(value)), nameof(value));
QueryString.cs (1)
32throw new ArgumentException("The leading '?' must be included for a non-empty query.", nameof(value));
Routing\RouteValueDictionary.cs (1)
379throw new ArgumentException(message, nameof(key));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Http.Connections (3)
src\Shared\WebEncoders\WebEncoders.cs (3)
115throw new ArgumentException( 247throw new ArgumentException( 403throw new ArgumentException(
Microsoft.AspNetCore.Http.Connections.Client (6)
HttpConnection.cs (2)
141throw new ArgumentException("Options does not have a URL specified.", nameof(httpConnectionOptions)); 158throw new ArgumentException("ServerSentEvents can not be the only transport specified when running in the browser.", nameof(httpConnectionOptions));
Internal\DefaultTransportFactory.cs (1)
24throw new ArgumentException($"{nameof(httpClient)} cannot be null when {nameof(requestedTransportType)} is not {nameof(HttpTransportType.WebSockets)}.", nameof(httpClient));
Internal\LongPollingTransport.cs (1)
47throw new ArgumentException($"The '{transferFormat}' transfer format is not supported by this transport.", nameof(transferFormat));
Internal\ServerSentEventsTransport.cs (1)
51throw new ArgumentException($"The '{transferFormat}' transfer format is not supported by this transport.", nameof(transferFormat));
Internal\WebSocketsTransport.cs (1)
293throw new ArgumentException($"The '{transferFormat}' transfer format is not supported by this transport.", nameof(transferFormat));
Microsoft.AspNetCore.Http.Results (1)
ValidationProblem.cs (1)
23throw new ArgumentException($"{nameof(ValidationProblem)} only supports a 400 Bad Request response status code.", nameof(problemDetails));
Microsoft.AspNetCore.HttpLogging (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.InternalTesting (1)
TestFileOutputContext.cs (1)
61throw new ArgumentException("The extension must start with '.' if one is provided.", nameof(extension));
Microsoft.AspNetCore.InternalTesting.Tests (1)
ExceptionAssertTest.cs (1)
18throw new ArgumentException("Value cannot be null or an empty string.", "foo");
Microsoft.AspNetCore.JsonPatch (1)
Converters\JsonPatchDocumentConverter.cs (1)
27throw new ArgumentException(Resources.FormatParameterMustMatchType(nameof(objectType), "JsonPatchDocument"), nameof(objectType));
Microsoft.AspNetCore.Mvc.Abstractions (6)
ModelBinding\BindingInfo.cs (1)
67throw new ArgumentException(
ModelBinding\BindingSource.cs (1)
189throw new ArgumentException(message, nameof(bindingSource));
ModelBinding\CompositeBindingSource.cs (4)
36throw new ArgumentException(message, nameof(bindingSources)); 44throw new ArgumentException(message, nameof(bindingSources)); 52throw new ArgumentException(message, nameof(bindingSources)); 87throw new ArgumentException(message, nameof(bindingSource));
Microsoft.AspNetCore.Mvc.Core (25)
ApiConventionMethodAttribute.cs (2)
55throw new ArgumentException(Resources.FormatApiConventionMethod_NoMethodFound(methodName, conventionType), nameof(methodName)); 59throw new ArgumentException(Resources.FormatApiConventionMethod_AmbiguousMethodName(methodName, conventionType), nameof(methodName));
ApiConventionTypeAttribute.cs (2)
58throw new ArgumentException(Resources.FormatApiConventionMustBeStatic(conventionType), nameof(conventionType)); 78throw new ArgumentException(errorMessage, nameof(conventionType));
BindPropertyAttribute.cs (1)
48throw new ArgumentException(
ControllerContext.cs (1)
40throw new ArgumentException(Resources.FormatActionDescriptorMustBeBasedOnControllerAction(
Controllers\ControllerActivatorProvider.cs (1)
47throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Controllers\ControllerFactoryProvider.cs (3)
45throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 80throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 101throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Controllers\DefaultControllerPropertyActivator.cs (1)
40throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Filters\FilterCollection.cs (2)
84throw new ArgumentException(message, nameof(filterType)); 162throw new ArgumentException(message, nameof(filterType));
Formatters\FormatterMappings.cs (3)
60throw new ArgumentException(message, nameof(format)); 87throw new ArgumentException( 101throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Resources.Format_NotValid, format), nameof(format));
ModelBinderAttribute.cs (1)
66throw new ArgumentException(
ModelBinding\Binders\BinderTypeModelBinder.cs (1)
29throw new ArgumentException(
ModelBinding\BindingSourceValueProvider.cs (2)
44throw new ArgumentException(message, nameof(bindingSource)); 52throw new ArgumentException(message, nameof(bindingSource));
ModelBinding\JQueryKeyValuePairNormalizer.cs (1)
71throw new ArgumentException(
ModelBinding\Metadata\BindingMetadata.cs (1)
47throw new ArgumentException(
ModelBinding\ModelBindingHelper.cs (1)
229throw new ArgumentException(message, nameof(modelType));
ModelBinding\ModelMetadataProviderExtensions.cs (1)
38throw new ArgumentException(message, nameof(propertyName));
Routing\DynamicControllerRouteValueTransformerMetadata.cs (1)
16throw new ArgumentException(
Microsoft.AspNetCore.Mvc.Core.Test (4)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (2)
1287set { throw new ArgumentException("This is an exception.", "value"); } 1293set { throw new ArgumentException("This is a different exception.", "value"); }
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (2)
1462set { throw new ArgumentException("This is an exception.", "value"); } 1468set { throw new ArgumentException("This is a different exception.", "value"); }
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
DataAnnotationsModelValidator.cs (2)
55throw new ArgumentException( 63throw new ArgumentException(
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
EnumerableWrapperProvider.cs (1)
36throw new ArgumentException(
SerializableErrorWrapperProvider.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
JsonHelperExtensions.cs (1)
44throw new ArgumentException(message, nameof(jsonHelper));
Microsoft.AspNetCore.Mvc.Razor (3)
RazorFileHierarchy.cs (1)
18throw new ArgumentException(Resources.RazorProject_PathMustStartWithForwardSlash, nameof(path));
RazorViewEngine.cs (2)
61throw new ArgumentException( 68throw new ArgumentException(
Microsoft.AspNetCore.Mvc.RazorPages (8)
ApplicationModels\PageConventionCollection.cs (2)
256throw new ArgumentException(Resources.FormatInvalidValidPageName(pageName), argumentName); 267throw new ArgumentException(Resources.PathMustBeRootRelativePath, nameof(folderPath));
DependencyInjection\MvcRazorPagesMvcBuilderExtensions.cs (1)
45throw new ArgumentException(Resources.PathMustBeRootRelativePath, nameof(rootDirectory));
Infrastructure\DefaultPageActivatorProvider.cs (1)
27throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Infrastructure\DefaultPageModelActivatorProvider.cs (1)
26throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Infrastructure\DynamicPageRouteValueTransformerMetadata.cs (1)
17throw new ArgumentException(
Infrastructure\ServiceBasedPageModelActivatorProvider.cs (1)
21throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
RazorPagesOptions.cs (1)
37throw new ArgumentException(Resources.PathMustBeRootRelativePath, nameof(value));
Microsoft.AspNetCore.Mvc.TagHelpers (5)
ComponentTagHelper.cs (1)
75throw new ArgumentException(
TagHelperOutputExtensions.cs (3)
70throw new ArgumentException( 153throw new ArgumentException(Resources.ArgumentCannotContainHtmlSpace, nameof(classValue)); 207throw new ArgumentException(Resources.ArgumentCannotContainHtmlSpace, nameof(classValue));
ValidationSummaryTagHelper.cs (1)
68throw new ArgumentException(
Microsoft.AspNetCore.Mvc.TagHelpers.Test (2)
GlobbingUrlBuilderTest.cs (1)
460throw new ArgumentException($"{nameof(rootNode)} must have children.", nameof(rootNode));
TagHelperOutputExtensionsTest.cs (1)
1043var expected = new ArgumentException(Resources.ArgumentCannotContainHtmlSpace, nameof(classValue)).Message;
Microsoft.AspNetCore.Mvc.ViewFeatures (16)
AttributeDictionary.cs (3)
162throw new ArgumentException( 193throw new ArgumentException( 251throw new ArgumentException(
Controller.cs (1)
55throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(ViewData));
DefaultHtmlGenerator.cs (4)
545throw new ArgumentException( 622throw new ArgumentException( 724throw new ArgumentException( 1150throw new ArgumentException(
HtmlHelper.cs (3)
376throw new ArgumentException(message, nameof(TEnum)); 394throw new ArgumentException(message, nameof(enumType)); 1378throw new ArgumentException(message, nameof(metadata));
HtmlHelperOfT.cs (2)
54throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 80throw new ArgumentException(Resources.FormatArgumentPropertyUnexpectedType(
Rendering\HtmlHelperComponentExtensions.cs (1)
77_ => throw new ArgumentException($"Unsupported render mode {renderMode}", nameof(renderMode)),
Rendering\TagBuilder.cs (1)
50throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(tagBuilder));
ViewDataDictionaryControllerPropertyActivator.cs (1)
58throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Microsoft.AspNetCore.OutputCaching (2)
RecyclableArrayBufferWriter.cs (1)
47throw new ArgumentException(null, nameof(count));
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Owin (3)
OwinEnvironment.cs (3)
42throw new ArgumentException("Missing required feature: " + nameof(IHttpRequestFeature) + ".", nameof(context)); 46throw new ArgumentException("Missing required feature: " + nameof(IHttpResponseFeature) + ".", nameof(context)); 261throw new ArgumentException("Not enough available space in array", nameof(array));
Microsoft.AspNetCore.RateLimiting (3)
RateLimiterOptions.cs (3)
55throw new ArgumentException($"There already exists a policy with the name {policyName}.", nameof(policyName)); 73throw new ArgumentException($"There already exists a policy with the name {policyName}.", nameof(policyName)); 98throw new ArgumentException($"There already exists a policy with the name {policyName}.", nameof(policyName));
Microsoft.AspNetCore.ResponseCaching (2)
ResponseCachingFeature.cs (1)
26throw new ArgumentException($"When {nameof(value)} contains more than one value, it cannot contain a null or empty value.", nameof(value));
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.ResponseCompression (2)
CompressionProviderCollection.cs (1)
39throw new ArgumentException($"The provider must implement {nameof(ICompressionProvider)}.", nameof(providerType));
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Routing (4)
DefaultLinkGenerator.cs (1)
162throw new ArgumentException("A host must be provided.", nameof(host));
LinkGeneratorEndpointNameAddressExtensions.cs (2)
312throw new ArgumentException("A host must be provided.", nameof(host)); 361throw new ArgumentException("A host must be provided.", nameof(host));
Tree\TreeRouter.cs (1)
113throw new ArgumentException(
Microsoft.AspNetCore.Server.HttpSys (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Server.Kestrel.Core (12)
Internal\Infrastructure\ConnectionManager.cs (2)
50throw new ArgumentException("Unable to add connection.", nameof(id)); 58throw new ArgumentException("Unable to remove connection.", nameof(id));
Internal\Infrastructure\TimeoutControl.cs (2)
317throw new ArgumentException(CoreStrings.PositiveFiniteTimeSpanRequired, nameof(timeSpan)); 331throw 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)
182throw new ArgumentException(CoreStrings.UnixSocketPathMustBeAbsolute, nameof(socketPath));
KestrelServerOptions.cs (1)
574throw new ArgumentException(CoreStrings.UnixSocketPathMustBeAbsolute, nameof(socketPath));
Middleware\HttpsConnectionMiddleware.cs (1)
64throw new ArgumentException(CoreStrings.ServerCertificateRequired, nameof(options));
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
136throw new ArgumentException("Certificate was not from this issuer", nameof(certificate));
src\Servers\Kestrel\shared\test\TestConnection.cs (1)
62throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
Microsoft.AspNetCore.Shared.Tests (8)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
236throw new ArgumentException($"An element with the key '{key}' already exists in the {nameof(AdaptiveCapacityDictionary<TKey, TValue>)}.", nameof(key));
src\Shared\TaskToApm.cs (1)
57throw new ArgumentException($"{nameof(asyncResult)} must be a TaskAsyncResult wrapping a Task returning a {typeof(TResult).Name}.", nameof(asyncResult));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
src\Shared\WebEncoders\WebEncoders.cs (3)
115throw new ArgumentException( 247throw new ArgumentException( 403throw new ArgumentException(
Microsoft.AspNetCore.SignalR.Common (2)
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.AspNetCore.SignalR.Tests (1)
HubConnectionHandlerTests.cs (1)
5437throw new ArgumentException("Input must be greater than zero.", nameof(count));
Microsoft.AspNetCore.SpaServices.Extensions (2)
AngularCli\AngularCliMiddleware.cs (1)
32throw new ArgumentException("Property 'SourcePath' cannot be null or empty", nameof(spaBuilder));
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (1)
32throw new ArgumentException("Property 'SourcePath' cannot be null or empty", nameof(spaBuilder));
Microsoft.AspNetCore.StaticFiles (1)
StaticFileContext.cs (1)
48throw new ArgumentException($"{nameof(subPath)} cannot wrap a null value.", nameof(subPath));
Microsoft.AspNetCore.TestHost (1)
RequestBuilder.cs (1)
61throw new ArgumentException("Invalid header name: " + name, nameof(name));
Microsoft.AspNetCore.WebUtilities (9)
FileMultipartSection.cs (1)
34throw new ArgumentException("Argument must be a file section", nameof(section));
FormMultipartSection.cs (1)
34throw new ArgumentException("Argument must be a form section", nameof(section));
HttpRequestStreamReader.cs (1)
80throw new ArgumentException(Resources.HttpRequestStreamReader_StreamNotReadable, nameof(stream));
HttpResponseStreamWriter.cs (1)
76throw new ArgumentException(Resources.HttpResponseStreamWriter_StreamNotWritable, nameof(stream));
MultipartSectionStreamExtensions.cs (1)
34throw new ArgumentException("Multipart section must have a body to be read.", nameof(section));
src\Shared\UrlDecoder\UrlDecoder.cs (1)
22throw new ArgumentException(
src\Shared\WebEncoders\WebEncoders.cs (3)
115throw new ArgumentException( 247throw new ArgumentException( 403throw new ArgumentException(
Microsoft.Build (1)
ErrorUtilities.cs (1)
625throw new ArgumentException(
Microsoft.Build.Conversion.Core (1)
OldVSProjectFileReader.cs (1)
148throw new ArgumentException("Cannot write past end of user's buffer.", nameof(charactersToRead));
Microsoft.Build.Engine.OM.UnitTests (1)
ErrorUtilities.cs (1)
625throw new ArgumentException(
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskThatReturnsDictionaryTaskItem.cs (1)
143throw new ArgumentException("Array must be one-dimensional.", nameof(array));
Microsoft.Build.Framework (13)
ImmutableSegmentedList`1.cs (2)
473throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue)); 487throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
SegmentedArray.cs (8)
34throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 36throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 54throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 56throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 80throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 82throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray)); 149throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 151throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
SegmentedArray`1.cs (1)
316throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
ThrowHelper.cs (2)
205return new ArgumentException(string.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 210return new ArgumentException(string.Format(SR.Arg_WrongType, value, targetType), nameof(value));
Microsoft.Build.Tasks.Core (3)
ErrorUtilities.cs (1)
625throw new ArgumentException(
GenerateManifestBase.cs (1)
448throw new ArgumentException(String.Empty /* no message */, nameof(manifestType));
ManifestUtil\SecurityUtil.cs (1)
569throw new ArgumentException(resources.GetString("CertNotInStore"), nameof(certThumbprint));
Microsoft.Build.Utilities.Core (7)
ErrorUtilities.cs (1)
625throw new ArgumentException(
ToolLocationHelper.cs (6)
3757throw new ArgumentException("Invalid frameworkReferenceRoot", nameof(frameworkReferenceRoot)); 3826throw new ArgumentException("Invalid frameworkReferenceRoot", nameof(frameworkReferenceRoot)); 3831throw new ArgumentException("Invalid frameworkIdentifier", nameof(frameworkIdentifier)); 3888throw new ArgumentException("Invalid frameworkReferenceRoot", nameof(frameworkReferenceRoot)); 3893throw new ArgumentException("Invalid frameworkIdentifier", nameof(frameworkIdentifier)); 3898throw new ArgumentException("Invalid frameworkVersion", nameof(frameworkVersion));
Microsoft.Cci.Extensions (3)
Mappings\SimpleElementMapping.cs (1)
30throw new ArgumentException("Only understand values -1, 0, 1", "diff");
Writers\CSharp\CSDeclarationWriter.Enums.cs (1)
186throw new ArgumentException($"Unsupported type {value.GetType()}", nameof(value));
Writers\DocumentIdWriter.cs (1)
90throw new ArgumentException($"Unknown member type {member}", "member");
Microsoft.CSharp (2)
Microsoft\CSharp\RuntimeBinder\Error.cs (2)
31new ArgumentException(SR.TypeArgumentRequiredForStaticCall, paramName); 49new ArgumentException(SR.DynamicArgumentNeedsValue, paramName);
Microsoft.DotNet.AsmDiff (2)
AssemblySet.cs (1)
150throw new ArgumentException("assemblies", "Assemblies must only contain assemblies loaded in the current host");
Csv\DiffCsvColumn.cs (1)
40throw new ArgumentException("Unexpected mapping", "mapping");
Microsoft.DotNet.Build.Tasks.Packaging (1)
GeneratePackageReport.cs (1)
358throw new ArgumentException($"Could not find source item for {targetPath}", nameof(targetPath));
Microsoft.DotNet.Helix.Client (4)
generated-code\Job.cs (1)
88throw new ArgumentException("The parameter is not valid", nameof(body));
generated-code\Storage.cs (2)
134throw new ArgumentException("The parameter is not valid", nameof(body)); 220throw new ArgumentException("The parameter is not valid", nameof(body));
generated-code\Telemetry.cs (1)
107throw new ArgumentException("The parameter is not valid", nameof(body));
Microsoft.DotNet.Helix.JobSender (2)
JobDefinition.cs (1)
291return Environment.GetEnvironmentVariable(name) ?? throw new ArgumentException("Missing required environment variable", name);
Payloads\AdhocPayload.cs (1)
17throw new ArgumentException(
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (1)
Modeler\ServiceClientModelFactory.cs (1)
394throw new ArgumentException("Schema must be object", nameof(schema));
Microsoft.DotNet.VersionTools (4)
src\BuildManifest\BuildManifestClient.cs (1)
139throw new ArgumentException(
src\Dependencies\Submodule\IndicatorPackageSubmoduleUpdater.cs (1)
37throw new ArgumentException(nameof(indicatorPackageId), "An indicator package must be specified.");
src\Dependencies\Submodule\LatestCommitSubmoduleUpdater.cs (2)
26throw new ArgumentException( 34throw new ArgumentException(
Microsoft.Extensions.Caching.Abstractions (2)
CacheEntryExtensions.cs (1)
204throw new ArgumentException(message, paramName);
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Caching.Hybrid (1)
Internal\RecyclableArrayBufferWriter.cs (1)
82throw new ArgumentException(null, nameof(count));
Microsoft.Extensions.Caching.Memory (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Caching.MicroBenchmarks (1)
src\Caching\Hybrid\src\Internal\RecyclableArrayBufferWriter.cs (1)
82throw new ArgumentException(null, nameof(count));
Microsoft.Extensions.Configuration (2)
ChainedConfigurationProvider.cs (1)
26_config = source.Configuration ?? throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "source.Configuration"), nameof(source));
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Configuration.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Configuration.Binder (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Configuration.CommandLine (3)
CommandLineConfigurationProvider.cs (2)
146throw new ArgumentException( 153throw new ArgumentException(
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Configuration.FileExtensions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Configuration.Ini (2)
IniConfigurationExtensions.cs (1)
71throw new ArgumentException(SR.Error_InvalidFilePath, nameof(path));
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Configuration.Json (2)
JsonConfigurationExtensions.cs (1)
71throw new ArgumentException(SR.Error_InvalidFilePath, nameof(path));
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Configuration.UserSecrets (3)
PathHelper.cs (1)
46throw new ArgumentException(SR.Common_StringNullOrEmpty, nameof(userSecretsId));
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
UserSecretsIdAttribute.cs (1)
29throw new ArgumentException(SR.Common_StringNullOrEmpty, nameof(userSecretId));
Microsoft.Extensions.Configuration.Xml (2)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
XmlConfigurationExtensions.cs (1)
80throw new ArgumentException(SR.Error_InvalidFilePath, nameof(path));
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\CallSiteFactory.cs (2)
46throw new ArgumentException( 61throw new ArgumentException(
Microsoft.Extensions.DependencyInjection.Abstractions (2)
Extensions\ServiceCollectionDescriptorExtensions.cs (1)
464throw new ArgumentException(
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.DependencyModel (15)
Dependency.cs (2)
16throw new ArgumentException(null, nameof(name)); 20throw new ArgumentException(null, nameof(version));
DependencyContextExtensions.cs (1)
115throw new ArgumentException($"Provided path has empty file name '{assetPath}'", nameof(assetPath));
Library.cs (3)
45throw new ArgumentException(null, nameof(type)); 49throw new ArgumentException(null, nameof(name)); 53throw new ArgumentException(null, nameof(version));
ResourceAssembly.cs (2)
14throw new ArgumentException(null, nameof(path)); 18throw new ArgumentException(null, nameof(locale));
RuntimeAssembly.cs (3)
18throw new ArgumentException(null, nameof(assemblyName)); 22throw new ArgumentException(null, nameof(path)); 37throw new ArgumentException($"Provided path has empty file name '{path}'", nameof(path));
RuntimeFallbacks.cs (1)
20throw new ArgumentException(null, nameof(runtime));
RuntimeFile.cs (1)
14throw new ArgumentException(null, nameof(path));
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
TargetInfo.cs (1)
16throw new ArgumentException(null, nameof(framework));
Microsoft.Extensions.Diagnostics (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
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.FileProviders.Composite (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalFileProvider.cs (1)
58throw new ArgumentException("The path must be absolute.", nameof(root));
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.FileSystemGlobbing (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Hosting (2)
Internal\Host.cs (1)
54throw new ArgumentException(SR.IHostApplicationLifetimeReplacementNotSupported, nameof(applicationLifetime));
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Hosting.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Hosting.Systemd (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Hosting.WindowsServices (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Http (3)
DependencyInjection\HttpClientBuilderExtensions.cs (1)
626throw new ArgumentException(SR.HandlerLifetime_InvalidValue, nameof(handlerLifetime));
HttpClientFactoryOptions.cs (1)
65throw new ArgumentException(SR.HandlerLifetime_InvalidValue, nameof(value));
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
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 (2)
LoggerFactory.cs (1)
94throw new ArgumentException(SR.Format(SR.InvalidActivityTrackingOptions, _factoryOptions.ActivityTrackingOptions), nameof(options));
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Logging.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Logging.AzureAppServices (2)
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
39throw new ArgumentException("The value cannot be an empty string.", paramName); 68throw new ArgumentException("The value cannot be an empty or whitespace string.", paramName);
Microsoft.Extensions.Logging.Configuration (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Logging.Console (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Logging.Debug (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Logging.EventLog (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Logging.EventSource (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Logging.TraceSource (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Options (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Options.ConfigurationExtensions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Extensions.Options.DataAnnotations (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
Microsoft.Interop.SourceGeneration (1)
TypeSymbolExtensions.cs (1)
333throw new ArgumentException($"Cannot handle type name in the format provided: {typeName}", nameof(typeName));
Microsoft.JSInterop (1)
JSRuntime.cs (1)
325: throw new ArgumentException($"There is no tracked object with id '{dotNetObjectId}'. Perhaps the DotNetObjectReference instance was already disposed.", nameof(dotNetObjectId));
Microsoft.Net.Http.Headers (6)
ContentDispositionHeaderValue.cs (1)
338throw new ArgumentException("An empty string is not allowed.", parameterName);
CookieHeaderValue.cs (2)
174throw new ArgumentException("Invalid cookie name: " + name, parameterName); 189throw new ArgumentException("Invalid cookie value: " + value, parameterName);
EntityTagHeaderValue.cs (1)
52throw new ArgumentException("An empty string is not allowed.", nameof(tag));
HeaderUtilities.cs (1)
75throw new ArgumentException("An empty string is not allowed.", parameterName);
MediaTypeHeaderValue.cs (1)
657throw new ArgumentException("An empty string is not allowed.", parameterName);
Microsoft.NET.Sdk.WebAssembly.Pack.Tasks (1)
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
Microsoft.NET.WebAssembly.Webcil (2)
WebcilReader.cs (2)
37throw new ArgumentException("Stream must be readable and seekable", nameof(stream)); 301throw new ArgumentException($"expected debug directory entry type {nameof(DebugDirectoryEntryType.PdbChecksum)}", nameof(entry));
Microsoft.Web.Xdt.Extensions (2)
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);
MobileBuildTasks (2)
Android\Ndk\NdkVersion.cs (1)
20throw new ArgumentException ("must be a non-empty string", nameof (version));
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
MonoAOTCompiler (1)
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
MonoTargetsTasks (2)
ILStrip\ILStrip.cs (1)
62throw new ArgumentException($"'{nameof(Assemblies)}' is required.", nameof(Assemblies));
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
MSBuild (1)
ErrorUtilities.cs (1)
625throw new ArgumentException(
MSBuildTaskHost (1)
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (1)
625throw new ArgumentException(
PresentationCore (259)
MS\Internal\Automation\EventMap.cs (1)
124throw new ArgumentException(SR.Automation_InvalidEventId, "eventId");
MS\Internal\FontCache\FontCacheUtil.cs (1)
518throw new ArgumentException(SR.FaceIndexMustBePositiveOrZero, "fontUri");
MS\Internal\IListConverters.cs (1)
65throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value");
MS\Internal\Ink\ExtendedPropertyCollection.cs (3)
166throw new ArgumentException(SR.EPExists, "id"); 184throw new ArgumentException(SR.EPGuidNotFound, "id"); 244throw new ArgumentException(SR.EPNotFound, "attributeId");
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (5)
147throw new ArgumentException(SR.StrokeCollectionCountTooBig, "strokes"); 231throw new ArgumentException(SR.ApplicationGestureArrayLengthIsZero, "applicationGestures"); 240throw new ArgumentException(SR.ApplicationGestureIsInvalid, "applicationGestures"); 252throw new ArgumentException(SR.DuplicateApplicationGestureFound, "applicationGestures"); 262throw new ArgumentException(SR.AllGesturesMustExistAlone, "applicationGestures");
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (18)
437throw new ArgumentException(SR.InvalidSizeSpecified, "cbSize"); 447throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Custom Attribute tag embedded in ISF stream does not match guid table"), "tag"); 454throw new ArgumentException(SR.InvalidSizeSpecified, "cbSize"); 474throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), "cbSize"); 495throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), "cbSize"); 797throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(System.Windows.Media.Color)), "value"); 805throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(int)), "value"); 813throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(DrawingFlags)), "value"); 824throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(StylusTip), typeof(int)), "value"); 828throw new ArgumentException(SR.Format(SR.InvalidValueOfType, value, typeof(StylusTip)), "value"); 839throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(String), typeof(Matrix)), "value"); 846throw new ArgumentException(SR.MatrixNotInvertible, "value"); 850throw new ArgumentException(SR.InvalidMatrixContainsNaN, "value"); 854throw new ArgumentException(SR.InvalidMatrixContainsInfinity, "value"); 862throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(bool)), "value"); 869throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(double)), "value"); 893throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte)), "value"); 906throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte[])), "value");
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (42)
222throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "isfStream"); 236throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), "isfStream"); 241throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "isfStream"); 400throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "inputStream"); 756throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Global Custom Attribute tag embedded in ISF stream does not match guid table"), "inkdata"); 766throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "inkdata"); 813throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "inkdata"); 844throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 849throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 862throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 872throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 904throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 917throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 927throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 944throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 953throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 976throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1006throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1011throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1019throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1029throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1061throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1070throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1078throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1110throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1118throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1145throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1183throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1204throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1277throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1312throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1348throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1354throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1359throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1365throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1370throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1376throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1381throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1387throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),"strm"); 1604throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Button guid tag embedded in ISF stream does not match guid table"),"strd"); 1620throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF with NoX or NoY specified"), "strd"); 1644throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Packet Description Property tag embedded in ISF stream does not match guid table"), "strd");
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (3)
63throw new ArgumentException(SR.InvalidTempFileName, "tempFileName"); 410throw new ArgumentException(SR.InvalidScheme, "requestedUri"); 417throw new ArgumentException(SR.InvalidEventHandle, "eventHandle");
MS\Internal\IO\Packaging\NetStream.cs (1)
148throw new ArgumentException(SR.IOBufferOverflow, "buffer");
MS\Internal\IO\Packaging\PreloadedPackages.cs (1)
167throw new ArgumentException(SR.UriMustBeAbsolute, "uri");
MS\Internal\PartialArray.cs (2)
143throw new ArgumentException( 152throw new ArgumentException(
MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (2)
185throw new ArgumentException( 194throw new ArgumentException(
MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (2)
128throw new ArgumentException( 137throw new ArgumentException(
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (1)
264throw new ArgumentException($"{osVer} is not a valid OS!", nameof(osVer));
System\IO\Packaging\PackageStore.cs (2)
102throw new ArgumentException(SR.NotAllowedPackageUri, nameof(uri)); 154throw new ArgumentException(SR.UriMustBeAbsolute, "uri");
System\IO\Packaging\PackWebRequestFactory.cs (2)
59throw new ArgumentException(SR.UriMustBeAbsolute, "uri"); 64throw new ArgumentException(SR.Format(SR.UriSchemeMismatch, PackUriHelper.UriSchemePack), "uri");
System\Windows\Documents\DynamicDocumentPaginator.cs (1)
78throw new ArgumentException(SR.PaginatorMissingContentPosition, "contentPosition");
System\Windows\DragDrop.cs (8)
401throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "dragSource"); 432throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "dragSource"); 717throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 740throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 774throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 797throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 1176throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope"); 1200throw new ArgumentException(SR.ScopeMustBeUIElementOrContent, "scope");
System\Windows\Duration.cs (2)
34throw new ArgumentException(SR.Timing_InvalidArgNonNegative, "timeSpan"); 60throw new ArgumentException(SR.Timing_InvalidArgNonNegative, "timeSpan");
System\Windows\FontStretchConverter.cs (1)
81throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value");
System\Windows\FontStyleConverter.cs (1)
81throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value");
System\Windows\FontWeightConverter.cs (1)
81throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value");
System\Windows\Generated\ContentElement.cs (4)
80throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 88throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 149throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 156throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation");
System\Windows\Generated\UIElement.cs (4)
80throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 88throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 149throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 156throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation");
System\Windows\Ink\DrawingAttributes.cs (3)
145throw new ArgumentException(SR.InvalidSttValue, "value"); 720throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(Matrix)), "propertyData"); 955throw new ArgumentException(SR.EPGuidNotFound, "id");
System\Windows\Ink\GestureRecognizer.cs (1)
178throw new ArgumentException(SR.StrokeCollectionCountTooBig, "strokes");
System\Windows\Ink\IncrementalHitTester.cs (2)
51throw new System.ArgumentException(SR.EmptyArrayNotAllowedAsArgument, "points"); 74throw new System.ArgumentException(SR.EmptyArrayNotAllowedAsArgument, "stylusPoints");
System\Windows\Ink\Stroke.cs (4)
66throw new ArgumentException(SR.InvalidStylusPointCollectionZeroCount, "stylusPoints"); 160throw new ArgumentException(SR.MatrixNotInvertible, "transformMatrix"); 164throw new ArgumentException(SR.InvalidMatrixContainsNaN, "transformMatrix"); 168throw new ArgumentException(SR.InvalidMatrixContainsInfinity, "transformMatrix");
System\Windows\Ink\StrokeCollection.cs (13)
60throw new ArgumentException(SR.StrokeIsDuplicated, "strokes"); 73throw new ArgumentException(SR.Image_StreamRead, "stream"); 79throw new ArgumentException(SR.Invalid_isfData_Length, "stream"); 97throw new ArgumentException(SR.Image_StreamWrite, "stream"); 198throw new ArgumentException(SR.InvalidGuid, "propertyDataId"); 236throw new ArgumentException(SR.MatrixNotInvertible, "transformMatrix"); 328throw new ArgumentException(SR.StrokeIsDuplicated, "stroke"); 346throw new ArgumentException(SR.StrokeIsDuplicated, "stroke"); 402ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, "strokes"); 446throw new ArgumentException(SR.StrokeIsDuplicated, "strokes"); 494ArgumentException ae = new ArgumentException(SR.EmptyScToReplace, "strokesToReplace"); 507ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, "strokesToReplace"); 523throw new ArgumentException(SR.StrokeIsDuplicated, "strokesToReplaceWith");
System\Windows\Input\Command\RoutedCommand.cs (1)
62throw new ArgumentException(SR.StringEmpty, "name");
System\Windows\Input\ManipulationStartingEventArgs.cs (1)
39throw new ArgumentException(SR.Manipulation_InvalidManipulationMode, "value");
System\Windows\Input\Stylus\Common\DynamicRenderer.cs (1)
262throw new ArgumentException(SR.Stylus_MustBeDownToCallReset, "stylusDevice");
System\Windows\Input\Stylus\Common\RawStylusInput.cs (3)
37throw new ArgumentException(SR.Stylus_MatrixNotInvertable, "tabletToElementTransform"); 111throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, "stylusPoints"); 115throw new ArgumentException(SR.Stylus_StylusPointsCantBeEmpty, "stylusPoints");
System\Windows\Input\Stylus\Common\StylusPlugInCollection.cs (2)
53throw new ArgumentException(SR.Stylus_PlugInIsDuplicated, nameof(plugIn)); 186throw new ArgumentException(SR.Stylus_PlugInIsDuplicated, "plugIn");
System\Windows\Input\Stylus\Common\StylusPoint.cs (3)
130throw new ArgumentException(SR.InvalidAdditionalDataForStylusPoint, "additionalValues"); 303throw new ArgumentException(SR.InvalidStylusPointProperty, "stylusPointProperty"); 386throw new ArgumentException(SR.InvalidStylusPointProperty, "propertyId");
System\Windows\Input\Stylus\Common\StylusPointCollection.cs (8)
54throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, "initialCapacity"); 79throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, "initialCapacity"); 97throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, "stylusPoints"); 132throw new ArgumentException(SR.InvalidStylusPointConstructionZeroLengthCollection, "points"); 213throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, "stylusPoints"); 291throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, "stylusPoint"); 309throw new ArgumentException(SR.IncompatibleStylusPointDescriptions, "stylusPoint"); 457throw new ArgumentException(SR.InvalidStylusPointDescriptionSubset, "subsetToReformatTo");
System\Windows\Input\Stylus\Common\StylusPointDescription.cs (4)
66throw new ArgumentException(SR.InvalidStylusPointDescription, "stylusPointPropertyInfos"); 82throw new ArgumentException(SR.InvalidStylusPointDescriptionDuplicatesFound, "stylusPointPropertyInfos"); 93throw new ArgumentException(SR.InvalidStylusPointDescriptionButtonsMustBeLast, "stylusPointPropertyInfos"); 100throw new ArgumentException(SR.InvalidStylusPointDescriptionTooManyButtons, "stylusPointPropertyInfos");
System\Windows\Input\Stylus\Common\StylusPointProperty.cs (2)
63throw new ArgumentException(SR.InvalidIsButtonForId, "isButton"); 71throw new ArgumentException(SR.InvalidIsButtonForId2, "isButton");
System\Windows\Input\Stylus\Common\StylusPointPropertyInfo.cs (2)
66throw new ArgumentException(SR.Stylus_InvalidMax, "maximum"); 72throw new ArgumentException(SR.InvalidStylusPointPropertyInfoResolution, "resolution");
System\Windows\Input\Stylus\Common\TabletDeviceCollection.cs (1)
77throw new ArgumentException(SR.Format(SR.Stylus_IndexOutOfRange, index.ToString(System.Globalization.CultureInfo.InvariantCulture)), "index");
System\Windows\Input\TouchDevice.cs (1)
344throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), "element");
System\Windows\InterOp\HwndSourceKeyboardInputSite.cs (1)
26throw new ArgumentException(SR.KeyboardSinkMustBeAnElement, "sink");
System\Windows\InterOp\HwndTarget.cs (3)
531throw new ArgumentException( 538throw new ArgumentException( 545throw new ArgumentException(
System\Windows\Markup\XmlLanguage.cs (1)
801throw new ArgumentException(SR.Format(SR.XmlLangMalformed, ietfLanguageTag), "ietfLanguageTag");
System\Windows\Media\Animation\ClockController.cs (1)
293throw new ArgumentException(SR.Timing_InvalidArgFinitePositive, "value");
System\Windows\Media\Animation\Generated\Animatable.cs (4)
86throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 94throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 155throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 162throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation");
System\Windows\Media\Animation\Generated\BooleanAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\ByteAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\CharAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\ColorAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\DecimalAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\DoubleAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\Int16AnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\Int32AnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\Int64AnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\MatrixAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\ObjectAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\Point3DAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\PointAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\QuaternionAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\RectAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\Rotation3DAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\SingleAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\SizeAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\StringAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\Vector3DAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Generated\VectorAnimationUsingKeyFrames.cs (1)
238throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\Media\Animation\Timeline.cs (2)
223throw new ArgumentException(SR.Timing_InvalidArgAccelAndDecel, "value"); 612throw new ArgumentException(SR.Timing_InvalidArgFinitePositive, "value");
System\Windows\Media\Animation\TimelineGroup.cs (1)
152throw new ArgumentException(SR.Timing_ChildMustBeTimeline, nameof(child));
System\Windows\Media\CharacterMetricsDictionary.cs (3)
510throw new ArgumentException(SR.Format(SR.CannotConvertStringToType, s, "int"), "key"); 518throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), "int"), "key"); 522throw new ArgumentException(SR.Format(SR.CodePointOutOfRange, value), "key");
System\Windows\Media\ColorContext.cs (2)
510throw new ArgumentException(SR.UriNotAbsolute, "profileUri"); 636throw new ArgumentException(SR.ColorContext_FileTooLarge, filename);
System\Windows\Media\ColorConverter.cs (1)
91throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value");
System\Windows\Media\CultureSpecificStringDictionary.cs (2)
327throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(string)), "value"); 340throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), typeof(XmlLanguage)), "key");
System\Windows\Media\Effects\BitmapEffect.cs (1)
117throw new ArgumentException(SR.Effect_No_InputSource, "input");
System\Windows\Media\Effects\ShaderEffect.cs (2)
395throw new ArgumentException(SR.GetResourceString(srid), "dp"); 446throw new ArgumentException(SR.Effect_ShaderSamplerType, "dp");
System\Windows\Media\FontEmbeddingManager.cs (1)
120throw new ArgumentException(SR.GlyphTypefaceNotRecorded, "glyphTypeface");
System\Windows\Media\FontFamily.cs (1)
94throw new ArgumentException(SR.UriNotAbsolute, "baseUri");
System\Windows\Media\FontFamilyConverter.cs (1)
142throw new ArgumentException(SR.Format(SR.General_Expected_Type, "FontFamily"), "value");
System\Windows\Media\Fonts.cs (2)
98throw new ArgumentException(SR.UriNotAbsolute, "baseUri"); 106throw new ArgumentException(SR.InvalidAbsoluteUriInFontFamilyName, "location");
System\Windows\Media\Generated\BrushConverter.cs (1)
83throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Brush"), "context");
System\Windows\Media\Generated\CacheModeConverter.cs (1)
83throw new ArgumentException(SR.Format(SR.General_Expected_Type, "CacheMode"), "context");
System\Windows\Media\Generated\GeometryConverter.cs (1)
83throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Geometry"), "context");
System\Windows\Media\Generated\PathFigureCollectionConverter.cs (1)
83throw new ArgumentException(SR.Format(SR.General_Expected_Type, "PathFigureCollection"), "context");
System\Windows\Media\Generated\TransformConverter.cs (1)
83throw new ArgumentException(SR.Format(SR.General_Expected_Type, "Transform"), "context");
System\Windows\Media\GlyphRun.cs (12)
413throw new ArgumentException(SR.ClusterMapEntriesShouldNotDecrease, "clusterMap"); 416throw new ArgumentException(SR.ClusterMapEntryShouldPointWithinGlyphIndices, "clusterMap"); 422throw new ArgumentException(SR.ClusterMapFirstEntryMustBeZero, "clusterMap"); 427throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, characters.Count), "clusterMap"); 433throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, GlyphCount), "clusterMap"); 440throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, CodepointCount + 1), "caretStops"); 462throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, "glyphIndices"); 466throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsMustBeLessOrEqualTo, MaxGlyphCount), "glyphIndices"); 472throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), "advanceWidths"); 475throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), "glyphOffsets"); 1113throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, "value"); 1143throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, "value");
System\Windows\Media\GlyphTypeface.cs (4)
125throw new ArgumentException(SR.UriNotAbsolute, "typefaceSource"); 238throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, "glyphs"); 241throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsMustBeLessOrEqualTo, ushort.MaxValue), "glyphs"); 303throw new ArgumentException(SR.UriNotAbsolute, "value");
System\Windows\Media\ImageSourceConverter.cs (1)
71throw new ArgumentException(SR.Format(SR.General_Expected_Type, "ImageSource"), "context");
System\Windows\Media\Imaging\BitmapEncoder.cs (1)
94throw new ArgumentException(
System\Windows\Media\Imaging\BitmapFrame.cs (2)
85throw new System.ArgumentException(SR.Image_NoDecodeFrames, "uri"); 102throw new System.ArgumentException(SR.Image_NoDecodeFrames, "stream");
System\Windows\Media\Imaging\BitmapSizeOptions.cs (1)
186throw new ArgumentException(SR.Image_SizeOptionsAngle, "rotation");
System\Windows\Media\Imaging\BitmapSource.cs (1)
660throw new ArgumentException(SR.Collection_BadRank, "pixels");
System\Windows\Media\Imaging\CachedBitmap.cs (2)
137throw new ArgumentException(SR.Collection_BadRank, "pixels"); 416throw new System.ArgumentException(
System\Windows\Media\Imaging\RenderTargetBitmap.cs (1)
58throw new System.ArgumentException(
System\Windows\Media\Imaging\WriteableBitmap.cs (5)
95throw new ArgumentException(SR.Effect_PixelFormat, "pixelFormat"); 895throw new ArgumentException(SR.Image_InsufficientBufferSize, "sourceBufferSize"); 1098throw new ArgumentException(SR.Image_InsufficientBuffer, "sourceBuffer"); 1124throw new ArgumentException(SR.Image_InsufficientBuffer, "sourceBuffer"); 1140throw new ArgumentException(SR.Collection_BadRank, backwardsCompat ? "pixels" : "sourceBuffer");
System\Windows\Media\PixelFormat.cs (2)
336throw new System.ArgumentException (SR.Format(SR.Image_BadPixelFormat, pixelFormatString), 430throw new System.ArgumentException (SR.Format(SR.Image_BadPixelFormat, format), "format");
System\Windows\Media\RequestCachePolicyConverter.cs (1)
85throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "value");
System\Windows\Media\textformatting\TextSimpleMarkerProperties.cs (1)
65throw new ArgumentException(SR.Format(SR.Enum_Invalid, typeof(TextMarkerStyle)), "style");
System\Windows\Media3D\Generated\Visual3D.cs (4)
86throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 94throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), "clock"); 155throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), "dp"); 162throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), "animation");
System\Windows\Media3D\Viewport2DVisual3D.cs (2)
522throw new ArgumentException(SR.Viewport2DVisual3D_MaterialGroupIsInteractiveMaterial, "material"); 546throw new ArgumentException(SR.Viewport2DVisual3D_MultipleInteractiveMaterials, "material");
System\Windows\PresentationSource.cs (2)
131throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, element.GetType()), nameof(element)); 197throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, e.GetType()), nameof(e));
System\Windows\TextDecorationCollectionConverter.cs (1)
83throw new ArgumentException(SR.Format(SR.General_BadType, "ConvertFrom"), "input");
PresentationFramework (216)
MS\Internal\Annotations\Anchoring\DataIdProcessor.cs (2)
202throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart"); 211throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart");
MS\Internal\Annotations\Anchoring\FixedPageProcessor.cs (2)
178throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart"); 189throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart");
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (8)
111throw new ArgumentException(SR.Format(SR.SelectionDoesNotResolveToAPage, "start"), "selection"); 118throw new ArgumentException(SR.Format(SR.SelectionDoesNotResolveToAPage, "end"), "selection"); 205throw new ArgumentException(SR.StartNodeMustBeFixedPageProxy, "startNode"); 293throw new ArgumentException(SR.StartNodeMustBeDocumentPageViewOrFixedPage, "startNode"); 461throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 467throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 487throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}"); 505throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart");
MS\Internal\Annotations\Anchoring\LocatorManager.cs (1)
371throw new ArgumentException("Unsupported Selection", "selection");
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (4)
82throw new ArgumentException(SR.WrongSelectionType, $"anchor1: type = {anchor1.GetType()}"); 85throw new ArgumentException(SR.WrongSelectionType, $"Anchor2: type = {anchor2.GetType()}"); 238throw new ArgumentException(SR.WrongSelectionType, "selection"); 380throw new ArgumentException(SR.WrongSelectionType, "selection");
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (5)
146throw new ArgumentException(SR.WrongSelectionType, "selection"); 156throw new ArgumentException(SR.InvalidStartNodeForTextSelection, "startNode"); 159throw new ArgumentException(SR.InvalidStartNodeForTextSelection, "startNode"); 203throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), "locatorPart"); 253throw new ArgumentException(SR.IncorrectAnchorLength, "locatorPart");
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (1)
277throw new ArgumentException(SR.SelectionMustBeServiceProvider, "selection");
MS\Internal\Annotations\Anchoring\TreeNodeSelectionProcessor.cs (2)
105throw new ArgumentException(SR.WrongSelectionType, nameof(selection)); 125throw new ArgumentException(SR.WrongSelectionType, nameof(selection));
MS\Internal\Annotations\Component\AnnotationAdorner.cs (1)
47throw new ArgumentException(SR.AnnotationAdorner_NotUIElement, "component");
MS\Internal\Annotations\Component\HighlightComponent.cs (4)
276throw new ArgumentException(SR.InvalidAttachedAnnotation, "attachedAnnotation"); 521throw new ArgumentException(SR.InvalidAttachedAnchor, "attachedAnnotation"); 531throw new ArgumentException(SR.AnnotationIsNull, "attachedAnnotation"); 537throw new ArgumentException(SR.Format(SR.NotHighlightAnnotationType, attachedAnnotation.Annotation.AnnotationType.ToString()), "attachedAnnotation");
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (1)
242throw new ArgumentException(SR.InvalidAttachedAnnotation, "attachedAnnotation");
MS\Internal\Annotations\XmlElementCollection.cs (2)
100throw new ArgumentException(SR.Format(SR.XmlNodeAlreadyOwned, "change", "change"), "item"); 116throw new ArgumentException(SR.Format(SR.XmlNodeAlreadyOwned, "change", "change"), "item");
MS\Internal\Controls\StickyNote\StickyNoteAnnotations.cs (2)
956throw new ArgumentException(SR.InvalidValueSpecified, "attachedAnnotation"); 1301throw new ArgumentException(SR.InvalidStickyNoteAnnotation, "attachedAnnotation");
MS\Internal\Data\IndexedEnumerable.cs (1)
332throw new ArgumentException(SR.CopyToNotEnoughSpace, "index");
MS\Internal\Documents\ContentElementCollection.cs (2)
461throw new ArgumentException(SR.Format(SR.TableCollectionElementTypeExpected, typeof(TItem).Name), "value"); 515throw new ArgumentException(SR.Format(SR.TableCollectionElementTypeExpected, typeof(TItem).Name), "value");
MS\Internal\Documents\DocumentPageHost.cs (2)
57throw new ArgumentException(SR.DocumentPageView_ParentNotDocumentPageHost, "pageVisual"); 60throw new ArgumentException(SR.DocumentPageView_ParentNotDocumentPageHost, "pageVisual");
MS\Internal\Documents\FlowDocumentPaginator.cs (5)
224throw new ArgumentException(SR.IDPInvalidContentPosition, "contentPosition"); 232throw new ArgumentException(SR.IDPInvalidContentPosition, "contentPosition"); 236throw new ArgumentException(SR.IDPInvalidContentPosition, "contentPosition"); 289throw new ArgumentException(SR.IDPInvalidContentPosition, "contentPosition"); 293throw new ArgumentException(SR.IDPInvalidContentPosition, "contentPosition");
MS\Internal\Documents\ParentUndoUnit.cs (1)
139throw new ArgumentException(SR.UndoUnitNotFound, "unit");
MS\Internal\Documents\UndoManager.cs (1)
349throw new ArgumentException(SR.UndoUnitNotFound, nameof(unit));
MS\Internal\Ink\ClipboardProcessor.cs (1)
290throw new ArgumentException(SR.InvalidClipboardFormat, "value");
MS\Internal\IO\Packaging\ByteStream.cs (1)
284throw new ArgumentException(SR.BufferTooSmall, "buffer");
MS\Internal\IO\Packaging\ManagedFilter.cs (1)
135throw new ArgumentException(SR.FilterPropSpecUnknownUnionSelector, "propSpec");
MS\Internal\IO\Packaging\XpsFilter.cs (3)
366throw new ArgumentException(SR.FileNameNullOrEmpty, "pszFileName"); 373throw new ArgumentException(SR.FilterLoadInvalidModeFlag, "dwMode"); 389throw new ArgumentException(SR.FilterLoadInvalidModeFlag, "dwMode");
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (1)
201throw new ArgumentException($"The provided type '{runtimeClass.FullName}' is not a WinRT projected runtime class.", nameof(runtimeClass));
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (1)
264throw new ArgumentException($"{osVer} is not a valid OS!", nameof(osVer));
System\Windows\Annotations\Annotation.cs (6)
99throw new ArgumentException(SR.TypeNameMustBeSpecified, "annotationType.Name");// needs better message 103throw new ArgumentException(SR.TypeNameMustBeSpecified, "annotationType.Namespace");//needs better message 135throw new ArgumentException(SR.TypeNameMustBeSpecified, "annotationType.Name");//needs better message 139throw new ArgumentException(SR.TypeNameMustBeSpecified, "annotationType.Namespace");//needs better message 144throw new ArgumentException(SR.InvalidGuid, "id"); 148throw new ArgumentException(SR.ModificationEarlierThanCreation, "lastModificationTime");
System\Windows\Annotations\AnnotationHelper.cs (2)
943throw new ArgumentException(SR.InvalidHighlightColor, "highlightBrush"); 1099throw new ArgumentException(SR.AnnotationServiceNotEnabled, "service");
System\Windows\Annotations\AnnotationResource.cs (1)
83throw new ArgumentException(SR.InvalidGuid, "id");
System\Windows\Annotations\AnnotationService.cs (3)
148throw new ArgumentException(SR.ParameterMustBeLogicalNode, "root"); 367throw new ArgumentException(SR.ParameterMustBeLogicalNode, "element"); 402throw new ArgumentException(SR.ParameterMustBeLogicalNode, "element");
System\Windows\Annotations\LocatorPart.cs (2)
53throw new ArgumentException(SR.TypeNameMustBeSpecified, "partType.Name"); 57throw new ArgumentException(SR.TypeNameMustBeSpecified, "partType.Namespace");
System\Windows\Annotations\Storage\XmlStreamStore.cs (7)
146throw new ArgumentException(SR.AnnotationAlreadyExists, "newAnnotation"); 150throw new ArgumentException(SR.AnnotationAlreadyExists, "newAnnotation"); 792throw new ArgumentException(SR.NullUri, "knownNamespaces"); 796throw new ArgumentException(SR.DuplicatedUri, "knownNamespaces"); 810throw new ArgumentException(SR.NullUri, "knownNamespaces"); 815throw new ArgumentException(SR.DuplicatedCompatibleUri, "knownNamespaces"); 889throw new ArgumentException(SR.Format(SR.InvalidNamespace, xmlNamespace), "xmlNamespace");
System\Windows\Controls\AdornedElementPlaceholder.cs (1)
67throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Controls\CustomDictionarySources.cs (1)
99throw new ArgumentException(SR.CustomDictionaryItemAlreadyExists, "item");
System\Windows\Controls\DataGridColumnCollection.cs (2)
50throw new ArgumentException(SR.Format(SR.DataGrid_InvalidColumnReuse, item.Header), "item"); 76throw new ArgumentException(SR.Format(SR.DataGrid_InvalidColumnReuse, item.Header), "item");
System\Windows\Controls\DataGridLength.cs (4)
81throw new ArgumentException( 92throw new ArgumentException( 99throw new ArgumentException( 106throw new ArgumentException(
System\Windows\Controls\Decorator.cs (1)
71throw new ArgumentException (SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Controls\DocumentViewer.cs (2)
1991throw new ArgumentException(SR.DocumentViewerArgumentMustBeInteger, "data"); 2024throw new ArgumentException(SR.DocumentViewerArgumentMustBePercentage, "data");
System\Windows\Controls\FlowDocumentReader.cs (1)
1962throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), "value");
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
1859throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), "value");
System\Windows\Controls\Grid.cs (1)
89throw (new ArgumentException(SR.Format(SR.Grid_UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value"));
System\Windows\Controls\InkCanvas.cs (1)
1843throw new ArgumentException(SR.InvalidPoint, "point");
System\Windows\Controls\ItemCollection.cs (1)
299throw new ArgumentException(SR.BadTargetArray, "array"); // array is multidimensional.
System\Windows\Controls\ItemContainerGenerator.cs (3)
175throw new ArgumentException(SR.PanelIsNotItemsHost, "panel"); 279throw new ArgumentException(SR.Format(SR.RemoveRequiresOffsetZero, position.Index, position.Offset), "position"); 281throw new ArgumentException(SR.Format(SR.RemoveRequiresPositiveCount, count), "count");
System\Windows\Controls\Panel.cs (1)
99throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1743throw new ArgumentException(SR.DocumentViewerChildMustImplementIDocumentPaginatorSource, "value");
System\Windows\Controls\Primitives\Popup.cs (1)
1294throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Controls\PrintDialog.cs (1)
94throw new System.ArgumentException(SR.PrintDialogInvalidPageRange, "PageRange");
System\Windows\Controls\RichTextBox.cs (2)
158throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FlowDocument)), "value"); 579throw new ArgumentException(SR.RichTextBox_PointerNotInSameDocument, "value");
System\Windows\Controls\Stack.cs (1)
863throw new ArgumentException(SR.Stack_VisualInDifferentSubTree,"child");
System\Windows\Controls\ToolBarTray.cs (1)
281throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ToolBar)), "value");
System\Windows\Controls\ViewPort3D.cs (1)
237throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Visual3D)), "value");
System\Windows\Controls\VirtualizedCellInfoCollection.cs (3)
74throw new ArgumentException(SR.SelectedCellsCollection_InvalidItem, "cell"); 79throw new ArgumentException(SR.SelectedCellsCollection_DuplicateItem, "cell"); 130throw new ArgumentException(SR.SelectedCellsCollection_InvalidItem, "cell");
System\Windows\Controls\WebBrowser.cs (1)
882throw new ArgumentException(SR.AbsoluteUriOnly, "source");
System\Windows\CornerRadiusConverter.cs (1)
142throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(CornerRadius)), "value");
System\Windows\Data\BindingExpression.cs (1)
407throw new ArgumentException(SR.Format(SR.PropertyNotBindable, dp.Name), "dp");
System\Windows\Data\BindingListCollectionView.cs (1)
970throw new ArgumentException(SR.CannotEditPlaceholder, "item");
System\Windows\Data\CompositeCollection.cs (1)
485throw new ArgumentException(SR.CollectionContainerMustBeUniqueForComposite, "cc");
System\Windows\Data\ListCollectionView.cs (1)
1168throw new ArgumentException(SR.CannotEditPlaceholder, "item");
System\Windows\Data\MultiBinding.cs (1)
62throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), "value");
System\Windows\Data\MultiBindingExpression.cs (1)
171throw new ArgumentException(SR.Format(SR.PropertyNotBindable, dp.Name), "dp");
System\Windows\Data\PriorityBinding.cs (1)
58throw new ArgumentException(SR.Format(SR.ChildHasWrongType, this.GetType().Name, "BindingBase", value.GetType().FullName), "value");
System\Windows\Data\PriorityBindingExpression.cs (1)
154throw new ArgumentException(SR.Format(SR.PropertyNotBindable, dp.Name), "dp");
System\Windows\Data\RelativeSource.cs (1)
291throw new ArgumentException(SR.RelativeSourceModeInvalid, "mode");
System\Windows\Data\XmlNamespaceMappingCollection.cs (4)
54throw new ArgumentException(SR.Format(SR.RequiresXmlNamespaceMapping, value.GetType().FullName), "value"); 92throw new ArgumentException(SR.RequiresXmlNamespaceMappingUri, nameof(mapping)); 126throw new ArgumentException(SR.RequiresXmlNamespaceMappingUri, nameof(mapping)); 161throw new ArgumentException(SR.RequiresXmlNamespaceMappingUri, nameof(mapping));
System\Windows\DependencyPropertyHelper.cs (1)
207throw new ArgumentException(SR.ElementMustBelongToTemplate, nameof(elementInTemplate));
System\Windows\Documents\DocumentSequence.cs (1)
113throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(DocumentReference)), "value");
System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
795throw new ArgumentException(SR.BadDistance, "distance");
System\Windows\Documents\DocumentStructures\SemanticBasicElement.cs (9)
81throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 126throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType1, value.GetType(), 164throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(NamedElement)), "value"); 213throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ListItemStructure)), nameof(value)); 255throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(), 308throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroupStructure)), "value"); 350throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowStructure)), nameof(value)); 393throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCellStructure)), nameof(value)); 437throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
System\Windows\Documents\DocumentStructures\StoryFragments.cs (2)
58throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(StoryFragment)), "value"); 118throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType6, value.GetType(),
System\Windows\Documents\FixedDocument.cs (1)
147throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PageContent)), "value");
System\Windows\Documents\FixedLineResult.cs (1)
52throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedLineResult)), "o");
System\Windows\Documents\FixedNode.cs (1)
154throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedNode)), "o");
System\Windows\Documents\FixedPage.cs (1)
194throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(UIElement)), "value");
System\Windows\Documents\FixedSOMContainer.cs (1)
42throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMContainer)), "comparedObj");
System\Windows\Documents\FixedSOMGroup.cs (1)
44throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, comparedObj.GetType(), typeof(FixedSOMGroup)), "comparedObj");
System\Windows\Documents\FixedSOMSemanticBox.cs (1)
99throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FixedSOMSemanticBox)), "o");
System\Windows\Documents\FixedTextPointer.cs (2)
283throw new ArgumentException(SR.BadDistance, "distance"); 403throw new ArgumentException(SR.BadDistance, "offset");
System\Windows\Documents\FlowNode.cs (1)
117throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowNode)), "o");
System\Windows\Documents\FlowPosition.cs (1)
74throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(FlowPosition)), "o");
System\Windows\Documents\Glyphs.cs (5)
263throw new ArgumentException(SR.GlyphsCaretStopsContainsHexDigits, "CaretStops"); 270throw new ArgumentException(SR.GlyphsCaretStopsLengthCorrespondsToUnicodeString, "CaretStops"); 277throw new ArgumentException(SR.GlyphsCaretStopsLengthCorrespondsToUnicodeString, "CaretStops"); 284throw new ArgumentException(SR.GlyphsCaretStopsLengthCorrespondsToUnicodeString, "CaretStops"); 291throw new ArgumentException(SR.GlyphsCaretStopsLengthCorrespondsToUnicodeString, "CaretStops");
System\Windows\Documents\PageContent.cs (1)
191throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(FixedPage)), "value");
System\Windows\Documents\Serialization\SerializerProvider.cs (8)
94throw new ArgumentException(SR.SerializerProviderAlreadyRegistered, serializerKey); 120throw new ArgumentException(SR.SerializerProviderNotRegistered, serializerKey); 146throw new ArgumentException(SR.SerializerProviderWrongVersion, serializerKey); 162throw new ArgumentException(SR.SerializerProviderUnknownSerializer, serializerKey); 173throw new ArgumentException(SR.SerializerProviderCannotLoad, serializerDescriptor.DisplayName); 177throw new ArgumentException(SR.SerializerProviderCannotLoad, serializerDescriptor.DisplayName); 181throw new ArgumentException(SR.SerializerProviderCannotLoad, serializerDescriptor.DisplayName); 185throw new ArgumentException(SR.SerializerProviderCannotLoad, serializerDescriptor.DisplayName);
System\Windows\Documents\Table.cs (1)
85throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroup)), "value"));
System\Windows\Documents\TableColumnCollection.cs (1)
281throw new ArgumentException(SR.Format(SR.TableCollectionElementTypeExpected, typeof(TableColumn).Name), "value");
System\Windows\Documents\TableRow.cs (1)
81throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCell)), "value"));
System\Windows\Documents\TableRowGroup.cs (1)
96throw (new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRow)), "value"));
System\Windows\Documents\TextElementCollection.cs (5)
324throw new ArgumentException(SR.TextElementCollection_NoEnumerator, "range"); 338throw new ArgumentException(SR.Format(SR.TextElementCollection_ItemHasUnexpectedType, "range", typeof(TextElementType).Name, typeof(TextElementType).Name), "value"); 401throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), "value"); 456throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), "value"); 567throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), "value");
System\Windows\Documents\TextRange.cs (3)
812throw new ArgumentException(SR.Format(SR.TextEditorTypeOfParameterIsNotAppropriateForFormattingProperty, value == null ? "null" : value.GetType().Name, formattingProperty.Name), "value"); 822throw new ArgumentException(SR.TextRange_InvalidParameterValue, "propertyValueAction"); 828throw new ArgumentException(SR.Format(SR.TextRange_PropertyCannotBeIncrementedOrDecremented, formattingProperty.Name), "propertyValueAction");
System\Windows\Documents\TextRangeBase.cs (6)
69throw new ArgumentException(SR.NotInAssociatedTree, "textPointer"); 1542throw new ArgumentException(SR.Format(SR.TextRange_UnsupportedDataFormat, dataFormat), "dataFormat"); 1576throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), "stream"); 1588throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), "stream"); 1593throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), "stream"); 1600throw new ArgumentException(SR.Format(SR.TextRange_UnsupportedDataFormat, dataFormat), "dataFormat");
System\Windows\DynamicResourceExtensionConverter.cs (1)
52throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "DynamicResourceExtension"), "value");
System\Windows\EventSetterHandlerConverter.cs (1)
66throw new ArgumentException(SR.TextRange_InvalidParameterValue, "typeDescriptorContext");
System\Windows\FrameworkPropertyMetadata.cs (2)
227throw new ArgumentException(SR.NoDefaultUpdateSourceTrigger, "defaultUpdateSourceTrigger"); 486throw new ArgumentException(SR.NoDefaultUpdateSourceTrigger, "value");
System\Windows\Ink\Events.cs (2)
313throw new ArgumentException(SR.InvalidEmptyStrokeCollection, "strokes"); 320throw new ArgumentException(SR.InvalidEmptyArray, "gestureRecognitionResults");
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (1)
53throw new ArgumentException(SR.Format(SR.RuntimeTypeRequired, type), "type");
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (2)
289throw new ArgumentException( 363throw new ArgumentException(
System\Windows\Media\Animation\Generated\ThicknessAnimationUsingKeyFrames.cs (1)
237throw new ArgumentException(SR.Animation_ChildMustBeKeyFrame, "child");
System\Windows\PropertyPathConverter.cs (1)
149throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(PropertyPath)), "value");
System\Windows\Shell\WindowChrome.cs (4)
122throw new ArgumentException("The element must be a DependencyObject", "inputElement"); 135throw new ArgumentException("The element must be a DependencyObject", "inputElement"); 154throw new ArgumentException("The element must be a DependencyObject", "inputElement"); 167throw new ArgumentException("The element must be a DependencyObject", "inputElement");
System\Windows\Standard\Verify.cs (16)
71throw new ArgumentException(errorMessage, name); 96throw new ArgumentException(errorMessage, name); 110throw new ArgumentException("The parameter must not be the default value.", name); 138throw new ArgumentException("The parameter must be null.", name); 173throw new ArgumentException("", name); 189throw new ArgumentException(message, name); 202throw new ArgumentException(message, parameterName); 207throw new ArgumentException(message, parameterName); 220throw new ArgumentException(message, parameterName); 225throw new ArgumentException(message, parameterName); 236throw new ArgumentException("The URI must be absolute.", parameterName); 252throw new ArgumentException(string.Create(CultureInfo.InvariantCulture, $"The integer value must be bounded with [{lowerBoundInclusive}, {upperBoundExclusive})"), parameterName); 262throw new ArgumentException(message, parameter); 276throw new ArgumentException("The type of this parameter does not support a required interface", parameterName); 287throw new ArgumentException($"No file exists at \"{filePath}\"", parameterName); 311throw new ArgumentException($"The parameter must implement interface {interfaceType}.", parameterName);
System\Windows\Style.cs (1)
417throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(SetterBase)), "value");
System\Windows\TemplateBindingExtensionConverter.cs (1)
55throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "TemplateBindingExtension"), "value");
System\Windows\TemplateKey.cs (2)
166result = new ArgumentException(SR.Format(SR.MustBeTypeOrString, dataType.GetType().Name), argName); 170result = new ArgumentException(SR.DataTypeCannotBeObject, argName);
System\Windows\ThicknessConverter.cs (1)
139throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(Thickness)), "value");
System\Windows\Trigger.cs (1)
188throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, o.GetType(), typeof(Setter)), "o");
PresentationUI (2)
MS\Internal\Documents\Application\RestrictedTransactionalPackage.cs (1)
92throw new ArgumentException(SR.PackagePartTypeNotWritable, "contentType");
MS\Internal\Documents\Application\TransactionalPackage.cs (1)
88throw new ArgumentException(
ReachFramework (5)
Packaging\XpsManager.cs (2)
314throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, contentType), "contentType"); 1194throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, contentType), "contentType");
PrintConfig\PTProvider.cs (3)
241throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 346throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 507throw new ArgumentException(String.Format(CultureInfo.CurrentCulture,
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\TestConnection.cs (1)
62throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TestConnection.cs (1)
62throw new ArgumentException($"TestConnection does not support address family of type {addressFamily}", nameof(addressFamily));
Swaggatherer (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
System.Collections (41)
System\Collections\BitArray.cs (4)
82throw new ArgumentException(SR.Format(SR.Argument_ArrayTooLarge, BitsPerByte), nameof(bytes)); 204throw new ArgumentException(SR.Format(SR.Argument_ArrayTooLarge, BitsPerInt32), nameof(values)); 755throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 969throw new ArgumentException(SR.Arg_BitArrayTypeUnsupported, 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\PriorityQueue.cs (3)
941throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 946throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 965throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\SortedDictionary.cs (10)
334throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 339throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 363throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 368throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key)); 562throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 567throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 590throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 723throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 728throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 751throw 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)); 626throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value)); 1054throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1063throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1168throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1177throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\SortedSet.cs (5)
546throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 551throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 571throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 584throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 1515throw new ArgumentException(SR.SortedSet_LowerValueGreaterThanUpperValue, nameof(lowerValue));
System\Collections\Generic\Stack.cs (3)
126throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 131throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 151throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System.Collections.Concurrent (11)
System\Collections\Concurrent\BlockingCollection.cs (9)
994throw new ArgumentException(SR.BlockingCollection_CantAddAnyWhenCompleted, nameof(collections)); //case#4 1378throw new ArgumentException(SR.BlockingCollection_CantTakeAnyWhenAllDone, nameof(collections)); 1578throw new ArgumentException(SR.Collection_CopyTo_TooManyElems, nameof(index)); 1582throw new ArgumentException(SR.BlockingCollection_CopyTo_MultiDim, nameof(array)); 1586throw new ArgumentException(SR.BlockingCollection_CopyTo_IncorrectType, nameof(array)); 1590throw new ArgumentException(SR.BlockingCollection_CopyTo_IncorrectType, nameof(array)); 1659throw new ArgumentException( 1674throw new ArgumentException( 1684throw new ArgumentException(
System\Collections\Concurrent\ConcurrentBag.cs (1)
297throw new ArgumentException(SR.Collection_CopyTo_TooManyElems, nameof(index));
System\Collections\Concurrent\ConcurrentDictionary.cs (1)
1883throw new ArgumentException(SR.ConcurrentDictionary_ArrayIncorrectType, nameof(array));
System.Collections.Immutable (15)
System\Collections\Frozen\FrozenDictionary.cs (5)
354throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 359throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 369throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array)); 390throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 402throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Frozen\FrozenSet.cs (1)
252throw 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)
848throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
System\Collections\Immutable\ImmutableList_1.cs (1)
411throw new ArgumentException(SR.CannotFindOldValue, nameof(oldValue));
System\Collections\ThrowHelper.cs (1)
22throw new ArgumentException(SR.CapacityMustBeGreaterThanOrEqualToCount, "destination");
Validation\Requires.cs (1)
117throw new ArgumentException(message, parameterName);
System.Collections.NonGeneric (5)
System\Collections\Queue.cs (1)
133throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
System\Collections\SortedList.cs (3)
339throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 941throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1044throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
System\Collections\Stack.cs (1)
119throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
System.Collections.Specialized (3)
System\Collections\Specialized\NameObjectCollectionBase.cs (2)
377throw new ArgumentException(SR.Arg_MultiRank, nameof(array)); 601throw new ArgumentException(SR.Arg_MultiRank, nameof(array));
System\Collections\Specialized\NameValueCollection.cs (1)
202throw new ArgumentException(SR.Arg_MultiRank, nameof(dest));
System.ComponentModel.Annotations (4)
System\ComponentModel\DataAnnotations\ValidationAttributeStore.cs (1)
184throw new ArgumentException(SR.Format(SR.AttributeStore_Unknown_Property, _type.Name, propertyName),
System\ComponentModel\DataAnnotations\Validator.cs (3)
140throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 284throw new ArgumentException(SR.Validator_InstanceMustMatchValidationContextInstance, nameof(instance)); 380throw new ArgumentException(SR.Format(SR.Validator_Property_Value_Wrong_Type, propertyName, propertyType),
System.ComponentModel.Composition (27)
Microsoft\Internal\Requires.cs (2)
100throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_InvalidEnumInSet, parameterName, value, enumFlagSet.ToString()), parameterName); 119throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, parameterName), parameterName);
System\ComponentModel\Composition\AttributedModel\AttributedModelDiscovery.cs (1)
55throw new ArgumentException(SR.Format(SR.Argument_ReflectionContextReturnsReflectionOnlyType, nameof(reflectionContext)), nameof(reflectionContext));
System\ComponentModel\Composition\ExceptionBuilder.cs (9)
25return new ArgumentException(message, parameterName); 41throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(memberName)), nameof(memberName)); 61return new ArgumentException(message, parameterName); 70throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName)); 75return new ArgumentException(message, parameterName); 94throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName)); 102return new ArgumentException(SR.Format(SR.ReflectionModel_InvalidPartDefinition, partDefinitionType), parameterName); 111throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(typeName)), nameof(typeName)); 116return 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)); 400throw new ArgumentException(SR.Argument_ExportsEmpty, nameof(exports)); 403throw 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)
60throw new ArgumentException(SR.Format(SR.Argument_ExpressionMustBePropertyMember, nameof(propertyFilter)), nameof(propertyFilter)); 107throw 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)
42throw 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)
2784throw new ArgumentException(SR.Format(SR.ConvertToException, nameof(objectType), instance.GetType()), nameof(instance));
System.Composition.Convention (11)
System\Composition\Convention\ExportConventionBuilder.cs (3)
66throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(contractName)), nameof(contractName)); 103throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name)); 130throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name));
System\Composition\Convention\ImportConventionBuilder.cs (3)
40throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(contractName)), nameof(contractName)); 108throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name)); 135throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name));
System\Composition\Convention\PartConventionBuilder.cs (2)
433throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name)); 460throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(name)), nameof(name));
System\Composition\Convention\PartConventionBuilderOfT.cs (3)
48throw new ArgumentException(SR.Format(SR.Argument_ExpressionMustBeVoidMethodWithNoArguments, nameof(methodSelector)), nameof(methodSelector)); 119throw new ArgumentException(SR.Format(SR.Argument_ExpressionMustBePropertyMember, nameof(propertySelector)), nameof(propertySelector)); 170throw 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.Data.Common (4)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
60ArgumentException e = new ArgumentException(error, parameter);
System\Data\Common\DbConnectionStringBuilder.cs (1)
351throw 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.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.Formats.Asn1 (27)
System\Formats\Asn1\Asn1Tag.cs (1)
369throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Formats\Asn1\AsnDecoder.BitString.cs (1)
167throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.cs (1)
712throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.Enumerated.cs (1)
208throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.NamedBitList.cs (1)
193throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.OctetString.cs (1)
71throw new ArgumentException(
System\Formats\Asn1\AsnDecoder.Text.cs (3)
78throw new ArgumentException(SR.Argument_Tag_NotCharacterString, nameof(expectedTag)); 155throw new ArgumentException( 171throw new ArgumentException(SR.Argument_Tag_NotCharacterString, nameof(expectedTag));
System\Formats\Asn1\AsnWriter.BitString.cs (2)
59throw new ArgumentException(SR.Argument_UnusedBitCountMustBeZero, nameof(unusedBitCount)); 71throw new ArgumentException(SR.Argument_UnusedBitWasSet, nameof(unusedBitCount));
System\Formats\Asn1\AsnWriter.cs (3)
168throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 454throw new ArgumentException( 660throw new ArgumentException(
System\Formats\Asn1\AsnWriter.Enumerated.cs (1)
81throw 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)
112throw new ArgumentException(
System\Formats\Asn1\AsnWriter.Oid.cs (7)
85throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 87throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 102_ => throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)), 123throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 160throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 170throw new ArgumentException(SR.Argument_InvalidOidValue, nameof(oidValue)); 187throw new ArgumentException(SR.Argument_InvalidOidValue, "oidValue");
System.Formats.Cbor (2)
System\Formats\Cbor\Writer\CborWriter.cs (1)
194throw new ArgumentException(SR.Argument_EncodeDestinationTooSmall, nameof(destination));
System\Formats\Cbor\Writer\CborWriter.Tag.cs (1)
78throw new ArgumentException(SR.Cbor_Writer_ValueCannotBeInfiniteOrNaN, nameof(seconds));
System.Formats.Tar (17)
System\Formats\Tar\SeekableSubReadStream.cs (1)
21throw new ArgumentException(SR.IO_NotSupported_UnseekableStream, nameof(superStream));
System\Formats\Tar\SubReadStream.cs (1)
28throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(superStream));
System\Formats\Tar\TarEntry.cs (2)
54throw new ArgumentException(SR.TarCannotConvertPaxGlobalExtendedAttributesEntry, nameof(other)); 259throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(value));
System\Formats\Tar\TarFile.cs (4)
38throw new ArgumentException(SR.IO_NotSupported_UnwritableStream, nameof(destination)); 77return Task.FromException(new ArgumentException(SR.IO_NotSupported_UnwritableStream, nameof(destination))); 178throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(source)); 223return Task.FromException(new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(source)));
System\Formats\Tar\TarHeader.Write.cs (6)
521throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 542throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 595throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.Name)), ArgNameEntry); 654throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(TarEntry.LinkName)), ArgNameEntry); 712throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.UserName)), ArgNameEntry); 730throw new ArgumentException(SR.Format(SR.TarEntryFieldExceedsMaxLength, nameof(PaxTarEntry.GroupName)), ArgNameEntry);
System\Formats\Tar\TarHelpers.cs (1)
387throw new ArgumentException(SR.Format(SR.TarEntryTypeNotSupportedInFormat, entryType, archiveFormat), paramName);
System\Formats\Tar\TarReader.cs (1)
39throw new ArgumentException(SR.IO_NotSupported_UnreadableStream, nameof(archiveStream));
System\Formats\Tar\TarWriter.cs (1)
393throw new ArgumentException(SR.TarEntryHardLinkOrSymlinkLinkNameEmpty, "entry");
System.IO.Compression (5)
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (1)
28throw new ArgumentException(SR.NotSupported_UnreadableStream, nameof(stream));
System\IO\Compression\DeflateZLib\DeflateStream.cs (3)
60throw new ArgumentException(SR.NotSupported_UnreadableStream, nameof(stream)); 73throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode)); 95throw new ArgumentException(SR.NotSupported_UnwritableStream, nameof(stream));
System\IO\Compression\ZipArchive.cs (1)
385throw new ArgumentException(SR.EntryNameAndCommentEncodingNotSupported, nameof(EntryNameAndCommentEncoding));
System.IO.Compression.Brotli (4)
System\IO\Compression\BrotliStream.cs (3)
38throw new ArgumentException(SR.Stream_FalseCanWrite, nameof(stream)); 48throw new ArgumentException(SR.Stream_FalseCanRead, nameof(stream)); 53throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(mode));
System\IO\Compression\BrotliUtils.cs (1)
23_ => throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(compressionLevel))
System.IO.Compression.ZipFile (2)
System\IO\Compression\ZipFile.Create.cs (1)
455throw new ArgumentException(SR.UnwritableStream, nameof(destination));
System\IO\Compression\ZipFile.Extract.cs (1)
325throw new ArgumentException(SR.UnreadableStream, nameof(source));
System.IO.FileSystem.DriveInfo (2)
System\IO\DriveInfo.UnixOrDefault.cs (2)
29throw new ArgumentException(SR.Format(SR.Arg_InvalidDriveChars, driveName), nameof(driveName)); 33throw new ArgumentException(SR.Arg_MustBeNonEmptyDriveName, nameof(driveName));
System.IO.FileSystem.Watcher (4)
System\IO\FileSystemWatcher.cs (4)
257throw new ArgumentException(SR.Format(SR.InvalidDirName, value), nameof(Path)); 260throw new ArgumentException(SR.Format(SR.InvalidDirName_NotExists, value), nameof(Path)); 379throw new ArgumentException(SR.Format(SR.InvalidDirName, path), nameof(path)); 382throw new ArgumentException(SR.Format(SR.InvalidDirName_NotExists, path), nameof(path));
System.IO.Hashing (1)
System\IO\Hashing\NonCryptographicHashAlgorithm.cs (1)
348throw 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.Pipes (7)
System\IO\Pipes\AnonymousPipeClientStream.cs (3)
33throw new ArgumentException(SR.Argument_InvalidHandle, nameof(pipeHandleAsString)); 41throw new ArgumentException(SR.Argument_InvalidHandle, nameof(pipeHandleAsString)); 57throw new ArgumentException(SR.Argument_InvalidHandle, nameof(safePipeHandle));
System\IO\Pipes\AnonymousPipeServerStream.cs (2)
45throw new ArgumentException(SR.Argument_InvalidHandle, nameof(serverSafePipeHandle)); 49throw new ArgumentException(SR.Argument_InvalidHandle, nameof(clientSafePipeHandle));
System\IO\Pipes\NamedPipeClientStream.cs (1)
99throw new ArgumentException(SR.Argument_InvalidHandle, nameof(safePipeHandle));
System\IO\Pipes\NamedPipeServerStream.cs (1)
140throw new ArgumentException(SR.Argument_InvalidHandle, nameof(safePipeHandle));
System.Linq.Expressions (81)
System\Linq\Expressions\Error.cs (81)
47return new ArgumentException(Strings.SameKeyExistsInExpando(key), nameof(key)); 124return new ArgumentException(Strings.SetterHasNoParams, paramName); 131return new ArgumentException(Strings.PropertyCannotHaveRefType, paramName); 138return new ArgumentException(Strings.IndexesOfSetGetMustMatch, paramName); 159return new ArgumentException(Strings.AccessorsCannotHaveVarArgs, paramName); 166return new ArgumentException(Strings.AccessorsCannotHaveByRefArgs, paramName); 194return new ArgumentException(Strings.BoundsCannotBeLessThanOne, paramName); 201return new ArgumentException(Strings.TypeMustNotBeByRef, paramName); 209return new ArgumentException(Strings.TypeMustNotBePointer, paramName); 217return new ArgumentException(Strings.SetterMustBeVoid, paramName); 225return new ArgumentException(Strings.PropertyTypeMustMatchGetter, paramName); 233return new ArgumentException(Strings.PropertyTypeMustMatchSetter, paramName); 240return new ArgumentException(Strings.BothAccessorsMustBeStatic, paramName); 247return new ArgumentException(Strings.OnlyStaticFieldsHaveNullInstance, paramName); 254return new ArgumentException(Strings.OnlyStaticPropertiesHaveNullInstance, paramName); 268return new ArgumentException(Strings.PropertyTypeCannotBeVoid, paramName); 275return new ArgumentException(Strings.InvalidUnboxType, paramName); 282return new ArgumentException(Strings.ExpressionMustBeWriteable, paramName); 289return new ArgumentException(Strings.ArgumentMustNotHaveValueType, paramName); 303return new ArgumentException(Strings.AllTestValuesMustHaveSameType, paramName); 310return new ArgumentException(Strings.AllCaseBodiesMustHaveSameType, paramName); 317return new ArgumentException(Strings.DefaultBodyMustBeSupplied, paramName); 324return new ArgumentException(Strings.LabelMustBeVoidOrHaveExpression, paramName); 331return new ArgumentException(Strings.LabelTypeMustBeVoid, paramName); 338return new ArgumentException(Strings.QuotedExpressionMustBeLambda, paramName); 345return new ArgumentException(Strings.VariableMustNotBeByRef(p0, p1), paramName); 359return new ArgumentException(Strings.DuplicateVariable(p0), paramName); 380return new ArgumentException(Strings.FaultCannotHaveCatchOrFinally, paramName); 408return new ArgumentException(Strings.UserDefinedOperatorMustBeStatic(p0), paramName); 415return new ArgumentException(Strings.UserDefinedOperatorMustNotBeVoid(p0), paramName); 478return new ArgumentException(Strings.ArgumentMustBeArray, paramName); 485return new ArgumentException(Strings.ArgumentMustBeBoolean, paramName); 492return new ArgumentException(Strings.EqualityMustReturnBoolean(p0), paramName); 499return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertyInfo, paramName); 506return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertyInfoOrMethod, paramName); 521return new ArgumentException(Strings.ArgumentMustBeInstanceMember, paramName); 535return new ArgumentException(Strings.ArgumentMustBeInteger, paramName); 549return new ArgumentException(Strings.ArgumentMustBeArrayIndexType, paramName); 563return new ArgumentException(Strings.ArgumentMustBeSingleDimensionalArrayType, paramName); 577return new ArgumentException(Strings.ArgumentTypesMustMatch, paramName); 598return new ArgumentException(Strings.IncorrectTypeForTypeAs(p0), paramName); 620return new ArgumentException(Strings.ArgumentTypeDoesNotMatchMember(p0, p1), paramName); 634return new ArgumentException(Strings.ArgumentMemberNotDeclOnType(p0, p1), paramName); 670return new ArgumentException(Strings.ExpressionTypeNotInvocable(p0), paramName); 727return new ArgumentException(Strings.LambdaTypeMustBeDerivedFromSystemDelegate, paramName); 734return new ArgumentException(Strings.MemberNotFieldOrProperty(p0), paramName); 741return new ArgumentException(Strings.MethodContainsGenericParameters(p0), paramName); 748return new ArgumentException(Strings.MethodIsGeneric(p0), paramName); 755return new ArgumentException(Strings.MethodNotPropertyAccessor(p0, p1), paramName); 769return new ArgumentException(Strings.PropertyDoesNotHaveGetter(p0), paramName); 783return new ArgumentException(Strings.PropertyDoesNotHaveSetter(p0), paramName); 790return new ArgumentException(Strings.PropertyDoesNotHaveAccessor(p0), paramName); 797return new ArgumentException(Strings.NotAMemberOfType(p0, p1), paramName); 812return new ArgumentException(Strings.NotAMemberOfAnyType(p0), paramName); 827return new ArgumentException(Strings.PropertyNotDefinedForType(p0, p1), paramName); 834return new ArgumentException(Strings.InstancePropertyNotDefinedForType(p0, p1), paramName); 848return new ArgumentException(Strings.InstancePropertyWithSpecifiedParametersNotDefinedForType(p0, p1, p2), paramName); 863return new ArgumentException(Strings.TypeMissingDefaultConstructor(p0), paramName); 871return new ArgumentException(Strings.ElementInitializerMethodNotAdd, paramName); 878return new ArgumentException(Strings.ElementInitializerMethodNoRefOutParam(p0, p1), paramName); 885return new ArgumentException(Strings.ElementInitializerMethodWithZeroArgs, paramName); 892return new ArgumentException(Strings.ElementInitializerMethodStatic, paramName); 899return new ArgumentException(Strings.TypeNotIEnumerable(p0), paramName); 907return new ArgumentException(Strings.UnhandledBinary(p0), paramName); 929return new ArgumentException(Strings.UnhandledUnary(p0), paramName); 936return new ArgumentException(Strings.UnknownBindingType, $"bindings[{index}]"); 992return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForFunc, paramName); 999return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForAction, paramName); 1006return new ArgumentException(Strings.ArgumentCannotBeOfTypeVoid, paramName); 1213return new ArgumentException(Strings.NonStaticConstructorRequired, paramName); 1245return new ArgumentException(Strings.TypeContainsGenericParameters(p0), paramName); 1261return new ArgumentException(Strings.TypeIsGeneric(p0), paramName); 1285return new ArgumentException(Strings.ExpressionTypeDoesNotMatchMethodParameter(p0, p1, p2), paramName); 1301return new ArgumentException(Strings.ExpressionTypeDoesNotMatchParameter(p0, p1), paramName); 1325return new ArgumentException(Strings.IncorrectNumberOfMethodCallArguments(p0), paramName); 1333return new ArgumentException(Strings.ExpressionTypeDoesNotMatchConstructorParameter(p0, p1), paramName); 1350return new ArgumentException(Strings.ExpressionMustBeReadable, paramName); 1363return new ArgumentException(Strings.InvalidArgumentValue_ParamName, paramName); 1368return new ArgumentException(Strings.NonEmptyCollectionRequired, paramName); 1373return new ArgumentException(Strings.InvalidNullValue(type), paramName); 1378return new ArgumentException(Strings.InvalidObjectType(value?.GetType() as object ?? "null", type), paramName);
System.Memory (2)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (2)
49throw new ArgumentException(null, nameof(initialCapacity)); 129throw new ArgumentException(null, nameof(count));
System.Net.Http (3)
System\Net\Http\HttpClient.cs (1)
89throw new ArgumentException(SR.net_http_client_absolute_baseaddress_required, nameof(value));
System\Net\Http\MultipartContent.cs (2)
82throw new ArgumentException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, boundary), nameof(boundary)); 87throw new ArgumentException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, boundary), nameof(boundary));
System.Net.Http.Json (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
68throw new ArgumentException(paramName, "Argument is whitespace");
System.Net.HttpListener (15)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (4)
77throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCharInProtocolString, subProtocol, invalidCharDescription), nameof(subProtocol)); 85throw new ArgumentException(SR.Format(SR.net_WebSockets_ReasonNotNull, 103throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusCode, 112throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusDescription,
System\Net\HttpListener.cs (4)
89throw new ArgumentException(SR.net_listener_cannot_set_custom_cbt, nameof(value)); 126throw new ArgumentException(SR.net_listener_scheme, nameof(uriPrefix)); 149throw new ArgumentException(SR.net_listener_host, nameof(uriPrefix)); 153throw new ArgumentException(SR.net_listener_slash, nameof(uriPrefix));
System\Net\HttpListenerResponse.cs (2)
165throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 262throw new ArgumentException(SR.net_cookie_exists, nameof(cookie));
System\Net\Managed\ChunkedInputStream.cs (1)
159throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\Managed\HttpListener.Managed.cs (1)
310throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\Managed\HttpListenerRequest.Managed.cs (1)
363throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\Managed\HttpListenerResponse.Managed.cs (1)
67throw new ArgumentException(SR.net_wrongversion, nameof(value));
System\Net\Managed\HttpRequestStream.Managed.cs (1)
172throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System.Net.Mail (5)
System\Net\Mail\Attachment.cs (4)
138throw new ArgumentException(SR.MediaTypeInvalid, nameof(mediaType)); 142throw new ArgumentException(SR.MediaTypeInvalid, nameof(mediaType)); 147throw new ArgumentException(SR.MediaTypeInvalid, nameof(mediaType)); 224throw new ArgumentException(SR.MailHeaderInvalidCID, nameof(value));
System\Net\Mime\MimeBasePart.cs (1)
208throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System.Net.NameResolution (5)
System\Net\Dns.cs (5)
45throw new ArgumentException(SR.net_invalid_ip_addr, nameof(address)); 76throw new ArgumentException(SR.net_invalid_ip_addr, nameof(hostNameOrAddress)); 155throw new ArgumentException(SR.net_invalid_ip_addr, nameof(address)); 200throw new ArgumentException(SR.net_invalid_ip_addr, nameof(hostNameOrAddress)); 508throw new ArgumentException(SR.net_invalid_ip_addr, nameof(hostName));
System.Net.Ping (2)
System\Net\NetworkInformation\Ping.cs (2)
52throw new ArgumentException(SR.net_invalidPingBufferSize, nameof(buffer)); 69throw new ArgumentException(SR.net_invalid_ip_addr, nameof(address));
System.Net.Primitives (9)
System\Net\CookieContainer.cs (1)
218throw 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)
132throw new ArgumentException(SR.dns_bad_ip_address, nameof(address)); 182throw new ArgumentException(SR.dns_bad_ip_address, nameof(address));
System\Net\IPEndPoint.cs (2)
160throw new ArgumentException(SR.Format(SR.net_InvalidAddressFamily, socketAddress.Family.ToString(), GetType().FullName), nameof(socketAddress)); 166throw new ArgumentException(SR.Format(SR.net_InvalidSocketAddressSize, socketAddress.GetType().FullName, GetType().FullName), nameof(socketAddress));
System\Net\IPNetwork.cs (1)
67static void ThrowInvalidBaseAddressException() => throw new ArgumentException(SR.net_bad_ip_network_invalid_baseaddress, nameof(baseAddress));
System.Net.Quic (5)
System\Net\Quic\Internal\MsQuicConfiguration.cs (3)
114throw new ArgumentException(SR.Format(SR.net_quic_not_null_ceritifcate, nameof(SslServerAuthenticationOptions.ServerCertificate), nameof(SslServerAuthenticationOptions.ServerCertificateContext), nameof(SslServerAuthenticationOptions.ServerCertificateSelectionCallback)), nameof(options)); 125throw new ArgumentException(SR.Format(SR.net_quic_not_null_not_empty_connection, nameof(SslApplicationProtocol)), nameof(options)); 335throw 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)
306throw new ArgumentException(SR.Format(SR.net_quic_unsupported_endpoint_type, options.RemoteEndPoint.GetType()), nameof(options));
System.Net.Requests (23)
src\libraries\Common\src\System\Net\HttpValidationHelpers.cs (6)
13throw new ArgumentException(SR.Format(SR.net_WebHeaderInvalidHeaderChars, name), nameof(name)); 19throw new ArgumentException(SR.Format(SR.net_WebHeaderInvalidHeaderChars, name), nameof(name)); 71throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 81throw new ArgumentException(SR.net_WebHeaderInvalidCRLFChars, nameof(value)); 89throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 95throw new ArgumentException(SR.net_WebHeaderInvalidCRLFChars, nameof(value));
System\Net\Cache\HttpRequestCachePolicy.cs (2)
38throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(HttpCacheAgeControl)), nameof(cacheAgeControl)); 64throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(HttpCacheAgeControl)), nameof(cacheAgeControl));
System\Net\FtpWebRequest.cs (5)
104throw new ArgumentException(SR.net_ftp_unsupported_method, nameof(method)); 276throw new ArgumentException(SR.net_ftp_unsupported_method, nameof(value)); 326throw new ArgumentException(SR.net_ftp_no_defaultcreds, nameof(value)); 686throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 809throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
System\Net\HttpWebRequest.cs (10)
381throw new ArgumentException(SR.net_invalid_host, nameof(value)); 475throw new ArgumentException(SR.net_nochunked, nameof(value)); 613throw new ArgumentException(SR.net_connarg, nameof(value)); 662throw new ArgumentException(SR.net_no100, nameof(value)); 834throw new ArgumentException(SR.net_wrongversion, nameof(value)); 935throw new ArgumentException(SR.net_badmethod, nameof(value)); 1145throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 1416throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult)); 1504throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier)); 1523throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier));
System.Net.Security (13)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (1)
198throw new ArgumentException(SR.net_ssl_app_protocols_invalid, nameof(applicationProtocols));
System\Net\Security\AuthenticatedStream.cs (1)
24throw new ArgumentException(SR.net_io_must_be_rw_stream, nameof(innerStream));
System\Net\Security\NegotiateStream.cs (1)
608throw new ArgumentException(SR.net_auth_must_specify_extended_protection_scheme, nameof(policy));
System\Net\Security\SslApplicationProtocol.cs (1)
34throw new ArgumentException(SR.net_ssl_app_protocol_invalid, nameof(protocol));
System\Net\Security\SslClientAuthenticationOptions.cs (2)
56throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(X509RevocationMode)), nameof(value)); 71throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(EncryptionPolicy)), nameof(value));
System\Net\Security\SslServerAuthenticationOptions.cs (2)
58throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(X509RevocationMode)), nameof(value)); 73throw new ArgumentException(SR.Format(SR.net_invalid_enum, nameof(EncryptionPolicy)), nameof(value));
System\Net\Security\SslStream.cs (1)
209throw new ArgumentException(SR.Format(SR.net_invalid_enum, "EncryptionPolicy"), nameof(encryptionPolicy));
System\Net\StreamFramer.cs (1)
108throw new ArgumentException(SR.Format(SR.net_frame_max_size, MaxMessageSize, value), nameof(PayloadSize));
System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicy.cs (3)
29throw new ArgumentException(SR.security_ExtendedProtectionPolicy_UseDifferentConstructorForNever, nameof(policyEnforcement)); 34throw new ArgumentException(SR.security_ExtendedProtectionPolicy_NoEmptyServiceNameCollection, nameof(customServiceNames)); 55throw new ArgumentException(SR.security_ExtendedProtectionPolicy_UseDifferentConstructorForNever, nameof(policyEnforcement));
System.Net.Sockets (39)
System\Net\Sockets\SendPacketsElement.cs (1)
54throw new ArgumentException(SR.net_sockets_sendpackelement_FileStreamMustBeAsync, nameof(fileStream));
System\Net\Sockets\Socket.cs (28)
239throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 900throw new ArgumentException(SR.net_sockets_invalid_ipaddress_length, nameof(addresses)); 938throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses)); 1093throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 1532throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers)); 1646throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEP.AddressFamily, _addressFamily), nameof(remoteEP)); 2006throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "LingerOption"), nameof(optionValue)); 2010throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper_Named, 0, (int)ushort.MaxValue, "optionValue.LingerTime"), nameof(optionValue)); 2019throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "MulticastOption"), nameof(optionValue)); 2029throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "IPv6MulticastOption"), nameof(optionValue)); 2035throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(optionValue)); 2192throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(level)); 2542throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2578throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint)); 2683throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 2732throw new ArgumentException(SR.net_multibuffernotsupported, "BufferList"); 2830throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e)); 2834throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 2938throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, "e.RemoteEndPoint"), nameof(e)); 2943throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 2947throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPointSnapshot.AddressFamily, _addressFamily), nameof(e)); 2992throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 2996throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, e.RemoteEndPoint.AddressFamily, _addressFamily), nameof(e)); 3064throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.SendPacketsElements"), nameof(e)); 3102throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e)); 3184throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, nameof(remoteEP)), nameof(remoteEP)); 3783throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, remoteEndPointArgumentName), remoteEndPointArgumentName); 3788throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEndPoint.AddressFamily, _addressFamily), remoteEndPointArgumentName);
System\Net\Sockets\Socket.Tasks.cs (2)
169throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses)); 841throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
557throw new ArgumentException(SR.net_buffercounttoosmall, nameof(Count));
System\Net\Sockets\SocketPal.Unix.cs (1)
1849throw 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)); 345throw new ArgumentException(SR.net_invalidAddressList, nameof(hostname)); 394throw new ArgumentException(SR.Format(SR.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr)); 478throw new ArgumentException(SR.Format(SR.net_protocol_invalid_multicast_family, "UDP"), nameof(multicastAddr));
System.Net.WebHeaderCollection (7)
src\libraries\Common\src\System\Net\HttpValidationHelpers.cs (6)
13throw new ArgumentException(SR.Format(SR.net_WebHeaderInvalidHeaderChars, name), nameof(name)); 19throw new ArgumentException(SR.Format(SR.net_WebHeaderInvalidHeaderChars, name), nameof(name)); 71throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 81throw new ArgumentException(SR.net_WebHeaderInvalidCRLFChars, nameof(value)); 89throw new ArgumentException(SR.net_WebHeaderInvalidControlChars, nameof(value)); 95throw new ArgumentException(SR.net_WebHeaderInvalidCRLFChars, nameof(value));
System\Net\WebHeaderCollection.cs (1)
317throw new ArgumentException(SR.net_WebHeaderMissingColon, nameof(header));
System.Net.WebSockets (10)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (4)
77throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCharInProtocolString, subProtocol, invalidCharDescription), nameof(subProtocol)); 85throw new ArgumentException(SR.Format(SR.net_WebSockets_ReasonNotNull, 103throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusCode, 112throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusDescription,
System\Net\WebSockets\ManagedWebSocket.cs (3)
261throw new ArgumentException(SR.Format( 279throw new ArgumentException(SR.Format( 302throw new ArgumentException(SR.net_WebSockets_Argument_MessageFlagsHasDifferentCompressionOptions, nameof(messageFlags));
System\Net\WebSockets\WebSocket.cs (3)
138throw new ArgumentException(!stream.CanRead ? SR.NotReadableStream : SR.NotWriteableStream, nameof(stream)); 165throw new ArgumentException(!stream.CanRead ? SR.NotReadableStream : SR.NotWriteableStream, nameof(stream)); 192throw new ArgumentException(!innerStream.CanRead ? SR.NotReadableStream : SR.NotWriteableStream, nameof(innerStream));
System.Net.WebSockets.Client (9)
src\libraries\Common\src\System\Net\WebSockets\WebSocketValidate.cs (4)
77throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCharInProtocolString, subProtocol, invalidCharDescription), nameof(subProtocol)); 85throw new ArgumentException(SR.Format(SR.net_WebSockets_ReasonNotNull, 103throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusCode, 112throw new ArgumentException(SR.Format(SR.net_WebSockets_InvalidCloseStatusDescription,
System\Net\WebSockets\ClientWebSocket.cs (2)
100throw new ArgumentException(SR.net_uri_NotAbsolute, nameof(uri)); 104throw new ArgumentException(SR.net_WebSockets_Scheme, nameof(uri));
System\Net\WebSockets\ClientWebSocketOptions.cs (1)
168throw new ArgumentException(SR.Format(SR.net_WebSockets_NoDuplicateProtocol, subProtocol), nameof(subProtocol));
System\Net\WebSockets\WebSocketHandle.Managed.cs (2)
56throw new ArgumentException(SR.net_WebSockets_CustomInvokerRequiredForHttp2, nameof(options)); 64throw new ArgumentException(SR.net_WebSockets_OptionsIncompatibleWithCustomInvoker, nameof(options));
System.Numerics.Tensors (10)
System\Numerics\Tensors\netcore\TensorPrimitives.Round.cs (3)
65throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode)); 121throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode)); 157throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, typeof(MidpointRounding)), nameof(mode));
System\ThrowHelper.cs (7)
17throw new ArgumentException(SR.Argument_DestinationTooShort, destinationName); 29throw new ArgumentException(SR.Argument_InputAndDestinationSpanMustNotOverlap, "destination"); 91throw new ArgumentException(SR.ThrowArgument_SetSliceNoRange, paramNames); 97throw new ArgumentException(SR.ThrowArgument_SetSliceInvalidShapes, paramNames); 115throw new ArgumentException(SR.ThrowArgument_DimensionsNotSame, paramNames); 121throw new ArgumentException(SR.ThrowArgument_1DTensorRequired, paramNames); 127throw 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 (493)
src\libraries\Common\src\System\Threading\Tasks\TaskToAsyncResult.cs (2)
82throw new ArgumentException(null, nameof(asyncResult)); 111throw new ArgumentException(null, nameof(asyncResult));
src\libraries\System.Private.CoreLib\src\System\Activator.RuntimeType.cs (2)
37throw new ArgumentException(SR.Arg_MustBeType, nameof(type)); 98throw new ArgumentException(SR.Arg_MustBeType, nameof(type));
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
101throw new ArgumentException(SR.Argument_EmptyString, nameof(assemblyName));
src\libraries\System.Private.CoreLib\src\System\ArgumentException.cs (2)
129throw new ArgumentException(SR.Argument_EmptyString, paramName); 136throw new ArgumentException(SR.Argument_EmptyOrWhiteSpaceString, paramName);
src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (2)
28: base(SR.ArgumentNull_Generic, paramName) 40: base(message ?? SR.ArgumentNull_Generic, paramName)
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (3)
31: base(SR.Arg_ArgumentOutOfRangeException, paramName) 37: base(message ?? SR.Arg_ArgumentOutOfRangeException, paramName) 49: base(message ?? SR.Arg_ArgumentOutOfRangeException, paramName)
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (3)
25throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(src)); 36throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(dst)); 61throw new ArgumentException(SR.Arg_MustBePrimArray, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Buffers\Binary\BinaryPrimitives.ReverseEndianness.cs (1)
408throw new ArgumentException(SR.Arg_BufferTooSmall, "destination");
src\libraries\System.Private.CoreLib\src\System\Buffers\ConfigurableArrayPool.cs (1)
236throw new ArgumentException(SR.ArgumentException_BufferNotFromPool, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
153throw new ArgumentException(SR.ArgumentException_BufferNotFromPool, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
1133throw new ArgumentException(SR.Format(invalidIsLow ? SR.Argument_InvalidLowSurrogate : SR.Argument_InvalidHighSurrogate, index), nameof(s));
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (5)
252throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 267throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 828throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2282throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 2296throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Queue.cs (3)
127throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 132throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 162throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (4)
272throw new ArgumentException(SR.Arg_HTCapacityOverflow, nameof(capacity)); 577throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1194throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 1229throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (2)
158throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index)); 311throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index));
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (4)
16throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array)); 21throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array)); 51throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 63throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\ReadOnlyDictionary.cs (2)
197throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array)); 209throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
src\libraries\System.Private.CoreLib\src\System\Convert.cs (3)
2347throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 2394throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options)); 2433throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)options), nameof(options));
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (1)
695case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style");
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (3)
223private static void ThrowInvalidKind() => throw new ArgumentException(SR.Argument_InvalidDateTimeKind, "kind"); 1267throw new ArgumentException(SR.Argument_DateTimeBadBinaryData, nameof(dateData)); 1274throw new ArgumentException(SR.Argument_DateTimeBadBinaryData, nameof(dateData));
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (6)
107throw new ArgumentException(SR.Argument_OffsetLocalMismatch, nameof(offset)); 114throw new ArgumentException(SR.Argument_OffsetUtcMismatch, nameof(offset)); 980throw new ArgumentException(SR.Argument_OffsetPrecision, nameof(offset)); 1012throw new ArgumentException(SR.Argument_InvalidDateTimeStyles, parameterName); 1016throw new ArgumentException(SR.Argument_ConflictingDateTimeStyles, parameterName); 1020throw new ArgumentException(SR.Argument_DateTimeOffsetInvalidDateTimeStyles, parameterName);
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
688throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, mode, nameof(MidpointRounding)), nameof(mode));
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (4)
36throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 550throw new ArgumentException(SR.Arg_MustBeType, nameof(types)); 556throw new ArgumentException(SR.Arg_EmptyArray, nameof(match)); 646throw new ArgumentException(SR.Arg_EmptyArray, nameof(match));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (1)
654throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (4)
323throw new ArgumentException(SR.Argument_InvalidTypeName, nameof(eventSourceType)); 440throw new ArgumentException(SR.EventSource_InvalidCommand, nameof(command)); 1578throw new ArgumentException(SR.EventSource_TraitEven, nameof(traits)); 3783throw new ArgumentException(SR.EventSource_InvalidEventFormat, nameof(settings));
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (4)
759throw new ArgumentException(SR.Format(SR.EventSource_UnknownEtwTrait, etwTrait.ToString()), "traits"); 815throw new ArgumentException(SR.EventSource_EvenHexDigits, "traits"); 828throw new ArgumentException(SR.Format(SR.EventSource_IllegalValue, value), "traits"); 852throw new ArgumentException(SR.Format(SR.EventSource_BadHexDigit, c), "traits");
src\libraries\System.Private.CoreLib\src\System\DuplicateWaitObjectException.cs (2)
26: base(SR.Arg_DuplicateWaitObjectException, parameterName) 32: base(message ?? SR.Arg_DuplicateWaitObjectException, parameterName)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (4)
889throw new ArgumentException(SR.Arg_MustBeEnum, nameof(TEnum)); 2149throw new ArgumentException(enumType is not RuntimeType ? SR.Arg_MustBeType : SR.Arg_MustBeEnum, nameof(enumType)); 2152throw new ArgumentException(SR.Arg_MustContainEnumInfo, "value"); 2224throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value));
src\libraries\System.Private.CoreLib\src\System\Environment.cs (2)
242throw new ArgumentException(SR.Argument_StringFirstCharIsZero, nameof(variable)); 245throw new ArgumentException(SR.Argument_IllegalEnvVarName, nameof(variable));
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (5)
70throw new ArgumentException(SR.Argument_OnlyMscorlib, nameof(assembly)); 88throw new ArgumentException(SR.Argument_OnlyMscorlib, nameof(assembly)); 102throw new ArgumentException(SR.Argument_CustomCultureCannotBePassedByNumber, nameof(culture)); 482throw new ArgumentException( 1373throw new ArgumentException(paramName: nameof(options), message: SR.Argument_InvalidFlag);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (1)
713throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Invariant.cs (2)
18throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options)); 122throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (1)
378throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureNotFoundException.cs (3)
28: base(message ?? DefaultMessage, paramName) 38: base(message ?? DefaultMessage, paramName) 56: base(message ?? DefaultMessage, paramName)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (11)
1060throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1085throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1105throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value)); 1127throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1148throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1353throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); 1631throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(patterns)); 1677throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)); 1693throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1714throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value)); 1775throw new ArgumentException(message, styles ? nameof(styles) : nameof(style));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (37)
79throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 83throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode)); 128throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 204throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode)); 222throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 232throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i), nameof(unicode)); 244throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 248throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 268throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 272throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 311throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 333throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 362throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 381throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 388throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode)); 414throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(unicode)); 499throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode)); 511throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 538throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c)); 553throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 583throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 587throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, 610throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 618throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 638throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 653throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 688throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 695throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 703throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 714throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 720throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 735throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii)); 779throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii)); 786throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii)); 792throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii)); 804throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[output.Length - 1]) ? 0 : 1)), nameof(ascii)); 827throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(cp));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Icu.cs (5)
39throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(unicode)); 48throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(unicode)); 89throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 104throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii)); 137throw new ArgumentException(SR.Argument_IdnIllegalName, paramName);
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.Nls.cs (1)
122throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Icu.cs (5)
35throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 75throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 102throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 126throw new ArgumentException(SR.Argument_InvalidNormalizationForm, nameof(normalizationForm)); 131throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput));
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Nls.cs (4)
41throw new ArgumentException(SR.Argument_InvalidNormalizationForm, nameof(normalizationForm)); 44throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput)); 119throw new ArgumentException(SR.Argument_InvalidNormalizationForm, nameof(normalizationForm)); 123throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(strInput));
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (9)
110throw new ArgumentException(SR.Argument_InvalidNativeDigitCount, propertyName); 125throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 130throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 139throw new ArgumentException(SR.Argument_InvalidNativeDigitValue, propertyName); 155throw new ArgumentException(SR.Argument_InvalidDigitSubstitution, propertyName); 294throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 298throw new ArgumentException(SR.Argument_InvalidGroupSize, propName); 822throw new ArgumentException( 837throw new ArgumentException((value & InvalidNumberStyles) != 0 ? SR.Argument_InvalidNumberStyles : SR.Arg_HexBinaryStylesNotSupported, nameof(style));
src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (6)
33throw new ArgumentException(SR.Argument_NoRegionInvariantCulture, nameof(name)); 38throw new ArgumentException(SR.Format(SR.Argument_InvalidCultureName, name), nameof(name)); 43throw new ArgumentException(SR.Format(SR.Argument_InvalidNeutralRegionName, name), nameof(name)); 60throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture)); 66throw new ArgumentException(SR.Format(SR.Argument_CustomCultureCannotBePassedByNumber, culture), nameof(culture)); 75throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
src\libraries\System.Private.CoreLib\src\System\Guid.cs (3)
90throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "16"), "b"); 116throw new ArgumentException(SR.Format(SR.Arg_GuidArrayCtor, "8"), nameof(d)); 963throw new ArgumentException(SR.Arg_MustBeGuid, nameof(value));
src\libraries\System.Private.CoreLib\src\System\IO\Directory.cs (1)
75throw new ArgumentException(SR.Argument_DirectorySeparatorInvalid, paramName);
src\libraries\System.Private.CoreLib\src\System\IO\Directory.Unix.cs (1)
17throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(unixCreateMode));
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryInfo.cs (4)
79throw new ArgumentException(SR.Argument_PathEmpty, nameof(path)); 81throw new ArgumentException(SR.Arg_Path2IsRooted, nameof(path)); 98throw new ArgumentException(SR.Format(SR.Argument_InvalidSubPath, path, FullPath), nameof(path)); 199_ => throw new ArgumentException(SR.ArgumentOutOfRange_Enum, nameof(searchTarget)),
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerableFactory.cs (3)
30throw new ArgumentException(SR.Arg_Path2IsRooted, nameof(expression)); 33throw new ArgumentException(SR.Argument_NullCharInPath, expression); 36throw new ArgumentException(SR.Argument_NullCharInPath, directory);
src\libraries\System.Private.CoreLib\src\System\IO\FileStatus.Unix.cs (2)
238throw new ArgumentException(SR.Arg_InvalidFileAttrs, "Attributes"); 481throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(UnixFileMode));
src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (5)
71throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle)); 188throw new ArgumentException(SR.Argument_InvalidAppendMode, nameof(options)); 194throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, options.Mode, options.Access), nameof(options)); 208throw new ArgumentException(SR.Argument_InvalidUnixCreateMode, nameof(options)); 597throw new ArgumentException(SR.Argument_InvalidSeekOrigin, nameof(origin));
src\libraries\System.Private.CoreLib\src\System\IO\FileStreamOptions.cs (1)
144throw new ArgumentException(SR.Arg_InvalidUnixFileMode, nameof(UnixCreateMode));
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.cs (1)
27throw new ArgumentException(SR.Argument_NullCharInPath, argName);
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (2)
867throw new ArgumentException(SR.Arg_PathEmpty, nameof(relativeTo)); 869throw new ArgumentException(SR.Arg_PathEmpty, nameof(path));
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (2)
31throw new ArgumentException(SR.Argument_NullCharInPath, nameof(path)); 42throw new ArgumentException(SR.Arg_BasePathNotFullyQualified, nameof(basePath));
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (4)
105throw new ArgumentException(SR.Format(SR.Argument_InvalidFileModeAndAccessCombo, mode, access), nameof(access)); 111throw new ArgumentException(SR.Argument_InvalidAppendMode, nameof(access)); 127throw new ArgumentException(SR.Argument_InvalidPreallocateAccess, nameof(access)); 135throw new ArgumentException(SR.Argument_InvalidPreallocateMode, nameof(mode));
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (1)
222throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(options));
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
179throw new ArgumentException(SR.Argument_StreamNotWritable, nameof(options));
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (4)
303throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position)); 531throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position)); 586throw new ArgumentException(SR.Argument_NotEnoughBytesToRead, nameof(position)); 610throw new ArgumentException(SR.Argument_NotEnoughBytesToWrite, nameof(position));
src\libraries\System.Private.CoreLib\src\System\ParseNumbers.cs (2)
33throw new ArgumentException(SR.Arg_InvalidBase, nameof(radix)); 121throw new ArgumentException(SR.Arg_InvalidBase, nameof(radix));
src\libraries\System.Private.CoreLib\src\System\Random.cs (1)
197throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices));
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
259throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, path), nameof(path));
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (1)
55throw new ArgumentException(SR.Argument_MustBeRuntimeConstructorInfo, nameof(constructor));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (1)
351throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (4)
96throw new ArgumentException(SR.Argument_NotExceptionType, nameof(excType)); 101throw new ArgumentException(SR.Arg_NoDefCTorWithoutTypeName, nameof(excType)); 140throw new ArgumentException(SR.Argument_EmitWriteLineType, nameof(localBuilder)); 177throw new ArgumentException(SR.Argument_EmitWriteLineType, nameof(fld));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\MethodBuilder.cs (1)
27throw new ArgumentException(SR.Arg_EmptyArray, nameof(names));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (14)
90throw new ArgumentException(SR.Arg_EmptyArray, nameof(names)); 331throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 343throw new ArgumentException(SR.Argument_NeedGenericMethodDefinition, nameof(method)); 348throw new ArgumentException(SR.Argument_MethodNeedGenericDeclaringType, nameof(method)); 353throw new ArgumentException(SR.Argument_InvalidMethodDeclaringType, nameof(type)); 366throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 378throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 383throw new ArgumentException(SR.Argument_ConstructorNeedGenericDeclaringType, nameof(constructor)); 388throw new ArgumentException(SR.Argument_InvalidConstructorDeclaringType, nameof(type)); 399throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 411throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type)); 416throw new ArgumentException(SR.Argument_FieldNeedGenericDeclaringType, nameof(field)); 421throw new ArgumentException(SR.Argument_InvalidFieldDeclaringType, nameof(type)); 432throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBase.cs (1)
146throw new ArgumentException(SR.Arg_VarMissNull, "parameters");
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (1)
77throw new ArgumentException(SR.Argument_MustBeRuntimeMethod, nameof(method));
src\libraries\System.Private.CoreLib\src\System\Reflection\Pointer.cs (3)
28throw new ArgumentException(SR.Arg_MustBePointer, nameof(ptr)); 30throw new ArgumentException(SR.Arg_MustBeType, nameof(type)); 38throw new ArgumentException(SR.Arg_MustBePointer, nameof(ptr));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (1)
214throw new ArgumentException(SR.Arg_ResMgrNotResSet, nameof(usingResourceSet));
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ContractHelper.cs (1)
36throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CurrencyWrapper.cs (1)
21throw new ArgumentException(SR.Arg_MustBeDecimal, nameof(obj));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ErrorWrapper.cs (1)
20throw new ArgumentException(SR.Arg_MustBeInt32, nameof(errorCode));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (2)
41throw new ArgumentException(SR.ArgumentException_NotIsomorphic, nameof(value)); 97throw new ArgumentException(SR.ArgumentException_NotIsomorphic, nameof(value));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (14)
112throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t)); 116throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t)); 127throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T)); 571throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structureType)); 575throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structureType)); 619throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T)); 1057throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 1074throw new ArgumentException(SR.Argument_TypeMustNotBeComImport, nameof(type)); 1078throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type)); 1100throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t)); 1104throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t)); 1112throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(t)); 1125throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(TDelegate)); 1133throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(TDelegate));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (5)
358throw 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)); 551throw new ArgumentException(SR.UnsupportedType, nameof(T)); 577throw new ArgumentException(SR.ComVariant_VT_DECIMAL_NotSupported_RawDataRef, nameof(T));
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (5)
340throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 358throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, nativeImagePath), nameof(nativeImagePath)); 363throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath)); 444throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, unmanagedDllPath), nameof(unmanagedDllPath)); 570throw new ArgumentException(SR.Arg_MustBeRuntimeAssembly, nameof(activating));
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\FrameworkName.cs (5)
120throw new ArgumentException(SR.Argument_FrameworkNameTooShort, nameof(frameworkName)); 131throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 148throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 188throw new ArgumentException(SR.Argument_FrameworkNameInvalid, nameof(frameworkName)); 194throw new ArgumentException(SR.Argument_FrameworkNameMissingVersion, nameof(frameworkName));
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (5)
37throw new ArgumentException(SR.Format(SR.Argument_ResourceScopeWrongDirection, fromResType, toResType), nameof(from)); 112throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, consumeAsScope), nameof(consumeAsScope)); 126throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, calleeScope), nameof(calleeScope)); 147throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, consumeAsScope), nameof(consumeAsScope)); 161throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, calleeScope), nameof(calleeScope));
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (17)
63throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 105throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value)); 114throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 196throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 324throw new ArgumentException(SR.Arg_NoAccessSpec, nameof(bindingFlags)); 341throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 346throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams)); 399throw new ArgumentException(SR.Arg_NamedParamNull, nameof(namedParams)); 410throw new ArgumentException(SR.Arg_CreatInstAccess, nameof(bindingFlags)); 435throw new ArgumentException(SR.Arg_FldSetGet, nameof(bindingFlags)); 438throw new ArgumentException(SR.Arg_FldGetPropSet, nameof(bindingFlags)); 447throw new ArgumentException(SR.Arg_FldSetPropGet, nameof(bindingFlags)); 450throw new ArgumentException(SR.Arg_FldSetInvoke, nameof(bindingFlags)); 519throw new ArgumentException(SR.Arg_FldGetArgErr, nameof(bindingFlags)); 526throw new ArgumentException(SR.Arg_FldSetArgErr, nameof(bindingFlags)); 548throw new ArgumentException(SR.Arg_PropSetGet, nameof(bindingFlags)); 557throw new ArgumentException(SR.Arg_PropSetInvoke, nameof(bindingFlags));
src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.cs (1)
219throw new ArgumentException(SR.Argument_SearchValues_UnsupportedStringComparison, nameof(comparisonType));
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (5)
260throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 574throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 683throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 741throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 998throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType));
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (1)
1200throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType));
src\libraries\System.Private.CoreLib\src\System\String.Searching.cs (3)
74throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 285: new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)); 423: new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType));
src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (2)
42_ => throw new ArgumentException(SR.NotSupported_StringComparison, nameof(comparisonType)), 231throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (1)
40throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\DecoderFallback.cs (1)
311throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\DecoderReplacementFallback.cs (1)
59throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(replacement));
src\libraries\System.Private.CoreLib\src\System\Text\Encoder.cs (1)
40throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\EncoderFallback.cs (1)
357throw new ArgumentException(SR.Format(SR.Argument_RecursiveFallback, charRecursive), "chars");
src\libraries\System.Private.CoreLib\src\System\Text\EncoderReplacementFallback.cs (1)
59throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex, nameof(replacement));
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (3)
222throw new ArgumentException(SR.Format(SR.Argument_CodepageNotSupported, codepage), nameof(codepage)); 1098throw new ArgumentException( 1126throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\EncodingTable.cs (1)
99throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (1)
2092throw new ArgumentException(SR.Arg_EmptySpan, nameof(oldValue));
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (2)
590throw new ArgumentException( 928throw new ArgumentException(
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.cs (1)
26throw new ArgumentException(SR.Argument_InvalidFlag, nameof(mode));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (1)
327throw new ArgumentException(SR.Task_MustBeCompleted, nameof(completedTask));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (1)
329throw new ArgumentException(SR.Task_MustBeCompleted, nameof(completedTask));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExceptionHolder.cs (1)
199throw new ArgumentException(SR.TaskExceptionHolder_UnknownExceptionType, nameof(exceptionObject));
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (5)
2350if (task == null) throw new ArgumentException(SR.Task_MultiTaskContinuation_NullTask, nameof(tasks)); 2973throw new ArgumentException(SR.Task_MultiTaskContinuation_EmptyTaskList, nameof(tasks)); 2981throw new ArgumentException(SR.Task_MultiTaskContinuation_NullTask, nameof(tasks)); 2992throw new ArgumentException(SR.Task_MultiTaskContinuation_EmptyTaskList, nameof(tasks)); 3000throw new ArgumentException(SR.Task_MultiTaskContinuation_NullTask, nameof(tasks));
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Portable.cs (2)
46throw new ArgumentException(SR.Argument_PreAllocatedAlreadyAllocated, nameof(preAllocated)); 68throw new ArgumentException(SR.Argument_NativeOverlappedWrongBoundHandle, nameof(overlapped));
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolBoundHandle.Unix.cs (1)
79throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle));
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
306throw new ArgumentException(SR.Argument_EmptyWaithandleArray, nameof(waitHandles));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (11)
107throw new ArgumentException(SR.Argument_DestinationTooShort, "destination"); 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"); 296throw new ArgumentException(SR.Arg_CannotBeNaN, GetArgumentName(argument)); 347throw new ArgumentException(SR.Arg_HandleNotSync, paramName); 353throw new ArgumentException(SR.Arg_HandleNotAsync, paramName); 536throw new ArgumentException(SR.Arg_InvalidHandle, paramName); 736return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key)); 741return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value)); 756return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (1)
865case ParseFailureKind.Argument_InvalidDateStyles: throw new ArgumentException(SR.Argument_InvalidDateStyles, "style");
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.AdjustmentRule.cs (7)
184throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecifiedOrUtc, nameof(dateStart)); 189throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecifiedOrUtc, nameof(dateEnd)); 194throw new ArgumentException(SR.Argument_TransitionTimesAreIdentical, nameof(daylightTransitionEnd)); 199throw new ArgumentException(SR.Argument_OutOfOrderDateTimes, nameof(dateStart)); 213throw new ArgumentException(SR.Argument_TimeSpanHasSeconds, nameof(daylightDelta)); 218throw new ArgumentException(SR.Argument_DateTimeHasTimeOfDay, nameof(dateStart)); 223throw new ArgumentException(SR.Argument_DateTimeHasTimeOfDay, nameof(dateEnd));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (8)
195throw new ArgumentException(SR.Argument_DateTimeOffsetIsNotAmbiguous, nameof(dateTimeOffset)); 210throw new ArgumentException(SR.Argument_DateTimeOffsetIsNotAmbiguous, nameof(dateTimeOffset)); 240throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime)); 269throw new ArgumentException(SR.Argument_DateTimeIsNotAmbiguous, nameof(dateTime)); 756throw new ArgumentException(SR.Argument_ConvertMismatch, nameof(sourceTimeZone)); 781throw new ArgumentException(SR.Argument_DateTimeIsInvalid, nameof(dateTime)); 870throw new ArgumentException(SR.Format(SR.Argument_InvalidSerializedString, source), nameof(source)); 2154throw new ArgumentException(SR.Argument_TimeSpanHasSeconds, nameof(baseUtcOffset));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.TransitionTime.cs (2)
75throw new ArgumentException(SR.Argument_DateTimeKindMustBeUnspecified, nameof(timeOfDay)); 105throw new ArgumentException(SR.Argument_DateTimeHasTicks, nameof(timeOfDay));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (3)
1286throw new ArgumentException(SR.Argument_TimeZoneInfoInvalidTZif, nameof(data)); 1312throw new ArgumentException("bad data", nameof(data)); 1320throw new ArgumentException(SR.Argument_TimeZoneInfoBadTZif, nameof(data));
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (8)
154throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 274throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 399throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 534throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 679throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 834throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 999throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other)); 1179throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
src\libraries\System.Private.CoreLib\src\System\Type.cs (5)
296new ArgumentException(SR.Format(SR.Arg_MemberInfoNotFound, member.Name), nameof(member)); 479throw new ArgumentException(SR.ArgumentNull_ArrayValue, nameof(args)); 602throw new ArgumentException(SR.Arg_MustBeEnum, "enumType"); 606throw new ArgumentException(SR.Argument_InvalidEnum, "enumType"); 615throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (4)
25throw new ArgumentException(SR.Arg_MustBeEnum, nameof(value)); 71throw new ArgumentException(SR.Arg_MustBeEnum, nameof(value)); 76throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value)); 93throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (1)
22throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(flds));
src\libraries\System.Private.CoreLib\src\System\Version.cs (4)
123throw new ArgumentException(SR.Arg_MustBeVersion, nameof(version)); 222throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper, "0", failureUpperBound), nameof(fieldCount)); 313if (throwOnFailure) throw new ArgumentException(SR.Arg_VersionString, nameof(input)); 330if (throwOnFailure) throw new ArgumentException(SR.Arg_VersionString, nameof(input));
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\AssemblyNameInfo.cs (1)
181: throw new ArgumentException(SR.InvalidAssemblyName, nameof(assemblyName));
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
334throw new ArgumentException(SR.Argument_InvalidTypeName, $"typeName@{errorIndex}");
src\System\Array.CoreCLR.cs (2)
61throw new ArgumentException(SR.Arg_LongerThanSrcArray, nameof(sourceArray)); 63throw new ArgumentException(SR.Arg_LongerThanDestArray, nameof(destinationArray));
src\System\Attribute.CoreCLR.cs (2)
546throw new ArgumentException(SR.Argument_InvalidParameterInfo, nameof(element)); 560throw new ArgumentException(SR.Argument_InvalidParameterInfo, nameof(element));
src\System\Collections\EmptyReadOnlyDictionaryInternal.cs (1)
46throw new ArgumentException(SR.ArgumentOutOfRange_IndexMustBeLessOrEqual, nameof(index));
src\System\Delegate.CoreCLR.cs (16)
63throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target)); 65throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target)); 223throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 225throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 258throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target)); 260throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 262throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target)); 265throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 293throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 296throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method)); 299throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 328throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 331throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method)); 334throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type)); 366throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type)); 369throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
src\System\GC.CoreCLR.cs (3)
212throw new ArgumentException(SR.Argument_AggressiveGCRequiresMaxGeneration, nameof(generation)); 216throw new ArgumentException(SR.Argument_AggressiveGCRequiresBlocking, nameof(blocking)); 220throw new ArgumentException(SR.Argument_AggressiveGCRequiresCompacting, nameof(compacting));
src\System\Reflection\Assembly.CoreCLR.cs (1)
32throw new ArgumentException(SR.Format_StringZeroLength, nameof(partialName));
src\System\Reflection\Emit\CustomAttributeBuilder.cs (3)
68throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedProperties, propertyValues"); 70throw new ArgumentException(SR.Arg_ArrayLengthsDiffer, "namedFields, fieldValues"); 288throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, passedType), paramName);
src\System\Reflection\Emit\DynamicILGenerator.cs (7)
69throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(meth)); 117throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(con)); 157throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(field)); 260throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 263throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo)); 266throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo)); 417throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(methodInfo));
src\System\Reflection\Emit\RuntimeAssemblyBuilder.cs (2)
45throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)access), nameof(access)); 190throw new ArgumentException(SR.Argument_InvalidName, nameof(name));
src\System\Reflection\Emit\RuntimeEnumBuilder.cs (1)
307throw new ArgumentException(SR.Argument_ShouldOnlySetVisibilityFlags, nameof(name));
src\System\Reflection\Emit\RuntimeFieldBuilder.cs (1)
24throw new ArgumentException(SR.Argument_IllegalName, nameof(fieldName));
src\System\Reflection\Emit\RuntimeILGenerator.cs (2)
604throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 825throw new ArgumentException(SR.Argument_UnmatchedMethodForLocal, nameof(local));
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (1)
67throw new ArgumentException(SR.Argument_IllegalName, nameof(name));
src\System\Reflection\Emit\RuntimePropertyBuilder.cs (1)
38throw new ArgumentException(SR.Argument_IllegalName, nameof(name));
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (6)
384throw new ArgumentException(SR.Argument_IllegalName, nameof(name)); 387throw new ArgumentException(SR.Argument_TypeNameTooLong, nameof(name)); 402throw new ArgumentException(SR.Argument_BadNestedTypeFlags, nameof(attr)); 997throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 1010throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 1435throw new ArgumentException(SR.Argument_IllegalName, nameof(name));
src\System\Reflection\Emit\SignatureHelper.cs (11)
101throw new ArgumentException(SR.Argument_UnknownUnmanagedCallConv, nameof(unmanagedCallConv)); 285throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers)); 288throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers)); 307throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers)); 310throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers)); 745throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(optionalCustomModifiers)); 748throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers)); 751throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers)); 768throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(requiredCustomModifiers)); 771throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers)); 774throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers));
src\System\Reflection\FieldInfo.CoreCLR.cs (1)
11throw new ArgumentException(SR.Argument_InvalidHandle, nameof(handle));
src\System\Reflection\RuntimeAssembly.cs (2)
344throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 354throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (2)
139throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 149throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeCustomAttributeData.cs (4)
179throw new ArgumentException(SR.Argument_InvalidKindOfTypeForCA, nameof(type)); 521_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, (int)encodedType), nameof(encodedType)), 541_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, val.Byte8), nameof(val)) 557throw new ArgumentException(null, nameof(encodedArg));
src\System\Reflection\RuntimeEventInfo.cs (2)
99throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 109throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeFieldInfo.cs (2)
70throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 80throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (4)
182throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 192throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 385throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(delegateType)); 388throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(delegateType));
src\System\Reflection\RuntimeModule.cs (11)
59throw new ArgumentException(SR.Format(SR.Argument_InvalidToken, tk, this), 85throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this), 93throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this), 156throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), nameof(metadataToken)); 186throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), 194throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), 229throw new ArgumentException(SR.Format(SR.Argument_ResolveModuleType, tk), nameof(metadataToken)); 232throw new ArgumentException(SR.Format(SR.Argument_ResolveType, tk, this), nameof(metadataToken)); 294throw new ArgumentException(SR.Format(SR.Argument_ResolveMember, tk, this), 370throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 380throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimeParameterInfo.cs (2)
468throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 484throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Reflection\RuntimePropertyInfo.cs (2)
147throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType)); 157throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (4)
74throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(type)); 94throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(module)); 111throw new ArgumentException(SR.InvalidOperation_HandleIsNotInitialized, nameof(method)); 362throw new ArgumentException(SR.Arg_MustBeType, nameof(type));
src\System\Runtime\InteropServices\ComWrappers.cs (1)
134throw new ArgumentException(null, nameof(instance));
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (10)
44throw new ArgumentException(SR.Format(SR.Argument_OffsetOfFieldNotFound, t.FullName), nameof(fieldName)); 49throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(fieldName)); 218throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(m)); 251throw new ArgumentException(SR.Argument_NeedNonGenericObject, nameof(structure)); 256throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure)); 281throw new ArgumentException(SR.Argument_StructMustNotBeValueClass, nameof(structure)); 286throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure)); 310throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structuretype)); 313throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structuretype)); 318throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structuretype));
src\System\RuntimeType.CoreCLR.cs (2)
2725throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(interfaceType)); 3550throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(instantiation));
src\System\Threading\Monitor.CoreCLR.cs (1)
54throw new ArgumentException(SR.Argument_MustBeFalse, "lockTaken");
src\System\Threading\Mutex.CoreCLR.Unix.cs (2)
25throw new ArgumentException(SR.Argument_WaitHandleNameTooLong, nameof(name)); 54throw new ArgumentException(SR.Argument_WaitHandleNameTooLong, nameof(name));
src\System\Threading\Thread.CoreCLR.cs (1)
77throw new ArgumentException(null, SR.Argument_InvalidHandle);
System.Private.DataContractSerialization (40)
System\Runtime\Serialization\Json\JsonDataContract.cs (1)
272throw new ArgumentException(SR.Format(SR.JsonTypeNotSupportedByDataContractJsonSerializer, traditionalDataContract.UnderlyingType), nameof(traditionalDataContract));
System\Runtime\Serialization\Json\XmlJsonWriter.cs (12)
661throw new ArgumentException(SR.JsonXmlProcessingInstructionNotSupported, nameof(name)); 676throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName)); 714throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns)); 719throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix)); 742throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns)); 748throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName)); 804throw new ArgumentException(SR.Format(SR.JsonUnexpectedAttributeLocalName, localName), nameof(localName)); 833throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName)); 839throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix)); 846throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns)); 1061throw new ArgumentException(SR.Format(SR.JsonOnlyWhitespace, ws[pos].ToString(), "WriteWhitespace"), nameof(ws)); 1432throw new ArgumentException(SR.JsonNestedArraysNotSupported, nameof(value));
System\Text\Base64Encoding.cs (4)
154throw new ArgumentException(SR.XmlArrayTooSmall, nameof(bytes)); 226throw new ArgumentException(SR.XmlArrayTooSmall, nameof(bytes)); 273throw new ArgumentException(SR.XmlArrayTooSmall, nameof(chars)); 358throw new ArgumentException(SR.XmlArrayTooSmall, nameof(chars));
System\Text\BinHexEncoding.cs (2)
39throw new ArgumentException(SR.XmlArrayTooSmall, nameof(bytes)); 78throw new ArgumentException(SR.XmlArrayTooSmall, nameof(chars));
System\Text\SurrogateChar.cs (3)
26throw new ArgumentException(SR.Format(SR.XmlInvalidSurrogate, ch.ToString("X", CultureInfo.InvariantCulture)), nameof(ch)); 37throw new ArgumentException(SR.Format(SR.XmlInvalidLowSurrogate, ((int)lowChar).ToString("X", CultureInfo.InvariantCulture)), nameof(lowChar)); 40throw new ArgumentException(SR.Format(SR.XmlInvalidHighSurrogate, ((int)highChar).ToString("X", CultureInfo.InvariantCulture)), nameof(highChar));
System\Xml\UniqueId.cs (1)
73throw new ArgumentException(SR.Format(SR.XmlArrayTooSmallInput, guidLength), nameof(guid));
System\Xml\XmlBaseWriter.cs (17)
231throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xml", xmlNamespace, ns), nameof(ns)); 239throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns)); 253throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix)); 260throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix)); 442throw new ArgumentException(SR.XmlInvalidCommentChars, nameof(text)); 499throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName)); 513throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix)); 563throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix)); 819throw new ArgumentException(SR.Format(SR.XmlNamespaceNotFound, namespaceUri), nameof(namespaceUri)); 847throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName)); 891throw new ArgumentException(SR.XmlProcessingInstructionNotSupported, nameof(name)); 967throw new ArgumentException(SR.XmlOnlyWhitespace, nameof(whitespace)); 1106throw new ArgumentException(SR.XmlMissingLowSurrogate, nameof(ch)); 1227throw new ArgumentException(SR.XmlNestedArraysNotSupported, nameof(value)); 2150throw new ArgumentException(SR.XmlReservedPrefix, nameof(prefix)); 2163throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, prefix, nameSpace.Uri, uri), nameof(prefix)); 2167throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix));
System.Private.Uri (5)
System\Uri.cs (3)
467throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "RelativeUri"), nameof(serializationInfo)); 1371throw new ArgumentException(SR.Format(SR.Argument_InvalidUriSubcomponent, part), nameof(part)); 1511throw new ArgumentException(null, nameof(digit));
System\UriBuilder.cs (2)
92throw new ArgumentException(SR.Argument_ExtraNotValid, nameof(extraValue)); 127throw new ArgumentException(SR.net_uri_BadScheme, nameof(value));
System.Private.Xml (56)
System\Xml\Core\XmlReader.cs (1)
1720throw new ArgumentException(SR.XmlBinary_NoParserContext, nameof(inputContext));
System\Xml\Core\XmlValidatingReaderImpl.cs (2)
141throw new ArgumentException(SR.Arg_ExpectingXmlTextReader, nameof(reader)); 221throw new ArgumentException(SR.Arg_ExpectingXmlTextReader, nameof(reader));
System\Xml\Core\XmlWellFormedWriter.cs (3)
393throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid)); 400throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid)); 407throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset));
System\Xml\Core\XmlWellFormedWriterAsync.cs (3)
94throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid)); 101throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid)); 108throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset));
System\Xml\Schema\XmlSchemaSet.cs (1)
586throw 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)
26throw 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)
290throw new ArgumentException(SR.XmlInternalError, nameof(mapping)); 481throw new ArgumentException(SR.Format(SR.XmlGetSchemaMethodName, provider.MethodName), nameof(provider.MethodName)); 604_ => throw new ArgumentException(SR.XmlInternalError, nameof(context)), 1136throw new ArgumentException(SR.XmlInternalError, nameof(context));
System\Xml\Serialization\XmlSchemaExporter.cs (3)
364throw new ArgumentException(SR.XmlInternalError, nameof(mapping)); 395throw new ArgumentException(SR.XmlInternalError, nameof(mapping)); 537throw new ArgumentException(SR.XmlInternalError, nameof(mapping));
System\Xml\Serialization\XmlSchemaImporter.cs (1)
455throw new ArgumentException(SR.XmlInternalError, nameof(desiredMappingType));
System\Xml\Serialization\XmlSerializationReader.cs (11)
972throw new ArgumentException(SR.Format(SR.XmlEmptyArrayType, CurrentTag()), nameof(value)); 985throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value)); 993throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value)); 998throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value)); 1006throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, new string(lengthStringSpan)), nameof(value)); 1020throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value)); 1022throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value)); 1024throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value)); 1074throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, dimensions[i]), "value"); 2321throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 2327throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializationReaderILGen.cs (2)
271throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 277throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializationWriter.cs (2)
2317throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 2323throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializationWriterILGen.cs (2)
80throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping)); 86throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\Serialization\XmlSerializer.cs (1)
665throw 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)
24throw new ArgumentException("", nameof(name));
System.Reflection.DispatchProxy (5)
System\Reflection\DispatchProxy.cs (1)
65throw new ArgumentException(SR.Format(SR.ProxyType_Must_Be_Derived_From_DispatchProxy, proxyType.Name), nameof(proxyType));
System\Reflection\DispatchProxyGenerator.cs (4)
181throw new ArgumentException(SR.Format(SR.InterfaceType_Must_Be_Interface, interfaceType.FullName), interfaceParameter); 187throw new ArgumentException(SR.Format(SR.BaseType_Cannot_Be_Sealed, baseType.FullName), proxyParameter); 193throw new ArgumentException(SR.Format(SR.BaseType_Cannot_Be_Abstract, baseType.FullName), proxyParameter); 199throw new ArgumentException(SR.Format(SR.BaseType_Must_Have_Default_Ctor, baseType.FullName), proxyParameter);
System.Reflection.Emit (23)
System\Reflection\Emit\CustomAttributeWrapper.cs (4)
44throw new ArgumentException(SR.Format(SR.Argument_InvalidCustomAttributeLength, ctor.DeclaringType, binaryAttribute.Length), nameof(binaryAttribute)); 48throw new ArgumentException(SR.Format(SR.Argument_InvalidProlog, ctor.DeclaringType), nameof(binaryAttribute)); 88throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, ctor.DeclaringType, namedType), nameof(binaryAttribute)); 174_ => throw new ArgumentException(SR.Argument_InvalidTypeCodeForTypeArgument, "binaryAttribute"),
System\Reflection\Emit\EnumBuilderImpl.cs (1)
17throw new ArgumentException(SR.Argument_ShouldOnlySetVisibilityFlags, nameof(name));
System\Reflection\Emit\ILGeneratorImpl.cs (5)
400throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 501throw new ArgumentException(SR.Argument_MustBeSwitchOpCode, nameof(opcode)); 521throw new ArgumentException(SR.Argument_UnmatchedMethodForLocal, nameof(local)); 600throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode)); 814throw 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)
293throw new ArgumentException(SR.Argument_BadSizeForData, nameof(data.Length)); 330throw new ArgumentException(SR.Format(SR.Argument_MethodOverriden, methodInfoBody.Name, FullName), nameof(methodInfoDeclaration)); 371new ArgumentException(SR.Format(SR.Argument_InvalidMethodOverride, FullName, methodName), "methodInfoBody"); 433throw new ArgumentException(SR.Argument_BadSizeForData, nameof(size)); 552throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, con.DeclaringType, name), nameof(binaryAttribute)); 979throw new ArgumentException(SR.Argument_MustBeInterface, nameof(interfaceType)); 984throw new ArgumentException(SR.Argument_InterfaceNotFound, nameof(interfaceType));
System.Reflection.Metadata (34)
System\Reflection\Internal\Utilities\StreamExtensions.cs (1)
124throw new ArgumentException(SR.StreamTooLarge, streamParameterName);
System\Reflection\Metadata\AssemblyNameInfo.cs (1)
181: 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)
1096throw new ArgumentException(SR.InvalidSignature, nameof(attributes));
System\Reflection\Metadata\Ecma335\Encoding\MethodBodyStreamEncoder.cs (1)
26throw new ArgumentException(SR.BuilderMustAligned, nameof(builder));
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (7)
63throw new ArgumentException(SR.BaseReaderMustBeFullMetadataReader, nameof(baseReader)); 73throw new ArgumentException(SR.Format(SR.ExpectedListOfSize, MetadataTokens.TableCount), nameof(baseTableRowCounts)); 83throw new ArgumentException(SR.Format(SR.ExpectedListOfSize, MetadataTokens.HeapCount), nameof(baseTableRowCounts)); 89throw new ArgumentException(SR.ExpectedNonEmptyList, nameof(deltaReaders)); 96throw new ArgumentException(SR.ReadersMustBeDeltaReaders, nameof(deltaReaders)); 287throw new ArgumentException(SR.HandleBelongsToFutureGeneration, nameof(handle)); 320throw new ArgumentException(SR.HandleBelongsToFutureGeneration, nameof(handle));
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
109throw new ArgumentException(SR.Format(SR.ValueMustBeMultiple, BlobUtilities.SizeOfGuid), nameof(guidHeapStartOffset));
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (2)
78throw new ArgumentException(SR.Format(SR.ExpectedArrayOfSize, MetadataTokens.TableCount), nameof(typeSystemRowCounts)); 95throw new ArgumentException(SR.Format(SR.RowCountMustBeZero, i), nameof(typeSystemRowCounts));
System\Reflection\Metadata\IL\ILOpCodeExtensions.cs (3)
92throw new ArgumentException(SR.Format(SR.UnexpectedOpCode, opCode), nameof(opCode)); 164throw new ArgumentException(SR.Format(SR.UnexpectedOpCode, opCode), nameof(opCode)); 236throw new ArgumentException(SR.Format(SR.UnexpectedOpCode, opCode), nameof(opCode));
System\Reflection\Metadata\Internal\MetadataWriterUtilities.cs (1)
89throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, value.GetType()), nameof(value));
System\Reflection\Metadata\MetadataReaderProvider.cs (1)
172throw new ArgumentException(SR.StreamMustSupportReadAndSeek, nameof(stream));
System\Reflection\Metadata\TypeNameParserHelpers.cs (1)
334throw 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)
82throw new ArgumentException(SR.StreamMustSupportReadAndSeek, nameof(peStream));
System\Reflection\PortableExecutable\PEReader.cs (1)
164throw 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)
40throw new ArgumentException(SR.Format(SR.Arg_InvalidPath, path), nameof(assemblyPaths)); 44throw new ArgumentException(SR.Format(SR.Arg_InvalidPath, path), nameof(assemblyPaths));
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.ManifestResources.cs (2)
20throw new ArgumentException(null, nameof(resourceName)); 67throw new ArgumentException(null, nameof(name));
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs (1)
124throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(typeArguments));
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (1)
100throw new ArgumentException(SR.Argument_GenericArgsCount, nameof(typeArguments));
System\Reflection\TypeLoading\Types\RoType.cs (1)
340throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
System.Resources.Extensions (1)
src\libraries\System.Private.CoreLib\src\System\Resources\RuntimeResourceSet.cs (1)
200_defaultReader = reader as DeserializingResourceReader ?? throw 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)
161throw new ArgumentException(SR.Invalid_state, nameof(state));
System\Runtime\Caching\MemoryCache.cs (7)
256throw new ArgumentException(SR.Invalid_expiration_combination, nameof(policy)); 265throw new ArgumentException(SR.Invalid_callback_combination, nameof(policy)); 354throw new ArgumentException(SR.Empty_string_invalid, nameof(name)); 358throw new ArgumentException(SR.Default_is_reserved, nameof(name)); 375throw new ArgumentException(SR.Empty_string_invalid, nameof(name)); 379throw new ArgumentException(SR.Default_is_reserved, nameof(name)); 415throw 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)
79throw new ArgumentException(SR.ComVariantMarshaller_ManagedTypeNotSupported, nameof(managed)); 192throw new ArgumentException(SR.ComVariantMarshaller_UnmanagedTypeNotSupported, nameof(unmanaged)); 313throw new ArgumentException("Invalid combination of unmanaged variant type and managed object type.", nameof(_managed));
System.Runtime.Numerics (4)
System\Number.BigInteger.cs (2)
43e = new ArgumentException(SR.Argument_InvalidNumberStyles, nameof(style)); 50e = new ArgumentException(SR.Argument_InvalidHexStyle, nameof(style));
System\Numerics\BigInteger.cs (1)
1199throw new ArgumentException(SR.Argument_MustBeBigInt, nameof(obj));
System\Numerics\Complex.cs (1)
2187throw 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.Cryptography (247)
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSsl.Derive.cs (1)
121throw new ArgumentException(SR.Cryptography_ArgECDHKeySizeMismatch, nameof(otherPartyPublicKey));
src\libraries\Common\src\System\Security\Cryptography\ECDiffieHellmanOpenSslPublicKey.cs (1)
18throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle));
src\libraries\Common\src\System\Security\Cryptography\SP800108HmacCounterKdf.cs (1)
556throw new ArgumentException(SR.Argument_EmptyString, nameof(hashAlgorithm));
System\Security\Cryptography\AesCcm.cs (2)
87throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 90throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag));
System\Security\Cryptography\AesGcm.cs (4)
61throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tagSizeInBytes)); 155throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 164throw new ArgumentException(SR.Format(SR.Cryptography_IncorrectTagLength, tagSizeInBytes), nameof(tag)); 169throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag));
System\Security\Cryptography\AesImplementation.cs (2)
189throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 195throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV));
System\Security\Cryptography\ChaCha20Poly1305.cs (2)
100throw new ArgumentException(SR.Cryptography_InvalidNonceLength, nameof(nonce)); 103throw new ArgumentException(SR.Cryptography_InvalidTagLength, nameof(tag));
System\Security\Cryptography\CryptoConfig.cs (1)
310throw new ArgumentException(SR.Cryptography_AlgorithmTypesMustBeVisible, nameof(algorithm));
System\Security\Cryptography\CryptographicOperations.cs (4)
153throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 462throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 765throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 817throw new ArgumentException(SR.Argument_DestinationTooShort, "destination");
System\Security\Cryptography\CryptoStream.cs (3)
51throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(stream)); 59throw new ArgumentException(SR.Argument_StreamNotWritable, nameof(stream)); 65throw new ArgumentException(SR.Argument_InvalidValue, nameof(mode));
System\Security\Cryptography\DesImplementation.cs (2)
66throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 77throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV));
System\Security\Cryptography\DSAOpenSsl.cs (2)
44throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 76throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle));
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (2)
30throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 63throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle));
System\Security\Cryptography\ECDsa.cs (4)
374throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 407throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 671throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 716throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Security\Cryptography\ECDsaOpenSsl.cs (2)
30throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle)); 63throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle));
System\Security\Cryptography\HKDF.cs (6)
54throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 117throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output)); 122throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output)); 132throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk)); 246throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output)); 251throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output));
System\Security\Cryptography\HMACMD5.cs (7)
130throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 190throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 193throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 216throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 263throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 326throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 329throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA1.cs (7)
133throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 191throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 194throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 216throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 261throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 322throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 325throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA256.cs (7)
125throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 183throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 186throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 208throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 253throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 314throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 317throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA3_256.cs (7)
161throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 221throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 224throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 293throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 355throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 358throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA3_384.cs (7)
161throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 221throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 224throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 293throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 355throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 358throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA3_512.cs (7)
161throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 221throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 224throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 247throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 293throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 355throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 358throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA384.cs (7)
142throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 200throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 203throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 225throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 270throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 331throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 334throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\HMACSHA512.cs (7)
139throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 197throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 200throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 222throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 267throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 328throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 331throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\IncrementalHash.cs (2)
155throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 227throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Security\Cryptography\Kmac128.cs (1)
531throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Kmac256.cs (1)
531throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof128.cs (1)
531throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\KmacXof256.cs (1)
531throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\MD5.cs (7)
90throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 147throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 150throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 172throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 198throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 235throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 238throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\PemEncoding.cs (5)
43throw new ArgumentException(SR.Argument_PemEncoding_NoPemFound, nameof(pemData)); 380throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(label)); 410throw new ArgumentException(null, nameof(destination)); 481throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(label)); 524throw new ArgumentException(SR.Argument_PemEncoding_InvalidLabel, nameof(label));
System\Security\Cryptography\PemKeyHelpers.cs (6)
118throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 132throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(input)); 186throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 197throw new ArgumentException(SR.Argument_PemImport_AmbiguousPem, nameof(input)); 212throw new ArgumentException(SR.Argument_PemImport_EncryptedPem, nameof(input)); 218throw new ArgumentException(SR.Argument_PemImport_NoPemFound, nameof(input));
System\Security\Cryptography\RandomNumberGenerator.cs (3)
182throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 205throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices)); 232throw new ArgumentException(SR.Arg_EmptySpan, nameof(choices));
System\Security\Cryptography\RC2Implementation.cs (2)
64throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 70throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV));
System\Security\Cryptography\RSA.cs (4)
220throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 303throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 529throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 631throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Security\Cryptography\RSAOpenSsl.cs (2)
44throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(handle)); 73throw new ArgumentException(SR.Cryptography_OpenInvalidHandle, nameof(pkeyHandle));
System\Security\Cryptography\SHA1.cs (7)
86throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 141throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 144throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 165throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 190throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 229throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA256.cs (7)
85throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 141throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 144throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 165throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 190throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 226throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 229throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA3_256.cs (7)
114throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 177throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 180throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 205throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 234throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 274throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 277throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA3_384.cs (7)
114throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 178throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 181throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 206throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 235throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 275throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 278throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA3_512.cs (7)
114throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 177throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 180throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 205throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 234throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 274throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 277throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA384.cs (7)
85throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 140throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 143throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 164throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 189throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 225throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 228throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SHA512.cs (7)
85throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 140throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 143throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 164throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 189throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 225throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 228throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Shake128.cs (4)
359throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 387throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 423throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 465throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\Shake256.cs (4)
359throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 387throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 423throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source)); 465throw new ArgumentException(SR.Argument_StreamNotReadable, nameof(source));
System\Security\Cryptography\SymmetricAlgorithm.cs (11)
328throw new ArgumentException(SR.Cryptography_MatchBlockSize, nameof(plaintextLength)); 399throw new ArgumentException(SR.Argument_BitsMustBeWholeBytes, nameof(feedbackSizeInBits)); 407throw new ArgumentException(SR.Cryptography_MatchFeedbackSize, nameof(plaintextLength)); 515throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 633throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 777throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 930throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1151throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1383throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 1625throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(iv)); 1632throw new ArgumentException(SR.Cryptography_InvalidFeedbackSize, nameof(feedbackSizeInBits));
System\Security\Cryptography\SymmetricPadding.cs (5)
50throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 65throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 82throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 99throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination)); 120throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
System\Security\Cryptography\TripleDesImplementation.cs (2)
58throw new ArgumentException(SR.Cryptography_InvalidKeySize, nameof(rgbKey)); 64throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(rgbIV));
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (10)
634throw new ArgumentException(SR.Cryptography_CertReq_IssuerRequiresPrivateKey, nameof(issuerCertificate)); 638throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 642throw new ArgumentException( 653throw new ArgumentException( 673throw new ArgumentException( 690throw new ArgumentException(SR.Cryptography_CertReq_BasicConstraintsRequired, nameof(issuerCertificate)); 692throw new ArgumentException(SR.Cryptography_CertReq_IssuerBasicConstraintsInvalid, nameof(issuerCertificate)); 694throw new ArgumentException(SR.Cryptography_CertReq_IssuerKeyUsageInvalid, nameof(issuerCertificate)); 720throw new ArgumentException( 816throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (5)
136throw new ArgumentException( 157throw new ArgumentException( 164throw new ArgumentException( 171throw new ArgumentException( 200throw new ArgumentException(
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.CdpExtension.cs (2)
67throw new ArgumentException(SR.Cryptography_X509_CDP_NullValue, nameof(uris)); 105throw new ArgumentException(SR.Cryptography_X509_CDP_MustNotBuildEmpty, nameof(uris));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.cs (2)
138throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(serialNumber)); 145throw new ArgumentException(
System\Security\Cryptography\X509Certificates\DSACertificateExtensions.cs (1)
54throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (1)
45throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (1)
29throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle));
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (1)
49throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey));
System\Security\Cryptography\X509Certificates\X500DistinguishedNameBuilder.cs (4)
137throw new ArgumentException(SR.Argument_X500_EmailTooLong, nameof(emailAddress)); 226throw new ArgumentException(SR.Argument_X500_InvalidCountryOrRegion, nameof(twoLetterCode)); 379throw new ArgumentException(SR.Format(SR.Argument_Asn1_InvalidStringContents, stringEncodingType), paramName); 401throw new ArgumentException(SR.Argument_Asn1_InvalidCharacterString, nameof(stringEncodingType));
System\Security\Cryptography\X509Certificates\X509AuthorityKeyIdentifierExtension.cs (2)
342throw new ArgumentException(SR.Argument_InvalidSerialNumberBytes, nameof(serialNumber)); 443throw new ArgumentException(SR.Argument_InvalidSerialNumberBytes, nameof(serialNumber));
System\Security\Cryptography\X509Certificates\X509Certificate.cs (5)
93throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 108throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 121throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 668throw new ArgumentException(SR.Argument_InvalidFlag, nameof(keyStorageFlags)); 677throw new ArgumentException(
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (4)
387throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 405throw new ArgumentException(SR.Arg_EmptyOrNullArray, nameof(rawData)); 762throw new ArgumentException(SR.Cryptography_PrivateKey_DoesNotMatch, nameof(privateKey)); 1272throw new ArgumentException(
System\Security\Cryptography\X509Certificates\X509CertificateCollection.cs (1)
112throw new ArgumentException(SR.Arg_InvalidType, nameof(value));
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 (35)
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)
227throw new ArgumentException(SR.Argument_DestinationTooSmall, nameof(destination));
System\Security\Cryptography\Cose\CoseHelpers.cs (1)
304_ => throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType()), nameof(key))
System\Security\Cryptography\Cose\CoseMessage.cs (1)
617throw new ArgumentException(SR.Argument_EncodeDestinationTooSmall, nameof(destination));
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (7)
193throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 196throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 267throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 270throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 426throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels, nameof(signer)); 436throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer)); 441throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(protectedHeaders));
System\Security\Cryptography\Cose\CoseSign1Message.cs (10)
170throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 173throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 224throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 227throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 312throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels, nameof(signer)); 317throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer)); 593throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 598throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 694throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 699throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
System\Security\Cryptography\Cose\CoseSignature.cs (4)
302throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 307throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent)); 369throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent)); 374throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
System\Security\Cryptography\Cose\CoseSigner.cs (6)
71throw new ArgumentException(SR.CoseSignerRSAKeyNeedsPadding, nameof(key)); 148throw new ArgumentException(SR.Sign1SignAlgMustBeProtected, "unprotectedHeaders"); 171throw new ArgumentException(exMsg, "protectedHeaders"); 185_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithmName), "hashAlgorithm") 199_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithmName), "hashAlgorithm") 210_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithmName), "hashAlgorithm")
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)
351throw new ArgumentException(SR.Format(SR.Argument_EncodingConversionOverflowBytes, EncodingName, EncoderFallback.GetType()), "bytes"); 359throw 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.Json (14)
System\Text\Json\Document\JsonDocument.cs (1)
1092throw new ArgumentException(SR.JsonDocumentDoesNotSupportComments, paramName);
System\Text\Json\ThrowHelper.cs (1)
65throw new ArgumentException(SR.ArrayTooSmall, paramName);
System\Text\Json\ThrowHelper.Node.cs (2)
14throw new ArgumentException(SR.NodeValueNotAllowed, paramName); 20throw new ArgumentException(SR.Format(SR.NodeDuplicateKey, propertyName), paramName);
System\Text\Json\ThrowHelper.Serialization.cs (4)
27throw new ArgumentException(SR.JsonSerializerDoesNotSupportComments, paramName); 138throw new ArgumentException(SR.Format(SR.CannotSerializeInvalidType, typeToConvert), paramName); 142throw new ArgumentException(SR.Format(SR.CannotSerializeInvalidMember, typeToConvert, propertyName, declaringType), paramName); 898throw 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.Threading.RateLimiting (14)
System\Threading\RateLimiting\ConcurrencyLimiter.cs (2)
50throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options)); 54throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options));
System\Threading\RateLimiting\FixedWindowRateLimiter.cs (3)
56throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options)); 60throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options)); 64throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.Window)), nameof(options));
System\Threading\RateLimiting\PartitionedRateLimiter.cs (1)
63throw new ArgumentException("Must pass in at least 1 limiter.", nameof(limiters));
System\Threading\RateLimiting\SlidingWindowRateLimiter.cs (4)
60throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.PermitLimit)), nameof(options)); 64throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.SegmentsPerWindow)), nameof(options)); 68throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options)); 72throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.Window)), nameof(options));
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (4)
58throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.TokenLimit)), nameof(options)); 62throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThan0, nameof(options.TokensPerPeriod)), nameof(options)); 66throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanOrEqual0, nameof(options.QueueLimit)), nameof(options)); 70throw new ArgumentException(SR.Format(SR.ShouldBeGreaterThanTimeSpan0, nameof(options.ReplenishmentPeriod)), nameof(options));
System.Threading.Tasks.Dataflow (40)
Base\DataflowBlock.cs (11)
153if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 645if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 690if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 707if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 1182if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 1183if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept)); 1495if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 2183if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 2184if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept)); 2699if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 2704if (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)
355if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 356if (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)); 310throw new ArgumentException(SR.Argument_NonGreedyNotSupported, nameof(dataflowBlockOptions)); 573if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 574if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Blocks\BroadcastBlock.cs (5)
169if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 170if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept)); 1047if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 1087if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 1114if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
Blocks\BufferBlock.cs (2)
94if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 95if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Blocks\JoinBlock.cs (2)
829if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 830if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Blocks\WriteOnceBlock.cs (5)
350if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 351if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept)); 390if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 411if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 424if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
Internal\SourceCore.cs (3)
166if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 222if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 249if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
Internal\SpscTargetCore.cs (2)
136throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 142if (source == null) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
Internal\TargetCore.cs (2)
184if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader)); 185if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
System.Transactions.Local (15)
System\Transactions\CommittableTransaction.cs (1)
166throw new ArgumentException(SR.BadAsyncResult, nameof(asyncResult));
System\Transactions\Transaction.cs (5)
485throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 533throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 936throw new ArgumentException(SR.PromoterTypeInvalid, nameof(promoterType)); 975throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 1021throw new ArgumentException(null, nameof(distributedTransactionIdentifier));
System\Transactions\TransactionInteropNonWindows.cs (3)
77throw new ArgumentException(SR.InvalidArgument, nameof(cookie)); 147throw new ArgumentException(SR.InvalidArgument, nameof(propagationToken)); 248throw new ArgumentException(SR.InvalidArgument, nameof(propagationToken));
System\Transactions\TransactionManager.cs (4)
144throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier)); 182throw new ArgumentException(SR.UnrecognizedRecoveryInformation, nameof(recoveryInformation)); 233throw new ArgumentException(SR.InvalidRecoveryInformation, "recoveryInformation"); 242throw new ArgumentException(SR.BadResourceManagerId, nameof(resourceManagerIdentifier));
System\Transactions\TransactionScope.cs (2)
215throw new ArgumentException(SR.TransactionScopeIsolationLevelDifferentFromTransaction, nameof(transactionOptions)); 297throw new ArgumentException(SR.TransactionScopeIsolationLevelDifferentFromTransaction, nameof(transactionOptions));
System.Windows.Controls.Ribbon (2)
Microsoft\Windows\Controls\Ribbon\Primitives\RibbonGroupsPanel.cs (2)
61throw new ArgumentException(Microsoft.Windows.Controls.SR.RibbonGroupsPanel_InvalidRegistrationParameter, "starLayoutInfoProvider"); 76throw new ArgumentException(Microsoft.Windows.Controls.SR.RibbonGroupsPanel_InvalidRegistrationParameter, "starLayoutInfoProvider");
System.Xaml (26)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (6)
334throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 608throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 1081throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 1120throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 1405throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList)); 1480throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
System\Xaml\Context\ObjectWriterContext.cs (2)
319throw new ArgumentException(SR.Format(SR.NotAmbientProperty, xamlMember.DeclaringType.Name, xamlMember.Name), nameof(properties)); 436throw new ArgumentException(SR.Format(SR.NotAmbientType, xamlType.Name), nameof(types));
System\Xaml\Context\ServiceProviderContext.cs (1)
296throw new ArgumentException(SR.SimpleFixupsMustHaveOneName, nameof(names));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (2)
67throw new ArgumentException(SR.SavedContextSchemaContextNull, nameof(savedContext)); 80throw new ArgumentException(SR.SavedContextSchemaContextMismatch, nameof(schemaContext));
System\Xaml\NameScope.cs (3)
146throw 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)
47throw new ArgumentException(SR.CollectionCannotContainNulls, nameof(xamlNamespaces));
System\Xaml\XamlMember.cs (2)
807throw new ArgumentException(SR.IncorrectGetterParamNum, argumentName); 815throw new ArgumentException(SR.IncorrectSetterParamNum, argumentName);
System\Xaml\XamlSchemaContext.cs (2)
271throw new ArgumentException(SR.Format(SR.ReferenceIsNull, "xamlTypeName.Name"), nameof(xamlTypeName)); 275throw 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)
169throw new ArgumentException(SR.Format(SR.TypeHasInvalidXamlName, type.Name), nameof(type)); 194throw new ArgumentException(SR.Format(SR.MemberHasInvalidXamlName, property.Name), nameof(property)); 219throw new ArgumentException(SR.XamlXmlWriterCannotWriteNonstringValue, nameof(value)); 233throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull, nameof(namespaceDeclaration)); 238throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull, nameof(namespaceDeclaration)); 243throw new ArgumentException(SR.NamespaceDeclarationCannotBeXml, nameof(namespaceDeclaration));
Templates.Blazor.Tests (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Templates.Blazor.WebAssembly.Tests (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Templates.Mvc.Tests (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
Templates.Tests (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
TestExclusionListTasks (1)
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
UIAutomationClient (2)
MS\Internal\Automation\HwndProxyElementProvider.cs (1)
386throw new ArgumentException(SR.UnexpectedWindowState,"state");
System\Windows\Automation\Text\TextRange.cs (1)
192throw new ArgumentException(SR.Format(SR.TextAttributeValueWrongType, attribute, ai.Type.Name, value.GetType().Name), "value");
UIAutomationClientSideProviders (2)
MS\Internal\AutomationProxies\WindowsEditBox.cs (1)
287throw new ArgumentException(SR.Format(SR.NotAValidValue, str), "val");
MS\Internal\AutomationProxies\WindowsRichEdit.cs (1)
185throw new ArgumentException(SR.Format(SR.NotAValidValue, str), "val");
UIAutomationTypes (1)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Interop\OSVersionHelper.cs (1)
264throw new ArgumentException($"{osVer} is not a valid OS!", nameof(osVer));
VersioningWebSite (1)
VersionRouteAttribute.cs (1)
44throw new ArgumentException(message, "versionRange");
Wasm.Performance.ConsoleHost (2)
src\Shared\CommandLineUtils\CommandLine\CommandOption.cs (2)
44throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); 50throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template));
WasmAppBuilder (1)
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
WorkloadBuildTasks (1)
src\tasks\Common\Utils.cs (1)
220throw new ArgumentException($"Cannot find {src} file to copy", nameof(src));
xunit.console (1)
common\Json.cs (1)
50throw new ArgumentException("Token value should be either True or False.", nameof(token));