3174 references to ArgumentException
aspire (1)
src\Shared\CircularBuffer.cs (1)
229throw new ArgumentException("Array does not contain enough space for items");
Aspire.Dashboard (2)
Otlp\Storage\TelemetryRepository.cs (1)
1168throw new ArgumentException("Span has no SpanId");
src\Shared\CircularBuffer.cs (1)
229throw new ArgumentException("Array does not contain enough space for items");
Aspire.EndToEnd.Tests (13)
IntegrationServicesFixture.cs (3)
97throw new ArgumentException($"Only one resource is supported at a time. resource: {resource}"); 104_ => throw new ArgumentException($"Unknown resource: {resource}") 137_ => throw new ArgumentException($"Unknown test scenario '{TestScenario}'")
tests\Shared\TemplatesTesting\BuildEnvironment.cs (6)
100throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 123throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 132throw new ArgumentException($"Environment variable SDK_FOR_TEMPLATES_TESTING_PATH is unset"); 138throw new ArgumentException($"Cannot find base directory for SDK_FOR_TEMPLATES_TESTING_PATH - {baseDir}"); 146throw new ArgumentException($"Cannot find 'BUILT_NUGETS_PATH={EnvironmentVariables.BuiltNuGetsPath}' or {BuiltNuGetsPath}"); 153throw new ArgumentException($"Cannot find TestAssetsPath={TestAssetsPath}");
tests\Shared\TemplatesTesting\DotNetNewCommand.cs (1)
23throw new ArgumentException("No custom hive directory was provided, and the BuildEnvironment does not have one set either");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (2)
91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}"); 95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
tests\testproject\Common\TestResourceNames.cs (1)
30throw new ArgumentException($"Unknown resource name: {resourceName}");
Aspire.Hosting (9)
Dashboard\DashboardServiceHost.cs (1)
157throw new ArgumentException($"{ResourceServiceUrlVariableName} must contain a local loopback address.");
Dcp\DcpNameGenerator.cs (1)
102throw new ArgumentException($"Could not generate a unique name for service '{candidateName}'");
Dcp\Model\Container.cs (4)
239throw new ArgumentException("Port protocol value must be 'TCP' or 'UDP'"); 253throw new ArgumentException("Supported protocols are TCP and UDP"); 266throw new ArgumentException("Supported protocols are TCP and UDP"); 337_ => throw new ArgumentException("Unknown file system entry type")
src\Shared\CircularBuffer.cs (1)
229throw new ArgumentException("Array does not contain enough space for items");
Utils\PasswordGenerator.cs (2)
79void ThrowArgumentException() => throw new ArgumentException($"'{minValueParamName}' must be 0 if '{enabledParamName}' is disabled."); 114(false, false, false, false) => throw new ArgumentException("At least one character type must be enabled.")
Aspire.Hosting.Docker (2)
EnvVarEscaper.cs (2)
208throw new ArgumentException("Variable content exceeds maximum allowed length"); 273throw new ArgumentException("Variable content exceeds maximum allowed length");
Aspire.Hosting.Testing.Tests (1)
tests\testproject\Common\TestResourceNames.cs (1)
30throw new ArgumentException($"Unknown resource name: {resourceName}");
Aspire.Hosting.Tests (3)
Dcp\TestKubernetesService.cs (2)
54throw new ArgumentException($"Resource '{namespaceParameter ?? ""}/{name}' not found"); 185throw new ArgumentException($"Resource '{obj.Metadata.NamespaceProperty}/{obj.Metadata.Name}' not found");
SlimTestProgramTests.cs (1)
33var app = testProgram.App ?? throw new ArgumentException("TestProgram.App is null");
Aspire.Playground.Tests (2)
src\Aspire.Hosting\Utils\PasswordGenerator.cs (2)
79void ThrowArgumentException() => throw new ArgumentException($"'{minValueParamName}' must be 0 if '{enabledParamName}' is disabled."); 114(false, false, false, false) => throw new ArgumentException("At least one character type must be enabled.")
Aspire.Templates.Tests (9)
tests\Shared\TemplatesTesting\BuildEnvironment.cs (6)
100throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 123throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 132throw new ArgumentException($"Environment variable SDK_FOR_TEMPLATES_TESTING_PATH is unset"); 138throw new ArgumentException($"Cannot find base directory for SDK_FOR_TEMPLATES_TESTING_PATH - {baseDir}"); 146throw new ArgumentException($"Cannot find 'BUILT_NUGETS_PATH={EnvironmentVariables.BuiltNuGetsPath}' or {BuiltNuGetsPath}"); 153throw new ArgumentException($"Cannot find TestAssetsPath={TestAssetsPath}");
tests\Shared\TemplatesTesting\DotNetNewCommand.cs (1)
23throw new ArgumentException("No custom hive directory was provided, and the BuildEnvironment does not have one set either");
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (2)
91throw new ArgumentException($"Cannot find {templatePackageId}*.nupkg in {builtNuGetsPath}. Packages found in {builtNuGetsPath}: {string.Join(", ", Directory.EnumerateFiles(builtNuGetsPath).Select(Path.GetFileName))}"); 95throw new ArgumentException($"Found more than one {templatePackageId}*.nupkg in {builtNuGetsPath}: {string.Join(", ", packages.Select(Path.GetFileName))}");
BoundTreeGenerator (1)
BoundNodeClassWriter.cs (1)
790throw new ArgumentException($"Field '{fieldName}' on node '{node.Name}' should have a nullable type, since it isn't a value type and it is marked null=allow or null=always");
CodeGenerator (1)
HttpUtilities\HttpUtilities.cs (1)
251throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "MethodAsciiString {0} length is greather than {1}", method, length));
ConfigurationSchemaGenerator (1)
RuntimeSource\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Crossgen2Tasks (2)
CommonFilePulledFromSdkRepo\Logger.cs (2)
126throw new ArgumentException( 135throw new ArgumentException(
csc (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
132throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
DesignSurface (1)
CustomControls\CustomButtonDesignerActionList.cs (1)
91throw new ArgumentException($"Property {propertyName} not found in {nameof(CustomButton)}");
DesignSurfaceExt (1)
NameCreationServiceImp.cs (1)
91throw new ArgumentException($"Invalid name: {name}");
dotnet-openapi (12)
Commands\AddProjectCommand.cs (1)
49throw new ArgumentException($"{SourceProjectArgName} of '{sourceFile}' was not valid. Valid values must be project file(s)");
Commands\BaseCommand.cs (9)
104throw new ArgumentException($"The project '{project}' does not exist."); 112throw new ArgumentException("No project files were found in the current directory. Either move to a new directory or provide the project explicitly"); 116throw new ArgumentException("More than one project was found in this directory, either remove a duplicate or explicitly provide the project."); 218throw new ArgumentException("dotnet was not found on the path."); 235throw new ArgumentException($"Adding package `{packageId}` to `{projectFile.Directory}` took longer than {timeout} seconds."); 251throw new ArgumentException($"Adding package `{packageId}` to `{projectFile.Directory}` returned ExitCode `{process.ExitCode}` and gave error `{error}` and output `{output}`"); 286throw new ArgumentException($"The given url returned '{response.StatusCode}', indicating failure. The url might be wrong, or there might be a networking issue."); 432throw new ArgumentException($"Invalid value '{value}' given as code generator."); 518throw new ArgumentException($"File '{destinationPath}' already exists. Aborting to avoid conflicts. Provide the '--output-file' argument with an unused file to resolve.");
Commands\RefreshCommand.cs (2)
53throw new ArgumentException("There was no OpenAPI reference to refresh with the given URL."); 62throw new ArgumentException("'dotnet openapi refresh' must be given a URL");
dotnet-svcutil.xmlserializer (9)
Microsoft\Tools\ServiceModel\SvcUtil\CommandLineParser.cs (6)
176throw new ArgumentException(SR.Format(SR.ErrSwitchMissing, arg)); 187throw new ArgumentException(SR.Format(SR.ErrUnexpectedDelimiter)); 215throw new ArgumentException(SR.Format(SR.ErrUnknownSwitch, arg.ToLower(CultureInfo.InvariantCulture))); 223throw new ArgumentException(SR.Format(SR.ErrUnexpectedValue, arg.ToLower(CultureInfo.InvariantCulture))); 228throw new ArgumentException(SR.Format(SR.ErrExpectedValue, arg.ToLower(CultureInfo.InvariantCulture))); 235throw new ArgumentException(SR.Format(SR.ErrSingleUseSwitch, arg.ToLower(CultureInfo.InvariantCulture)));
Microsoft\Tools\ServiceModel\SvcUtil\Options.cs (2)
440throw new ArgumentException("Invalid smreference value"); 473throw new ArgumentException("Need to pass the System.ServiceModel.Primitives.dll path through the 'smreference' parameter.");
Microsoft\Tools\ServiceModel\SvcUtil\ToolArgumentException.cs (1)
26internal ToolArgumentException(String message) : base(message)
dotnet-svcutil-lib (208)
CodeDomFixup\ConfigToCode.cs (1)
450throw new ArgumentException(SR.NotClientBaseType);
FrameworkFork\Microsoft.CodeDom\Compiler\CodeGenerator.cs (2)
1803throw new ArgumentException(string.Format(SRCodeDom.InvalidPrimitiveType, e.Value.GetType().ToString())); 2165throw new ArgumentException(string.Format(SRCodeDom.InvalidIdentifier, value));
FrameworkFork\Microsoft.CodeDom\Compiler\CodeValidator.cs (3)
701throw new ArgumentException(string.Format(SRCodeDom.ArityDoesntMatch, baseType, e.TypeArguments.Count)); 1025throw new ArgumentException(string.Format(SRCodeDom.InvalidPathCharsInChecksum, e.FileName)); 1031throw new ArgumentException(string.Format(SRCodeDom.InvalidRegion, e.RegionText));
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (2)
1405throw new ArgumentException(string.Format(SRCodeDom.InvalidPrimitiveType, e.Value.GetType().ToString())); 3641throw new ArgumentException(string.Format(SRCodeDom.InvalidIdentifier, value));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlCharCheckingWriter.cs (8)
143throw new ArgumentException(ResXml.Xml_EmptyLocalName); 161throw new ArgumentException(ResXml.Xml_EmptyLocalName); 254throw new ArgumentException(string.Format(ResXml.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(ws, i))); 326throw new ArgumentException(ResXml.Xml_EmptyName); 369throw new ArgumentException(ResXml.Xml_EmptyName); 374throw new ArgumentException(string.Format(len == 0 ? ResXml.Xml_BadStartNameChar : ResXml.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(ncname, len))); 382throw new ArgumentException(ResXml.Xml_EmptyName); 389throw new ArgumentException(string.Format(res, XmlException.BuildCharExceptionArgs(name, len)));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlEncodedRawTextWriter.cs (3)
1527throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar); 1733throw new ArgumentException(string.Format(ResXml.Xml_IndentCharsNotWhitespace, propertyName)); 1780throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharsInIndent, new string[] { propertyName, error }));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextEncoder.cs (3)
224throw new ArgumentException(ResXml.Xml_SurrogatePairSplit); 457throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar); 517throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImpl.cs (1)
8295throw new ArgumentException((_incReadDecoder is IncrementalReadCharsDecoder) ? "count" : "len");
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextWriter.cs (26)
345throw new ArgumentException(ResXml.Xml_InvalidIndentation); 365throw new ArgumentException(ResXml.Xml_InvalidQuote); 397throw new ArgumentException(ResXml.Xml_ClosedOrError); 401throw new ArgumentException(ResXml.Xml_NoRoot); 475throw new ArgumentException(ResXml.Xml_UndefPrefix); 518throw new ArgumentException(ResXml.Xml_NoNamespaces); 584throw new ArgumentException(ResXml.Xml_XmlnsBelongsToReservedNs); 603throw new ArgumentException(ResXml.Xml_XmlnsBelongsToReservedNs); 615throw new ArgumentException(ResXml.Xml_UndefPrefix); 656throw new ArgumentException(ResXml.Xml_NoNamespaces); 707throw new ArgumentException(ResXml.Xml_InvalidCDataChars); 731throw new ArgumentException(ResXml.Xml_InvalidCommentChars); 755throw new ArgumentException(ResXml.Xml_InvalidPiChars); 759throw new ArgumentException(ResXml.Xml_DupXmlDecl); 814throw new ArgumentException(ResXml.Xml_NonWhitespace); 1033throw new ArgumentException(string.Format(ResXml.Xml_UndefNamespace, ns)); 1047throw new ArgumentException(ResXml.Xml_NoNamespaces); 1063throw new ArgumentException(ResXml.Xml_EmptyName); 1113throw new ArgumentException(ResXml.Xml_EmptyName); 1117throw new ArgumentException(string.Format(ResXml.Xml_InvalidNameChars, name)); 1415throw new ArgumentException(ResXml.Xml_CanNotBindToReservedNamespace); 1442throw new ArgumentException(ResXml.Xml_PrefixForEmptyNs); 1627throw new ArgumentException(ResXml.Xml_EmptyName); 1677throw new ArgumentException(string.Format(ResXml.Xml_InvalidNameChars, name)); 1701throw new ArgumentException(string.Format(ResXml.Xml_InvalidXmlSpace, value)); 1724throw new ArgumentException(ResXml.Xml_InvalidPrefix);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlUtf8RawTextWriter.cs (3)
1375throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar); 1613throw new ArgumentException(string.Format(ResXml.Xml_IndentCharsNotWhitespace, propertyName)); 1660throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharsInIndent, new string[] { propertyName, error }));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWellformedWriter.cs (25)
361throw new ArgumentException(ResXml.Xml_NoRoot); 381throw new ArgumentException(ResXml.Xml_EmptyName); 449throw new ArgumentException(ResXml.Xml_EmptyLocalName); 476throw new ArgumentException(ResXml.Xml_PrefixForEmptyNs); 640throw new ArgumentException(ResXml.Xml_EmptyLocalName); 679throw new ArgumentException(ResXml.Xml_XmlnsPrefix); 702throw new ArgumentException(ResXml.Xml_XmlnsPrefix); 712throw new ArgumentException(ResXml.Xml_XmlPrefix); 808throw new ArgumentException(ResXml.Xml_PrefixForEmptyNs); 812throw new ArgumentException(ResXml.Xml_CanNotBindToReservedNamespace); 852throw new ArgumentException(string.Format(ResXml.Xml_InvalidXmlSpace, value)); 924throw new ArgumentException(ResXml.Xml_EmptyName); 939throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? ResXml.Xml_DupXmlDecl : ResXml.Xml_CannotWriteXmlDecl); 975throw new ArgumentException(ResXml.Xml_EmptyName); 1002throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar); 1058throw new ArgumentException(ResXml.Xml_NonWhitespace); 1368throw new ArgumentException(ResXml.Xml_EmptyLocalName); 1381throw new ArgumentException(string.Format(ResXml.Xml_UndefNamespace, ns)); 1716throw new ArgumentException(ResXml.Xml_XmlPrefix); 1726throw new ArgumentException(ResXml.Xml_XmlnsPrefix); 1743throw new ArgumentException(string.Format(ResXml.Xml_NamespaceDeclXmlXmlns, prefix)); 1827throw new ArgumentException(string.Format(ResXml.Xml_NamespaceDeclXmlXmlns, prefix)); 1835throw new ArgumentException(ResXml.Xml_XmlPrefix); 1840throw new ArgumentException(ResXml.Xml_XmlnsPrefix); 2190return new ArgumentException(string.Format(ResXml.Xml_InvalidNameCharsDetail, args));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWriter.cs (2)
243throw new ArgumentException(ResXml.Xml_EmptyName); 263throw new ArgumentException(string.Format(ResXml.Xml_UndefNamespace, ns));
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentXPathNavigator.cs (1)
1275throw new ArgumentException(string.Format(ResXml.XPathDocument_SchemaSetNotAllowed, null));
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlAttribute.cs (1)
30throw new ArgumentException(ResXml.Xdom_Attr_Name);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlAttributeCollection.cs (7)
118throw new ArgumentException(ResXml.Xdom_AttrCol_Object); 137throw new ArgumentException(ResXml.Xdom_NamedNode_Context); 156throw new ArgumentException(ResXml.Xdom_NamedNode_Context); 182throw new ArgumentException(ResXml.Xdom_AttrCol_Insert); 185throw new ArgumentException(ResXml.Xdom_NamedNode_Context); 211throw new ArgumentException(ResXml.Xdom_AttrCol_Insert); 214throw new ArgumentException(ResXml.Xdom_NamedNode_Context);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlDeclaration.cs (4)
25throw new ArgumentException(ResXml.Xdom_Version); 28throw new ArgumentException(string.Format(ResXml.Xdom_standalone, standalone)); 61throw new ArgumentException(string.Format(ResXml.Xdom_standalone, value)); 108throw new ArgumentException(ResXml.Xdom_Version);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlDocument.cs (4)
170throw new ArgumentException(string.Format(ResXml.Xdom_Attr_Reserved_XmlNS, namespaceURI)); 1101throw new ArgumentException(string.Format(ResXml.Arg_CannotCreateNode, type)); 1196throw new ArgumentException(string.Format(ResXml.Xdom_Invalid_NT_String, nodeTypeString)); 1440throw new ArgumentException(string.Format(ResXml.XmlDocument_NodeNotFromDocument, "nodeToValidate"));
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlDocumentFragment.cs (1)
56throw new ArgumentException(ResXml.Xdom_Node_Null_Doc);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlElement.cs (1)
33throw new ArgumentException(ResXml.Xdom_Empty_LocalName);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlEntityReference.cs (1)
45throw new ArgumentException(ResXml.Xdom_InvalidCharacter_EntityReference);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlLoader.cs (4)
41throw new ArgumentException(ResXml.Xdom_Load_NoDocument); 43throw new ArgumentException(ResXml.Xdom_Load_NoReader); 79throw new ArgumentException(ResXml.Xdom_Load_NoDocument); 81throw new ArgumentException(ResXml.Xdom_Load_NoReader);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlNode.cs (10)
30throw new ArgumentException(ResXml.Xdom_Node_Null_Doc); 236throw new ArgumentException(ResXml.Xdom_Node_Insert_Child); 245throw new ArgumentException(ResXml.Xdom_Node_Insert_Path); 253throw new ArgumentException(ResXml.Xdom_Node_Insert_Context); 350throw new ArgumentException(ResXml.Xdom_Node_Insert_Child); 359throw new ArgumentException(ResXml.Xdom_Node_Insert_Path); 367throw new ArgumentException(ResXml.Xdom_Node_Insert_Context); 480throw new ArgumentException(ResXml.Xdom_Node_Remove_Child); 577throw new ArgumentException(ResXml.Xdom_Node_Insert_Child); 584throw new ArgumentException(ResXml.Xdom_Node_Insert_Context);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlSignificantWhitespace.cs (2)
18throw new ArgumentException(ResXml.Xdom_WS_Char); 91throw new ArgumentException(ResXml.Xdom_WS_Char);
FrameworkFork\Microsoft.Xml\Xml\Dom\XmlWhitespace.cs (2)
18throw new ArgumentException(ResXml.Xdom_WS_Char); 84throw new ArgumentException(ResXml.Xdom_WS_Char);
FrameworkFork\Microsoft.Xml\Xml\schema\XmlSchemaValidator.cs (1)
401throw new ArgumentException(ResXml.Sch_InvalidPartialValidationType);
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDateTime.cs (1)
518throw new ArgumentException(string.Format(ResXml.Sch_XsdDateTimeCompare, left.TypeCode, right.TypeCode));
FrameworkFork\Microsoft.Xml\Xml\Serialization\Advanced\SchemaImporterExtension.cs (1)
79throw new ArgumentException(string.Format(ResXml.XmlInvalidSchemaExtension, type));
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (5)
867throw new ArgumentException(string.Format(ResXml.Sch_InvalidDateTimeOption, dateTimeOption, "dateTimeOption")); 1421throw new ArgumentException(string.Format(ResXml.Sch_InvalidDateTimeOption, dateTimeOption, "dateTimeOption")); 1768return new ArgumentException(res); 1785return new ArgumentException(string.Format(res, arg)); 1802return new ArgumentException(string.Format(res, args));
FrameworkFork\Microsoft.Xml\Xml\XmlNamespaceManager.cs (2)
144throw new ArgumentException(ResXml.Xml_XmlPrefix); 148throw new ArgumentException(ResXml.Xml_XmlnsPrefix);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (2)
79throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.CannotImportNullSchema))); 102throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.CannotImportNullDataContractName)));
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerContext.cs (1)
209throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.NullKnownType, "knownTypes")));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (6)
261throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xmlns", ns))); 263throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xml", ns))); 322throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidXmlSpace, _attributeValue))); 375throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidXmlSpace, _attributeValue))); 1942throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xmlns", uri))); 1945throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xml", uri)));
FrameworkFork\System.ServiceModel\Framework\System\ComponentModel\InvalidEnumArgumentException.cs (1)
26: base(message)
FrameworkFork\System.ServiceModel\SMDiagnostics\System\ServiceModel\Diagnostics\ExceptionUtility.cs (1)
41return (ArgumentException)this.ThrowHelperError(new ArgumentException(message));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\SymmetricKey.cs (1)
30throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.SymmetricKeyLengthTooShort, symmetricKey.Length)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AddressHeaderCollection.cs (3)
31throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MessageHeaderIsNull0)); 39throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MessageHeaderIsNull0)); 105throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MultipleMessageHeaders, name, ns)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\AsymmetricSecurityBindingElement.cs (3)
169throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.CannotImportProtectionLevelForContract, contract.Name, contract.Namespace))); 373throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.CannotImportProtectionLevelForContract, policyContext.Contract.Name, policyContext.Contract.Namespace))); 401throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.CannotImportProtectionLevelForContract, policyContext.Contract.Name, policyContext.Contract.Namespace)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
353return new ArgumentException(string.Format(SRServiceModel.HttpToMustEqualVia, to, via));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageProperties.cs (4)
67throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MessagePropertyNotFound, name))); 464throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MessagePropertyReturnedNullCopy)); 636throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.DuplicateMessageProperty, name))); 728throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.MessagePropertiesArraySize0));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestReplyCorrelator.cs (1)
79throw TraceUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SuppliedMessageIsNotAReplyItHasNoRelatesTo0), reply);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ServiceChannel.cs (1)
791throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxInvalidCallbackIAsyncResult));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransactionFlowBindingElement.cs (1)
171throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.TransactionFlowBadOption)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\TypeLoader.cs (1)
705throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.SFxInvalidCallbackContractType, callbackType.Name)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlExporter.cs (2)
148throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.EndpointsMustHaveAValidBinding1, endpoint.Name))); 262throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.DuplicateContractQNameNameOnExport, contract.Name, contract.Namespace)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\WsdlImporter.cs (1)
231throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.WsdlImporterContractMustBeInKnownContracts));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (1)
409throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SPS_InvalidAsyncResult));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\MessageOperationFormatter.cs (5)
29throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxParametersMustBeEmpty)); 41throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxParameterMustBeArrayOfOneElement)); 49throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxResultMustBeMessage)); 51throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxParametersMustBeEmpty)); 61throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxParameterMustBeMessage));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\StreamFormatter.cs (1)
251throw TraceUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.SFxInvalidStreamOffsetLength, offset + count)), _message);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (1)
66throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxInvalidCallbackIAsyncResult));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (1)
74throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SFxInvalidCallbackIAsyncResult));
FrameworkFork\System.ServiceModel\System\ServiceModel\FaultReason.cs (1)
94throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.NoMatchingTranslationFoundForFaultText));
FrameworkFork\System.ServiceModel\System\ServiceModel\MessageHeaderT.cs (1)
173throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException("typedHeaderInstance"));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityAlgorithmSuite.cs (2)
266throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.Psha1KeyLengthInvalid, this.DefaultEncryptionKeyDerivationLength))); 341throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.Psha1KeyLengthInvalid, this.DefaultSignatureKeyDerivationLength)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityProtocolFactory.cs (2)
749throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MultipleSupportingAuthenticatorsOfSameType, spec.TokenParameters.GetType()))); 756throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.MultipleSupportingAuthenticatorsOfSameType, spec.TokenParameters.GetType())));
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WindowsClientCredential.cs (1)
44throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.UnsupportedTokenImpersonationLevel, "AllowedImpersonationLevel", value.ToString())));
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedCollection.cs (2)
306throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.SynchronizedCollectionWrongTypeNull)); 311throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRServiceModel.SynchronizedCollectionWrongType1, value.GetType().FullName)));
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedKeyedCollection.cs (2)
102throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.CannotAddTwoItemsWithTheSameKeyToSynchronizedKeyedCollection0)); 112throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SRServiceModel.ItemDoesNotExistInSynchronizedKeyedCollection0));
FrameworkFork\System.ServiceModel\System\ServiceModel\SynchronizedReadOnlyCollection.cs (1)
269throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(message));
FrameworkFork\System.Web.Services\Services\Description\MimeFormatExtensions.cs (3)
184if (value < 0) throw new ArgumentException(string.Format(ResWebServices.WebNegativeValue, "group")); 196if (value < 0) throw new ArgumentException(string.Format(ResWebServices.WebNegativeValue, "capture")); 208if (value < 0) throw new ArgumentException(string.Format(ResWebServices.WebNegativeValue, "repeats"));
Metadata\MetadataDocumentLoader.cs (3)
97throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrInvalidUriFormat, uri)); 139throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrInvalidUriFormat, uri)); 144throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrUrlNotAllowedOnMultipleInputsFormat, metadataUri));
Metadata\MetadataFileNameManager.cs (1)
255throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrDirectoryInsteadOfFileFormat, path));
Metadata\ServiceDescriptor.cs (2)
37throw new ArgumentException(nameof(serviceUri)); 50throw new ArgumentException(nameof(metadataFiles));
Shared\MSBuildProj.cs (2)
393throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorFullPathNotAProjectFilePathFormat, fullPath)); 398throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorProjectFileAlreadyExistsFormat, fullPath));
Shared\Options\ApplicationOptions.cs (2)
205throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.WarningUnrecognizedOptionFormat, optionId)); 288var ex = new ArgumentException(error);
Shared\Options\ListValue.cs (1)
33throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionDuplicateValueFormat, this.Owner.Name, value));
Shared\Options\OptionBase.cs (1)
182throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorOptionAlreadyDeserializedFormat, this.SerializationName));
Shared\Options\OptionsSerializer.cs (1)
70var jOptionsObject = jPropInfo.Value as JObject ?? throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, jPropInfo.Value?.Type, option.SerializationName));
Shared\Options\OptionValueParser.cs (2)
240throw new ArgumentException(string.Concat(invalidValueError, " ", supportedValues)); 271throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidOptionValueFormat, value, option.Name));
Shared\ProjectDependency.cs (10)
77throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, filePath, nameof(filePath))); 82throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName))); 91throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageVersion, nameof(packageVersion))); 96throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, dependencyType, nameof(dependencyType))); 104throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName))); 110throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName))); 120throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, packageName, nameof(packageName))); 127throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, filePath, nameof(filePath))); 140throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, filePath, nameof(filePath))); 180throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorInvalidDependencyValue, dependencySpec, nameof(dependencySpec)));
Shared\ProjectPropertyResolver.cs (1)
248throw new ArgumentException(nameof(propertyName));
ToolArgumentException.cs (1)
24internal ToolArgumentException(String message) : base(message)
dotnet-user-jwts (1)
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
28throw new ArgumentException(SecretsHelpersResources.FormatError_InvalidSecretsId(newSecretsId));
dotnet-user-secrets (1)
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
28throw new ArgumentException(SecretsHelpersResources.FormatError_InvalidSecretsId(newSecretsId));
GenerateDocumentationAndConfigFiles (1)
Program.cs (1)
1338throw new ArgumentException($"Unexpected arguments. '{nameof(enable)}' can't be false while '{nameof(enableAsWarning)}' is true.");
IdeBenchmarks (1)
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
39throw new ArgumentException("Couldn't find solution.");
IdeCoreBenchmarks (14)
ClassificationBenchmarks.cs (3)
51throw new ArgumentException($"Unable to restore {_solutionPath}"); 60throw new ArgumentException("Couldn't find Roslyn.sln"); 76throw new ArgumentException("Couldn't create workspace");
FindReferencesBenchmarks.cs (4)
48throw new ArgumentException($"Unable to restore {solutionPath}"); 57throw new ArgumentException("Couldn't find Compilers.slnf"); 73throw new ArgumentException("Couldn't create workspace"); 85throw new ArgumentException("Couldn't get storage service");
IncrementalSourceGeneratorBenchmarks.cs (3)
57throw new ArgumentException($"Unable to restore {_solutionPath}"); 66throw new ArgumentException("Couldn't find Roslyn.sln"); 81throw new ArgumentException("Couldn't create workspace");
NavigateToBenchmarks.cs (3)
54throw new ArgumentException($"Unable to restore {_solutionPath}"); 63throw new ArgumentException("Couldn't find Roslyn.sln"); 78throw new ArgumentException("Couldn't create workspace");
SyntacticChangeRangeBenchmark.cs (1)
41throw new ArgumentException("Code location not found");
illink (19)
ILLink.RoslynAnalyzer (9)
DataFlowAnalyzerContext.cs (1)
20 throw new System.ArgumentException ($"Analyzer {analyzer.GetType ().Name} is not in the cache");
src\tools\illink\src\ILLink.Shared\DiagnosticId.cs (1)
246 _ => throw new ArgumentException ($"The provided diagnostic id '{diagnosticId}' does not fall into the range of supported warning codes 2001 to 6000 (inclusive).")
src\tools\illink\src\ILLink.Shared\TrimAnalysis\HandleCallAction.cs (6)
367 _ => throw new ArgumentException ($"Reflection call '{calledMethod.GetDisplayName ()}' inside '{GetContainingSymbolDisplayName ()}' is of unexpected member type."), 378 _ => throw new ArgumentException ($"Reflection call '{calledMethod.GetDisplayName ()}' inside '{GetContainingSymbolDisplayName ()}' is of unexpected member type."), 419 _ => throw new ArgumentException ($"Reflection call '{calledMethod.GetDisplayName ()}' inside '{GetContainingSymbolDisplayName ()}' is of unexpected member type."), 472 throw new ArgumentException ($"Reflection call '{calledMethod.GetDisplayName ()}' inside '{GetContainingSymbolDisplayName ()}' is an unexpected intrinsic."); 643 _ => throw new ArgumentException ($"Reflection call '{calledMethod.GetDisplayName ()}' inside '{GetContainingSymbolDisplayName ()}' is of unexpected member type."), 668 throw new ArgumentException ($"Error processing reflection call '{calledMethod.GetDisplayName ()}' inside {GetContainingSymbolDisplayName ()}. Unexpected member kind.");
src\tools\illink\src\ILLink.Shared\TypeSystemProxy\WellKnownType.cs (1)
41 _ => throw new System.ArgumentException (type.ToString ())
ILLink.Tasks (6)
LinkTask.cs (6)
385 throw new ArgumentException ($"optimization metadata {optimization} must be True or False"); 394 throw new ArgumentException ($"TrimmerSingleWarn metadata must be True or False"); 466 throw new ArgumentException ("custom data requires \"Value\" metadata"); 476 throw new ArgumentException ("feature settings require \"Value\" metadata"); 498 throw new ArgumentException ("custom step requires \"Type\" metadata"); 505 throw new ArgumentException ("custom step may not have both \"BeforeStep\" and \"AfterStep\" metadata");
installer.tasks (3)
StaticFileRegeneration\RegenerateThirdPartyNotices.cs (1)
56?? throw new ArgumentException($"{item.ItemSpec} specifies no Branch.");
StaticFileRegeneration\TpnDocument.cs (1)
47throw new ArgumentException($"No sections found.");
StaticFileRegeneration\TpnSectionHeader.cs (1)
108throw new ArgumentException(
InteropClient (1)
InteropClient.cs (1)
281throw new ArgumentException("Unknown test case " + options.TestCase);
Metrics (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
Metrics.Legacy (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTokenSerializerTest.cs (1)
168throw new ArgumentException("Invalid salt value in data");
Microsoft.AspNetCore.App.Analyzers (2)
Infrastructure\VirtualChars\VirtualCharSequence.cs (2)
58throw new ArgumentException("Span start out of range."); 63throw new ArgumentException("Span end out of range.");
Microsoft.AspNetCore.App.Analyzers.Test (5)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (5)
124throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw multiple occurrences of {0}", PositionString)); 137throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", SpanEndString, SpanStartString)); 151throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", NamedSpanEndString, NamedSpanStartString)); 164throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", SpanStartString, SpanEndString)); 169throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", NamedSpanEndString, NamedSpanEndString));
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticationScheme.cs (1)
26throw new ArgumentException("handlerType must implement IAuthenticationHandler.");
Microsoft.AspNetCore.Authentication.Negotiate (1)
LdapSettings.cs (1)
89throw new ArgumentException($"{nameof(MachineAccountPassword)} should only be specified when {nameof(MachineAccountName)} is configured.");
Microsoft.AspNetCore.Components (16)
CascadingValue.cs (3)
81throw new ArgumentException($"The parameter '{nameof(Name)}' for component '{nameof(CascadingValue<TValue>)}' does not allow null or empty values."); 90throw new ArgumentException($"The component '{nameof(CascadingValue<TValue>)}' does not accept a parameter with the name '{parameter.Name}'."); 105throw new ArgumentException($"Missing required parameter '{nameof(Value)}' for component '{GetType().Name}'.");
LayoutAttribute.cs (1)
25throw new ArgumentException($"Invalid layout type: {layoutType.FullName} " +
NavigationManager.cs (3)
290throw new ArgumentException(message); 316throw new ArgumentException(message); 596throw new ArgumentException(message);
PersistentComponentState.cs (2)
89throw new ArgumentException($"There is already a persisted object under the same key '{key}'"); 107throw new ArgumentException($"There is already a persisted object under the same key '{key}'");
Rendering\RenderTreeBuilder.cs (2)
424throw new ArgumentException($"The {nameof(frame.FrameType)} must be {RenderTreeFrameType.Attribute}."); 502throw new ArgumentException($"The component type must implement {typeof(IComponent).FullName}.");
RenderTree\Renderer.cs (1)
722: throw new ArgumentException($"The renderer does not have a component with ID {componentId}.");
RenderTree\StackObjectPool.cs (1)
64throw new ArgumentException($"Attempting to return wrong pooled instance. {nameof(Get)}/{nameof(Return)} calls must form a stack.");
Sections\SectionContent.cs (1)
104throw new ArgumentException($"Unknown parameter '{param.Name}'");
src\Http\Http.Abstractions\src\Routing\RouteValueDictionary.cs (1)
379throw new ArgumentException($"An element with the key '{key}' already exists in the {nameof(RouteValueDictionary)}.");
src\Http\Routing\src\Patterns\RoutePatternFactory.cs (1)
734throw new ArgumentException(Resources.FormatTemplateRoute_InvalidLiteral(content));
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
113throw new ArgumentException("Unsupported Language");
Microsoft.AspNetCore.Components.Endpoints (1)
Rendering\EndpointHtmlRenderer.Prerendering.cs (1)
107throw new ArgumentException(Resources.FormatTypeMustDeriveFromType(componentType, typeof(IComponent)));
Microsoft.AspNetCore.Components.Forms (7)
FieldIdentifier.cs (7)
117throw new ArgumentException("The provided expression must evaluate to a non-null value."); 132throw new ArgumentException("The provided expression must evaluate to a non-null value."); 137throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object."); 149throw new ArgumentException($"The provided expression contains a {accessorBody.GetType().Name} which is not supported. {nameof(FieldIdentifier)} only supports simple member accessors (fields, properties) of an object."); 163value = model.Value ?? throw new ArgumentException("The provided expression must evaluate to a non-null value."); 177throw new ArgumentException("The provided expression must evaluate to a non-null value."); 209throw new ArgumentException("The provided expression must evaluate to a non-null value.");
Microsoft.AspNetCore.Components.QuickGrid (2)
Columns\GridSort.cs (2)
140throw new ArgumentException(ExpressionNotRepresentableMessage); 165throw new ArgumentException(ExpressionNotRepresentableMessage);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\DiagnosticVerifier.Helper.cs (1)
113throw new ArgumentException("Unsupported Language");
Microsoft.AspNetCore.Components.Server (4)
Circuits\CircuitRegistry.cs (1)
79throw new ArgumentException($"Circuit with identity {circuitHost.CircuitId} is already registered.");
Circuits\RemoteJSDataStream.cs (1)
50throw new ArgumentException($"SignalR MaximumIncomingBytes must be at least 1 kb.");
Circuits\RemoteJSRuntime.cs (1)
180throw new ArgumentException($"The stream {streamId} is already pending.");
src\Components\Shared\src\RenderBatchWriter.cs (1)
201throw new ArgumentException($"Unsupported frame type: {frame.FrameType}");
Microsoft.AspNetCore.Components.Web (4)
JSComponents\JSComponentInterop.cs (2)
70throw new ArgumentException($"There is no registered JS component with identifier '{identifier}'."); 137throw new ArgumentException($"There is no declared parameter named '{parameterName}', so the supplied object cannot be deserialized.");
Routing\NavigationLock.cs (1)
61throw new ArgumentException($"The component '{nameof(NavigationLock)}' does not accept a parameter with the name '{parameter.Name}'.");
WebEventData\ChangeEventArgsReader.cs (1)
37throw new ArgumentException($"Unsupported {nameof(ChangeEventArgs)} value {jsonElement}.");
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
PullFromJSDataStreamTest.cs (1)
126throw new ArgumentException($"Unexpected call to InvokeAsync, expected byte[] got {typeof(TValue)}");
Microsoft.AspNetCore.Components.WebView (1)
src\Components\Shared\src\RenderBatchWriter.cs (1)
201throw new ArgumentException($"Unsupported frame type: {frame.FrameType}");
Microsoft.AspNetCore.Diagnostics (1)
StatusCodePage\StatusCodePagesMiddleware.cs (1)
30throw new ArgumentException("Missing options.HandleAsync implementation.");
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Internal\Json\JsonConverterHelper.cs (2)
125throw new ArgumentException("Invalid field type"); 221throw new ArgumentException("Invalid field type");
Microsoft.AspNetCore.Http (1)
HeaderDictionary.cs (1)
198throw new ArgumentException("The key is null");
Microsoft.AspNetCore.Http.Abstractions (1)
Extensions\UsePathBaseMiddleware.cs (1)
27throw new ArgumentException($"{nameof(pathBase)} cannot be null or empty.");
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
234throw new ArgumentException($"{nameof(methodInfo)} does not have a declaring type.");
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\StaticRouteHandlerModel.Emitter.cs (1)
56_ => throw new ArgumentException($"Received unexpected HTTP method: {endpoint.HttpMethod}")
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (1)
WriteOnceDynamicTestObject.cs (1)
111throw new ArgumentException($"Value for {key} already exists");
Microsoft.AspNetCore.JsonPatch.Tests (1)
WriteOnceDynamicTestObject.cs (1)
111throw new ArgumentException($"Value for {key} already exists");
Microsoft.AspNetCore.Localization (1)
ApplicationBuilderExtensions.cs (1)
86throw new ArgumentException(Resources.Exception_CulturesShouldNotBeEmpty);
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
ActualApiResponseMetadata.cs (1)
30public int StatusCode => _statusCode ?? throw new ArgumentException("Status code is not available when IsDefaultResponse is true");
Microsoft.AspNetCore.Mvc.Core (11)
ActionConstraints\HttpMethodActionConstraint.cs (1)
41throw new ArgumentException($"{nameof(httpMethods)} cannot contain null or empty strings.");
ActionResultOfT.cs (2)
28throw new ArgumentException(error); 44throw new ArgumentException(error);
Controllers\DefaultControllerActivator.cs (2)
34throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 43throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Controllers\DefaultControllerFactory.cs (1)
45throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Formatters\MediaType.cs (1)
64throw new ArgumentException(Resources.FormatArgument_InvalidOffsetLength(nameof(offset), nameof(length)));
Infrastructure\ModelStateInvalidFilter.cs (1)
34throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
ModelBinding\Validation\ValidationVisitor.cs (1)
173throw new ArgumentException(Resources.FormatValidationVisitor_ContainerCannotBeSpecified(metadata.MetadataKind));
Routing\UrlHelperFactory.cs (2)
25throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull( 32throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Microsoft.AspNetCore.Mvc.Core.Test (1)
Infrastructure\ControllerActionInvokerTest.cs (1)
1877throw new ArgumentException("Argument Exception");
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
HtmlGenerationWithCultureTest.cs (1)
197throw new ArgumentException($"Document does not contain element that matches the selector {selector}: " + Environment.NewLine + document.DocumentElement.OuterHtml);
Infrastructure\IHtmlDocumentExtensions.cs (1)
16throw new ArgumentException($"Document does not contain element that matches the selector {selector}: " + Environment.NewLine + document.DocumentElement.OuterHtml);
Microsoft.AspNetCore.Mvc.Razor (1)
Compilation\CompiledViewDescriptor.cs (1)
46throw new ArgumentException(Resources.FormatCompiledViewDescriptor_NoData(nameof(item), nameof(attribute)));
Microsoft.AspNetCore.Mvc.RazorPages (1)
PageResult.cs (1)
54throw new ArgumentException(Resources.FormatPageViewResult_ContextIsInvalid(
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\DistributedCacheTagHelperFormatter.cs (1)
22throw new ArgumentException(
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
ExpressionHelper.cs (1)
208throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
ViewComponents\DefaultViewComponentActivator.cs (1)
43throw new ArgumentException(Resources.FormatPropertyOfTypeCannotBeNull(
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
DefaultDisplayTemplatesTest.cs (1)
353throw new ArgumentException(expectedMessage);
Microsoft.AspNetCore.OutputCaching (1)
Memory\MemoryOutputCacheStore.cs (1)
91throw new ArgumentException(Resources.TagCannotBeNull);
Microsoft.AspNetCore.RateLimiting.Tests (2)
TestPartitionedRateLimiter.cs (2)
38throw new ArgumentException("Tests only support 1 permit at a time"); 64throw new ArgumentException("Tests only support 1 permit at a time");
Microsoft.AspNetCore.Rewrite (5)
ApacheModRewrite\RuleBuilder.cs (3)
98throw new ArgumentException("Invalid operation for integer comparison."); 121throw new ArgumentException("Invalid operation for string comparison."); 149throw new ArgumentException("Invalid operation for property comparison");
RedirectToNonWwwRule.cs (1)
27throw new ArgumentException($"One or more {nameof(domains)} must be provided.");
RedirectToWwwRule.cs (1)
27throw new ArgumentException($"One or more {nameof(domains)} must be provided.");
Microsoft.AspNetCore.Routing (10)
Matching\CandidateSet.cs (1)
43throw new ArgumentException($"The provided {nameof(endpoints)}, {nameof(values)}, and {nameof(scores)} must have the same length.");
Patterns\RoutePatternFactory.cs (9)
734throw new ArgumentException(Resources.FormatTemplateRoute_InvalidLiteral(content)); 775throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 798throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 825throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 830throw new ArgumentException(Resources.TemplateRoute_OptionalCannotHaveDefaultValue); 859throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 864throw new ArgumentException(Resources.TemplateRoute_OptionalCannotHaveDefaultValue); 895throw new ArgumentException(Resources.FormatTemplateRoute_InvalidParameterName(parameterName)); 900throw new ArgumentException(Resources.TemplateRoute_OptionalCannotHaveDefaultValue);
Microsoft.AspNetCore.Server.HttpSys (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
265throw new ArgumentException("An item with the same key has already been added.");
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
265throw new ArgumentException("An item with the same key has already been added.");
Microsoft.AspNetCore.Server.IntegrationTesting (10)
Deployers\ApplicationDeployer.cs (1)
34throw new ArgumentException($"Invalid ServerType '{DeploymentParameters.ServerType}'.");
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (6)
39throw new ArgumentException($"Invalid value '{_deploymentParameters.ServerName}' for {nameof(RemoteWindowsDeploymentParameters.ServerName)}"); 44throw new ArgumentException($"Invalid value '{_deploymentParameters.ServerAccountName}' for {nameof(RemoteWindowsDeploymentParameters.ServerAccountName)}." + 50throw new ArgumentException($"Invalid value '{_deploymentParameters.ServerAccountPassword}' for {nameof(RemoteWindowsDeploymentParameters.ServerAccountPassword)}." + 57throw new ArgumentException($"Invalid value '{_deploymentParameters.DotnetRuntimePath}' for {nameof(RemoteWindowsDeploymentParameters.DotnetRuntimePath)}. " + 63throw new ArgumentException($"Invalid value for {nameof(RemoteWindowsDeploymentParameters.RemoteServerFileSharePath)}." + 69throw new ArgumentException($"Invalid value for {nameof(RemoteWindowsDeploymentParameters.ApplicationBaseUriHint)}.");
TestMatrix.cs (3)
96throw new ArgumentException("No servers were specified."); 102throw new ArgumentException("No TFMs were specified."); 160throw new ArgumentException(server.ToString());
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Http\HttpHeaders.cs (1)
112throw new ArgumentException(CoreStrings.KeyAlreadyExists);
ListenOptionsHttpsExtensions.cs (1)
264throw new ArgumentException($"{nameof(TlsHandshakeCallbackOptions.OnConnection)} must not be null.");
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
265throw new ArgumentException("An item with the same key has already been added.");
Microsoft.AspNetCore.SignalR.Common (1)
Protocol\CompletionMessage.cs (1)
41throw new ArgumentException($"Expected either '{nameof(error)}' or '{nameof(result)}' to be provided, but not both");
Microsoft.AspNetCore.SpaServices.Extensions (1)
StaticFiles\DefaultSpaStaticFileProvider.cs (1)
26throw new ArgumentException($"The {nameof(options.RootPath)} property " +
Microsoft.AspNetCore.StaticFiles (1)
Infrastructure\SharedOptions.cs (1)
34throw new ArgumentException("Request path must not end in a slash");
Microsoft.AspNetCore.WebUtilities (1)
FormPipeReader.cs (1)
58throw new ArgumentException("UTF7 is unsupported and insecure. Please select a different encoding.");
Microsoft.Build (10)
Collections\RetrievableEntryHashSet\RetrievableEntryHashSet.cs (3)
640throw new ArgumentException("index"); 679throw new ArgumentException("arrayIndex"); 784throw new ArgumentException("newSize");
ErrorUtilities.cs (1)
532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName));
Graph\GraphBuilder.cs (1)
256throw new ArgumentException(
Graph\ParallelWorkSet.cs (1)
83throw new ArgumentException("Degree of parallelism must be a positive integer.");
Graph\ProjectGraph.cs (1)
795throw new ArgumentException(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("OM_TargetNameNullOrEmpty", nameof(GetTargetLists)));
Instance\ProjectInstance.cs (2)
926throw new ArgumentException(nameof(linkedProject)); 1055throw new ArgumentException(nameof(elementsCollection));
Logging\TerminalLogger\TerminalNodeStatus.cs (1)
35throw new ArgumentException("Target should not contain any escape codes, if you want to colorize target use the other constructor.");
Microsoft.Build.Engine.OM.UnitTests (2)
ErrorUtilities.cs (1)
532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName));
TransientIO.cs (1)
85throw new ArgumentException(nameof(relative));
Microsoft.Build.Engine.UnitTests (8)
BackEnd\BuildResult_Tests.cs (1)
323result.AddResultsForTarget("omega", new TargetResult(Array.Empty<TaskItem>(), BuildResultUtilities.GetStopWithErrorResult(new ArgumentException("The argument was invalid"))));
BackEnd\CustomTaskHelper.cs (1)
61throw new ArgumentException(builder.ToString());
BackEnd\MockHost.cs (1)
211_ => throw new ArgumentException("Unexpected type " + type),
BackEnd\TargetBuilder_Tests.cs (1)
1855_ => throw new ArgumentException("Unexpected type " + type),
BackEnd\TargetEntry_Tests.cs (1)
1325_ => throw new ArgumentException("Unexpected type " + type),
BackEnd\TaskBuilder_Tests.cs (1)
1296_ => throw new ArgumentException("Unexpected type " + type),
BackEnd\TaskThatReturnsDictionaryTaskItem.cs (2)
116throw new ArgumentException("An item with the same key has already been added."); 153throw new ArgumentException("The number of elements in the source is greater than the available space from index to the end of the destination array.");
Microsoft.Build.Framework (5)
HashHelpers.cs (1)
63throw new ArgumentException(SR.Arg_HTCapacityOverflow);
ThrowHelper.cs (4)
69throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 116return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 177throw new ArgumentException(SR.Argument_InvalidArrayType); 200return new ArgumentException(GetResourceString(resource));
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
132throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
Utilities.cs (1)
148return new ArgumentException(string.Format(CultureInfo.CurrentCulture, errorString, args));
Microsoft.Build.Tasks.Core (28)
ErrorUtilities.cs (1)
532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName));
ManifestUtil\mansign2.cs (2)
1149throw new ArgumentException("value"); 1173throw new ArgumentException("value");
ManifestUtil\SecurityUtil.cs (1)
578throw new ArgumentException("TargetFrameworkVersion");
ResourceHandling\MSBuildResXReader.cs (4)
343throw new ArgumentException(nameof(stringValue)); 349throw new ArgumentException(nameof(stringValue)); 359throw new ArgumentException(nameof(stringValue)); 365throw new ArgumentException(nameof(stringValue));
ResourceHandling\NameUtilities.cs (1)
23throw new ArgumentException(nameof(assemblyQualifiedName));
system.design\stronglytypedresourcebuilder.cs (1)
172throw new ArgumentException(SR.GetString(SR.InvalidIdentifier, className));
XamlTaskFactory\CommandLineGenerator.cs (1)
539throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Xaml.MissingRequiredArgument", parentSwitch, arg.Item1));
XamlTaskFactory\TaskParser.cs (3)
105throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Xaml.RuleParseFailed", parseErrors.ToString())); 144throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Xaml.RuleFileNotFound", contentOrFile)); 176throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Xaml.RuleFileNotFound", maybeFullPath));
XamlTaskFactory\XamlDataDrivenToolTask.cs (1)
403throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Xaml.MissingRequiredArgument", propertyName, argName));
XmlPeek.cs (4)
198throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XmlPeek.NamespacesParameterNoAttribute", prefixAttr)); 205throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XmlPeek.NamespacesParameterNoAttribute", uriAttr)); 237throw new ArgumentException(ResourceUtilities.GetResourceString("XmlPeek.XmlInput.TooMany")); 242throw new ArgumentException(ResourceUtilities.GetResourceString("XmlPeek.XmlInput.TooFew"));
XmlPoke.cs (2)
185throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XmlPoke.NamespacesParameterNoAttribute", prefixAttr)); 192throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XmlPoke.NamespacesParameterNoAttribute", uriAttr));
XslTransformation.cs (7)
238throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XslTransform.XsltParameterNoAttribute", "Name")); 243throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XslTransform.XsltParameterNoAttribute", "Value")); 279throw new ArgumentException(ResourceUtilities.GetResourceString("XslTransform.XmlInput.TooMany")); 283throw new ArgumentException(ResourceUtilities.GetResourceString("XslTransform.XmlInput.TooFew")); 388throw new ArgumentException(ResourceUtilities.GetResourceString("XslTransform.XsltInput.TooMany")); 392throw new ArgumentException(ResourceUtilities.GetResourceString("XslTransform.XsltInput.TooFew")); 532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("XslTransform.MustSpecifyType", assemblyPath));
Microsoft.Build.UnitTests.Shared (1)
MockEngine.cs (1)
208throw new ArgumentException("Expected log setter to be used only to reset the log to empty.");
Microsoft.Build.Utilities.Core (1)
ErrorUtilities.cs (1)
532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName));
Microsoft.CodeAnalysis (28)
CodeAnalysisEventSource.Common.cs (1)
120throw new ArgumentException("Pinned value must match string.");
Compilation\Compilation.cs (4)
1473throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeMemberAndNamesCountMismatch2, 1479throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeArgumentCountMismatch2, 1485throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeArgumentCountMismatch2, 1491throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeArgumentCountMismatch2,
Diagnostic\Diagnostic.DiagnosticWithProgrammaticSuppression.cs (1)
138throw new ArgumentException(nameof(isSuppressed));
DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
229throw new ArgumentException($"Not a valid assembly: {originalPath}");
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
440throw new ArgumentException("language");
DiagnosticAnalyzer\DiagnosticAnalysisContext.cs (2)
1941throw new ArgumentException(message); 1948throw new ArgumentException(message);
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
230throw new ArgumentException($"Shadow copy path '{shadowCopyPath}' must not be the root directory");
DiagnosticAnalyzer\Suppression.cs (1)
27throw new ArgumentException(message);
MetadataReference\CompilationReference.cs (1)
91throw new ArgumentException(CodeAnalysisResources.CannotCreateReferenceToModule);
RuleSet\RuleSet.cs (1)
74throw new ArgumentException("Effective action cannot be applied to rulesets with Includes");
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource));
SymbolDisplay\SymbolDisplayExtensions.cs (2)
27throw new ArgumentException(nameof(parts)); 60throw new ArgumentException(nameof(parts));
Syntax\SeparatedSyntaxList.cs (2)
575throw new ArgumentException("separatorToken"); 581throw new ArgumentException("newSeparator");
Syntax\SyntaxList`1.cs (1)
339throw new ArgumentException(nameof(nodeInList));
Syntax\SyntaxListBuilder.cs (1)
74throw new ArgumentException("Cannot add a null node.");
Syntax\SyntaxNodeExtensions_Tracking.cs (1)
47throw new ArgumentException(CodeAnalysisResources.InvalidNodeToTrack);
Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
Microsoft.CodeAnalysis.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
Microsoft.CodeAnalysis.Analyzers.UnitTests (3)
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzerTests.cs (3)
198_ => throw new ArgumentException("Unknown target framework"), 212_ => throw new ArgumentException("Unknown target framework"), 228_ => throw new ArgumentException("Unknown target framework"),
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\PropertySetAnalysis\ConstructorMapper.cs (1)
96throw new ArgumentException($"ConstructorMapper PropertyAbstractValues has invalid length (expected {propertyCount}, actual length {this.PropertyAbstractValues.Length})");
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Analysis\TaintedDataAnalysis\SourceInfo.cs (1)
66throw new ArgumentException("Can't specify constantArrayLengthMatcher unless taintConstantArray is true");
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\InterproceduralAnalysisPredicate.cs (1)
27throw new ArgumentException("You must provide at least one non-null predicate argument");
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
Microsoft.CodeAnalysis.CodeStyle (11)
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
64throw new ArgumentException(nameof(surrogateChar));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
454throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
Microsoft.CodeAnalysis.CodeStyle.Fixes (5)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
Microsoft.CodeAnalysis.Collections.Package (5)
Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
Internal\ThrowHelper.cs (4)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource));
Microsoft.CodeAnalysis.CSharp (51)
Binder\LookupOptions.cs (1)
174throw new ArgumentException(CSharpResources.LookupOptionsHasInvalidCombo);
Compilation\CSharpCompilation.cs (8)
2377throw new ArgumentException(nameof(rank)); 4097throw new ArgumentException(string.Format(CSharpResources.NotSameNumberParameterTypesAndRefKinds, parameterTypes.Length, parameterRefKinds.Length)); 4103throw new ArgumentException(CSharpResources.OutIsNotValidForReturn); 4108throw new ArgumentException(string.Format(CSharpResources.CallingConventionTypesRequireUnmanaged, nameof(callingConventionTypes), nameof(callingConvention))); 4143throw new ArgumentException(string.Format(CSharpResources.CallingConventionTypeIsInvalid, type.ToDisplayString())); 4229throw new ArgumentException($"Non-ReadOnly members are not supported in C# anonymous types."); 4464throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps2, $"{csharpReturnType.ToDisplayString()} operator {name}({csharpLeftType.ToDisplayString()}, {csharpRightType.ToDisplayString()})")); 4546throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps2, $"{csharpReturnType.ToDisplayString()} operator {name}({csharpOperandType.ToDisplayString()})"));
Compilation\CSharpSemanticModel.cs (8)
1369throw new ArgumentException(CSharpResources.SyntaxNodeIsNotWithinSynt); 1388throw new ArgumentException(CSharpResources.SpeculatedSyntaxNodeCannotBelongToCurrentCompilation); 5319throw new ArgumentException("firstStatement is not a StatementSyntax."); 5324throw new ArgumentException("firstStatement is a StatementSyntax but lastStatement isn't."); 5339throw new ArgumentException("statement is not a StatementSyntax."); 5359throw new ArgumentException("firstStatement is not a StatementSyntax."); 5364throw new ArgumentException("lastStatement is not a StatementSyntax."); 5385throw new ArgumentException("statementOrExpression is not a StatementSyntax or an ExpressionSyntax or a ConstructorInitializerSyntax or a PrimaryConstructorBaseTypeSyntax.");
Compilation\SyntaxTreeSemanticModel.cs (10)
110throw new ArgumentException("span"); 1724throw new ArgumentException(CSharpResources.InvalidGetDeclarationNameMultipleDeclarators); 2199throw new ArgumentException("typeParameter not within tree"); 2268throw new ArgumentException("statements not within tree"); 2275throw new ArgumentException("global statements not within the same compilation unit"); 2281throw new ArgumentException("statements not within the same statement list"); 2286throw new ArgumentException("first statement does not precede last statement"); 2299throw new ArgumentException("expression not within tree"); 2316throw new ArgumentException("node not within tree"); 2333throw new ArgumentException("node not within tree");
SymbolDisplay\SymbolDisplay.cs (1)
259throw new ArgumentException(CSharpResources.SyntaxTreeSemanticModelMust);
Symbols\PublicModel\Symbol.cs (2)
35throw new ArgumentException(nameof(typeArguments)); 41throw new ArgumentException(nameof(typeArgumentNullableAnnotations));
Syntax\ShebangDirectiveTriviaSyntax.cs (1)
47throw new ArgumentException(nameof(content));
Syntax\SyntaxFactory.cs (7)
208throw new ArgumentException("kind"); 325throw new ArgumentException("text should not start with an @ character."); 1468throw new ArgumentException(CodeAnalysisResources.NodeOrTokenOutOfSequence); 1473throw new ArgumentException(CodeAnalysisResources.UnexpectedTypeOfNodeInList); 2323throw new ArgumentException(CSharpResources.SyntaxTreeIsNotASubmission); 2772: throw new ArgumentException(nameof(body)); 2777: throw new ArgumentException(nameof(body));
Utilities\ValueSetFactory.ByteTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.CharTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.DecimalTC.cs (2)
104throw new ArgumentException("relation"); 139throw new ArgumentException("scale");
Utilities\ValueSetFactory.DoubleTC.cs (1)
79throw new ArgumentException("relation");
Utilities\ValueSetFactory.IntTC.cs (1)
49throw new ArgumentException("relation");
Utilities\ValueSetFactory.LongTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.SByteTC.cs (1)
38throw new ArgumentException("relation");
Utilities\ValueSetFactory.ShortTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.SingleTC.cs (1)
83throw new ArgumentException("relation");
Utilities\ValueSetFactory.UIntTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.ULongTC.cs (1)
39throw new ArgumentException("relation");
Utilities\ValueSetFactory.UShortTC.cs (1)
39throw new ArgumentException("relation");
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
325throw new ArgumentException("target"); 374throw new ArgumentException("attributeToRemove"); 389throw new ArgumentException("attributeToRemove"); 474throw new ArgumentException("attributeToRemove");
Microsoft.CodeAnalysis.CSharp.Features (4)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.ItemGetter.cs (1)
187_ => throw new ArgumentException("Unexpected interface member symbol kind")
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (3)
156throw new ArgumentException("GroupJoin is not supported"); 216throw new ArgumentException($"Unexpected node kind {node.Kind()}"); 806throw new ArgumentException("Last node must me the select clause");
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
IOperation\IOperationTests_IConversionExpression.cs (2)
5407throw new ArgumentException($"Cannot handle syntax of type {syntax.GetType()}"); 5432throw new ArgumentException($"Cannot handle arguments of type {operation.GetType()}");
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
CodeGeneration\CSharpSyntaxGenerator.cs (2)
308throw new ArgumentException("Unknown operator kind."); 355_ => throw new ArgumentException("Unknown operator kind."),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (5)
325throw new ArgumentException("target"); 374throw new ArgumentException("attributeToRemove"); 389throw new ArgumentException("attributeToRemove"); 474throw new ArgumentException("attributeToRemove"); 566throw new ArgumentException(WorkspaceExtensionsResources.No_available_location_found_to_add_statements_to);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamespaceGenerator.cs (2)
38throw new ArgumentException(WorkspaceExtensionsResources.Namespace_can_not_be_added_in_this_destination); 60throw new ArgumentException(WorkspaceExtensionsResources.Namespace_can_not_be_added_in_this_destination);
Microsoft.CodeAnalysis.EditorFeatures (4)
ExternalAccess\IntelliCode\IntentProcessor.cs (1)
42throw new ArgumentException("could not retrieve document for request snapshot");
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
554throw new ArgumentException(WorkspacesResources.The_specified_document_is_not_a_version_of_this_document);
Interactive\InteractiveGlobalUndoServiceFactory.cs (1)
49throw new ArgumentException(EditorFeaturesResources.Given_Workspace_doesn_t_support_Undo);
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (1)
233throw new ArgumentException(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
ChangeSignature\AddedParameterOrExistingIndex.cs (1)
70_ => throw new ArgumentException("Unsupported language")
PullMemberUp\TestPullMemberUpService.cs (2)
48throw new ArgumentException($"No target base type for {containingType}"); 72throw new ArgumentException($"No Matching target base type for {DestinationName}");
RefactoringHelpers\RefactoringHelpersTestBase.cs (2)
78throw new ArgumentException("Invalid missing test format: only `[|...|]` (selection) should be present."); 93throw new ArgumentException("Invalid test format: both `[|...|]` (selection) and `{|result:...|}` (retrieved node span) selections are required for a test.");
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (3)
Debugger\Engine\DkmClrValue.cs (3)
259throw new ArgumentException(string.Format("Nested braces in '{0}'", formatString)); 267throw new ArgumentException(string.Format("Unmatched closing brace in '{0}'", formatString)); 376throw new ArgumentException(string.Format("Unmatched open brace in '{0}'", formatString));
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
InlineHints\FSharpInlineHint.cs (1)
28throw new ArgumentException($"{nameof(displayParts)} must be non-empty");
SignatureHelp\FSharpSignatureHelpItem.cs (1)
52throw new ArgumentException(FeaturesResources.Variadic_SignatureHelpItem_must_have_at_least_one_parameter);
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
RazorMappedSpanResult.cs (1)
22throw new ArgumentException(nameof(filePath));
Microsoft.CodeAnalysis.Features (11)
BraceMatching\BraceMatchingService.cs (1)
29throw new ArgumentException(nameof(position));
CodeFixes\Suppression\ExportConfigurationFixProviderAttribute.cs (1)
39throw new ArgumentException(nameof(languages));
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (3)
107throw new ArgumentException(nameof(container)); 185throw new ArgumentException(nameof(targetNamespace)); 190throw new ArgumentException(nameof(container));
Completion\SharedSyntaxContextsWithSpeculativeModel.cs (1)
36throw new ArgumentException("Don't support getting SyntaxContext for document unrelated to the original document");
FindUsages\DefinitionsAndReferences.cs (1)
43throw new ArgumentException(
InlineHints\InlineHint.cs (1)
47throw new ArgumentException($"{nameof(displayParts)} must be non-empty");
SignatureHelp\SignatureHelpItem.cs (1)
51throw new ArgumentException(FeaturesResources.Variadic_SignatureHelpItem_must_have_at_least_one_parameter);
Snippets\SnippetChange.cs (1)
39throw new ArgumentException($"{nameof(textChanges)} must not be empty.");
Snippets\SnippetPlaceholder.cs (1)
37throw new ArgumentException($"{nameof(text)} must not be an null or empty.");
Microsoft.CodeAnalysis.InteractiveHost (5)
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource));
Microsoft.CodeAnalysis.LanguageServer (2)
Services\StarredCompletions\StarredCompletionsAssemblyHelper.cs (2)
128throw new ArgumentException($"{assembly.FullName} assembly did not contain {className} class"); 133throw new ArgumentException($"{className} from {assembly.FullName} assembly did not contain {methodName} method");
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Extensions\Extensions.cs (1)
252throw new ArgumentException(string.Format("Document project language {0} is not valid", document.Project.Language));
Handler\InlineCompletions\XmlSnippetParser.cs (1)
89throw new ArgumentException($"Missing file path for snippet {snippetInfo.Title}");
Handler\MapCode\MapCodeHandler.cs (2)
83?? throw new ArgumentException($"mapCode sub-request failed: MapCodeMapping.TextDocument not expected to be null."); 87throw new ArgumentException($"mapCode sub-request for {textDocument.DocumentUri} failed: can't find this document in the workspace.");
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (1)
319throw new ArgumentException($"{enumType.Name} has only one value.");
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RoundTripUtil.cs (1)
159throw new ArgumentException("Unsupported DebugInformationFormat: " + emitOptions.DebugInformationFormat);
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Verifiers\CSharpSourceGeneratorVerifier`1+Test.cs (1)
135throw new ArgumentException("Syntax tree encoding was not specified");
Verifiers\VisualBasicSourceGeneratorVerifier`1+Test.cs (1)
120throw new ArgumentException("Syntax tree encoding was not specified");
Microsoft.CodeAnalysis.Scripting (1)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
165throw new ArgumentException(Microsoft.CodeAnalysis.Scripting.ScriptingResources.InvalidAssemblyName);
Microsoft.CodeAnalysis.Test.Utilities (5)
MarkedSource\MarkupTestFile.cs (5)
126throw new ArgumentException(string.Format("Saw multiple occurrences of {0}", PositionString)); 139throw new ArgumentException(string.Format("Saw {0} without matching {1}", SpanEndString, SpanStartString)); 153throw new ArgumentException(string.Format("Saw {0} without matching {1}", NamedSpanEndString, NamedSpanStartString)); 166throw new ArgumentException(string.Format("Saw {0} without matching {1}", SpanStartString, SpanEndString)); 171throw new ArgumentException(string.Format("Saw {0} without matching {1}", NamedSpanEndString, NamedSpanEndString));
Microsoft.CodeAnalysis.Threading.Package (5)
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource));
Microsoft.CodeAnalysis.UnitTests (3)
Collections\List\IEnumerable.Generic.Tests.cs (1)
302throw new ArgumentException(
Collections\List\SegmentedList.Generic.Tests.Misc.cs (2)
496throw new ArgumentException("invalid argument passed to testcase"); 572throw new ArgumentException("invalid argument passed to testcase");
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
Binding\ImplicitVariableTests.vb (1)
1295Throw New ArgumentException("Must specify a value for either 'expected' or 'notExpected'")
FlowAnalysis\FlowTestBase.vb (2)
120Throw New ArgumentException("Failed to identify statement sequence, maybe the region is invalid") 142Throw New ArgumentException("Failed to identify expression or statement sequence, maybe the region is invalid")
Microsoft.CodeAnalysis.Workspaces (77)
CodeCleanup\Providers\ExportCodeCleanupProvider.cs (1)
26throw new ArgumentException("languages");
CodeFixes\ExportCodeFixProviderAttribute.cs (1)
56throw new ArgumentException(message);
CodeRefactorings\ExportCodeRefactoringProviderAttribute.cs (1)
53throw new ArgumentException(message);
Editing\SymbolEditor.cs (2)
275throw new ArgumentException(string.Format(WorkspacesResources.The_symbol_0_cannot_be_located_within_the_current_solution, argSymbol.Name)); 413throw new ArgumentException(string.Format(WorkspacesResources.The_member_0_is_not_declared_within_the_declaration_of_the_symbol, member.Name));
Editing\SyntaxGenerator.cs (2)
281throw new ArgumentException($"Method kind '{method.MethodKind}' is not an operator."); 808throw new ArgumentException("Symbol cannot be converted to a declaration");
Options\OptionKey.cs (1)
28throw new ArgumentException(CompilerExtensionsResources.A_language_name_cannot_be_specified_for_this_option);
Rename\Renamer.cs (1)
63throw new ArgumentException(resolution.ErrorMessage);
Rename\Renamer.RenameDocumentActionSet.cs (1)
82throw new ArgumentException(string.Format(WorkspacesResources.Cannot_apply_action_that_is_not_in_0, nameof(ApplicableActions)));
Shared\Utilities\ExtensionOrderer.Node.cs (1)
26throw new ArgumentException(WorkspacesResources.Cycle_detected_in_extensions);
src\Compilers\Core\Portable\CodeAnalysisEventSource.Common.cs (1)
120throw new ArgumentException("Pinned value must match string.");
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (1)
229throw new ArgumentException($"Not a valid assembly: {originalPath}");
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
230throw new ArgumentException($"Shadow copy path '{shadowCopyPath}' must not be the root directory");
src\Compilers\Core\Portable\Text\TextChangeRangeExtensions.cs (2)
122throw new ArgumentException(nameof(oldChanges)); 127throw new ArgumentException(nameof(newChanges));
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\CodeStyle\CodeStyleOption2`1.cs (2)
196_ => throw new ArgumentException(nameof(element)), 210_ => throw new ArgumentException(nameof(type)),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (1)
64throw new ArgumentException(nameof(surrogateChar));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
454throw new ArgumentException(CompilerExtensionsResources.Value_too_large_to_be_represented_as_a_30_bit_unsigned_integer);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (4)
239throw new ArgumentException(WorkspaceExtensionsResources.Could_not_find_location_to_generation_symbol_into); 485throw new ArgumentException(WorkspaceExtensionsResources.No_location_provided_to_add_statements_to); 490throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_not_in_source); 495throw new ArgumentException(WorkspaceExtensionsResources.Destination_location_was_from_a_different_tree);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
60throw new ArgumentException($"{nameof(GetRequiredDocument)} was given a source-generated DocumentId, but it will never return a source generated document. The caller needs to be calling some other method.");
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\FileExtensionsMetadata.cs (1)
27throw new ArgumentException(nameof(extensions));
Workspace\CommandLineProject.cs (4)
31throw new ArgumentException(WorkspacesResources.Unrecognized_language_name); 69throw new ArgumentException(string.Format(WorkspacesResources.Can_t_resolve_metadata_reference_colon_0, ((UnresolvedMetadataReference)unresolvedMetadataReferences).Reference)); 82throw new ArgumentException(string.Format(WorkspacesResources.Can_t_resolve_analyzer_reference_colon_0, ((UnresolvedAnalyzerReference)unresolvedAnalyzerReferences).Display)); 96throw new ArgumentException(string.Format(WorkspacesResources.An_error_occurred_while_reading_the_specified_configuration_file_colon_0, e.Message));
Workspace\Host\DocumentService\ISpanMappingService.cs (1)
74throw new System.ArgumentException(nameof(filePath));
Workspace\Host\Mef\ExportDynamicFileInfoProviderAttribute.cs (1)
32throw new ArgumentException(nameof(extensions));
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (2)
152throw new ArgumentException("The reference was already disposed at " + previousDisposalLocation); 156throw new ArgumentException("Attempting to stop watching a file that we never started watching. This is a bug.");
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (4)
167throw new ArgumentException($"'{fullPath}' has already been added to this project."); 245throw new ArgumentException($"'{fullPath}' is not a dynamic file of this project."); 266throw new ArgumentException($"'{fullPath}' is not a source file of this project."); 321throw new ArgumentException($"{nameof(textContainer)} is not a text container added to this project.");
Workspace\ProjectSystem\ProjectSystemProject.cs (4)
970throw new ArgumentException($"{dynamicFilePath} has already been added to this project."); 1010throw new ArgumentException($"{dynamicFilePath} wasn't added by a previous call to {nameof(AddDynamicSourceFile)}"); 1337throw new ArgumentException("The project reference has already been added to the project."); 1399throw new ArgumentException("The project does not contain that project reference.");
Workspace\Solution\Document.cs (1)
471throw new ArgumentException(WorkspacesResources.The_specified_document_is_not_a_version_of_this_document);
Workspace\Solution\DocumentId.cs (1)
55throw new ArgumentException(nameof(id));
Workspace\Solution\Project.cs (1)
818throw new ArgumentException(string.Format(WorkspacesResources._0_is_in_a_different_project, documentId));
Workspace\Solution\ProjectId.cs (1)
63throw new ArgumentException(nameof(id));
Workspace\Solution\SolutionId.cs (1)
48throw new ArgumentException(nameof(id));
Workspace\Solution\SolutionState.cs (1)
390throw new ArgumentException(string.Format(WorkspacesResources.The_language_0_is_not_supported, language));
Workspace\Workspace.cs (19)
1308throw new ArgumentException(string.Format( 2354throw new ArgumentException(WorkspacesResources.Workspace_is_not_empty); 2368throw new ArgumentException(string.Format( 2384throw new ArgumentException(string.Format( 2397throw new ArgumentException(string.Format( 2410throw new ArgumentException(string.Format( 2424throw new ArgumentException(string.Format( 2437throw new ArgumentException(WorkspacesResources.Metadata_is_not_referenced); 2448throw new ArgumentException(WorkspacesResources.Metadata_is_already_referenced); 2459throw new ArgumentException(string.Format(WorkspacesResources._0_is_not_present, analyzerReference)); 2470throw new ArgumentException(string.Format(WorkspacesResources._0_is_already_present, analyzerReference)); 2481throw new ArgumentException(string.Format(WorkspacesResources._0_is_not_present, analyzerReference)); 2492throw new ArgumentException(string.Format(WorkspacesResources._0_is_already_present, analyzerReference)); 2506throw new ArgumentException(string.Format( 2522throw new ArgumentException(string.Format( 2538throw new ArgumentException(string.Format( 2551throw new ArgumentException(string.Format( 2567throw new ArgumentException(string.Format( 2583throw new ArgumentException(string.Format(
Workspace\Workspace_Editor.cs (5)
163throw new ArgumentException(string.Format(WorkspacesResources._0_still_contains_open_documents, this.GetProjectName(projectId))); 335throw new ArgumentException( 345throw new ArgumentException(string.Format( 374throw new ArgumentException(string.Format( 662throw new ArgumentException(string.Format(
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\ProjectMap.cs (2)
104throw new ArgumentException(WorkspaceMSBuildResources.Project_does_not_have_a_path); 114throw new ArgumentException(WorkspaceMSBuildResources.Project_already_added);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
src\Dependencies\Collections\Internal\HashHelpers.cs (1)
65throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\Dependencies\Collections\Internal\ThrowHelper.cs (4)
78throw new ArgumentException(string.Format(SR.Arg_BogusIComparer, comparer)); 132return new ArgumentException(string.Format(SR.Argument_AddingDuplicateWithKey, key)); 193throw new ArgumentException(SR.Argument_IncompatibleArrayType); 216return new ArgumentException(GetResourceString(resource));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (8)
ObjectExtensions.cs (1)
25throw new ArgumentException("Property " + propertyName + " was not found on type " + type.ToString());
Workspaces\TestWorkspace_XmlConsumption.cs (7)
361throw new ArgumentException($"{projectElement} is missing a {LanguageAttributeName} attribute."); 368throw new ArgumentException(string.Format("Language should be one of '{0}' and it is {1}", 561throw new ArgumentException($"Linked files must specify either a {LinkAssemblyNameAttributeName} or {LinkProjectNameAttributeName}"); 580throw new ArgumentException($"Linked file's {LinkProjectNameAttributeName} '{originalProjectName}' project not found."); 584throw new ArgumentException($"Linked file's {LinkAssemblyNameAttributeName} '{originalAssemblyName}' project not found."); 592throw new ArgumentException($"Linked files must specify a {LinkFilePathAttributeName}"); 602throw new ArgumentException($"Linked file's LinkFilePath '{originalDocumentPath}' file not found.");
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\ProjectDependencyGraphTests.cs (1)
692throw new ArgumentException("Invalid project definition: " + projectDefinition);
Microsoft.Data.Analysis (29)
DataFrame.cs (1)
403throw new ArgumentException(String.Format("{0} {1}", Strings.MismatchedRowCount, Columns[i].Name));
DataFrame.IO.cs (3)
369throw new ArgumentException(string.Format(Strings.ExpectedEitherGuessRowsOrDataTypes, nameof(guessRows), nameof(dataTypes))); 581throw new ArgumentException(string.Format(Strings.ExpectedEitherGuessRowsOrDataTypes, nameof(guessRows), nameof(dataTypes))); 663throw new ArgumentException("Decimal separator cannot match the column separator");
DataFrameColumn.cs (2)
625throw new ArgumentException("Bad comparer"); 631throw new ArgumentException("Bad comparer");
DataFrameColumnCollection.cs (16)
240throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(DateTime))); 257throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string))); 274throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string))); 291throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Boolean))); 308throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Byte))); 325throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Char))); 342throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Double))); 359throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Decimal))); 376throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Single))); 393throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int32))); 410throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int64))); 427throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(SByte))); 444throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int16))); 461throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string))); 478throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(UInt64))); 495throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(UInt16)));
DataFrameColumns\ArrowStringDataFrameColumn.cs (2)
54throw new ArgumentException(nameof(offsetBuffer)); 528throw new ArgumentException(nameof(value));
GroupBy.cs (2)
111throw new ArgumentException(nameof(groupByColumnIndex)); 113_keyToRowIndicesMap = keyToRowIndices ?? throw new ArgumentException(nameof(keyToRowIndices));
TextFieldParser.cs (3)
453throw new ArgumentException(string.Format(Strings.PositiveNumberOfCharacters, nameof(numberOfChars))); 573throw new ArgumentException(Strings.StreamDoesntSupportReading); 978throw new ArgumentException(Strings.InvalidFieldWidths);
Microsoft.Data.Analysis.Tests (3)
src\Microsoft.Data.Analysis\TextFieldParser.cs (3)
453throw new ArgumentException(string.Format(Strings.PositiveNumberOfCharacters, nameof(numberOfChars))); 573throw new ArgumentException(Strings.StreamDoesntSupportReading); 978throw new ArgumentException(Strings.InvalidFieldWidths);
Microsoft.DotNet.Build.Manifest (3)
ArtifactModel.cs (1)
66throw new ArgumentException($"Invalid value for {nameof(Visibility)}: {val}");
XElementParsingExtensions.cs (2)
18throw new ArgumentException( 48throw new ArgumentException(
Microsoft.DotNet.Build.Tasks.Feed (7)
src\AzureDevOpsNugetFeedAssetPublisher.cs (1)
41throw new ArgumentException(
src\BlobUrlInfo.cs (2)
49throw new ArgumentException(string.Format("Blob URL host name {0} should be of the form <account name>.<endpoint>", hostName)); 62throw new ArgumentException(string.Format("Blob URL path {0} should have a container and blob path", path));
src\common\AzureStorageUtils.cs (1)
170throw new ArgumentException("An attempt to get the MIME mapping of an empty path was made.");
src\common\LatestLinksManager.cs (1)
57throw new ArgumentException("No link prefixes specified.");
src\model\TargetChannelConfig.cs (1)
189throw new ArgumentException($"Target feed specification for {feedUrl} must have a separated asset selection 'ShippingOnly' and 'NonShippingOnly' packages");
src\PushToBuildStorage.cs (1)
377throw new ArgumentException($"Invalid visibility: {item.ItemSpec}");
Microsoft.DotNet.Build.Tasks.Installers (2)
src\BuildFPMToolPreReqs.cs (1)
167throw new ArgumentException(
src\CreateRpmPackage.cs (1)
82_ => throw new ArgumentException($"Unknown architecture: {PackageArchitecture}")
Microsoft.DotNet.Build.Tasks.Packaging (1)
PackageItem.cs (1)
45throw new ArgumentException($"Recursive wildcards \"**\" are not permitted in source paths for packages: {SourcePath}. Recursive directory may impact asset selection and we don't want to attempt to expand the wildcard since the build may not yet be complete.");
Microsoft.DotNet.Build.Tasks.Workloads (8)
Msi\WorkloadPackGroupMsi.wix.cs (1)
171throw new ArgumentException($"ID {id} didn't match existing ID {subdir.Id} for directory {name}.");
Msi\WorkloadPackMsi.wix.cs (1)
96_ => throw new ArgumentException(string.Format(Strings.UnknownWorkloadKind, kind)),
Swix\ComponentSwixProject.cs (1)
36throw new ArgumentException(string.Format(Strings.ComponentMustHaveAtLeastOneDependency, component.Name));
Swix\PackageGroupSwixProject.wix.cs (1)
38throw new ArgumentException(string.Format(Strings.ComponentMustHaveAtLeastOneDependency, packageGroup.Name));
Swix\SwixDependency.cs (2)
60throw new ArgumentException(Strings.SwixDependencyVersionRequired); 65throw new ArgumentException(Strings.SwixDependencyMaxVersionLessThanMinVersion);
Utils.cs (1)
96throw new ArgumentException($"Parameter cannot be empty: ${name}");
WorkloadPackPackage.wix.cs (1)
121_ => throw new ArgumentException(string.Format(Strings.UnknownWorkloadKind, pack.Kind))
Microsoft.DotNet.Git.IssueManager (7)
Clients\AzureDevOpsClient.cs (1)
75throw new ArgumentException(
Helpers\RepositoryHelper.cs (4)
25throw new ArgumentException("A GitHub personal access token is needed for this operation."); 33throw new ArgumentException("An Azure DevOps personal access token is needed for this operation."); 57throw new ArgumentException("A GitHub personal access token is needed for this operation."); 88throw new ArgumentException("A GitHub personal access token is needed for this operation.");
IssueManager.cs (2)
35throw new ArgumentException(nameof(repositoryUrl)); 40throw new ArgumentException(nameof(commit));
Microsoft.DotNet.Helix.JobSender (1)
JobDefinition.cs (1)
173throw new ArgumentException($"Helix API does not contain an entry for {queueId}");
Microsoft.DotNet.Helix.Sdk (3)
FindDotNetCliPackage.cs (3)
201throw new ArgumentException($"'{version}' is not a valid semantic version."); 295throw new ArgumentException($"Invalid value '{Channel}' for parameter {nameof(Channel)}"); 317throw new ArgumentException($"Invalid value '{PackageType}' for parameter {nameof(PackageType)}");
Microsoft.DotNet.RemoteExecutor (1)
RemoteExecutor.cs (1)
603throw new ArgumentException($"Field marshaling is not supported by {nameof(Invoke)}: {fi.Name}");
Microsoft.DotNet.SignCheckLibrary (4)
Verification\PkgVerifier.cs (1)
23throw new ArgumentException("PkgVerifier can only be used with .pkg and .app files.");
Verification\SignatureVerificationManager.cs (1)
232throw new ArgumentException(String.Format(SignCheckResources.ArgumentNullOrEmpty, "path"));
Verification\SignatureVerificationResult.cs (1)
200throw new ArgumentException("path");
Verification\TarVerifier.cs (1)
19throw new ArgumentException("fileExtension must be .tar or .gz");
Microsoft.DotNet.SourceBuild.Tasks (2)
src\UsageReport\WritePackageUsageData.cs (2)
95throw new ArgumentException( 271throw new ArgumentException($"Path '{path}' is not within RootDir '{RootDir}'");
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (2)
Modeler\EnumOpenApiExtension.cs (1)
31throw new ArgumentException("x-ms-enum extension only accepts an object");
Modeler\PaginatedOpenApiExtension.cs (1)
37throw new ArgumentException("x-ms-paginated extension only accepts an object");
Microsoft.DotNet.XliffTasks (1)
Tasks\TransformTemplates.cs (1)
57throw new ArgumentException($"Either both '{nameof(language)}' and '{nameof(resourceMap)}' must be specified, or they both must be 'null'.");
Microsoft.Extensions.AI.Tests (1)
Functions\AIFunctionFactoryTest.cs (1)
518throw new ArgumentException($"Unable to resolve argument for '{p.Name}'."),
Microsoft.Extensions.Caching.Hybrid.Tests (1)
DistributedCacheTests.cs (1)
306throw new ArgumentException("small segments not considered"); // a pain to construct
Microsoft.Extensions.Caching.SqlServer (1)
SqlServerCache.cs (1)
47throw new ArgumentException(
Microsoft.Extensions.DependencyInjection (6)
ServiceLookup\CallSiteFactory.cs (4)
53throw new ArgumentException( 78throw new ArgumentException( 117throw new ArgumentException(SR.Format(SR.TrimmingAnnotationsDoNotMatch, implementationType.FullName, serviceType.FullName)); 124throw new ArgumentException(SR.Format(SR.TrimmingAnnotationsDoNotMatch_NewConstraint, implementationType.FullName, serviceType.FullName));
ServiceLookup\ConstantCallSite.cs (1)
18throw new ArgumentException(SR.Format(SR.ConstantCantBeConvertedToServiceType, defaultValue.GetType(), serviceType));
ServiceLookup\ConstructorCallSite.cs (1)
22throw new ArgumentException(SR.Format(SR.ImplementationTypeCantBeConvertedToServiceType, constructorInfo.DeclaringType, serviceType));
Microsoft.Extensions.FileSystemGlobbing (1)
Internal\Patterns\PatternBuilder.cs (1)
82throw new ArgumentException("\"..\" can be only added at the beginning of the pattern.");
Microsoft.Extensions.Logging.Abstractions (1)
LoggerMessage.cs (1)
459throw new ArgumentException(
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Extensions.ML (3)
Builder\PredictionEnginePoolBuilder.cs (1)
25Services = services ?? throw new ArgumentException(nameof(services));
ModelLoaders\FileModelLoader.cs (1)
42throw new ArgumentException($"The provided model file {filePath} doesn't exist.");
PredictionEnginePool.cs (1)
100throw new ArgumentException("You need to configure a default, not named, model before you use this method.");
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Extensions.Primitives (3)
StringValues.cs (1)
379throw new ArgumentException(
ThrowHelper.cs (2)
27throw new ArgumentException(GetResourceText(resource)); 56return new ArgumentException(GetResourceText(resource));
Microsoft.Gen.Logging (1)
src\Generators\Shared\RoslynExtensions.cs (1)
103? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Gen.Logging.Generated.Tests (8)
LogMethodTests.cs (8)
212CollectionTestExtensions.M9(logger, LogLevel.Critical, 0, new ArgumentException("Foo"), 1); 526ExceptionTestExtensions.M0(logger, new ArgumentException("Foo"), new ArgumentException("Bar")); 533ExceptionTestExtensions.M1(new ArgumentException("Foo"), logger, new ArgumentException("Bar")); 540ExceptionTestExtensions.M2(logger, "One", new ArgumentException("Foo")); 547var exception = new ArgumentException("Foo"); 760AtSymbolsTestExtensions.UseAtSymbol4(logger, LogLevel.Debug, "42", 42, new ArgumentException("Foo"));
Microsoft.Gen.Metrics (1)
src\Generators\Shared\RoslynExtensions.cs (1)
103? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
Microsoft.Interop.SourceGeneration (7)
GeneratedStatements.cs (3)
68throw new ArgumentException("Direction must be ManagedToUnmanaged or UnmanagedToManaged"); 95throw new ArgumentException("CurrentStage must be Invoke"); 129throw new ArgumentException("CurrentStage must be Invoke");
Marshalling\MarshallerHelpers.cs (1)
275throw new ArgumentException("Stub context direction must not be bidirectional.");
Marshalling\MarshallingGeneratorExtensions.cs (1)
93throw new ArgumentException("Context direction must be ManagedToUnmanaged or UnmanagedToManaged");
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
TypeNames.cs (1)
145_ => throw new ArgumentException($"Unexpected CallConv: {callConv}")
Microsoft.JSInterop (6)
Infrastructure\DotNetDispatcher.cs (5)
173throw new ArgumentException($"For instance method calls, '{nameof(assemblyName)}' should be null. Value received: '{assemblyName}'."); 253throw new ArgumentException($"The call to '{methodIdentifier}' expects '{parameterTypes.Length}' parameters, but received '{index}'."); 363throw new ArgumentException($"The assembly '{assemblyKey.AssemblyName}' does not contain a public invokable method with [{nameof(JSInvokableAttribute)}(\"{methodIdentifier}\")]."); 396throw new ArgumentException($"The type '{type.Name}' does not contain a public invokable method with [{nameof(JSInvokableAttribute)}(\"{methodIdentifier}\")]."); 508?? throw new ArgumentException($"There is no loaded assembly with the name '{assemblyKey.AssemblyName}'.");
Infrastructure\TaskGenericsUtil.cs (1)
47?? throw new ArgumentException($"The type '{taskType.FullName}' is not inherited from '{typeof(Task).FullName}'.");
Microsoft.Maui (3)
Animations\Animation.cs (1)
139 throw new ArgumentException($"{nameof(duration)} must be greater than {nameof(beginAt)}");
Layouts\Flex.cs (2)
447 throw new ArgumentException("cannot add item into self"); 449 throw new ArgumentException("child already has a parent");
Microsoft.Maui.Controls (28)
Animation.cs (1)
54 throw new ArgumentException("finishAt must be greater than beginAt");
Application\Application.cs (2)
73 throw new ArgumentException("No IAppIndexingProvider was provided"); 75 throw new ArgumentException("No AppLinks implementation was found, if in Android make sure you installed the Microsoft.Maui.Controls.AppLinks");
ExportEffectAttribute.cs (1)
19 throw new ArgumentException("uniqueName must not contain a .");
ImageSource.cs (2)
104 throw new ArgumentException("uri is relative"); 120 throw new ArgumentException("uri is relative");
Items\MarshalingObservableCollection.cs (1)
25 throw new ArgumentException($"{nameof(list)} must implement {nameof(INotifyCollectionChanged)}");
NavigationModel.cs (1)
74 throw new ArgumentException("before must be in the current navigation context");
NavigationPage\NavigationPage.cs (2)
747 throw new ArgumentException("Cannot insert page which is already in the navigation stack"); 884 throw new ArgumentException("Page to remove must be contained on this Navigation Page");
NavigationPage\NavigationPage.Legacy.cs (2)
132 throw new ArgumentException("Cannot insert page which is already in the navigation stack"); 247 throw new ArgumentException("Page to remove must be contained on this Navigation Page");
NavigationProxy.cs (1)
177 throw new ArgumentException("before must be in the pushed stack of the current context");
ObservableWrapper.cs (1)
61 throw new ArgumentException("Destination array was not long enough. Check destIndex and length, and the array's lower bounds.");
OrderedDictionary.cs (2)
129 throw new ArgumentException("Not enough space in array to copy"); 396 throw new ArgumentException("Not enough space in array to copy");
ReferenceTypeConverter.cs (1)
33 throw new ArgumentException("serviceProvider does not provide an IProvideValueTarget");
ResourceDictionary.cs (1)
197 throw new ArgumentException($"A resource with the key '{key}' is already present in the ResourceDictionary.");
Routing.cs (2)
251 throw new ArgumentException($"Route contains invalid characters in \"{part}\""); 256 throw new ArgumentException($"Duplicated Route: \"{route}\"");
Shapes\MatrixTypeConverter.cs (3)
23 throw new ArgumentException("Argument is null or empty"); 28 throw new ArgumentException("Argument must have six numbers"); 34 throw new ArgumentException("Argument must be numeric values");
Shell\ShellElementCollection.cs (1)
38 throw new ArgumentException("Inner can only be set once");
Shell\ShellSection.cs (2)
743 throw new ArgumentException("Page not found in nav stack"); 1208 throw new ArgumentException("Page not found in nav stack");
Style.cs (1)
48 throw new ArgumentException("BasedOn.TargetType is not compatible with TargetType");
TypeTypeConverter.cs (1)
24 throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
Microsoft.Maui.Controls.BindingSourceGen (1)
BindingCodeWriter.cs (1)
142 _ => throw new ArgumentException(nameof(unsafeAccessor.Kind))
Microsoft.Maui.Controls.Maps (1)
Map.cs (1)
231 throw new ArgumentException("Pin must have a Label to be added to a map");
Microsoft.Maui.Controls.Xaml (4)
MarkupExtensions\DataTemplateExtension.cs (1)
18 throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
MarkupExtensions\ReferenceExtension.cs (1)
25 ?? throw new ArgumentException("serviceProvider does not provide an IProvideValueTarget");
MarkupExtensions\StaticExtension.cs (1)
22 throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
MarkupExtensions\TypeExtension.cs (1)
17 throw new ArgumentException("No IXamlTypeResolver in IServiceProvider");
Microsoft.Maui.Essentials (6)
Share\Share.shared.cs (4)
113 throw new ArgumentException($"Both the {nameof(request.Text)} and {nameof(request.Uri)} are invalid. Make sure to include at least one of them in the request."); 127 throw new ArgumentException(FileNullException(nameof(request.File))); 141 throw new ArgumentException(FileNullException(nameof(request.Files))); 144 throw new ArgumentException(FileNullException(nameof(request.Files)));
Types\DeviceIdiom.shared.cs (1)
48 throw new ArgumentException(nameof(deviceIdiom));
Types\DevicePlatform.shared.cs (1)
71 throw new ArgumentException(nameof(devicePlatform));
Microsoft.ML.AutoML (20)
API\BinaryClassificationExperiment.cs (1)
445throw new ArgumentException($"The runner metric manager is of type {_metricManager.GetType()} which expected to be of type {typeof(ITrainValidateDatasetManager)} or {typeof(ICrossValidateDatasetManager)}");
API\MulticlassClassificationExperiment.cs (1)
423throw new ArgumentException($"The runner metric manager is of type {_metricManager.GetType()} which expected to be of type {typeof(ITrainValidateDatasetManager)} or {typeof(ICrossValidateDatasetManager)}");
API\RegressionExperiment.cs (1)
450throw new ArgumentException($"The runner metric manager is of type {_metricManager.GetType()} which expected to be of type {typeof(ITrainValidateDatasetManager)} or {typeof(ICrossValidateDatasetManager)}");
AutoMLExperiment\IMonitor.cs (2)
95throw new ArgumentException($"result must be of type {typeof(TrialResult<TMetrics>)}"); 109throw new ArgumentException($"result must be of type {typeof(TrialResult<TMetrics>)}");
AutoMLExperiment\ITrialResultManager.cs (1)
63throw new ArgumentException("can't add or update result that already save to csv");
AutoMLExperiment\Runner\SweepablePipelineRunner.cs (1)
91throw new ArgumentException("IDatasetManager must be either ITrainTestDatasetManager or ICrossValidationDatasetManager");
ColumnInference\ColumnInferenceValidationUtil.cs (1)
22throw new ArgumentException($"Specified column {columnName} " +
ColumnInference\ColumnTypeInference.cs (1)
397throw new ArgumentException($"Specified label column '{args.Label}' was not found.");
ColumnInference\TextFileSample.cs (2)
117throw new ArgumentException("Couldn't identify line breaks. Provided file is not text?"); 206throw new ArgumentException("File is not text, or couldn't detect line breaks");
Tuner\AutoZeroTuner.cs (1)
57throw new ArgumentException($"Fail to find available configs for given trainers: {string.Join(",", trainerEstimators)}");
Utils\ArrayMath.cs (3)
130throw new ArgumentException($"length doesn't match, {truth.Length} != {pred.Length}"); 145throw new ArgumentException($"length doesn't match, {truth.Length} != {pred.Length}"); 159throw new ArgumentException($"length doesn't match, {truth.Length} != {pred.Length}");
Utils\UserInputValidationUtil.cs (5)
152throw new ArgumentException($"Null column string was specified as {columnPurpose} in column information"); 160throw new ArgumentException("Provided label column cannot be null"); 260throw new ArgumentException(exceptionMessage); 273throw new ArgumentException($"Provided {columnPurpose} column '{columnName}' was of type {itemType}, " + 278throw new ArgumentException($"Provided {columnPurpose} column '{columnName}' was of type {itemType}, " +
Microsoft.ML.AutoML.SourceGenerator (2)
SearchSpaceGenerator.cs (2)
62_ => throw new ArgumentException("unknown type"), 83(_, _) => throw new ArgumentException("unknown"),
Microsoft.ML.AutoML.Tests (1)
Utils\TaskAgnosticIterationResult.cs (1)
78throw new ArgumentException($"Unsupported metric type {typeof(T).Name}.");
Microsoft.ML.CodeGenerator (4)
CodeGenerator\CSharp\TrainerGeneratorFactory.cs (2)
77throw new ArgumentException($"The trainer '{trainer}' is not handled currently."); 80throw new ArgumentException($"The trainer '{node.Name}' is not handled currently.");
Utils.cs (2)
171throw new ArgumentException($"The data type '{labelType}' is not handled currently."); 362throw new ArgumentException($"The data type '{dataKind}' is not handled currently.");
Microsoft.ML.DataView (1)
DataViewSchema.cs (1)
224throw new ArgumentException(nameof(column));
Microsoft.ML.GenAI.Core (7)
Extension\ModuleExtension.cs (1)
245throw new ArgumentException("The layer count is not enough to cover all layers, did you forget to set the last layer count to -1?");
Trainer\CausalLMDataset.cs (3)
34throw new ArgumentException("The length of inputs and outputs should be the same."); 55throw new ArgumentException("The length of inputs and outputs should be the same."); 75throw new ArgumentException("The length of inputIds and labelIds should be the same.");
Utility\AttentionMaskConverter.cs (3)
50throw new ArgumentException("key_value_length should be provided when attention_mask is causal"); 80throw new ArgumentException("This is not a casual mask"); 156throw new ArgumentException("Attention mask should be 2D");
Microsoft.ML.GenAI.LLaMA (2)
Module\LlamaModel.cs (2)
76throw new ArgumentException("Only one of input_ids or inputs_embeds may be set"); 93throw new ArgumentException("Either input_ids or inputs_embeds must be set");
Microsoft.ML.GenAI.Mistral (2)
MistralModel.cs (2)
70throw new ArgumentException("Only one of input_ids or inputs_embeds may be set"); 87throw new ArgumentException("Either input_ids or inputs_embeds must be set");
Microsoft.ML.GenAI.Phi (5)
Module\Phi2Attention.cs (1)
64this._numKeyValueHeads = config.NumKeyValueHeads ?? throw new ArgumentException("num_key_value_heads must be specified");
Module\Phi3DecoderLayer.cs (2)
149numKeyValueHeads: config.NumKeyValueHeads ?? throw new ArgumentException("num_key_value_heads must be specified"), 150numKeyValueGroups: config.NumAttentionHeads / config.NumKeyValueHeads ?? throw new ArgumentException("num_key_value_heads must be specified"),
Module\Phi3Model.cs (2)
73throw new ArgumentException("Only one of input_ids or inputs_embeds may be set"); 90throw new ArgumentException("Either input_ids or inputs_embeds must be set");
Microsoft.ML.ImageAnalytics (2)
ImageLoader.cs (1)
114throw new ArgumentException(String.Format("Directory \"{0}\" does not exist.", imageFolder));
MLImage.cs (1)
100throw new ArgumentException($"Invalid {nameof(imagePixelData)} buffer size.");
Microsoft.ML.OnnxTransformer (2)
OnnxSessionOptions.cs (2)
26throw new ArgumentException("No Onnx Session Options"); 36throw new ArgumentException("No Onnx Session Options");
Microsoft.ML.SearchSpace (5)
Converter\NumericOptionConverter.cs (2)
46_ => throw new ArgumentException($"unknown schema type: {schema.Type}"), 78_ => throw new ArgumentException("unknown type"),
Converter\OptionConverter.cs (2)
42throw new ArgumentException("unknown option type"); 62throw new ArgumentException("unknown option type");
Converter\ParameterConverter.cs (1)
50throw new ArgumentException($"Unsupported reader type {reader.TokenType}");
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
511throw new ArgumentException($"Unsupported data type of {typeof(T)} to convert to Tensor.");
Microsoft.ML.TimeSeries (1)
RootCauseAnalyzer.cs (1)
788throw new ArgumentException("Object is not a BestDimension");
Microsoft.ML.Tokenizers (19)
Model\BertTokenizer.cs (2)
780throw new ArgumentException($"The special token '{kvp.Key}' is not in the vocabulary or assigned id value {id} different than the value {kvp.Value} in the special tokens."); 818throw new ArgumentException($"The special token '{token}' is not in the vocabulary.");
Model\CodeGenTokenizer.cs (7)
153throw new ArgumentException($"The Unknown token '{UnknownToken}' is not found in the vocabulary."); 163throw new ArgumentException($"The beginning of sentence token '{BeginningOfSentenceToken}' is not found in the vocabulary."); 173throw new ArgumentException($"The end of sentence token '{EndOfSentenceToken}' is not found in the vocabulary."); 181throw new ArgumentException("The beginning of sentence token must be provided when the flag is set to include it in the encoding."); 186throw new ArgumentException("The end of sentence token must be provided when the flag is set to include it in the encoding."); 1756throw new ArgumentException($"Problems met when parsing JSON vocabulary object.{Environment.NewLine}Error message: {e.Message}"); 1761throw new ArgumentException($"Failed to read the vocabulary file.");
Model\EnglishRobertaTokenizer.cs (4)
188throw new ArgumentException($"Problems met when parsing JSON vocabulary object.{Environment.NewLine}Error message: {e.Message}"); 193throw new ArgumentException($"Failed to read the vocabulary file."); 1262throw new ArgumentException("Incorrect vocabulary format, expected \"<token> <cnt>\""); 1267throw new ArgumentException($"Cannot parse the line: '{line}'.");
Model\SentencePieceUnigramModel.cs (1)
35throw new ArgumentException("The BOS, EOS, or UNK token is not present in the vocabulary.");
Model\WordPieceTokenizer.cs (1)
64throw new ArgumentException($"The unknown token '{options.UnknownToken}' is not in the vocabulary.");
Normalizer\SentencePieceNormalizer.cs (2)
492throw new ArgumentException("Blob for normalization rule is broken."); 507throw new ArgumentException("Trie data size exceeds the input blob size.");
Utils\DoubleArrayTrie.cs (2)
342throw new ArgumentException("failed to insert key: negative value"); 346throw new ArgumentException("failed to insert key: zero-length key");
Microsoft.ML.Tokenizers.Tests (3)
src\Microsoft.ML.Tokenizers\Utils\DoubleArrayTrie.cs (2)
342throw new ArgumentException("failed to insert key: negative value"); 346throw new ArgumentException("failed to insert key: zero-length key");
TiktokenTests.cs (1)
479_ => throw new ArgumentException("Invalid encoding name"),
Microsoft.ML.TorchSharp (11)
NasBert\Modules\Layers\EncConvLayer.cs (1)
50throw new ArgumentException($"Invalid arguments: {param}.");
NasBert\Modules\Layers\SelfAttentionLayer.cs (1)
61throw new ArgumentException("Invalid arguments.");
NasBert\Modules\MultiHeadAttention.cs (4)
77throw new ArgumentException("EmbeddingDim must be divisible by NumHeads"); 84throw new ArgumentException("Self-attention requires query, key and value to be of the same size"); 164throw new ArgumentException("query must NOT be null and must be 3D in multi-head attention;" + 186throw new ArgumentException(
NasBert\Modules\SearchSpace.cs (1)
35throw new ArgumentException("all non-zero hidden dimensions should be the same.");
Roberta\Modules\AttentionSelf.cs (1)
34throw new ArgumentException($"NumAttentionHeads must be a factor of hiddenSize, got {numAttentionHeads} and {hiddenSize}.");
Utils\DataUtils.cs (2)
56throw new ArgumentException( 62throw new ArgumentException(
Utils\FileUtils.cs (1)
46throw new ArgumentException($"Stream should be non-null and its stream.CanRead property should be true.");
Microsoft.Net.Http.Headers (1)
RangeItemHeaderValue.cs (1)
31throw new ArgumentException("Invalid header range.");
Microsoft.NET.StringTools.net35 (1)
InternableString.Simple.cs (1)
20throw new ArgumentException(nameof(array));
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
227Return New ArgumentException(Description)
Microsoft.VisualStudio.LanguageServices (9)
LanguageService\AbstractLanguageService`2.IVsImmediateStatementCompletion2.cs (1)
97new ArgumentException($"Expected content type {this.ContentTypeName} " +
Progression\GraphBuilder.cs (1)
301throw new ArgumentException("symbol");
Progression\GraphNodeCreation.cs (1)
56throw new ArgumentException(string.Format(ServicesVSResources.Can_t_create_a_node_id_for_this_symbol_kind_colon_0, symbol));
Progression\GraphNodeIdCreation.cs (2)
465throw new ArgumentException("symbol"); 493throw new ArgumentException("symbol");
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
460throw new ArgumentException(string.Format(ServicesVSResources.Could_not_find_project_0, projectId));
TaskList\ProjectExternalErrorReporter.cs (1)
210throw new ArgumentException(ServicesVSResources.End_position_must_be_start_position);
Utilities\GlyphExtensions.cs (1)
158throw new ArgumentException("glyph");
Workspace\GlobalUndoServiceFactory.cs (1)
67throw new ArgumentException(ServicesVSResources.given_workspace_doesn_t_support_undo);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.ICSharpVenusProjectSite.cs (1)
28throw new ArgumentException($"The project {nameof(project)} is not currently referenced by this project.");
Microsoft.Web.Xdt.Extensions (1)
InsertOrAppendAttribute.cs (1)
64throw new ArgumentException("Expected two ['] characters");
MSBuild (1)
ErrorUtilities.cs (1)
532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName));
MSBuildTaskHost (2)
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (1)
532throw new ArgumentException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.ParameterCannotHaveZeroLength", parameterName));
Immutable\ImmutableDictionary.cs (1)
122throw new ArgumentException(nameof(arrayIndex));
MyFrontend (1)
Components\NavigationManagerExtensions.cs (1)
17throw new ArgumentException(message);
PresentationBuildTasks (14)
MS\Internal\MarkupCompiler\PathInternal.cs (2)
32throw new ArgumentException(nameof(relativeTo)); 38throw new ArgumentException(nameof(path));
src\Microsoft.DotNet.Wpf\src\PresentationCore\MS\Internal\Media\ParserStreamGeometryContext.cs (1)
715throw new ArgumentException(SR.UnknownPathOperationType);
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsCache.cs (4)
245throw new ArgumentException(SR.Format(SR.ParserAttributeArgsHigh, "XmlnsDefinitionAttribute")); 265throw new ArgumentException(SR.Format(SR.ParserAttributeArgsHigh, "XmlnsCompatibleWithAttribute")); 313throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, "XmlnsDefinitionAttribute")); 387throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, "XmlnsCompatibleWithAttribute"));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\XmlnsDictionary.cs (3)
142throw new ArgumentException(SR.ParserKeysAreStrings); 470throw new ArgumentException(SR.ParserKeysAreStrings); 478throw new ArgumentException(SR.ParserKeysAreStrings);
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (3)
347throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 360throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 365throw new ArgumentException(SR.Format(SR.ParserAttributeArgsHigh, attrType.Name));
src\Microsoft.DotNet.Wpf\src\WindowsBase\System\IO\Packaging\CompoundFile\FormatVersion.cs (1)
77throw new ArgumentException(SR.ZeroLengthFeatureID);
PresentationCore (369)
MS\Internal\Automation\SynchronizedInputAdaptor.cs (1)
38throw new ArgumentException(SR.Format(SR.Automation_InvalidSynchronizedInputType, inputType));
MS\Internal\Automation\TextProviderWrapper.cs (1)
56throw new ArgumentException(SR.Format(SR.TextProvider_InvalidChild, "childElement"));
MS\Internal\Automation\TextRangeProviderWrapper.cs (3)
50throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidRangeProvider, "range")); 60throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidRangeProvider, "targetRange")); 123throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidRangeProvider, "targetRange"));
MS\Internal\FontCache\FontFaceLayoutInfo.cs (1)
720throw new ArgumentException(SR.Collection_BadRank);
MS\Internal\FontFace\CompositeFontInfo.cs (1)
48throw new ArgumentException(SR.FamilyMap_TargetNotSet);
MS\Internal\FontFace\CompositeFontParser.cs (5)
25throw new ArgumentException(SR.Format(SR.PropertyValueCannotBeNaN, propertyName)); 41throw new ArgumentException(SR.Format(SR.PropertyValueCannotBeNaN, propertyName)); 49throw new ArgumentException(SR.Format(SR.PropertyMustBeGreaterThanZero, propertyName)); 57throw new ArgumentException(SR.Format(SR.PropertyValueCannotBeNaN, propertyName)); 65throw new ArgumentException(SR.Format(SR.PropertyCannotBeNegative, propertyName));
MS\Internal\FontFace\TypefaceCollection.cs (1)
61throw new ArgumentException(SR.Collection_BadRank);
MS\Internal\Ink\ExtendedProperty.cs (1)
23throw new ArgumentException(SR.InvalidGuid);
MS\Internal\Ink\InkSerializedFormat\AlgoModule.cs (7)
150throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Input buffer passed was shorter than expected")); 155throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("output buffer length was zero")); 195throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Input buffer was too short (must be at least 3 bytes)")); 235throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid decompression algo byte")); 263throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid compression specified or computed by FindPropAlgoByte")); 310throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("input.Length must be at least 2")); 320throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("bogus isf, we don't decompress property data with lz"));
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (1)
773throw new ArgumentException(SR.InvalidGuid);
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (5)
134throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("ISF size is larger than maximum stream size")); 143throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Drawing Attribute tag embedded in ISF stream does not match guid table")); 154throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid PenTip value found in ISF stream")); 218throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("ISF size if greater then maximum stream size")); 225throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"));
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (3)
438throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("bogus GorillaEncodingType passed to compress")); 478throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("bogus GorillaEncodingType passed to GetDataFromReader")); 623throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("bogus GorillaEncodingType passed to Uncompress"));
MS\Internal\Ink\InkSerializedFormat\GuidTagList.cs (2)
113throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Tag is outside of the known guid tag range")); 137throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Tag is outside of the known guid tag range"));
MS\Internal\Ink\InkSerializedFormat\HuffCodec.cs (1)
237throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("invalid huffman encoded data"));
MS\Internal\Ink\InkSerializedFormat\HuffModule.cs (1)
59throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("invalid codec computed"));
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (12)
342throw new ArgumentException(SR.InvalidStream); 361throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 472throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 506throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 569throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 582throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 604throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 618throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 667throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 765throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 780throw new ArgumentException(ISFDebugMessage("Invalid ISF data")); 1210throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid argument passed to ReliableRead"));
MS\Internal\Ink\InkSerializedFormat\MetricEntry.cs (2)
296throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("MetricEntryType was persisted with Never flag which should never happen")); 444throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("MetricEntry cannot be null"));
MS\Internal\Ink\InkSerializedFormat\MultiByteCodec.cs (1)
84throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("invalid input in MultiByteCodec.Decode"));
MS\Internal\Ink\InkSerializedFormat\SerializationHelper.cs (1)
322throw new ArgumentException(SR.InvalidDataTypeForExtendedProperty);
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (18)
76throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Stroke size (" + 156throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Packet buffer overflowed the ISF stream")); 182throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Stroke Custom Attribute tag embedded in ISF stream does not match guid table")); 195throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 230throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 244throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 253throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 262throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 270throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 279throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 286throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected")); 306throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Stroke Custom Attribute tag embedded in ISF stream does not match guid table")); 330throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 365throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 391throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 412throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF data")); 486throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Buffer range is smaller than expected expected size")); 518throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Button data length not equal to expected length"));
MS\Internal\Ink\Renderer.cs (3)
436throw new System.ArgumentException(SR.DuplicateStrokeAdded); 464throw new System.ArgumentException(SR.UnknownStroke3); 481throw new System.ArgumentException(SR.UnknownStroke1);
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (4)
695throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); 702throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); 720throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges")); 727throw new ArgumentException(SR.Format(SR.InvalidByteRanges, "byteRanges"));
MS\Internal\IO\Packaging\DeobfuscatingStream.cs (1)
325throw new ArgumentException(SR.InvalidPartName);
MS\Internal\IO\Packaging\NetStream.cs (2)
256throw new ArgumentException(SR.SeekNegative); 283throw new ArgumentException(SR.SeekNegative);
MS\Internal\Media\ParserStreamGeometryContext.cs (1)
715throw new ArgumentException(SR.UnknownPathOperationType);
MS\Internal\Media\VisualTreeUtils.cs (1)
219throw new ArgumentException(SR.Visual_NotAVisual);
MS\Internal\Media\XamlSerializationHelper.cs (1)
345throw new ArgumentException(SR.FloatUnknownBamlType);
MS\Internal\PartialArray.cs (1)
147throw new ArgumentException(
MS\Internal\TextFormatting\LineServicesRun.cs (1)
918throw new ArgumentException(SR.CompileFeatureSet_InvalidTypographyProperties);
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
376throw new ArgumentException(SR.OptimalParagraphMustWrap);
MS\Internal\TextFormatting\TextRunCacheImp.cs (5)
115throw new ArgumentException(SR.TextRunPropertiesCannotBeNull); 118throw new ArgumentException(SR.Format(SR.PropertyOfClassMustBeGreaterThanZero, "FontRenderingEmSize", "TextRunProperties")); 123throw new ArgumentException(SR.Format(SR.PropertyOfClassCannotBeGreaterThan, "FontRenderingEmSize", "TextRunProperties", realMaxFontRenderingEmSize)); 128throw new ArgumentException(SR.Format(SR.PropertyOfClassCannotBeNull, "CultureInfo", "TextRunProperties")); 131throw new ArgumentException(SR.Format(SR.PropertyOfClassCannotBeNull, "Typeface", "TextRunProperties"));
MS\Internal\TextFormatting\TextStore.cs (1)
2362throw new ArgumentException(SR.TextObjectMetrics_WidthOutOfRange);
MS\Internal\TextFormatting\ThousandthOfEmRealDoubles.cs (1)
188throw new ArgumentException(
MS\Internal\TextFormatting\ThousandthOfEmRealPoints.cs (1)
133throw new ArgumentException(
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SequentialUshortCollection.cs (1)
40throw new ArgumentException(SR.Collection_BadRank);
System\Windows\DataFormat.cs (1)
22throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed);
System\Windows\DataFormats.cs (1)
29throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed);
System\Windows\DataObjectPastingEventArgs.cs (4)
55throw new ArgumentException(SR.DataObject_EmptyFormatNotAllowed); 60throw new ArgumentException(SR.Format(SR.DataObject_DataFormatNotPresentOnDataObject, formatToApply)); 128throw new ArgumentException(SR.DataObject_DataObjectMustHaveAtLeastOneFormat); 157throw new ArgumentException(SR.Format(SR.DataObject_DataFormatNotPresentOnDataObject, value));
System\Windows\DragEventArgs.cs (1)
147throw new ArgumentException(SR.Format(SR.DragDrop_DragDropEffectsInvalid, "value"));
System\Windows\EventHandlersStore.cs (2)
147throw new ArgumentException(SR.HandlerTypeIllegal); 181throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\EventManager.cs (3)
70throw new ArgumentException(SR.Format(SR.DuplicateEventName, name, ownerType)); 159throw new ArgumentException(SR.ClassTypeIllegal); 164throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\EventRoute.cs (2)
128throw new ArgumentException(SR.SourceNotSet); 133throw new ArgumentException(SR.Mismatched_RoutedEvent);
System\Windows\FreezableCollection.cs (6)
81throw new System.ArgumentException(SR.Collection_NoNull); 193throw new System.ArgumentException(SR.Collection_NoNull); 310throw new System.ArgumentException(SR.Collection_NoNull); 481throw new ArgumentException(SR.Collection_BadRank); 639throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "T")); 695throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Generated\ContentElement.cs (4)
82throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 147throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 521throw new ArgumentException(SR.HandlerTypeIllegal); 576throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\Generated\TextDecorationCollection.cs (7)
119throw new System.ArgumentException(SR.Collection_NoNull); 227throw new System.ArgumentException(SR.Collection_NoNull); 393throw new ArgumentException(SR.Collection_BadRank); 497throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextDecoration")); 523throw new System.ArgumentException(SR.Collection_NoNull); 923throw new System.ArgumentException(SR.Collection_NoNull); 941throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Generated\UIElement.cs (4)
82throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 147throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 521throw new ArgumentException(SR.HandlerTypeIllegal); 576throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\Generated\UIElement3D.cs (2)
327throw new ArgumentException(SR.HandlerTypeIllegal); 382throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\Ink\Events.cs (2)
37throw new ArgumentException(SR.Format(SR.CannotBothBeNull, "added", "removed")); 103throw new ArgumentException(SR.Format(SR.CannotBothBeNull, "newValue", "previousValue"));
System\Windows\Ink\Stroke.cs (1)
506throw new ArgumentException(SR.InvalidStylusPointCollectionZeroCount);
System\Windows\Ink\Stroke2.cs (2)
120throw new ArgumentException(SR.EmptyArray); 151throw new ArgumentException(SR.EmptyArray);
System\Windows\Ink\StrokeCollection2.cs (2)
225throw new ArgumentException(SR.EmptyArray); 275throw new ArgumentException(SR.EmptyArray);
System\Windows\Input\AccessKeyManager.cs (1)
125throw new ArgumentException(SR.Format(SR.AccessKeyManager_NotAUnicodeCharacter, "key"));
System\Windows\Input\Command\KeyBinding.cs (1)
88throw new ArgumentException(SR.Format(SR.InputBinding_ExpectedInputGesture, typeof(KeyGesture)));
System\Windows\Input\Command\MouseBinding.cs (1)
104throw new ArgumentException(SR.Format(SR.InputBinding_ExpectedInputGesture, typeof(MouseGesture)));
System\Windows\Input\Cursor.cs (5)
32throw new ArgumentException(SR.Format(SR.InvalidCursorType, cursorType)); 63throw new ArgumentException(SR.Format(SR.Cursor_UnsupportedFormat , cursorFile)); 198throw new ArgumentException(SR.Format(SR.Cursor_LoadImageFailure, fileName)); 252throw new ArgumentException(SR.Cursor_InvalidStream); 298throw new ArgumentException(SR.Cursor_InvalidStream);
System\Windows\Input\InputMethod.cs (2)
811throw new ArgumentException(SR.Format(SR.InputMethod_InvalidConversionMode, value)); 1062throw new ArgumentException(SR.Format(SR.InputMethod_InvalidSentenceMode, value));
System\Windows\Input\InputScope.cs (1)
171throw new ArgumentException(SR.Format(SR.InputScope_InvalidInputScopeName, "value"));
System\Windows\Input\Stylus\Common\StylusPointDescription.cs (1)
151throw new ArgumentException("stylusPointProperty");
System\Windows\Input\TextComposition.cs (1)
103throw new ArgumentException(SR.TextComposition_NullResultText);
System\Windows\Input\TextCompositionManager.cs (8)
314throw new ArgumentException(SR.Format(SR.TextCompositionManager_NoInputManager, "composition")); 319throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionHasStarted, "composition")); 337throw new ArgumentException(SR.Format(SR.TextCompositionManager_NoInputManager, "composition")); 342throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionNotStarted, "composition")); 347throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionHasDone, "composition")); 364throw new ArgumentException(SR.Format(SR.TextCompositionManager_NoInputManager, "composition")); 369throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionNotStarted, "composition")); 374throw new ArgumentException(SR.Format(SR.TextCompositionManager_TextCompositionHasDone, "composition"));
System\Windows\InterOp\HwndKeyboardInputProvider.cs (1)
694throw new ArgumentException(SR.OnlyAcceptsKeyMessages);
System\Windows\InterOp\HwndSource.cs (4)
673throw new ArgumentException(SR.NullHwnd); 1913throw new ArgumentException(SR.KeyboardSinkAlreadyOwned); 2092throw new ArgumentException(SR.OnlyAcceptsKeyMessages); 2280throw new ArgumentException(SR.OnlyAcceptsKeyMessages);
System\Windows\Markup\XamlSerializerUtil.cs (1)
56throw new ArgumentException(SR.Format(SR.NonWhiteSpaceInAddText, s));
System\Windows\Media\Animation\Generated\Animatable.cs (2)
81throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 146throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
System\Windows\Media\Animation\Generated\TimelineCollection.cs (7)
118throw new System.ArgumentException(SR.Collection_NoNull); 226throw new System.ArgumentException(SR.Collection_NoNull); 392throw new ArgumentException(SR.Collection_BadRank); 496throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Timeline")); 522throw new System.ArgumentException(SR.Collection_NoNull); 922throw new System.ArgumentException(SR.Collection_NoNull); 940throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Animation\KeySpline.cs (4)
57throw new ArgumentException(SR.Format( 65throw new ArgumentException(SR.Format( 167throw new ArgumentException(SR.Format( 199throw new ArgumentException(SR.Format(
System\Windows\Media\CharacterMetrics.cs (6)
104throw new ArgumentException(SR.CharacterMetrics_NegativeHorizontalAdvance); 110throw new ArgumentException(SR.CharacterMetrics_NegativeVerticalAdvance); 165throw new ArgumentException(SR.Format(SR.CannotConvertStringToType, field.ToString(), "double")); 171throw new ArgumentException(SR.CharacterMetrics_MissingRequiredField); 180throw new ArgumentException(SR.CharacterMetrics_TooManyFields); 190throw new ArgumentException(SR.CharacterMetrics_MissingRequiredField);
System\Windows\Media\CharacterMetricsDictionary.cs (8)
121throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 139throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 178throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 181throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 196throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); 201throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(SC.DictionaryEntry), elementType)); 363throw new ArgumentException(SR.Format(SR.CollectionDuplicateKey, key)); 517throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(CharacterMetrics), value.GetType()));
System\Windows\Media\Color.cs (5)
70throw new ArgumentException(SR.Format(SR.Color_DimensionMismatch, null)); 75throw new ArgumentException(SR.Format(SR.Color_DimensionMismatch, null)); 488throw new ArgumentException(SR.Format(SR.Color_ColorContextTypeMismatch, null)); 522throw new ArgumentException(SR.Format(SR.Color_ColorContextTypeMismatch, null)); 605throw new ArgumentException(SR.Format(SR.Color_ColorContextTypeMismatch, null));
System\Windows\Media\CompositionTarget.cs (1)
461throw new System.ArgumentException(SR.CompositionTarget_RootVisual_HasParent);
System\Windows\Media\CultureSpecificStringDictionary.cs (6)
113throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 116throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 147throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 150throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 165throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); 170throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(SC.DictionaryEntry), elementType));
System\Windows\Media\Effects\Generated\BitmapEffectCollection.cs (7)
121throw new System.ArgumentException(SR.Collection_NoNull); 229throw new System.ArgumentException(SR.Collection_NoNull); 395throw new ArgumentException(SR.Collection_BadRank); 499throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "BitmapEffect")); 525throw new System.ArgumentException(SR.Collection_NoNull); 925throw new System.ArgumentException(SR.Collection_NoNull); 943throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Effects\PixelShader.cs (1)
90throw new ArgumentException(SR.Effect_SourceUriMustBeFileOrPack);
System\Windows\Media\Effects\ShaderEffect.cs (1)
447throw new ArgumentException(SR.GetResourceString(srid));
System\Windows\Media\EllipseGeometry.cs (1)
30throw new System.ArgumentException(SR.Format(SR.Rect_Empty, "rect"));
System\Windows\Media\FamilyMapCollection.cs (7)
77throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 80throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 91throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); 95throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(FamilyTypeface), elementType)); 98throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 101throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array")); 367throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FontFamilyMap)));
System\Windows\Media\FamilyTypefaceCollection.cs (6)
241throw new ArgumentException(SR.CompositeFont_DuplicateTypeface); 359throw new ArgumentException(SR.Format(SR.CannotConvertType, obj.GetType(), typeof(FamilyTypeface))); 369throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional); 373throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(FamilyTypeface[]), elementType)); 376throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array")); 379throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array"));
System\Windows\Media\Fonts.cs (1)
315throw new ArgumentException(SR.Collection_BadRank);
System\Windows\Media\Generated\DoubleCollection.cs (2)
367throw new ArgumentException(SR.Collection_BadRank); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "double"));
System\Windows\Media\Generated\DrawingCollection.cs (7)
140throw new System.ArgumentException(SR.Collection_NoNull); 248throw new System.ArgumentException(SR.Collection_NoNull); 414throw new ArgumentException(SR.Collection_BadRank); 518throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Drawing")); 544throw new System.ArgumentException(SR.Collection_NoNull); 967throw new System.ArgumentException(SR.Collection_NoNull); 985throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\GeneralTransformCollection.cs (7)
128throw new System.ArgumentException(SR.Collection_NoNull); 236throw new System.ArgumentException(SR.Collection_NoNull); 402throw new ArgumentException(SR.Collection_BadRank); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform")); 532throw new System.ArgumentException(SR.Collection_NoNull); 932throw new System.ArgumentException(SR.Collection_NoNull); 950throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\GeometryCollection.cs (7)
140throw new System.ArgumentException(SR.Collection_NoNull); 248throw new System.ArgumentException(SR.Collection_NoNull); 414throw new ArgumentException(SR.Collection_BadRank); 518throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Geometry")); 544throw new System.ArgumentException(SR.Collection_NoNull); 967throw new System.ArgumentException(SR.Collection_NoNull); 985throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\GradientStopCollection.cs (7)
128throw new System.ArgumentException(SR.Collection_NoNull); 236throw new System.ArgumentException(SR.Collection_NoNull); 402throw new ArgumentException(SR.Collection_BadRank); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GradientStop")); 532throw new System.ArgumentException(SR.Collection_NoNull); 1035throw new System.ArgumentException(SR.Collection_NoNull); 1053throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\Int32Collection.cs (2)
367throw new ArgumentException(SR.Collection_BadRank); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "int"));
System\Windows\Media\Generated\PathFigureCollection.cs (7)
129throw new System.ArgumentException(SR.Collection_NoNull); 237throw new System.ArgumentException(SR.Collection_NoNull); 403throw new ArgumentException(SR.Collection_BadRank); 507throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathFigure")); 533throw new System.ArgumentException(SR.Collection_NoNull); 1022throw new System.ArgumentException(SR.Collection_NoNull); 1040throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\PathSegmentCollection.cs (7)
128throw new System.ArgumentException(SR.Collection_NoNull); 236throw new System.ArgumentException(SR.Collection_NoNull); 402throw new ArgumentException(SR.Collection_BadRank); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "PathSegment")); 532throw new System.ArgumentException(SR.Collection_NoNull); 932throw new System.ArgumentException(SR.Collection_NoNull); 950throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\PointCollection.cs (2)
367throw new ArgumentException(SR.Collection_BadRank); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point"));
System\Windows\Media\Generated\TextEffectCollection.cs (7)
128throw new System.ArgumentException(SR.Collection_NoNull); 236throw new System.ArgumentException(SR.Collection_NoNull); 402throw new ArgumentException(SR.Collection_BadRank); 506throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "TextEffect")); 532throw new System.ArgumentException(SR.Collection_NoNull); 932throw new System.ArgumentException(SR.Collection_NoNull); 950throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\TransformCollection.cs (7)
140throw new System.ArgumentException(SR.Collection_NoNull); 248throw new System.ArgumentException(SR.Collection_NoNull); 414throw new ArgumentException(SR.Collection_BadRank); 518throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform")); 544throw new System.ArgumentException(SR.Collection_NoNull); 967throw new System.ArgumentException(SR.Collection_NoNull); 985throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media\Generated\VectorCollection.cs (2)
367throw new ArgumentException(SR.Collection_BadRank); 455throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector"));
System\Windows\Media\GlyphRun.cs (1)
415throw new ArgumentException(SR.SidewaysRTLTextIsNotSupported);
System\Windows\Media\GlyphTypeface.cs (2)
1813throw new ArgumentException(SR.Collection_BadRank); 1898throw new ArgumentException(SR.Collection_BadRank);
System\Windows\Media\Imaging\BitmapImage.cs (1)
368throw new System.ArgumentException(SR.Image_NoDecodeFrames);
System\Windows\Media\Imaging\BitmapPalette.cs (1)
115throw new System.ArgumentException(SR.Format(SR.Image_PaletteFixedType, paletteType));
System\Windows\Media\Imaging\BitmapSource.cs (1)
662throw new ArgumentException(SR.Image_InvalidArrayForPixel);
System\Windows\Media\Imaging\BitmapVisualManager.cs (2)
32throw new ArgumentException(SR.Format(SR.Image_CantBeFrozen, null)); 69throw new ArgumentException(SR.Image_CantBeFrozen);
System\Windows\Media\Imaging\CachedBitmap.cs (1)
130throw new ArgumentException(SR.Image_InvalidArrayForPixel);
System\Windows\Media\Imaging\FormatConvertedBitmap.cs (1)
37throw new ArgumentException(SR.Image_AlphaThresholdOutOfRange);
System\Windows\Media\Imaging\WriteableBitmap.cs (2)
392throw new ArgumentException(SR.Image_InvalidArrayForPixel); 488throw new ArgumentException(SR.Image_InvalidArrayForPixel);
System\Windows\Media\MediaSystem.cs (1)
279throw new ArgumentException(SR.MediaSystem_ApiInvalidContext);
System\Windows\Media\PixelFormatConverter.cs (1)
78throw new ArgumentException(SR.Format(SR.General_Expected_Type, nameof(PixelFormat)));
System\Windows\Media\textformatting\NumberSubstitution.cs (1)
83throw new ArgumentException(SR.SpecificNumberCultureRequired);
System\Windows\Media\textformatting\TextFormatter.cs (1)
122throw new ArgumentException(SR.CurrentDispatcherNotFound);
System\Windows\Media\Visual.cs (2)
2579throw new ArgumentException(SR.Visual_HasParent); 2648throw new ArgumentException(SR.Visual_NotChild);
System\Windows\Media\VisualCollection.cs (5)
174throw new ArgumentException(SR.Collection_BadRank); 337throw new System.ArgumentException(SR.VisualCollection_EntryInUse); 342throw new System.ArgumentException(SR.VisualCollection_VisualHasParent); 443throw new System.ArgumentException(SR.VisualCollection_VisualHasParent); 687throw new System.ArgumentException(SR.VisualCollection_VisualHasParent);
System\Windows\Media3D\Generated\GeneralTransform3DCollection.cs (7)
126throw new System.ArgumentException(SR.Collection_NoNull); 234throw new System.ArgumentException(SR.Collection_NoNull); 400throw new ArgumentException(SR.Collection_BadRank); 504throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "GeneralTransform3D")); 530throw new System.ArgumentException(SR.Collection_NoNull); 930throw new System.ArgumentException(SR.Collection_NoNull); 948throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media3D\Generated\MaterialCollection.cs (7)
138throw new System.ArgumentException(SR.Collection_NoNull); 246throw new System.ArgumentException(SR.Collection_NoNull); 412throw new ArgumentException(SR.Collection_BadRank); 516throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Material")); 542throw new System.ArgumentException(SR.Collection_NoNull); 965throw new System.ArgumentException(SR.Collection_NoNull); 983throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media3D\Generated\Model3DCollection.cs (7)
138throw new System.ArgumentException(SR.Collection_NoNull); 246throw new System.ArgumentException(SR.Collection_NoNull); 412throw new ArgumentException(SR.Collection_BadRank); 516throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Model3D")); 542throw new System.ArgumentException(SR.Collection_NoNull); 965throw new System.ArgumentException(SR.Collection_NoNull); 983throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media3D\Generated\Point3DCollection.cs (2)
365throw new ArgumentException(SR.Collection_BadRank); 453throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Point3D"));
System\Windows\Media3D\Generated\Transform3DCollection.cs (7)
138throw new System.ArgumentException(SR.Collection_NoNull); 246throw new System.ArgumentException(SR.Collection_NoNull); 412throw new ArgumentException(SR.Collection_BadRank); 516throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Transform3D")); 542throw new System.ArgumentException(SR.Collection_NoNull); 965throw new System.ArgumentException(SR.Collection_NoNull); 983throw new System.ArgumentException(SR.Collection_NoNull);
System\Windows\Media3D\Generated\Vector3DCollection.cs (2)
365throw new ArgumentException(SR.Collection_BadRank); 453throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Vector3D"));
System\Windows\Media3D\Generated\Visual3D.cs (2)
81throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior); 146throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
System\Windows\Media3D\ModelVisual3D.cs (1)
79throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, nameof(Visual3D)));
System\Windows\Media3D\Rect3D.cs (4)
58throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 202throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 227throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 252throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative);
System\Windows\Media3D\Size3D.cs (4)
24throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 85throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 110throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative); 136throw new System.ArgumentException(SR.Size3D_DimensionCannotBeNegative);
System\Windows\Media3D\Viewport2DVisual3D.cs (2)
364throw new ArgumentException(SR.Visual_HasParent); 395throw new ArgumentException(SR.Visual_NotChild);
System\Windows\Media3D\Visual3DCollection.cs (4)
159throw new ArgumentException(SR.Collection_BadRank); 450throw new System.ArgumentException(SR.Format(SR.Collection_BadType, this.GetType().Name, value.GetType().Name, "Visual3D")); 460throw new System.ArgumentException(SR.Collection_NoNull); 467throw new System.ArgumentException(SR.VisualCollection_VisualHasParent);
System\Windows\QueryContinueDragEventArgs.cs (1)
81throw new ArgumentException(SR.Format(SR.DragDrop_DragActionInvalid, "value"));
System\Windows\TextDecorationCollectionConverter.cs (1)
152throw new ArgumentException(SR.Format(SR.InvalidTextDecorationCollectionString, text));
System\Windows\UIElement.cs (4)
1644throw new ArgumentException(SR.SourceNotSet); 1649throw new ArgumentException(SR.Mismatched_RoutedEvent); 1901throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType())); 1937throw new ArgumentException(SR.Format(SR.Invalid_IInputElement, d.GetType()));
PresentationFramework (260)
Microsoft\Win32\FileDialog.cs (1)
327throw new ArgumentException(SR.FileDialogInvalidFilter);
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
303throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.CountAttribute)); 497throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo))); 503throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)));
MS\Internal\Annotations\Anchoring\LocatorManager.cs (1)
133throw new ArgumentException(SR.Format(SR.InvalidSubTreeProcessor, processorString));
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (4)
201throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.CountAttribute)); 357throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.CountAttribute)); 434throw new ArgumentException(nameof(segmentNumber)); 441throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)));
MS\Internal\Annotations\AnnotationObservableCollection.cs (2)
110throw new ArgumentException(SR.AlreadyHasParent); 124throw new ArgumentException(SR.AlreadyHasParent);
MS\Internal\Annotations\Component\HighlightComponent.cs (1)
217throw new ArgumentException(SR.MoreThanOneAttachedAnnotation);
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (2)
203throw new ArgumentException(SR.MoreThanOneAttachedAnnotation); 471throw new ArgumentException(SR.InvalidAttachedAnchor);
MS\Internal\Annotations\TextAnchor.cs (1)
105throw new ArgumentException(SR.Format(SR.NotInAssociatedTree, "textPointer"));
MS\Internal\Controls\ConnectionPointCookie.cs (2)
43ex = new ArgumentException(SR.Format(SR.AxNoEventInterface, eventInterface.Name)); 78throw new ArgumentException(SR.Format(SR.AxNoConnectionPoint, eventInterface.Name));
MS\Internal\Data\RBTree.cs (1)
570throw new ArgumentException(SR.Argument_InvalidOffLen);
MS\Internal\Data\ViewManager.cs (2)
579throw new ArgumentException(SR.Format(SR.CollectionView_WrongType, collectionViewType.Name)); 837throw new ArgumentException(SR.Format(SR.CollectionView_NameTypeDuplicity, collectionViewType, cachedViewType));
MS\Internal\Documents\ContentElementCollection.cs (3)
69throw new ArgumentException(SR.TableCollectionRankMultiDimNotSupported); 77throw new ArgumentException(SR.TableCollectionInvalidOffLen); 109throw new ArgumentException(SR.TableCollectionInvalidOffLen);
MS\Internal\Documents\TableColumnCollectionInternal.cs (3)
143throw new System.ArgumentException(SR.TableCollectionWrongProxyParent); 150throw new System.ArgumentException(SR.TableCollectionInOtherCollection); 279throw new ArgumentException(SR.TableCollectionRangeOutOfRange);
MS\Internal\Documents\TableTextElementCollectionInternal.cs (5)
45throw new System.ArgumentException(SR.TableCollectionInOtherCollection); 110throw new System.ArgumentException(SR.TableCollectionInOtherCollection); 229throw new ArgumentException(SR.TableCollectionRangeOutOfRange); 265throw new System.ArgumentException(SR.TableCollectionWrongProxyParent); 420throw new System.ArgumentException(SR.TableCollectionInOtherCollection);
MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (1)
240throw new ArgumentException(SR.CannotSetNegativePosition);
MS\Internal\IO\Packaging\XmlFixedPageInfo.cs (1)
37throw new ArgumentException(SR.Format(SR.UnexpectedXmlNodeInXmlFixedPageInfoConstructor,
MS\Internal\KnownBoxes.cs (3)
14throw new System.ArgumentException(SR.Rect_WidthAndHeightCannotBeNegative); 33throw new System.ArgumentException(SR.Rect_WidthAndHeightCannotBeNegative); 50throw new System.ArgumentException(SR.Rect_WidthAndHeightCannotBeNegative);
MS\Internal\Markup\StaticExtension.cs (3)
65throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, Member)); 73throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, Member)); 83throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, "IXamlTypeResolver"));
MS\Internal\WindowsRuntime\Generated\WinRT\Projections.cs (1)
141throw new ArgumentException(nameof(type));
System\Windows\Annotations\AnnotationDocumentPaginator.cs (1)
71throw new ArgumentException(SR.OnlyFlowAndFixedSupported);
System\Windows\Annotations\AnnotationHelper.cs (1)
597throw new ArgumentException(SR.InvalidSelectionPages);
System\Windows\Annotations\Storage\XmlStreamStore.cs (1)
67throw new ArgumentException(SR.StreamDoesNotSupportSeek);
System\Windows\Application.cs (12)
352throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull,"resourceLocator", "OriginalString")); 355throw new ArgumentException(SR.AbsoluteUriNotAllowed); 442throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull,"resourceLocator", "OriginalString")); 445throw new ArgumentException(SR.AbsoluteUriNotAllowed); 579throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull, "uriResource", "OriginalString")); 583throw new ArgumentException(SR.NonPackAppAbsoluteUriNotAllowed); 611throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull, "uriContent", "OriginalString")); 615throw new ArgumentException(SR.NonPackAppAbsoluteUriNotAllowed); 640throw new ArgumentException(SR.Format(SR.ArgumentPropertyMustNotBeNull, "uriRemote", "OriginalString")); 646throw new ArgumentException(SR.NonPackSooAbsoluteUriNotAllowed); 971throw new ArgumentException(string.Format("ThemeMode value {0} is invalid. Use None, System, Light or Dark", value)); 1687throw new ArgumentException(SR.Format(SR.WindowPassedShouldBeOnApplicationThread, window.GetType().FullName, this.GetType().FullName));
System\Windows\Automation\Peers\CalendarAutomationPeer.cs (1)
528throw new ArgumentException(SR.PropertyNotSupported);
System\Windows\Automation\Peers\DataGridColumnHeadersPresenterAutomationPeer.cs (1)
158throw new ArgumentException(SR.PropertyNotSupported);
System\Windows\Automation\Peers\DataGridItemAutomationPeer.cs (1)
135throw new ArgumentException(SR.PropertyNotSupported);
System\Windows\Automation\Peers\ItemsControlAutomationPeer.cs (1)
235throw new ArgumentException(SR.PropertyNotSupported);
System\Windows\ComponentResourceKeyConverter.cs (1)
100throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "ComponentResourceKey"));
System\Windows\Condition.cs (3)
51throw new ArgumentException(SR.Format(SR.InvalidPropertyValue, conditionValue, conditionProperty.Name)); 134throw new ArgumentException(SR.Format(SR.ConditionValueOfMarkupExtensionNotSupported, 140throw new ArgumentException(SR.ConditionValueOfExpressionNotSupported);
System\Windows\ConditionCollection.cs (1)
112throw new ArgumentException(SR.MustBeCondition);
System\Windows\Controls\AdornedElementPlaceholder.cs (1)
62throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\AVElementHelper.cs (1)
99throw new ArgumentException(SR.AudioVideo_InvalidDependencyObject);
System\Windows\Controls\ColumnDefinition.cs (7)
78throw new ArgumentException(SR.GridCollection_DestArrayInvalidRank); 86throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array")); 108throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array")); 313throw new ArgumentException(SR.TableCollectionRangeOutOfRange); 549throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "ColumnDefinitionCollection", "ColumnDefinition")); 554throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, "value", "ColumnDefinitionCollection")); 570throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "ColumnDefinitionCollection", "ColumnDefinition"));
System\Windows\Controls\ContextMenuService.cs (1)
43throw new ArgumentException(SR.ContextMenuInDifferentDispatcher);
System\Windows\Controls\CustomDictionarySources.cs (1)
338throw new ArgumentException(SR.CustomDictionaryNullItem);
System\Windows\Controls\DataGridColumnCollection.cs (1)
497throw new ArgumentException(SR.DataGrid_DuplicateDisplayIndex);
System\Windows\Controls\Decorator.cs (1)
70throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType()));
System\Windows\Controls\FlowDocumentReader.cs (5)
747throw new ArgumentException(SR.FlowDocumentReaderViewingModeEnabledConflict); 1616throw new ArgumentException(SR.FlowDocumentReaderViewingModeEnabledConflict); 1648throw new ArgumentException(SR.FlowDocumentReaderCannotDisableAllViewingModes); 1654throw new ArgumentException(SR.FlowDocumentReaderViewingModeEnabledConflict); 1917throw new ArgumentException(SR.FlowDocumentReaderCanHaveOnlyOneChild);
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1184throw new ArgumentException(SR.FlowDocumentScrollViewerDocumentBelongsToAnotherFlowDocumentScrollViewerAlready); 1800throw new ArgumentException(SR.FlowDocumentScrollViewerCanHaveOnlyOneChild);
System\Windows\Controls\ItemsPanelTemplate.cs (1)
155throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ItemsPresenter", templatedParent.GetType().Name));
System\Windows\Controls\Primitives\DocumentViewerBase.cs (2)
864throw new ArgumentException(SR.DocumentViewerPageViewsCollectionEmpty); 874throw new ArgumentException(SR.DocumentViewerOneMasterPage);
System\Windows\Controls\PrintDialog.cs (2)
161throw new System.ArgumentException(SR.Format(SR.PrintDialogZeroNotAllowed, "MinPage")); 181throw new System.ArgumentException(SR.Format(SR.PrintDialogZeroNotAllowed, "MaxPage"));
System\Windows\Controls\RichTextBox.cs (2)
158throw new ArgumentException(SR.Format(SR.CanOnlyHaveOneChild, this.GetType(), value.GetType())); 360throw new ArgumentException(SR.RichTextBox_DocumentBelongsToAnotherRichTextBoxAlready);
System\Windows\Controls\RowDefinition.cs (7)
73throw new ArgumentException(SR.GridCollection_DestArrayInvalidRank); 81throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array")); 103throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array")); 308throw new ArgumentException(SR.TableCollectionRangeOutOfRange); 544throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "RowDefinitionCollection", "RowDefinition")); 549throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, "value", "RowDefinitionCollection")); 565throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "RowDefinitionCollection", "RowDefinition"));
System\Windows\Controls\StickyNote.cs (1)
1741throw new ArgumentException(SR.InvalidInkForeground);
System\Windows\Controls\TextAdaptor.cs (1)
670throw new ArgumentException(SR.TextProvider_InvalidPoint);
System\Windows\Controls\TextBlock.cs (2)
127throw new ArgumentException(SR.Format(SR.TextPanelIllegalParaTypeForIAddChild, "value", value.GetType())); 145throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, parentType.Name, valueType.Name));
System\Windows\Controls\TextRangeAdaptor.cs (3)
510throw new ArgumentException(SR.TextRangeProvider_WrongTextRange); 1751throw new ArgumentException(SR.Format(SR.TextRangeProvider_EmptyStringParameter, "text")); 1854throw new ArgumentException(SR.Format(SR.TextRangeProvider_InvalidParameterValue, maxLength, "maxLength"));
System\Windows\Controls\UIElementCollection.cs (2)
386throw new System.ArgumentException(SR.Format(SR.Collection_NoNull, "UIElementCollection")); 391throw new System.ArgumentException(SR.Format(SR.Collection_BadType, "UIElementCollection", value.GetType().Name, "UIElement"));
System\Windows\Controls\VirtualizationCacheLength.cs (2)
68throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoNaN, "cacheBeforeViewport")); 73throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoNaN, "cacheAfterViewport"));
System\Windows\Controls\WebBrowser.cs (1)
432throw new ArgumentException(SR.NeedToBeComVisible);
System\Windows\ControlTemplate.cs (3)
67throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, _targetType.Name, templatedParent.GetType().Name)); 73throw new ArgumentException(SR.MustNotTemplateUnassociatedControl); 138throw new ArgumentException(SR.Format(SR.InvalidControlTemplateTargetType, targetType.Name));
System\Windows\CornerRadiusConverter.cs (1)
134throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(CornerRadius), destinationType.FullName));
System\Windows\Data\BindingListCollectionView.cs (2)
2196throw new ArgumentException(SR.CannotDetermineSortByPropertiesForCollection); 2205throw new ArgumentException(SR.Format(SR.PropertyToSortByNotFoundOnType, typeName, sorts[i].PropertyName));
System\Windows\Data\XmlNamespaceMappingCollection.cs (1)
139throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, nameof(arrayIndex), nameof(array)));
System\Windows\DataTemplate.cs (1)
192throw new ArgumentException(SR.Format(SR.TemplateTargetTypeMismatch, "ContentPresenter", templatedParent.GetType().Name));
System\Windows\DataTrigger.cs (2)
77throw new ArgumentException(SR.Format(SR.ConditionValueOfMarkupExtensionNotSupported, 83throw new ArgumentException(SR.ConditionValueOfExpressionNotSupported);
System\Windows\Documents\DocumentSequence.cs (1)
324throw new ArgumentException(SR.IDPInvalidContentPosition);
System\Windows\Documents\DocumentSequenceTextContainer.cs (2)
346throw new ArgumentException(SR.Format(SR.NotInAssociatedContainer, "position")); 352throw new ArgumentException(SR.Format(SR.BadFixedTextPosition, "position"));
System\Windows\Documents\DocumentSequenceTextPointer.cs (4)
658throw new ArgumentException(SR.Format(SR.NegativeValue, "startIndex")); 662throw new ArgumentException(SR.Format(SR.StartIndexExceedsBufferSize, startIndex, textBuffer.Length)); 666throw new ArgumentException(SR.Format(SR.NegativeValue, "count")); 670throw new ArgumentException(SR.Format(SR.MaxLengthExceedsBufferSize, count, textBuffer.Length, startIndex));
System\Windows\Documents\FixedDocument.cs (2)
403throw new ArgumentException(SR.IDPInvalidContentPosition); 443throw new ArgumentException(SR.FixedDocumentExpectsDependencyObject);
System\Windows\Documents\FixedTextContainer.cs (2)
313throw new ArgumentException(SR.Format(SR.NotInAssociatedContainer, "position")); 320throw new ArgumentException(SR.Format(SR.BadFixedTextPosition, "position"));
System\Windows\Documents\FixedTextPointer.cs (1)
128throw new ArgumentException(SR.Format(SR.NegativeValue, "count"));
System\Windows\Documents\FlowDocument.cs (2)
1629throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, _typeofThis.Name, value.GetType().Name)); 1635throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, value.GetType().Name));
System\Windows\Documents\Glyphs.cs (12)
300throw new ArgumentException(SR.GlyphsUnicodeStringAndIndicesCannotBothBeEmpty); 401throw new ArgumentException(SR.GlyphsClusterBadCharactersBeforeBracket); 405throw new ArgumentException(SR.GlyphsClusterNoNestedClusters); 409throw new ArgumentException(SR.GlyphsClusterNoMatchingBracket); 423throw new ArgumentException(SR.GlyphsClusterMisplacedSeparator); 460throw new ArgumentException(SR.GlyphsUnicodeStringIsTooShort); 560throw new ArgumentException(SR.GlyphsIndexRequiredIfNoUnicode); 563throw new ArgumentException(SR.GlyphsUnicodeStringIsTooShort); 592throw new ArgumentException(SR.GlyphsAdvanceWidthCannotBeNegative); 610throw new ArgumentException(SR.GlyphsTooManyCommas); 655throw new ArgumentException(SR.GlyphsIndexRequiredWithinCluster); 658throw new ArgumentException(SR.GlyphsUnicodeStringIsTooShort);
System\Windows\Documents\Serialization\SerializerDescriptor.cs (4)
66throw new ArgumentException(SR.SerializerProviderDisplayNameNull); 70throw new ArgumentException(SR.SerializerProviderManufacturerNameNull); 74throw new ArgumentException(SR.SerializerProviderManufacturerWebsiteNull); 78throw new ArgumentException(SR.SerializerProviderDefaultFileExtensionNull);
System\Windows\Documents\Span.cs (3)
92throw new ArgumentException(SR.Format(SR.InDifferentTextContainers, "start", "end")); 96throw new ArgumentException(SR.Format(SR.BadTextPositionOrder, "start", "end")); 109throw new ArgumentException(SR.Format(SR.InDifferentParagraphs, "start", "end"));
System\Windows\Documents\TextElement.cs (6)
100throw new ArgumentException(SR.TextElement_UnmatchedEndPointer); 123throw new ArgumentException(SR.Format(SR.InDifferentScope, "start", "end")); 808throw new ArgumentException(SR.Format(SR.TextSchema_ThisInlineUIContainerHasAChildUIElementAlready, this.GetType().Name, ((InlineUIContainer)this).Child.GetType().Name, value.GetType().Name)); 820throw new ArgumentException(SR.Format(SR.TextSchema_ThisBlockUIContainerHasAChildUIElementAlready, this.GetType().Name, ((BlockUIContainer)this).Child.GetType().Name, value.GetType().Name)); 836throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name)); 843throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name));
System\Windows\Documents\TextElementCollection.cs (6)
253throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 292throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 463throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name)); 602throw new ArgumentException("array"); 609throw new ArgumentException("arrayIndex"); 614throw new ArgumentException(SR.Format(SR.TextElementCollection_CannotCopyToArrayNotSufficientMemory, count, arrayIndex, array.Length));
System\Windows\Documents\TextPointer.cs (6)
289throw new ArgumentException(SR.BadDistance); 1752throw new ArgumentException(SR.Format(SR.NegativeValue, "startIndex")); 1756throw new ArgumentException(SR.Format(SR.StartIndexExceedsBufferSize, startIndex, textBuffer.Length)); 1760throw new ArgumentException(SR.Format(SR.NegativeValue, "count")); 1764throw new ArgumentException(SR.Format(SR.MaxLengthExceedsBufferSize, count, textBuffer.Length, startIndex)); 3905throw new ArgumentException(SR.BadDistance);
System\Windows\Documents\TextRange.cs (2)
784throw new ArgumentException(SR.Format(SR.TextEditorPropertyIsNotApplicableForTextFormatting, formattingProperty.Name)); 852throw new ArgumentException(SR.Format(SR.TextEditorPropertyIsNotApplicableForTextFormatting, formattingProperty.Name));
System\Windows\Documents\TextStore.cs (1)
3332throw new ArgumentException(SR.Format(SR.TextStore_BadIMECharOffset, offset, this.TextContainer.IMECharCount));
System\Windows\Documents\ValidationHelper.cs (5)
44throw new ArgumentException(SR.Format(SR.NotInAssociatedTree, paramName)); 59throw new ArgumentException(SR.Format(SR.InDifferentTextContainers, "startPosition", "endPosition")); 63throw new ArgumentException(SR.Format(SR.BadTextPositionOrder, "startPosition", "endPosition")); 107throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, position.Parent.GetType().Name, child.GetType().Name)); 115throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, child.GetType().Name));
System\Windows\Documents\WinRTSpellerInterop.cs (1)
430throw new ArgumentException(SR.Format(SR.CustomDictionaryFailedToLoadDictionaryUri, lexiconFilePath));
System\Windows\Documents\WpfPayload.cs (1)
489throw new ArgumentException(SR.WpfPayload_InvalidImageSource);
System\Windows\EventSetter.cs (3)
95throw new ArgumentException(SR.Format(SR.NullPropertyIllegal, "EventSetter.Event")); 99throw new ArgumentException(SR.Format(SR.NullPropertyIllegal, "EventSetter.Handler")); 103throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\EventTrigger.cs (1)
57throw new ArgumentException(SR.Format(SR.EventTriggerBadAction, value.GetType().Name));
System\Windows\FigureLength.cs (3)
103throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoNaN, "value")); 107throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoInfinity, "value")); 119throw new ArgumentException(SR.Format(SR.InvalidCtorParameterUnknownFigureUnitType, "type"));
System\Windows\FrameworkElement.cs (1)
477throw new ArgumentException( SR.Format(SR.TargetNameNotFound, targetName));
System\Windows\FrameworkElementFactory.cs (7)
87throw new ArgumentException(SR.Format(SR.MustBeFrameworkOr3DDerived, value.Name)); 144throw new ArgumentException(SR.NameNotEmptyString); 167throw new ArgumentException(SR.FrameworkElementFactoryAlreadyParented); 209throw new ArgumentException(SR.Format(SR.InvalidPropertyValue, value, dp.Name)); 222throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, dp.Name, GetType().Name)); 310throw new ArgumentException(SR.HandlerTypeIllegal); 346throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\FrameworkTemplate.cs (2)
374throw new ArgumentException(SR.Format(SR.VisualTreeRootIsFrameworkElement, nameof(FrameworkElement), templateRoot.Type.Name)); 835throw new ArgumentException(SR.Format(SR.InvalidPropertyValue, value, dependencyProperty.Name));
System\Windows\GridLength.cs (3)
92throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoNaN, "value")); 96throw new ArgumentException(SR.Format(SR.InvalidCtorParameterNoInfinity, "value")); 102throw new ArgumentException(SR.Format(SR.InvalidCtorParameterUnknownGridUnitType, "type"));
System\Windows\Markup\Baml2006\Baml2006Reader.cs (3)
1436throw new ArgumentException(SR.Format(SR.IntegerCollectionLengthLessThanZero, Array.Empty<object>())); 2084throw new ArgumentException(SR.Format(SR.MissingTagInNamespace, "=", uriInput)); 2089throw new ArgumentException(SR.Format(SR.AssemblyTagMissing, "assembly", uriInput));
System\Windows\Markup\Baml2006\SharedStream.cs (1)
47throw new ArgumentException("can\u2019t seek on baseStream");
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (3)
83throw new ArgumentException(SR.AssemblyIdNegative); 122throw new ArgumentException(SR.KnownTypeIdNegative); 151throw new ArgumentException(SR.KnownTypeIdNegative);
System\Windows\Markup\BamlWriter.cs (2)
31throw new ArgumentException(SR.BamlWriterBadStream); 1068throw new ArgumentException(SR.Format(SR.BamlWriterBadAssembly,
System\Windows\Markup\Localizer\BamlLocalizationDictionary.cs (1)
305throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, "arrayIndex", "array"));
System\Windows\Markup\RoutedEventConverter.cs (1)
165throw new ArgumentException(SR.Format(SR.ParserPrefixNSProperty, nsPrefix, nameString));
System\Windows\Markup\XamlInt32CollectionSerializer.cs (2)
275throw new ArgumentException(SR.IntegerCollectionLengthLessThanZero); 324throw new ArgumentException(SR.UnknownIndexType);
System\Windows\Markup\XamlSerializerUtil.cs (1)
39throw new ArgumentException(SR.Format(SR.NonWhiteSpaceInAddText, s));
System\Windows\Markup\XamlStream.cs (2)
155throw new ArgumentException(SR.ParserWriterUnknownOrigin); 299throw new ArgumentException(SR.ParserWriterUnknownOrigin);
System\Windows\Markup\XmlnsCache.cs (2)
352throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, "XmlnsDefinitionAttribute")); 387throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, "XmlnsCompatibleWithAttribute"));
System\Windows\Markup\XmlnsDictionary.cs (3)
142throw new ArgumentException(SR.ParserKeysAreStrings); 470throw new ArgumentException(SR.ParserKeysAreStrings); 478throw new ArgumentException(SR.ParserKeysAreStrings);
System\Windows\Media\Animation\BeginStoryboard.cs (2)
80throw new ArgumentException(SR.Storyboard_UnrecognizedHandoffBehavior); 105throw new ArgumentException(SR.Format(SR.InvalidPropertyValue, value, "Name"));
System\Windows\Media\Animation\SeekStoryboard.cs (1)
81throw new ArgumentException(SR.Storyboard_UnrecognizedTimeSeekOrigin);
System\Windows\Media\Animation\Storyboard.cs (1)
1215throw new ArgumentException(SR.Storyboard_UnrecognizedHandoffBehavior);
System\Windows\MessageBox.cs (1)
397throw new ArgumentException(SR.CantShowMBServiceWithOwner);
System\Windows\Navigation\NavigationService.cs (1)
192throw new System.ArgumentException(SR.HyperLinkTargetNotFound);
System\Windows\PropertyPath.cs (1)
845throw new ArgumentException(SR.Format(SR.ParserPrefixNSProperty, nsPrefix, name));
System\Windows\PropertyPathConverter.cs (2)
102throw new ArgumentException(SR.Format(SR.CannotConvertType, source.GetType().FullName, typeof(PropertyPath))); 133throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(PropertyPath), destinationType.FullName));
System\Windows\ResourceDictionary.cs (2)
136throw new ArgumentException(SR.Format(SR.ResourceDictionaryLoadFromFailure, value == null ? "''" : value.ToString())); 1292throw new ArgumentException(SR.KeyCollectionHasInvalidKey);
System\Windows\ResourceReferenceExpressionConverter.cs (1)
116throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "ResourceReferenceExpression"));
System\Windows\Setter.cs (8)
49throw new ArgumentException(SR.SetterValueCannotBeUnset); 68throw new ArgumentException(SR.Format(SR.ReadOnlyPropertyNotAllowed, property.Name, GetType().Name)); 90throw new ArgumentException(SR.Format(SR.NullPropertyIllegal, "Setter.Property")); 98throw new ArgumentException(SR.StylePropertyInStyleNotAllowed); 112throw new ArgumentException(SR.Format(SR.SetterValueOfMarkupExtensionNotSupported, 119throw new ArgumentException(SR.Format(SR.InvalidSetterValue, value, dp.OwnerType, dp.Name)); 172throw new ArgumentException(SR.SetterValueCannotBeUnset); 180throw new ArgumentException(SR.StyleValueOfExpressionNotSupported);
System\Windows\Shell\JumpList.cs (1)
62throw new ArgumentException(SR.JumpItemsRejectedEventArgs_CountMismatch);
System\Windows\Style.cs (2)
167throw new ArgumentException(SR.Format(SR.MustBeFrameworkDerived, value.Name)); 205throw new ArgumentException(SR.StyleCannotBeBasedOnSelf);
System\Windows\StyleHelper.cs (1)
5316throw new ArgumentException(SR.Format(SR.NameScopeDuplicateNamesNotAllowed, childName));
System\Windows\SystemKeyConverter.cs (1)
132throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "SystemResourceKey or SystemThemeKey"));
System\Windows\TemplateBindingExpressionConverter.cs (1)
45throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "TemplateBindingExpression"));
System\Windows\ThicknessConverter.cs (1)
134throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(Thickness), destinationType.FullName));
System\Windows\Trigger.cs (2)
79throw new ArgumentException(SR.Format(SR.ConditionValueOfMarkupExtensionNotSupported, 85throw new ArgumentException(SR.ConditionValueOfExpressionNotSupported);
System\Windows\TriggerActionCollection.cs (1)
305throw new ArgumentException(SR.MustBeTriggerAction);
System\Windows\TriggerBase.cs (2)
177throw new ArgumentException(SR.StylePropertyInStyleNotAllowed); 191throw new ArgumentException(SR.ChildNameMustBeNonEmpty);
System\Windows\Window.cs (6)
586throw new ArgumentException(string.Format("ThemeMode value {0} is invalid. Use None, System, Light or Dark", value)); 1234throw new ArgumentException(SR.CannotSetOwnerToItself); 1268throw new ArgumentException(SR.Format(SR.CircularOwnerChild, value, this)); 5686throw new ArgumentException(SR.Format(SR.ValueNotBetweenInt32MinMax, l)); 5697throw new ArgumentException(SR.Format(SR.InvalidValueForTopLeft, length)); 5703throw new ArgumentException(SR.Format(SR.ValueNotBetweenInt32MinMax, length));
PresentationFramework.Fluent.Tests (1)
ResourceTests\FluentResourceDictionaryTests.cs (1)
74throw new ArgumentException($"The source : {source} can not be loaded.");
PresentationUI (1)
MS\Internal\Documents\DigitalSignatureProvider.cs (1)
39throw new ArgumentException(SR.DigitalSignatureNoFixedDocumentSequence);
ReachFramework (14)
Packaging\XpsFixedPageReaderWriter.cs (2)
1225throw new ArgumentException(SR.ReachPackaging_InvalidType); 1245throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, mimeType.ToString()));
Packaging\XpsManager.cs (2)
350throw new ArgumentException(SR.ReachPackaging_InvalidType); 1475throw new ArgumentException(SR.ReachPackaging_PartFromDifferentContainer);
Serialization\FontTypeConverter.cs (1)
157throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "GlyphRun"));
Serialization\ImageSourceTypeConverter.cs (1)
162throw new ArgumentException(SR.Format(SR.MustBeOfType, "value", "BitmapSource"));
Serialization\Manager\NGCSerializer.cs (3)
87throw new ArgumentException(SR.ReachSerialization_ExpectedFixedDocument); 156throw new ArgumentException(SR.ReachSerialization_ExpectedFixedPage); 470throw new ArgumentException(SR.ReachSerialization_ExpectedFixedDocumentSequence);
Serialization\Manager\ReachVisualSerializer.cs (2)
43throw new ArgumentException(SR.Format(SR.MustBeOfType, "serializedObject", typeof(Visual))); 179throw new ArgumentException(SR.Format(SR.MustBeOfType, "serializedObject", typeof(Visual)));
Serialization\Manager\ReachVisualSerializerAsync.cs (2)
76throw new ArgumentException(SR.Format(SR.MustBeOfType, "serializedObject", typeof(Visual))); 229throw new ArgumentException(SR.Format(SR.MustBeOfType, "serializedObject", typeof(Visual)));
Serialization\Manager\XpsOMPackagingPolicy.cs (1)
572throw new ArgumentException(SR.Format(SR.ReachPackaging_InvalidContentType, contentType.ToString()));
Replay (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
132throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
ResultsOfTGenerator (1)
Program.cs (1)
24throw new ArgumentException("Invalid number of args specified. Must specify both class file path and test file path if args are passed.");
Roslyn.Diagnostics.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
Roslyn.Test.PdbUtilities (5)
Reader\Token2SourceLineExporter.cs (5)
360throw new ArgumentException("Arg_HTCapacityOverflow"); 370throw new ArgumentException("Arg_HTCapacityOverflow"); 449throw new ArgumentException("Argument_KeyLessThanZero"); 529throw new ArgumentException("Argument_KeyLessThanZero"); 589throw new ArgumentException("Argument_AddingDuplicate__" + _buckets[bucketNumber].key);
RunTests (1)
AssemblyScheduler.cs (1)
254throw new ArgumentException($"{testListPath} does not exist");
System.Collections (27)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (1)
40throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System\Collections\BitArray.cs (6)
330throw new ArgumentException(SR.Arg_ArrayLengthsDiffer); 403throw new ArgumentException(SR.Arg_ArrayLengthsDiffer); 476throw new ArgumentException(SR.Arg_ArrayLengthsDiffer); 761throw new ArgumentException(SR.Argument_InvalidOffLen); 779throw new ArgumentException(SR.Argument_InvalidOffLen); 826throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Collections\Generic\LinkedList.cs (2)
207throw new ArgumentException(SR.Arg_InsufficientSpace); 465throw new ArgumentException(SR.Arg_InsufficientSpace);
System\Collections\Generic\OrderedDictionary.cs (4)
1215throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1302throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1545throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1854throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System\Collections\Generic\PriorityQueue.cs (1)
975throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Collections\Generic\SortedDictionary.cs (5)
544throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 568throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 705throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 729throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 898throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, item));
System\Collections\Generic\SortedList.cs (3)
167throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, keys[i])); 442throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 473throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System\Collections\Generic\SortedSet.cs (2)
523throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 558throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System\Collections\Generic\Stack.cs (2)
108throw new ArgumentException(SR.Argument_InvalidOffLen); 141throw new ArgumentException(SR.Argument_InvalidOffLen);
System.Collections.Concurrent (10)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
System\Collections\Concurrent\BlockingCollection.cs (1)
184throw new ArgumentException(SR.BlockingCollection_ctor_CountMoreThanCapacity);
System\Collections\Concurrent\ConcurrentDictionary.cs (6)
345throw new ArgumentException(SR.ConcurrentDictionary_SourceContainsDuplicateKeys); 765throw new ArgumentException(SR.ConcurrentDictionary_ArrayNotLargeEnough); 1574throw new ArgumentException(SR.ConcurrentDictionary_KeyAlreadyExisted); 1710throw new ArgumentException(SR.ConcurrentDictionary_TypeOfKeyIncorrect); 1843throw new ArgumentException(SR.ConcurrentDictionary_TypeOfKeyIncorrect); 1903throw new ArgumentException(SR.ConcurrentDictionary_ArrayNotLargeEnough);
System\Collections\Concurrent\ConcurrentStack.cs (1)
402throw new ArgumentException(SR.ConcurrentStack_PushPopRange_InvalidCount);
System\ThrowHelper.cs (1)
20internal static void ThrowValueNullException() => throw new ArgumentException(SR.ConcurrentDictionary_TypeOfValueIncorrect);
System.Collections.Immutable (8)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
System\Collections\Immutable\ImmutableDictionary_2.HashBucket.cs (4)
162throw new ArgumentException(SR.Format(SR.DuplicateKey, key)); 168throw new ArgumentException(SR.Format(SR.DuplicateKey, key)); 194throw new ArgumentException(SR.Format(SR.DuplicateKey, key)); 200throw new ArgumentException(SR.Format(SR.DuplicateKey, key));
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (1)
865throw new ArgumentException(SR.Format(SR.DuplicateKey, item.Key));
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (1)
665throw new ArgumentException(SR.Format(SR.DuplicateKey, key));
System\Collections\Immutable\SortedInt32KeyNode.cs (1)
448throw new ArgumentException(SR.Format(SR.DuplicateKey, key));
System.Collections.NonGeneric (5)
System\Collections\CollectionBase.cs (1)
170if (index < 0) throw new ArgumentException(SR.Arg_RemoveArgNotFound);
System\Collections\Queue.cs (1)
138throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Collections\SortedList.cs (2)
179throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate_OldAndNewKeys, GetKey(i), key)); 342throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System\Collections\Stack.cs (1)
122throw new ArgumentException(SR.Argument_InvalidOffLen);
System.Collections.Specialized (6)
src\libraries\System.Private.CoreLib\src\System\Collections\CompatibleComparer.cs (1)
44throw new ArgumentException(SR.Argument_ImplementIComparable);
System\Collections\Specialized\ListDictionary.cs (2)
163throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, key)); 211throw new ArgumentException(SR.Arg_InsufficientSpace);
System\Collections\Specialized\NameObjectCollectionBase.cs (2)
384throw new ArgumentException(SR.Arg_InsufficientSpace); 608throw new ArgumentException(SR.Arg_InsufficientSpace);
System\Collections\Specialized\NameValueCollection.cs (1)
209throw new ArgumentException(SR.Arg_InsufficientSpace);
System.ComponentModel.Annotations (1)
System\ComponentModel\DataAnnotations\CompareAttribute.cs (1)
45throw new ArgumentException(SR.Format(SR.Common_PropertyNotFound, validationContext.ObjectType.FullName, OtherProperty));
System.ComponentModel.Composition (8)
System\ComponentModel\Composition\ConstraintServices.cs (7)
121throw new ArgumentException(nameof(parameter)); 126throw new ArgumentException(nameof(constantKey)); 140throw new ArgumentException(nameof(parameter)); 145throw new ArgumentException(nameof(constantKey)); 150throw new ArgumentException(nameof(constantType)); 168throw new ArgumentException(nameof(parameter)); 173throw new ArgumentException(nameof(constantValue));
System\ComponentModel\Composition\ExceptionBuilder.cs (1)
55throw new ArgumentException(SR.ArgumentException_EmptyString);
System.ComponentModel.Primitives (2)
System\ComponentModel\InvalidAsynchronousStateException.cs (1)
30public InvalidAsynchronousStateException(string? message) : base(message)
System\ComponentModel\InvalidEnumArgumentException.cs (1)
29public InvalidEnumArgumentException(string? message) : base(message)
System.ComponentModel.TypeConverter (59)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (1)
67_ => throw new ArgumentException(SR.Format(SR.InvalidColor, text)),
System\ComponentModel\AmbientValueAttribute.cs (1)
149throw new ArgumentException(SR.RuntimeInstanceNotAllowed);
System\ComponentModel\Container.cs (1)
237throw new ArgumentException(SR.Format(SR.DuplicateComponentName, name));
System\ComponentModel\Design\PropertyTabAttribute.cs (4)
198throw new ArgumentException(SR.PropertyTabAttributeArrayLengthMismatch); 206throw new ArgumentException(SR.PropertyTabAttributeArrayLengthMismatch); 213throw new ArgumentException(SR.PropertyTabAttributeParamsBothNull); 222throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope);
System\ComponentModel\Design\Serialization\InstanceDescriptor.cs (8)
46throw new ArgumentException(SR.InstanceDescriptorMustBeStatic); 50throw new ArgumentException(SR.InstanceDescriptorLengthMismatch); 57throw new ArgumentException(SR.InstanceDescriptorCannotBeStatic); 61throw new ArgumentException(SR.InstanceDescriptorLengthMismatch); 68throw new ArgumentException(SR.InstanceDescriptorMustBeStatic); 72throw new ArgumentException(SR.InstanceDescriptorLengthMismatch); 79throw new ArgumentException(SR.InstanceDescriptorMustBeReadable); 84throw new ArgumentException(SR.InstanceDescriptorMustBeStatic);
System\ComponentModel\Design\Serialization\MemberRelationshipService.cs (1)
125throw new ArgumentException(SR.Format(SR.MemberRelationshipService_RelationshipNotSupported, sourceName, source.Member.Name, relName, relationship.Member.Name));
System\ComponentModel\Design\ServiceContainer.cs (1)
85throw new ArgumentException(SR.Format(SR.ErrorInvalidServiceInstance, serviceType.FullName));
System\ComponentModel\EnumConverter.cs (2)
28throw new ArgumentException(SR.EnumInvalidValue); 133throw new ArgumentException(SR.Format(SR.EnumConverterInvalidValue, value, EnumType.Name));
System\ComponentModel\LicenseManager.cs (1)
249throw new ArgumentException(SR.LicMgrDifferentUser);
System\ComponentModel\MaskedTextProvider.cs (3)
227throw new ArgumentException(SR.MaskedTextProviderMaskInvalidChar); 674throw new ArgumentException(SR.MaskedTextProviderInvalidCharError); 705throw new ArgumentException(SR.MaskedTextProviderInvalidCharError);
System\ComponentModel\PropertyDescriptorCollection.cs (4)
420throw new ArgumentException(nameof(value)); 460throw new ArgumentException(nameof(value)); 487throw new ArgumentException(nameof(key)); 581throw new ArgumentException(nameof(value));
System\ComponentModel\ReflectEventDescriptor.cs (5)
83throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 87throw new ArgumentException(SR.Format(SR.ErrorInvalidEventType, name)); 101_componentClass = componentClass ?? throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 195throw new ArgumentException(SR.Format(SR.ErrorInvalidEventHandler, Name)); 369throw new ArgumentException(SR.Format(SR.ErrorMissingEventAccessors, Name));
System\ComponentModel\ReflectPropertyDescriptor.cs (4)
95throw new ArgumentException(SR.Format(SR.ErrorInvalidPropertyType, name)); 100throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 171throw new ArgumentException(SR.Format(SR.InvalidNullArgument, nameof(componentClass))); 351throw new ArgumentException(SR.Format(SR.ErrorMissingPropertyAccessors, Name));
System\ComponentModel\TypeDescriptor.cs (12)
412throw new ArgumentException(SR.TypeDescriptorSameAssociation); 437throw new ArgumentException(SR.TypeDescriptorAlreadyAssociated); 491throw new ArgumentException(SR.TypeDescriptorArgsCountMismatch); 1003throw new ArgumentException(nameof(component)); 1036throw new ArgumentException(nameof(component)); 1046throw new ArgumentException(nameof(component)); 2095throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(Attribute).FullName)); 2108throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(PropertyDescriptor).FullName)); 2121throw new ArgumentException(SR.Format(SR.TypeDescriptorExpectedElementType, typeof(EventDescriptor).FullName)); 3258throw new ArgumentException(SR.TypeDescriptorArgsCountMismatch); 3361throw new ArgumentException(nameof(instance)); 3377throw new ArgumentException(nameof(instance));
System\Drawing\PointConverter.cs (2)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"x{sep} y")); 97throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Drawing\RectangleConverter.cs (2)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"x{sep} y{sep} width{sep} height")); 107throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Drawing\SizeConverter.cs (2)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"Width{sep} Height")); 97throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Drawing\SizeFConverter.cs (2)
43throw new ArgumentException(SR.Format(SR.TextParseFailedFormat, text.ToString(), $"Width{sep} Height")); 95throw new ArgumentException(SR.PropertyValueInvalidEntry);
System\Timers\Timer.cs (3)
53throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(interval), interval)); 59throw new ArgumentException(SR.Format(SR.InvalidParameter, nameof(interval), interval)); 171throw new ArgumentException(SR.Format(SR.TimerInvalidInterval, value, 0));
System.Composition.Convention (1)
System\Composition\Convention\PartConventionBuilder.cs (1)
345throw new ArgumentException(SR.ArgumentException_EmptyString);
System.Configuration.ConfigurationManager (31)
System\Configuration\CallbackValidatorAttribute.cs (1)
39throw new ArgumentException(SR.Format(SR.Validator_method_not_found, _callbackMethodName));
System\Configuration\ClientSettingsStore.cs (1)
265_ => throw new ArgumentException(SR.UnknownUserLevel),
System\Configuration\ConfigurationConverterBase.cs (1)
23throw new ArgumentException(SR.Format(SR.Converter_unsupported_value_type, expected.Name));
System\Configuration\ConfigurationElementCollection.cs (7)
48throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultAddItemName, value)); 58throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultRemoveItemName, value)); 69throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultClearItemsName, value)); 625throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, ElementName)); 1061throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, 1138throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, elementName)); 1150throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, elementName));
System\Configuration\ConfigurationManager.cs (1)
211throw new ArgumentException(SR.Config_configmanager_open_noexe);
System\Configuration\ConfigurationProperty.cs (1)
269throw new ArgumentException(SR.Format(SR.Property_name_reserved, name));
System\Configuration\ConfigurationValidatorAttribute.cs (1)
21throw new ArgumentException(SR.Format(SR.Validator_Attribute_param_not_validator,
System\Configuration\GenericEnumConverter.cs (1)
52return new ArgumentException(SR.Format(SR.Invalid_enum_value, names));
System\Configuration\Internal\InternalConfigHost.cs (1)
207throw new ArgumentException(SR.Format(SR.Config_source_not_under_config_dir, configSource));
System\Configuration\MgmtConfigurationRecord.cs (3)
673throw new ArgumentException(SR.Config_add_configurationsection_already_exists); 834throw new ArgumentException(SR.Config_add_configurationsectiongroup_already_exists); 973throw new ArgumentException(SR.Format(SR.Filename_in_SaveAs_is_used_already, filename));
System\Configuration\PositiveTimeSpanValidator.cs (1)
18throw new ArgumentException(SR.Validator_timespan_value_must_be_positive);
System\Configuration\Provider\ProviderCollection.cs (1)
45throw new ArgumentException(SR.Config_provider_name_null_or_empty);
System\Configuration\RegexStringValidator.cs (1)
32throw new ArgumentException(SR.Format(SR.Regex_validator_error, _expression));
System\Configuration\SettingsPropertyValue.cs (2)
145throw new ArgumentException(SR.Format(SR.Could_not_create_from_default_value, Property.Name, e.Message)); 150throw new ArgumentException(SR.Format(SR.Could_not_create_from_default_value_2, Property.Name));
System\Configuration\StringValidator.cs (3)
40throw new ArgumentException(SR.Format(SR.Validator_string_min_length, _minLength)); 42throw new ArgumentException(SR.Format(SR.Validator_string_max_length, _maxLength)); 52throw new ArgumentException(SR.Format(SR.Validator_string_invalid_chars, _invalidChars));
System\Configuration\SubclassTypeValidator.cs (1)
33throw new ArgumentException(SR.Format(SR.Subclass_validator_error, ((Type)value).FullName,
System\Configuration\TimeSpanSecondsConverter.cs (1)
29throw new ArgumentException(SR.Converter_timespan_not_in_second);
System\Configuration\TypeNameConverter.cs (1)
27if (result == null) throw new ArgumentException(SR.Format(SR.Type_cannot_be_resolved, (string)data));
System\Configuration\ValidatorUtils.cs (2)
61throw new ArgumentException(SR.Format(CultureInfo.InvariantCulture, 72throw new ArgumentException(SR.Format(SR.Validator_scalar_resolution_violation, resolutionAsString));
System.Console (3)
System\ConsolePal.Unix.cs (1)
753throw new ArgumentException(SR.Arg_InvalidConsoleColor);
System\IO\SyncTextReader.cs (2)
125throw new ArgumentException(SR.Argument_InvalidOffLen); 137throw new ArgumentException(SR.Argument_InvalidOffLen);
System.Data.Common (10)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
46ArgumentException e = new ArgumentException(error); 205ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartName, property, value)); 212ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameQuoteUsage, property, value)); 219ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameToManyParts, property, value, limit));
System\Data\DataException.cs (1)
338internal static Exception _Argument(string error) => TraceExceptionAsReturnValue(new ArgumentException(error));
System\Data\DataSetUtil.cs (1)
20return new ArgumentException(message);
System\Data\SQLTypes\SQLGuid.cs (1)
34throw new ArgumentException(SQLResource.InvalidArraySizeMessage);
System\Xml\XmlDataDocument.cs (3)
105throw new ArgumentException(SR.DataDom_MultipleDataSet); 2624throw new ArgumentException(SR.DataDom_DataSetNull); 2627throw new ArgumentException(SR.DataDom_MultipleDataSet);
System.Data.Odbc (4)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
46ArgumentException e = new ArgumentException(error); 205ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartName, property, value)); 212ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameQuoteUsage, property, value)); 219ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameToManyParts, property, value, limit));
System.Diagnostics.DiagnosticSource (5)
System\Diagnostics\Activity.cs (3)
462NotifyError(new ArgumentException(SR.OperationNameInvalid)); 693NotifyError(new ArgumentException(SR.ParentIdInvalid)); 1037throw new ArgumentException(SR.ActivityIdFormatInvalid);
System\Diagnostics\ActivityContext.cs (1)
103throw new ArgumentException(SR.InvalidTraceParent);
System\Diagnostics\Metrics\TagList.netcore.cs (1)
145throw new ArgumentException(SR.Arg_BufferTooSmall);
System.Diagnostics.Process (1)
System\Diagnostics\Process.cs (1)
1039throw new ArgumentException(SR.Format(SR.MissingProcess, processId.ToString()));
System.Diagnostics.TraceSource (2)
System\Diagnostics\TraceSwitch.cs (1)
40throw new ArgumentException(SR.TraceSwitchInvalidLevel);
System\Diagnostics\TraceUtils.cs (1)
24throw new ArgumentException(SR.Format(SR.AttributeNotSupported, key, parent.GetType().FullName));
System.Drawing.Primitives (2)
src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (1)
67_ => throw new ArgumentException(SR.Format(SR.InvalidColor, text)),
System\Drawing\Color.cs (1)
435throw new ArgumentException(SR.Format(SR.InvalidEx2BoundArgument, n, v, byte.MinValue, byte.MaxValue));
System.Formats.Cbor (1)
System\Formats\Cbor\Writer\CborWriter.cs (1)
171throw new ArgumentException(SR.Cbor_Writer_PayloadIsNotValidCbor);
System.Formats.Tar (5)
System\Formats\Tar\TarHeader.cs (2)
128throw new ArgumentException(SR.Format(SR.TarExtAttrDisallowedKeyChar, kvp.Key, kvp.Key[index] == '\n' ? "\\n" : kvp.Key[index])); 132throw new ArgumentException(SR.Format(SR.TarExtAttrDisallowedValueChar, kvp.Key, "\\n"));
System\Formats\Tar\TarHeader.Write.cs (2)
1131throw new ArgumentException(SR.Format(SR.TarFieldTooLargeForEntryFormat, _format)); 1156throw new ArgumentException(SR.Format(SR.TarFieldTooLargeForEntryFormat, _format));
System\Formats\Tar\TarWriter.cs (1)
68throw new ArgumentException(SR.IO_NotSupported_UnwritableStream);
System.IO.Compression (4)
System\IO\Compression\ZipArchive.cs (3)
894throw new ArgumentException(SR.CreateModeCapabilities); 898throw new ArgumentException(SR.ReadModeCapabilities); 906throw new ArgumentException(SR.UpdateModeCapabilities);
System\IO\Compression\ZipArchiveEntry.cs (1)
152throw new ArgumentException(SR.EntryNamesTooLong);
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.cs (1)
116throw new ArgumentException(SR.Format(SR.InvalidEnumArgument, nameof(value), (int)value, nameof(NotifyFilters)));
System.IO.IsolatedStorage (4)
System\IO\IsolatedStorage\IsolatedStorage.cs (1)
182throw new ArgumentException(SR.IsolatedStorage_Scope_Invalid);
System\IO\IsolatedStorage\IsolatedStorageFile.cs (1)
675throw new ArgumentException(SR.IsolatedStorage_Scope_U_R_M);
System\IO\IsolatedStorage\IsolatedStorageFileStream.cs (2)
89throw new ArgumentException( 113throw new ArgumentException(SR.IsolatedStorage_FileOpenMode);
System.IO.MemoryMappedFiles (6)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (5)
145throw new ArgumentException(SR.Argument_EmptyFile); 218throw new ArgumentException(SR.Argument_EmptyFile); 247throw new ArgumentException(SR.Argument_EmptyFile); 290throw new ArgumentException(SR.Argument_MapNameEmptyString); 519throw new ArgumentException(SR.Argument_MapNameEmptyString);
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (1)
22throw new ArgumentException(SR.Argument_ReadAccessWithLargeCapacity);
System.IO.Packaging (34)
System\IO\Packaging\ContentType.cs (12)
84throw new ArgumentException(SR.ContentTypeCannotHaveLeadingTrailingLWS); 270throw new ArgumentException(SR.InvalidLinearWhiteSpaceCharacter); 290throw new ArgumentException(SR.InvalidTypeSubType); 310throw new ArgumentException(SR.ExpectingSemicolon); 316throw new ArgumentException(SR.ExpectingParameterValuePairs); 328throw new ArgumentException(SR.InvalidParameterValuePair); 387throw new ArgumentException(SR.InvalidParameterValue); 413throw new ArgumentException(SR.InvalidToken_ContentType); 419throw new ArgumentException(SR.InvalidToken_ContentType); 436throw new ArgumentException(SR.InvalidParameterValue); 466throw new ArgumentException(SR.InvalidParameterValue); 469throw new ArgumentException(SR.InvalidParameterValue);
System\IO\Packaging\InterleavedZipPackagePartStream.cs (1)
217throw new ArgumentException(SR.SeekNegative);
System\IO\Packaging\InterleavedZipPackagePartStream.PieceDirectory.cs (1)
334throw new ArgumentException(SR.PieceDoesNotExist);
System\IO\Packaging\InternalRelationshipCollection.cs (1)
146throw new ArgumentException(SR.InvalidRelationshipType);
System\IO\Packaging\Package.cs (3)
863throw new ArgumentException(SR.UnsupportedCombinationOfModeAccess); 865throw new ArgumentException(SR.UnsupportedCombinationOfModeAccess); 867throw new ArgumentException(SR.UnsupportedCombinationOfModeAccess);
System\IO\Packaging\PackagePart.cs (2)
317throw new ArgumentException(SR.CreateNewNotSupported); 319throw new ArgumentException(SR.TruncateNotSupported);
System\IO\Packaging\PackUriHelper.cs (12)
52throw new ArgumentException(SR.PartUriIsEmpty); 201throw new ArgumentException(SR.RelationshipPartUriNotExpected); 250throw new ArgumentException(SR.RelationshipPartUriExpected); 385return new ArgumentException(SR.PartUriIsEmpty); 388return new ArgumentException(SR.PartUriShouldStartWithForwardSlash); 420return new ArgumentException(SR.InvalidPartUri); 427return new ArgumentException(SR.UnexpectedPartPieceUri); 445return new ArgumentException(SR.URIShouldNotBeAbsolute); 460return new ArgumentException(SR.PartUriCannotHaveAFragment); 477return new ArgumentException(SR.PartUriShouldNotEndWithForwardSlash); 500return new ArgumentException(SR.PartUriShouldNotStartWithTwoForwardSlashes); 805throw new ArgumentException(SR.NotAValidRelationshipPartUri);
System\IO\Packaging\PackUriHelper.PackUriScheme.cs (2)
81throw new ArgumentException(SR.Format(SR.FragmentMustStartWithHash, nameof(fragment))); 316throw new ArgumentException(SR.InnerPackageUriHasFragment);
System.IO.Pipes (1)
System\IO\Pipes\NamedPipeClientStream.cs (1)
64throw new ArgumentException(SR.Argument_EmptyServerName);
System.IO.Ports (8)
System\IO\Ports\InternalResources.cs (3)
34throw new ArgumentException(SR.Arg_WrongAsyncResult); 40throw new ArgumentException(SR.InvalidOperation_EndReadCalledMultiple); 46throw new ArgumentException(SR.InvalidOperation_EndWriteCalledMultiple);
System\IO\Ports\SerialPort.cs (4)
669throw new ArgumentException(SR.Argument_InvalidOffLen); 810throw new ArgumentException(SR.Argument_InvalidOffLen); 1201throw new ArgumentException(SR.Argument_InvalidOffLen); 1221throw new ArgumentException(SR.Argument_InvalidOffLen);
System\IO\Ports\SerialStream.cs (1)
100throw new ArgumentException(SR.Argument_InvalidOffLen);
System.Linq.Expressions (35)
System\Linq\Expressions\Error.cs (34)
19return new ArgumentException(Strings.ReducibleMustOverrideReduce); 26return new ArgumentException(Strings.ArgCntMustBeGreaterThanNameCnt); 75return new ArgumentException(Strings.MustReduceToDifferent); 117return new ArgumentException(Strings.ReducedNotCompatible); 152return new ArgumentException(Strings.FirstArgumentMustBeCallSite); 180return new ArgumentException(Strings.TypeMustBeDerivedFromSystemDelegate); 261return new ArgumentException(Strings.OnlyStaticMethodsHaveNullInstance); 296return new ArgumentException(Strings.MustBeReducible); 373return new ArgumentException(Strings.StartEndMustBeOrdered); 387return new ArgumentException(Strings.TryMustHaveCatchFinallyOrFault); 394return new ArgumentException(Strings.BodyOfCatchMustHaveSameTypeAsBodyOfTry); 471return new ArgumentException(Strings.ArgumentTypeCannotBeVoid); 570return new ArgumentException(Strings.ArgumentTypesMustMatch); 649return new ArgumentException(Strings.ExpressionTypeDoesNotMatchReturn(p0, p1)); 656return new ArgumentException(Strings.ExpressionTypeDoesNotMatchAssignment(p0, p1)); 663return new ArgumentException(Strings.ExpressionTypeDoesNotMatchLabel(p0, p1)); 677return new ArgumentException(Strings.FieldNotDefinedForType(p0, p1)); 684return new ArgumentException(Strings.InstanceFieldNotDefinedForType(p0, p1)); 691return new ArgumentException(Strings.FieldInfoNotDefinedForType(p0, p1, p2)); 698return new ArgumentException(Strings.IncorrectNumberOfIndexes); 705return new ArgumentException(Strings.IncorrectNumberOfLambdaDeclarationParameters); 713return new ArgumentException(Strings.IncorrectNumberOfMembersForGivenConstructor); 720return new ArgumentException(Strings.IncorrectNumberOfArgumentsForMembers); 820return new ArgumentException(Strings.ParameterExpressionNotValidAsDelegate(p0, p1)); 841return new ArgumentException(Strings.InstancePropertyWithoutParameterNotDefinedForType(p0, p1)); 855return new ArgumentException(Strings.InstanceAndMethodTypeMismatch(p0, p1, p2)); 914return new ArgumentException(Strings.UnhandledBinding); 921return new ArgumentException(Strings.UnhandledBindingType(p0)); 943return new ArgumentException(Strings.UserDefinedOpMustHaveConsistentTypes(p0, p1)); 950return new ArgumentException(Strings.UserDefinedOpMustHaveValidReturnType(p0, p1)); 957return new ArgumentException(Strings.LogicalOperatorMustHaveBooleanOperators(p0, p1)); 1172return new ArgumentException(Strings.TestValueTypeDoesNotMatchComparisonMethodParameter(p0, p1)); 1179return new ArgumentException(Strings.SwitchValueTypeDoesNotMatchComparisonMethodParameter(p0, p1)); 1277return new ArgumentException(Strings.IncorrectNumberOfConstructorArguments);
System\Runtime\CompilerServices\ReadOnlyCollectionBuilder.cs (1)
356throw new ArgumentException(nameof(array));
System.Linq.Parallel (2)
System\Linq\ParallelEnumerable.cs (2)
355throw new ArgumentException(SR.ParallelEnumerable_WithQueryExecutionMode_InvalidMode); 391throw new ArgumentException(SR.ParallelEnumerable_WithMergeOptions_InvalidOptions);
System.Linq.Queryable (2)
System\Linq\Error.cs (2)
9new ArgumentException(Strings.ArgumentNotIEnumerableGeneric(message)); 12new ArgumentException(Strings.ArgumentNotValid(message));
System.Memory (1)
src\libraries\Common\src\System\Buffers\ArrayBufferWriter.cs (1)
202throw new ArgumentException(nameof(sizeHint));
System.Net.Http (4)
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (1)
406throw new ArgumentException(SR.Format(CultureInfo.InvariantCulture,
System\Net\Http\Headers\HttpHeaderValueCollection.cs (2)
105throw new ArgumentException(SR.net_http_copyto_array_too_small); 119throw new ArgumentException(SR.net_http_copyto_array_too_small);
System\Net\Http\Headers\RangeItemHeaderValue.cs (1)
25throw new ArgumentException(SR.net_http_headers_invalid_range);
System.Net.Http.Json (1)
System\Net\Http\Json\JsonContent.cs (1)
169throw new ArgumentException(SR.Format(SR.SerializeWrongType, inputType, inputValue.GetType()));
System.Net.HttpListener (1)
System\Net\Managed\ListenerPrefix.cs (1)
110throw new ArgumentException(SR.net_listener_host);
System.Net.Mail (2)
System\Net\Mail\MailPriority.cs (2)
158throw new ArgumentException(SR.MailSubjectInvalidFormat); 313throw new ArgumentException(SR.net_io_invalidasyncresult);
System.Net.Security (1)
System\Net\Security\Pal.Managed\EndpointChannelBindingToken.cs (1)
56throw new ArgumentException(signatureAlgorithm.Value);
System.Net.Sockets (3)
System\Net\Sockets\SocketAsyncEventArgs.cs (3)
160throw new ArgumentException(SR.net_ambiguousbuffers); 388throw new ArgumentException(SR.net_ambiguousbuffers); 415throw new ArgumentException(SR.net_ambiguousbuffers);
System.Numerics.Tensors (26)
System\Numerics\Tensors\netcore\Tensor_1.cs (1)
372void ITensor.Fill(object value) => Fill(value is T t ? t : throw new ArgumentException($"Cannot convert {value} to {typeof(T)}"));
System\ThrowHelper.cs (25)
22throw new ArgumentException(SR.Argument_SpansMustHaveSameLength); 26throw new ArgumentException(SR.Argument_SpansMustBeNonEmpty); 50throw new ArgumentException(SR.Argument_DestinationSpansMustNotOverlap); 67throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType)); 96throw new ArgumentException(SR.ThrowArgument_IndicesLengthMustEqualRank); 100return new ArgumentException(message); 112throw new ArgumentException(SR.ThrowArgument_FilterTensorMustEqualTensorLength); 130throw new ArgumentException(SR.ThrowArgument_LengthsNotCompatible); 136throw new ArgumentException(SR.ThrowArgument_SplitNotSplitEvenly); 166throw new ArgumentException(SR.ThrowArgument_StackTooFewTensors); 172throw new ArgumentException(SR.ThrowArgument_OnlyOneWildcard); 178throw new ArgumentException(SR.ThrowArgument_InvalidReshapeDimensions); 184throw new ArgumentException(SR.ThrowArgument_AxisLargerThanRank); 190throw new ArgumentException(SR.ThrowArgument_InvalidSqueezeAxis); 196throw new ArgumentException(SR.ThrowArgument_ConcatenateTooFewTensors); 202throw new ArgumentException(SR.ThrowArgument_InvalidDimension); 208throw new ArgumentException(SR.ThrowArgument_InvalidConcatenateShape); 214throw new ArgumentException(SR.ThrowArgument_TransposeTooFewDimensions); 220throw new ArgumentException(SR.ThrowArgument_PermuteAxisOrder); 226throw new ArgumentException(SR.ThrowArgument_InPlaceInvalidShape); 232throw new ArgumentException(SR.ThrowArgument_InvalidStridesAndLengths); 250throw new ArgumentException(SR.Format(SR.Argument_IncompatibleDimensions, leftDim, rightDim)); 256throw new ArgumentException(SR.ThrowArgument_StackShapesNotSame); 262throw new ArgumentException(SR.Argument_CannotReshapeNonContiguousOrDense); 268throw new ArgumentException(SR.Argument_MinGreaterThanMax);
System.ObjectModel (1)
System\Collections\CollectionHelpers.cs (1)
29throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System.Private.CoreLib (395)
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
64throw new ArgumentException(SR.Format_StringZeroLength);
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
133throw new ArgumentException(SR.AggregateException_ctor_InnerExceptionNull);
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
202throw new ArgumentException(SR.Arg_MustBeTrue);
src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (1)
21: base(SR.ArgumentNull_Generic)
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (1)
25: base(SR.Arg_ArgumentOutOfRangeException)
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
151throw new ArgumentException(SR.Arg_MustBeBoolean);
src\libraries\System.Private.CoreLib\src\System\Buffer.cs (1)
51throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
63throw new ArgumentException(SR.Arg_MustBeByte);
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
145throw new ArgumentException(SR.Arg_MustBeChar);
src\libraries\System.Private.CoreLib\src\System\Collections\ArrayList.cs (26)
195throw new ArgumentException(SR.Argument_InvalidOffLen); 265throw new ArgumentException(SR.Argument_InvalidOffLen); 330throw new ArgumentException(SR.Argument_InvalidOffLen); 534throw new ArgumentException(SR.Argument_InvalidOffLen); 580throw new ArgumentException(SR.Argument_InvalidOffLen); 608throw new ArgumentException(SR.Argument_InvalidOffLen); 639throw new ArgumentException(SR.Argument_InvalidOffLen); 765throw new ArgumentException(SR.Argument_InvalidOffLen); 826throw new ArgumentException(SR.Argument_InvalidOffLen); 831throw new ArgumentException(SR.Argument_InvalidOffLen); 848throw new ArgumentException(SR.Argument_InvalidOffLen); 972throw new ArgumentException(SR.Argument_InvalidOffLen); 990throw new ArgumentException(SR.Argument_InvalidOffLen); 1028throw new ArgumentException(SR.Argument_InvalidOffLen); 1037throw new ArgumentException(SR.Argument_InvalidOffLen); 1813throw new ArgumentException(SR.Argument_InvalidOffLen); 2067throw new ArgumentException(SR.Argument_InvalidOffLen); 2219throw new ArgumentException(SR.Argument_InvalidOffLen); 2285throw new ArgumentException(SR.Argument_InvalidOffLen); 2300throw new ArgumentException(SR.Argument_InvalidOffLen); 2302throw new ArgumentException(SR.Argument_InvalidOffLen); 2333throw new ArgumentException(SR.Argument_InvalidOffLen); 2344throw new ArgumentException(SR.Argument_InvalidOffLen); 2457throw new ArgumentException(SR.Argument_InvalidOffLen); 2475throw new ArgumentException(SR.Argument_InvalidOffLen); 2498throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\Collections\Comparer.cs (1)
67throw new ArgumentException(SR.Argument_ImplementIComparable);
src\libraries\System.Private.CoreLib\src\System\Collections\CompatibleComparer.cs (1)
44throw new ArgumentException(SR.Argument_ImplementIComparable);
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
src\libraries\System.Private.CoreLib\src\System\Collections\Hashtable.cs (8)
170throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 185throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 205throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 220throw new ArgumentException(SR.Arg_CannotMixComparisonInfrastructure); 580throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 891throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, _buckets[bucketNumber].key, key)); 1197throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 1232throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
src\libraries\System.Private.CoreLib\src\System\Collections\ListDictionaryInternal.cs (3)
107throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate__, node.key, key)); 153throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 308throw new ArgumentException(SR.Arg_RankMultiDimNotSupported);
src\libraries\System.Private.CoreLib\src\System\Collections\ObjectModel\CollectionHelpers.cs (1)
40throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
src\libraries\System.Private.CoreLib\src\System\ComponentModel\DefaultValueAttribute.cs (1)
252throw new ArgumentException(SR.RuntimeInstanceNotAllowed);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (2)
164_ => throw new ArgumentException(SR.Arg_UnknownTypeCode), 2296private static void ThrowInvalidBase() => throw new ArgumentException(SR.Arg_InvalidBase);
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (1)
251throw new ArgumentException(SR.Arg_MustBeDateOnly);
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (3)
1069throw new ArgumentException(SR.Arg_MustBeDateTime); 1164throw new ArgumentException(SR.Arg_OleAutDateInvalid); 1178if (millis < 0 || millis > MaxMillis) throw new ArgumentException(SR.Arg_OleAutDateScale);
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (2)
551throw new ArgumentException(SR.Arg_MustBeDateTimeOffset); 784throw new ArgumentException(SR.Arg_ArgumentOutOfRangeException);
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (3)
304throw new ArgumentException(SR.Arg_DecBitCtor); 337throw new ArgumentException(SR.Arg_DecBitCtor); 424throw new ArgumentException(SR.Arg_MustBeDecimal);
src\libraries\System.Private.CoreLib\src\System\Delegate.cs (1)
167throw new ArgumentException(SR.Arg_DlgtTypeMis);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Contracts\Contracts.cs (2)
519throw new ArgumentException(SR.Argument_ToExclusiveLessThanFromExclusive); 566throw new ArgumentException(SR.Argument_ToExclusiveLessThanFromExclusive);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (7)
1649throw new ArgumentException(SR.EventSource_NeedGuid); 1654throw new ArgumentException(SR.EventSource_NeedName); 1996throw new ArgumentException(SR.EventSource_NoRelatedActivityId); 2674throw new ArgumentException(SR.EventSource_ListenerNotFound); 2886throw new ArgumentException(SR.Format(SR.EventSource_EventSourceGuidInUse, m_guid)); 3341throw new ArgumentException(SR.EventSource_StopsFollowStarts); 5647throw new ArgumentException(msg);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (1)
585throw new ArgumentException(SR.Format(SR.EventSource_NonCompliantTypeError, dataType.Name));
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
267return (value is null) ? 1 : throw new ArgumentException(SR.Arg_MustBeDouble);
src\libraries\System.Private.CoreLib\src\System\DuplicateWaitObjectException.cs (1)
20: base(SR.Arg_DuplicateWaitObjectException)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (5)
404throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType())); 1121throw new ArgumentException(SR.Format(SR.Arg_EnumValueNotFound, originalValue.ToString())); 1289throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType())); 1636throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, rtType)); 1649throw new ArgumentException(SR.Format(SR.Arg_EnumFormatUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType));
src\libraries\System.Private.CoreLib\src\System\Environment.Variables.Windows.cs (2)
57throw new ArgumentException(SR.Argument_LongEnvVarValue); 64throw new ArgumentException(Marshal.GetPInvokeErrorMessage(errorCode));
src\libraries\System.Private.CoreLib\src\System\Globalization\Calendar.cs (1)
114throw new ArgumentException(SR.Format(SR.Argument_ResultCalendarRange, minValue, maxValue));
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (3)
732throw new ArgumentException(SR.Arg_ExternalException); 783throw new ArgumentException(SR.Arg_ExternalException); 913throw new ArgumentException(SR.Arg_ExternalException);
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (8)
147throw new ArgumentException(SR.Arg_ExternalException); 168throw new ArgumentException(SR.Arg_ExternalException); 202throw new ArgumentException(SR.Arg_ExternalException); 250throw new ArgumentException(SR.Arg_ExternalException); 402throw new ArgumentException(SR.Arg_ExternalException); 415throw new ArgumentException(SR.Arg_ExternalException); 515throw new ArgumentException(SR.Arg_ExternalException); 560throw new ArgumentException(SR.Arg_ExternalException);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.cs (1)
732throw new ArgumentException(SR.Format(SR.Argument_InvalidId, nameof(name)));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureInfo.cs (1)
329throw new ArgumentException(SR.Format(SR.Argument_InvalidResourceCultureName, cultureName));
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureNotFoundException.cs (2)
18: base(DefaultMessage) 23: base(message ?? DefaultMessage)
src\libraries\System.Private.CoreLib\src\System\Globalization\GregorianCalendarHelper.cs (2)
374throw new ArgumentException(SR.Argument_NoEra); 395throw new ArgumentException(SR.Argument_NoEra);
src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (1)
54throw new ArgumentException(SR.Argument_NoRegionInvariantCulture);
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
434return (obj is null) ? 1 : throw new ArgumentException(SR.Arg_MustBeHalf);
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
61throw new ArgumentException(SR.Arg_MustBeInt128);
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
68throw new ArgumentException(SR.Arg_MustBeInt16);
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
81throw new ArgumentException(SR.Arg_MustBeInt32);
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
78throw new ArgumentException(SR.Arg_MustBeInt64);
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
193throw new ArgumentException(SR.Arg_MustBeIntPtr);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (3)
46throw new ArgumentException(SR.Argument_StreamNotReadable); 302throw new ArgumentException(SR.Argument_InvalidOffLen); 421throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryWriter.cs (2)
51throw new ArgumentException(SR.Argument_StreamNotWritable); 181throw new ArgumentException(SR.Arg_SurrogatesNotAllowedAsSingleChar);
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (2)
88throw new ArgumentException(SR.Argument_InvalidOffLen); 520_ => throw new ArgumentException(SR.Argument_InvalidSeekOrigin)
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (1)
45throw new ArgumentException(SR.Argument_NullCharInPath);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (5)
148throw new ArgumentException(SR.Argument_StreamNotReadable); 354throw new ArgumentException(SR.Argument_InvalidOffLen); 433throw new ArgumentException(SR.Argument_InvalidOffLen); 1055throw new ArgumentException(SR.Argument_InvalidOffLen); 1266throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (4)
104throw new ArgumentException(SR.Argument_StreamNotWritable); 377throw new ArgumentException(SR.Argument_InvalidOffLen); 737throw new ArgumentException(SR.Argument_InvalidOffLen); 889throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (3)
94throw new ArgumentException(SR.Argument_InvalidOffLen); 295throw new ArgumentException(SR.Argument_InvalidOffLen); 313throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\StringWriter.cs (1)
96throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (5)
78throw new ArgumentException(SR.Argument_InvalidOffLen); 268throw new ArgumentException(SR.Argument_InvalidOffLen); 298throw new ArgumentException(SR.Argument_InvalidOffLen); 397throw new ArgumentException(SR.Argument_InvalidOffLen); 410throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (1)
152throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryAccessor.cs (5)
48throw new ArgumentException(SR.Argument_OffsetAndCapacityOutOfBounds); 69throw new ArgumentException(SR.Argument_UnmanagedMemAccessorWrapAround); 249throw new ArgumentException(SR.Arg_BadDecimal); // Throw same Exception type as Decimal(int[]) ctor for compat 321throw new ArgumentException(SR.Argument_InvalidOffLen); 547throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (4)
88throw new ArgumentException(SR.Argument_InvalidSafeBufferOffLen); 109throw new ArgumentException(SR.ArgumentOutOfRange_UnmanagedMemStreamWrapAround); 558throw new ArgumentException(SR.Argument_InvalidSeekOrigin); 665throw new ArgumentException(SR.Arg_BufferTooSmall);
src\libraries\System.Private.CoreLib\src\System\Math.cs (1)
1509throw new ArgumentException(SR.Format(SR.Argument_MinMaxValue, min, max));
src\libraries\System.Private.CoreLib\src\System\ParseNumbers.cs (2)
53throw new ArgumentException(SR.Arg_CannotHaveNegativeValue); 141throw new ArgumentException(SR.Arg_CannotHaveNegativeValue);
src\libraries\System.Private.CoreLib\src\System\Reflection\Assembly.cs (1)
237throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
src\libraries\System.Private.CoreLib\src\System\Reflection\AssemblyName.cs (1)
36throw new ArgumentException(SR.Format_StringZeroLength);
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeNamedArgument.cs (1)
24_ => throw new ArgumentException(SR.Argument_InvalidMemberForNamedArgument)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\DynamicMethod.cs (3)
237throw new ArgumentException(SR.Arg_InvalidTypeInSignature); 240throw new ArgumentException(SR.Arg_InvalidTypeInSignature); 273throw new ArgumentException(SR.Argument_InvalidTypeForDynamicMethod);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\ILGenerator.cs (1)
128throw new ArgumentException(SR.NotSupported_OutputStreamUsingTypeBuilder);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (5)
76throw new ArgumentException(SR.Argument_BadSigFormat); 137throw new ArgumentException(SR.Argument_BadSigFormat); 167throw new ArgumentException(SR.Argument_BadSigFormat); 185throw new ArgumentException(SR.Argument_BadSigFormat); 301throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (2)
128throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeOptionalCustomModifiers), nameof(parameterTypes))); 131throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeRequiredCustomModifiers), nameof(parameterTypes)));
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (1)
486throw new ArgumentException(SR.Format(SR.Arg_FieldDeclTarget, fieldInfo.Name, fieldInfo.DeclaringType, target.GetType()));
src\libraries\System.Private.CoreLib\src\System\Reflection\ParameterModifier.cs (1)
13throw new ArgumentException(SR.Arg_ParmArraySize);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureByRefType.cs (1)
20public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureConstructedGenericType.cs (1)
58public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignatureGenericParameterType.cs (1)
33public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Reflection\SignaturePointerType.cs (1)
20public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (1)
140throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_FallbackLoc, fallbackLocation));
src\libraries\System.Private.CoreLib\src\System\Resources\NeutralResourcesLanguageAttribute.cs (1)
25throw new ArgumentException(SR.Format(SR.Arg_InvalidNeutralResourcesLanguage_FallbackLoc, location));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceManager.cs (4)
192throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 208throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 225throw new ArgumentException(SR.Argument_MustBeRuntimeType); 540throw new ArgumentException(SR.Format(SR.Arg_InvalidSatelliteContract_Asm_Ver, a, v));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (1)
151throw new ArgumentException(SR.Format(SR.Arg_ResourceNameNotExist, resourceName));
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (3)
129throw new ArgumentException(SR.Argument_StreamNotReadable); 808throw new ArgumentException(SR.Resources_StreamNotValid); 846throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ArrayWithOffset.cs (2)
25throw new ArgumentException(SR.ArgumentException_NotIsomorphic); 31throw new ArgumentException(SR.Argument_StructArrayTooLarge);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
418_ => throw new ArgumentException(SR.Format(SR.ComVariant_SizeMustMatchVariantSize, nameof(T), nameof(vt)))
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (3)
90throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 125throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly); 207throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (1)
790throw new ArgumentException(SR.Arg_MustBeNFloat);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (4)
220throw new ArgumentException(SR.Argument_InvalidOffLen); 308throw new ArgumentException(SR.Argument_InvalidOffLen); 376throw new ArgumentException(SR.Arg_BufferTooSmall); 406throw new ArgumentException(SR.Argument_NeedStructWithNoRefs);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\OptionalFieldAttribute.cs (1)
18throw new ArgumentException(SR.Serialization_OptionalFieldVersionValue);
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.cs (1)
340throw new ArgumentException(SR.Argument_MustBeRuntimeType);
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (8)
46throw new ArgumentException(SR.Argument_HasToBeArrayClass); 214throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this)); 229throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType)); 496throw new ArgumentException(SR.Arg_IndexMustBeInt); 739throw new ArgumentException( 754throw new ArgumentException( 822throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this)); 893throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this));
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
67throw new ArgumentException(SR.Arg_MustBeSByte);
src\libraries\System.Private.CoreLib\src\System\Security\SecurityElement.cs (11)
39throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, tag)); 49throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, tag)); 52throw new ArgumentException(SR.Format(SR.Argument_InvalidElementText, text)); 68throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, value)); 115throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, attrName)); 118throw new ArgumentException(SR.Format(SR.Argument_InvalidElementValue, attrValue)); 141throw new ArgumentException(SR.Format(SR.Argument_InvalidElementTag, value)); 159throw new ArgumentException(SR.ArgumentNull_Child); 183throw new ArgumentException(SR.Argument_AttributeNamesMustBeUnique); 197throw new ArgumentException(SR.Format(SR.Argument_InvalidElementName, name)); 200throw new ArgumentException(SR.Format(SR.Argument_InvalidElementValue, value));
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
266return (value is null) ? 1 : throw new ArgumentException(SR.Arg_MustBeSingle);
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.Byte.cs (1)
448throw new ArgumentException(SR.Arg_MustBeNullTerminatedString);
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (3)
115throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart)); 121throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSimpleAssemblyName, startupHookPart)); 201throw new ArgumentException(SR.Format(SR.Argument_InvalidStartupHookSignature,
src\libraries\System.Private.CoreLib\src\System\String.Comparison.cs (1)
514throw new ArgumentException(SR.Arg_MustBeString);
src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (1)
177throw new ArgumentException(SR.Argument_ImplementIComparable);
src\libraries\System.Private.CoreLib\src\System\Text\Decoder.cs (2)
257throw new ArgumentException(SR.Argument_ConversionOverflow); 299throw new ArgumentException(SR.Argument_ConversionOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\DecoderExceptionFallback.cs (3)
80: base(SR.Arg_ArgumentException) 86: base(message) 98: base(message)
src\libraries\System.Private.CoreLib\src\System\Text\DecoderFallback.cs (7)
127throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 134throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 150throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 182throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 189throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 199throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 241throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex);
src\libraries\System.Private.CoreLib\src\System\Text\Encoder.cs (2)
257throw new ArgumentException(SR.Argument_ConversionOverflow); 298throw new ArgumentException(SR.Argument_ConversionOverflow);
src\libraries\System.Private.CoreLib\src\System\Text\EncoderExceptionFallback.cs (4)
81: base(SR.Arg_ArgumentException) 87: base(message) 99string? message, char charUnknown, int index) : base(message) 106string message, char charUnknownHigh, char charUnknownLow, int index) : base(message)
src\libraries\System.Private.CoreLib\src\System\Text\EncoderFallback.cs (1)
285throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex);
src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (1)
242throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, Encoding.EncodingName, _fallbackBuffer.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (2)
1119throw new ArgumentException(SR.Argument_ConversionOverflow); 1438throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty,
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (2)
878throw new ArgumentException(SR.ArgumentOutOfRange_OffsetOut); 895throw new ArgumentException(SR.Arg_LongerThanSrcString);
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (2)
382throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType())); 665throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (2)
375throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType().ToString() ?? string.Empty)); 510throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, this.EncodingName, encoder.Fallback?.GetType()));
src\libraries\System.Private.CoreLib\src\System\Text\UTF7Encoding.cs (1)
905throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
8880 => throw new ArgumentException(SR.CancellationToken_CreateLinkedToken_TokensIsEmpty),
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.cs (1)
84throw new ArgumentException(SR.Argument_SemaphoreInitialMaximum);
src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (1)
281throw new ArgumentException(SR.SpinLock_TryReliableEnter_ArgumentException);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (8)
83throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType)); 119throw new ArgumentException(SR.Argument_OverlapAlignmentMismatch); 157throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer)); 284throw new ArgumentException(SR.Arg_CannotBeNaN); 309return new ArgumentException(SR.Format(SR.Argument_AddingDuplicateWithKey, key)); 524throw new ArgumentException(SR.Argument_IncompatibleArrayType); 715return new ArgumentException(SR.Argument_InvalidOffLen); 720return new ArgumentException(GetResourceString(resource));
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (1)
415throw new ArgumentException(SR.Arg_MustBeTimeOnly);
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
415throw new ArgumentException(SR.Arg_MustBeTimeSpan);
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (1)
1128throw new ArgumentException(SR.ArgumentException_TupleLastArgumentNotATuple);
src\libraries\System.Private.CoreLib\src\System\Type.Enum.cs (2)
34throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this)); 55throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType));
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (2)
33RuntimeFieldInfo field = flds[i] as RuntimeFieldInfo ?? throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo); 36throw new ArgumentException(SR.Format(SR.Argument_TypedReferenceInvalidField, field.Name));
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
63throw new ArgumentException(SR.Arg_MustBeUInt128);
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
63throw new ArgumentException(SR.Arg_MustBeUInt16);
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
75throw new ArgumentException(SR.Arg_MustBeUInt32);
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
75throw new ArgumentException(SR.Arg_MustBeUInt64);
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
189throw new ArgumentException(SR.Arg_MustBeUIntPtr);
src\libraries\System.Private.CoreLib\src\System\UnitySerializationHolder.cs (1)
52throw new ArgumentException(SR.Format(SR.Argument_InvalidUnity, _data ?? "UnityType"));
src\libraries\System.Private.CoreLib\src\System\ValueTuple.cs (1)
1856throw new ArgumentException(SR.ArgumentException_ValueTupleLastArgumentNotAValueTuple);
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeNameParser.cs (1)
199throw new ArgumentException(SR.Argument_AssemblyGetTypeCannotSpecifyAssembly);
src\System\Array.CoreCLR.cs (1)
598throw new ArgumentException(SR.Arg_PrimWiden);
src\System\Attribute.CoreCLR.cs (9)
456throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 495throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 543throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 582throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 599throw new ArgumentException(SR.Argument_InvalidParamInfo); 650throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 668throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 708throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass); 738throw new ArgumentException(SR.Argument_MustHaveAttributeBaseClass);
src\System\Collections\EmptyReadOnlyDictionaryInternal.cs (1)
41throw new ArgumentException(SR.Arg_RankMultiDimNotSupported);
src\System\Delegate.CoreCLR.cs (6)
51throw new ArgumentException(SR.Arg_DlgtTargMeth); 251throw new ArgumentException(SR.Arg_DlgtTargMeth); 287throw new ArgumentException(SR.Arg_DlgtTargMeth); 325throw new ArgumentException(SR.Arg_DlgtTargMeth); 357throw new ArgumentException(SR.Arg_DlgtTargMeth); 391throw new ArgumentException(SR.Arg_DlgtTargMeth);
src\System\MulticastDelegate.CoreCLR.cs (2)
218throw new ArgumentException(SR.Arg_DlgtTypeMis); 546throw new ArgumentException(SR.Arg_DlgtNullInst);
src\System\Reflection\Emit\CustomAttributeBuilder.cs (13)
75throw new ArgumentException(SR.Argument_BadConstructor); 78throw new ArgumentException(SR.Argument_BadConstructorCallConv); 93throw new ArgumentException(SR.Argument_BadParameterCountsForConstructor); 98throw new ArgumentException(SR.Argument_BadTypeInCustomAttribute); 143throw new ArgumentException(SR.Argument_BadTypeInCustomAttribute); 147throw new ArgumentException(SR.Argument_NotAWritableProperty); 165throw new ArgumentException(SR.Argument_BadPropertyForConstructorBuilder); 199throw new ArgumentException(SR.Argument_BadTypeInCustomAttribute); 217throw new ArgumentException(SR.Argument_BadFieldForConstructorBuilder); 271throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 420throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeForCA, value.GetType())); 493throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, ot)); 505throw new ArgumentException(SR.Format(SR.Argument_BadParameterTypeForCAB, typename));
src\System\Reflection\Emit\DynamicILGenerator.cs (8)
40throw new ArgumentException(SR.Argument_MustBeRuntimeType); 79throw new ArgumentException(SR.Argument_InvalidOpCodeOnDynamicMethod); 133RuntimeType rtType = type as RuntimeType ?? throw new ArgumentException(SR.Argument_MustBeRuntimeType); 347throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType); 360throw new ArgumentException(SR.Argument_MustBeRuntimeType); 476throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(parameterTypes))); 479throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(parameterTypes))); 1024throw new ArgumentException(SR.Format(SR.Argument_MethodDeclaringTypeGenericLcg, m, t));
src\System\Reflection\Emit\RuntimeFieldBuilder.cs (2)
27throw new ArgumentException(SR.Argument_BadFieldType); 147throw new ArgumentException(SR.Argument_ConstantNull);
src\System\Reflection\Emit\RuntimeILGenerator.cs (9)
190throw new ArgumentException(SR.Argument_UnclosedExceptionBlock); 281throw new ArgumentException(SR.Argument_BadLabel); 285throw new ArgumentException(SR.Argument_BadLabelContent); 313throw new ArgumentException(SR.Argument_BadLabel); 1023throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType); 1129throw new ArgumentException(SR.Argument_InvalidLabel); 1134throw new ArgumentException(SR.Argument_RedefinedLabel); 1368throw new ArgumentException(SR.Argument_TooManyFinallyClause); 1549throw new ArgumentException(SR.Argument_UnmatchingSymScope);
src\System\Reflection\Emit\RuntimeMethodBuilder.cs (1)
93throw new ArgumentException(SR.Arg_NoStaticVirtual);
src\System\Reflection\Emit\RuntimeModuleBuilder.cs (6)
85throw new ArgumentException(SR.Argument_DuplicateTypeName); 256throw new ArgumentException(SR.Argument_InvalidConstructorInfo); 266throw new ArgumentException(SR.Argument_InvalidConstructorInfo); 784throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 814throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 1136throw new ArgumentException(SR.Argument_HasToBeArrayClass);
src\System\Reflection\Emit\RuntimeTypeBuilder.cs (15)
221throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 230throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 240throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 249throw new ArgumentException(SR.Argument_ConstantDoesntMatch); 286throw new ArgumentException(SR.Format(SR.Argument_ConstantNotSupported, type)); 475throw new ArgumentException(SR.Argument_BadSizeForData); 510throw new ArgumentException(SR.Argument_BadTypeAttrNestedVisibilityOnNonNestedType); 518throw new ArgumentException(SR.Argument_BadTypeAttrNonNestedVisibilityNestedType); 525throw new ArgumentException(SR.Argument_BadTypeAttrInvalidLayout); 531throw new ArgumentException(SR.Argument_BadTypeAttrReservedBitsSet); 1074throw new ArgumentException(SR.ArgumentException_BadMethodImplBody); 1126throw new ArgumentException(SR.Argument_BadPInvokeMethod); 1129throw new ArgumentException(SR.Argument_BadPInvokeOnInterface); 1145throw new ArgumentException(SR.Argument_MethodRedefined); 1692throw new ArgumentException(SR.Argument_CannotSetParentToInterface);
src\System\Reflection\Emit\SignatureHelper.cs (8)
198throw new ArgumentException(SR.Argument_BadFieldSig); 227throw new ArgumentException(SR.NotSupported_MustBeModuleBuilder); 487throw new ArgumentException(SR.Argument_LargeInteger); 512throw new ArgumentException(SR.Argument_LargeInteger); 723throw new ArgumentException(SR.Argument_LargeInteger); 806throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(arguments))); 809throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(arguments))); 823throw new ArgumentException(SR.Argument_SigIsFinalized);
src\System\Reflection\FieldInfo.CoreCLR.cs (2)
17throw new ArgumentException(SR.Format( 27throw new ArgumentException(SR.Argument_InvalidHandle);
src\System\Reflection\Metadata\MetadataUpdater.cs (1)
42throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
src\System\Reflection\MethodBase.CoreCLR.cs (3)
18throw new ArgumentException(SR.Argument_InvalidHandle); 24throw new ArgumentException(SR.Format( 34throw new ArgumentException(SR.Argument_InvalidHandle);
src\System\Reflection\RtFieldInfo.cs (2)
93throw new ArgumentException(SR.Arg_TypedReference_Null); 109throw new ArgumentException(SR.Arg_TypedReference_Null);
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (1)
390throw new ArgumentException(SR.Arg_DlgtTargMeth);
src\System\Reflection\RuntimeModule.cs (5)
39throw new ArgumentException(SR.Argument_InvalidGenericInstArray); 256throw new ArgumentException(SR.InvalidOperation_PropertyInfoNotAvailable); 259throw new ArgumentException(SR.InvalidOperation_EventInfoNotAvailable); 300throw new ArgumentException( 308throw new ArgumentException(SR.Format(SR.Argument_ResolveString, metadataToken, this));
src\System\Reflection\RuntimePropertyInfo.cs (2)
336RuntimeMethodInfo m = GetGetMethod(true) ?? throw new ArgumentException(SR.Arg_GetMethNotFnd); 356RuntimeMethodInfo m = GetSetMethod(true) ?? throw new ArgumentException(SR.Arg_SetMethNotFnd);
src\System\Reflection\TypeNameResolver.CoreCLR.cs (1)
91return throwOnError ? throw new ArgumentException(SR.Argument_AssemblyGetTypeCannotSpecifyAssembly) : null;
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (9)
24throw new ArgumentException(SR.Argument_InvalidHandle); 29throw new ArgumentException(SR.Argument_BadFieldForInitializeArray); 40throw new ArgumentException(SR.Argument_BadArrayForInitializeArray); 46throw new ArgumentException(SR.Argument_BadFieldForInitializeArray); 94throw new ArgumentException(SR.Argument_InvalidHandle); 99throw new ArgumentException(SR.Argument_BadFieldForInitializeArray); 106throw new ArgumentException(SR.Argument_BadArrayForInitializeArray); 112throw new ArgumentException(SR.Argument_BadFieldForInitializeArray); 585throw new ArgumentException(SR.Arg_TypeNotSupported);
src\System\RuntimeHandles.cs (3)
468throw new ArgumentException(SR.Arg_InvalidHandle); 473throw new ArgumentException(SR.Arg_ArgumentOutOfRangeException); 672throw new ArgumentException(SR.Arg_InvalidHandle);
src\System\RuntimeType.ActivatorCache.cs (1)
65case ArgumentException: throw new ArgumentException(friendlyMessage);
src\System\RuntimeType.BoxCache.cs (2)
43throw new ArgumentException(SR.Arg_TypeNotSupported); 50throw new ArgumentException(SR.Arg_TypeNotSupported);
src\System\RuntimeType.CoreCLR.cs (6)
1837throw new ArgumentException(SR.Format( 1865throw new ArgumentException(SR.Format( 1887throw new ArgumentException(SR.Format( 1962throw new ArgumentException(SR.Format( 2729throw new ArgumentException(SR.Argument_ArrayGetInterfaceMap); 3835throw new ArgumentException(SR.Format(SR.Acc_CreateGenericEx, this));
src\System\StubHelpers.cs (5)
173throw new ArgumentException(SR.Interop_Marshal_Unmappable_Char); 698throw new ArgumentException(SR.Argument_WrongSizeArrayInNativeStruct); 947throw new ArgumentException(SR.Arg_NDirectBadObject); 1125throw new ArgumentException(SR.Arg_MarshalAsAnyRestriction); 1154throw new ArgumentException(SR.Arg_NDirectBadObject);
System.Private.DataContractSerialization (17)
System\Runtime\Serialization\Json\ReflectionJsonFormatWriter.cs (1)
35throw new ArgumentException(nameof(xmlWriter));
System\Runtime\Serialization\Json\XmlJsonWriter.cs (1)
511throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, _attributeText));
System\Runtime\Serialization\SchemaImporter.cs (2)
75throw new ArgumentException(SR.Format(SR.CannotImportNullSchema)); 98throw new ArgumentException(SR.Format(SR.CannotImportNullDataContractName));
System\Runtime\Serialization\XmlObjectSerializerContext.cs (1)
199throw new ArgumentException(SR.Format(SR.NullKnownType, "knownTypes"));
System\Runtime\Serialization\XsdDataContractExporter.cs (5)
114throw new ArgumentException(SR.Format(SR.CannotExportNullAssembly, nameof(assemblies))); 146throw new ArgumentException(SR.Format(SR.CannotExportNullType, nameof(types))); 293throw new ArgumentException(SR.CannotExportNullKnownType); 317throw new ArgumentException(SR.Format(SR.CannotExportNullAssembly, nameof(assemblies))); 355throw new ArgumentException(SR.Format(SR.CannotExportNullType, nameof(types)));
System\Xml\XmlBaseWriter.cs (6)
272throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xmlns", ns)); 274throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xml", ns)); 334throw new ArgumentException(SR.Format(SR.XmlInvalidXmlSpace, _attributeValue)); 398throw new ArgumentException(SR.Format(SR.XmlInvalidXmlSpace, _attributeValue)); 2169throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xmlns", uri)); 2172throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xml", uri));
System\Xml\XmlCanonicalWriter.cs (1)
98throw new ArgumentException(SR.InvalidInclusivePrefixListCollection);
System.Private.Uri (2)
System\UriExt.cs (2)
26throw new ArgumentException(SR.Format(SR.net_uri_InvalidUriKind, uriKind)); 758throw new ArgumentException(SR.Format(SR.net_uri_InvalidUriKind, uriKind));
System.Private.Windows.Core (33)
System\Private\Windows\BinaryFormat\BinaryFormatWriter.cs (1)
310throw new ArgumentException($"{nameof(primitive)} is not primitive.");
System\Private\Windows\BinaryFormat\Serializer\ArrayRecord.cs (1)
66throw new ArgumentException($"{nameof(arrayInfo)} doesn't match count of {nameof(arrayObjects)}");
System\Private\Windows\BinaryFormat\Serializer\MemberPrimitiveTyped.cs (1)
36throw new ArgumentException($"{nameof(value)} is not primitive.");
System\Private\Windows\Ole\DataObjectExtensions.cs (2)
14throw new ArgumentException(SR.CollectionEmptyException); 26throw new ArgumentException(string.Format(SR.Clipboard_InvalidPath, path ?? "<null>", nameof(filePaths)));
System\SpanReader.cs (2)
135throw new ArgumentException($"The size of {nameof(TValue)} must be evenly divisible by the size of {nameof(T)}."); 169throw new ArgumentException($"The size of {nameof(TValue)} must be evenly divisible by the size of {nameof(T)}.");
Windows\Win32\Graphics\GdiPlus\StatusExtensions.cs (7)
28return new ArgumentException(SR.GdiplusInvalidParameter); 50return new ArgumentException(SR.GdiplusUnknownImageFormat); 52return new ArgumentException(SR.GdiplusPropertyNotFoundError); 54return new ArgumentException(SR.GdiplusPropertyNotSupportedError); 58return new ArgumentException(string.Format(SR.GdiplusFontFamilyNotFound, "?")); 62return new ArgumentException(string.Format(SR.GdiplusFontStyleNotFound, "?", "?")); 66return new ArgumentException(SR.GdiplusNotTrueTypeFont_NoName);
Windows\Win32\System\Com\SafeArrayScope.cs (9)
43throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 50throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 57throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 64throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 69throw new ArgumentException("Use ComSafeArrayScope instead"); 75throw new ArgumentException($"Wanted SafeArrayScope<{typeof(T)}> but got SAFEARRAY with VarType={value->VarType}"); 83throw new ArgumentException("Unknown type"); 107throw new ArgumentException("Use ComSafeArrayScope instead"); 118throw new ArgumentException("Unknown type");
Windows\Win32\System\Variant\VARIANT.cs (10)
89throw new ArgumentException("Invalid Variant"); 215throw new ArgumentException("Specified OLE variant is invalid."); 226throw new ArgumentException("Record marshalling doesn't actually work in .NET Core. Matching that behaviour."); 230throw new ArgumentException(string.Format(SR.COM2UnhandledVT, type)); 241throw new ArgumentException("The specified record cannot be mapped to a managed value class."); 259throw new ArgumentException(string.Format(SR.COM2UnhandledVT, arrayType)); 412throw new ArgumentException(string.Format(SR.COM2UnhandledVT, vt)); 617throw new ArgumentException(string.Format(SR.COM2UnhandledVT, arrayType)); 668_ => throw new ArgumentException(string.Format(SR.COM2UnhandledVT, vt)), 863throw new ArgumentException(string.Format(SR.COM2UnhandledVT, vt));
System.Private.Windows.Core.TestUtilities (3)
TestAccessor.cs (1)
77modifiers: null) ?? throw new ArgumentException($"Could not find non public method {methodName}.");
TestAccessors.cs (1)
61?? throw new ArgumentException("Cannot create TestAccessor for Nullable<T> instances with no value.");
XUnit\CommonMemberDataAttribute.cs (1)
34throw new ArgumentException($"Property {MemberName} on {MemberType ?? testMethod.DeclaringType} yielded an item that is not an object[], but {item.GetType().Name}");
System.Private.Xml (124)
System\Xml\Core\XmlCharCheckingWriter.cs (5)
229throw new ArgumentException(SR.Format(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(ws, i))); 339throw new ArgumentException(SR.Xml_EmptyName); 344throw new ArgumentException(SR.Format(len == 0 ? SR.Xml_BadStartNameChar : SR.Xml_BadNameChar, XmlException.BuildCharExceptionArgs(ncname, len))); 352throw new ArgumentException(SR.Xml_EmptyName); 360throw new ArgumentException(string.Format(res, XmlException.BuildCharExceptionArgs(name, len)));
System\Xml\Core\XmlCharCheckingWriterAsync.cs (1)
175throw new ArgumentException(SR.Format(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(ws, i)));
System\Xml\Core\XmlEncodedRawTextWriter.cs (3)
1629throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 1852throw new ArgumentException(SR.Format(SR.Xml_IndentCharsNotWhitespace, propertyName)); 1899throw new ArgumentException(SR.Format(SR.Xml_InvalidCharsInIndent, new string[] { propertyName, error }));
System\Xml\Core\XmlTextEncoder.cs (3)
199throw new ArgumentException(SR.Xml_SurrogatePairSplit); 420throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 459throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar);
System\Xml\Core\XmlTextReaderImpl.cs (1)
8155throw new ArgumentException((_incReadDecoder is IncrementalReadCharsDecoder) ? nameof(count) : "len");
System\Xml\Core\XmlTextWriter.cs (22)
390throw new ArgumentException(SR.Xml_InvalidQuote); 422throw new ArgumentException(SR.Xml_ClosedOrError); 426throw new ArgumentException(SR.Xml_NoRoot); 500throw new ArgumentException(SR.Xml_UndefPrefix); 544throw new ArgumentException(SR.Xml_NoNamespaces); 610throw new ArgumentException(SR.Xml_XmlnsBelongsToReservedNs); 631throw new ArgumentException(SR.Xml_XmlnsBelongsToReservedNs); 644throw new ArgumentException(SR.Xml_UndefPrefix); 684throw new ArgumentException(SR.Xml_NoNamespaces); 738throw new ArgumentException(SR.Xml_InvalidCDataChars); 764throw new ArgumentException(SR.Xml_InvalidCommentChars); 788throw new ArgumentException(SR.Xml_InvalidPiChars); 793throw new ArgumentException(SR.Xml_DupXmlDecl); 849throw new ArgumentException(SR.Xml_NonWhitespace); 1068throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns)); 1084throw new ArgumentException(SR.Xml_NoNamespaces); 1153throw new ArgumentException(SR.Format(SR.Xml_InvalidNameChars, name)); 1463throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace); 1491throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 1738throw new ArgumentException(SR.Format(SR.Xml_InvalidNameChars, name)); 1760throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value)); 1777throw new ArgumentException(SR.Xml_InvalidPrefix);
System\Xml\Core\XmlUtf8RawTextWriter.cs (3)
1456throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 1714throw new ArgumentException(SR.Format(SR.Xml_IndentCharsNotWhitespace, propertyName)); 1761throw new ArgumentException(SR.Format(SR.Xml_InvalidCharsInIndent, new string[] { propertyName, error }));
System\Xml\Core\XmlWellFormedWriter.cs (20)
345throw new ArgumentException(SR.Xml_NoRoot); 448throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 613throw new ArgumentException(SR.Xml_EmptyLocalName); 648throw new ArgumentException(SR.Xml_XmlnsPrefix); 671throw new ArgumentException(SR.Xml_XmlnsPrefix); 681throw new ArgumentException(SR.Xml_XmlPrefix); 778throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 782throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace); 825throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value)); 900throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? SR.Xml_DupXmlDecl : SR.Xml_CannotWriteXmlDecl); 960throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 1013throw new ArgumentException(SR.Xml_NonWhitespace); 1294throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns)); 1616throw new ArgumentException(SR.Xml_XmlPrefix); 1626throw new ArgumentException(SR.Xml_XmlnsPrefix); 1643throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix)); 1727throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix)); 1735throw new ArgumentException(SR.Xml_XmlPrefix); 1740throw new ArgumentException(SR.Xml_XmlnsPrefix); 2067return new ArgumentException(SR.Format(SR.Xml_InvalidNameCharsDetail, args));
System\Xml\Core\XmlWellFormedWriterAsync.cs (13)
45throw new ArgumentException(SR.Xml_NoRoot); 221throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 453throw new ArgumentException(SR.Xml_EmptyLocalName); 506throw new ArgumentException(SR.Xml_XmlnsPrefix); 529throw new ArgumentException(SR.Xml_XmlnsPrefix); 539throw new ArgumentException(SR.Xml_XmlPrefix); 683throw new ArgumentException(SR.Xml_PrefixForEmptyNs); 687throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace); 729throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value)); 801throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? SR.Xml_DupXmlDecl : SR.Xml_CannotWriteXmlDecl); 861throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar); 915throw new ArgumentException(SR.Xml_NonWhitespace); 1145throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Core\XmlWriter.cs (1)
234throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Core\XmlWriterAsync.cs (1)
220throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Dom\DocumentXPathNavigator.cs (1)
1257throw new ArgumentException(SR.Format(SR.XPathDocument_SchemaSetNotAllowed, null));
System\Xml\Dom\XmlAttribute.cs (1)
30throw new ArgumentException(SR.Xdom_Attr_Name);
System\Xml\Dom\XmlAttributeCollection.cs (7)
121throw new ArgumentException(SR.Xdom_AttrCol_Object); 140throw new ArgumentException(SR.Xdom_NamedNode_Context); 159throw new ArgumentException(SR.Xdom_NamedNode_Context); 185throw new ArgumentException(SR.Xdom_AttrCol_Insert); 188throw new ArgumentException(SR.Xdom_NamedNode_Context); 214throw new ArgumentException(SR.Xdom_AttrCol_Insert); 217throw new ArgumentException(SR.Xdom_NamedNode_Context);
System\Xml\Dom\XmlDeclaration.cs (4)
24throw new ArgumentException(SR.Xdom_Version); 27throw new ArgumentException(SR.Format(SR.Xdom_standalone, standalone)); 65throw new ArgumentException(SR.Format(SR.Xdom_standalone, value)); 116throw new ArgumentException(SR.Xdom_Version);
System\Xml\Dom\XmlDocument.cs (4)
246throw new ArgumentException(SR.Format(SR.Xdom_Attr_Reserved_XmlNS, namespaceURI)); 1161throw new ArgumentException(SR.Format(SR.Arg_CannotCreateNode, type)); 1256throw new ArgumentException(SR.Format(SR.Xdom_Invalid_NT_String, nodeTypeString)); 1496throw new ArgumentException(SR.Format(SR.XmlDocument_NodeNotFromDocument, nameof(nodeToValidate)));
System\Xml\Dom\XmlDocumentFragment.cs (1)
51throw new ArgumentException(SR.Xdom_Node_Null_Doc);
System\Xml\Dom\XmlElement.cs (1)
31throw new ArgumentException(SR.Xdom_Empty_LocalName);
System\Xml\Dom\XmlEntityReference.cs (1)
41throw new ArgumentException(SR.Xdom_InvalidCharacter_EntityReference);
System\Xml\Dom\XmlLoader.cs (4)
37throw new ArgumentException(SR.Xdom_Load_NoDocument); 39throw new ArgumentException(SR.Xdom_Load_NoReader); 75throw new ArgumentException(SR.Xdom_Load_NoDocument); 77throw new ArgumentException(SR.Xdom_Load_NoReader);
System\Xml\Dom\XmlNode.cs (10)
30throw new ArgumentException(SR.Xdom_Node_Null_Doc); 251throw new ArgumentException(SR.Xdom_Node_Insert_Child); 260throw new ArgumentException(SR.Xdom_Node_Insert_Path); 268throw new ArgumentException(SR.Xdom_Node_Insert_Context); 365throw new ArgumentException(SR.Xdom_Node_Insert_Child); 374throw new ArgumentException(SR.Xdom_Node_Insert_Path); 382throw new ArgumentException(SR.Xdom_Node_Insert_Context); 494throw new ArgumentException(SR.Xdom_Node_Remove_Child); 587throw new ArgumentException(SR.Xdom_Node_Insert_Child); 593throw new ArgumentException(SR.Xdom_Node_Insert_Context);
System\Xml\Dom\XmlSignificantWhiteSpace.cs (2)
15throw new ArgumentException(SR.Xdom_WS_Char); 88throw new ArgumentException(SR.Xdom_WS_Char);
System\Xml\Dom\XmlWhitespace.cs (2)
16throw new ArgumentException(SR.Xdom_WS_Char); 81throw new ArgumentException(SR.Xdom_WS_Char);
System\Xml\Schema\XmlSchemaValidator.cs (1)
382throw new ArgumentException(SR.Sch_InvalidPartialValidationType);
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (2)
62throw new ArgumentException(SR.Format(SR.XmlInternalError, "xmlMapping")); 74throw new ArgumentException(SR.Format(SR.XmlInternalError, "xmlMapping"));
System\Xml\Serialization\ReflectionXmlSerializationWriter.cs (2)
27throw new ArgumentException(SR.Format(SR.XmlInternalError, nameof(xmlMapping))); 36throw new ArgumentException(SR.Format(SR.XmlInternalError, nameof(xmlMapping)));
System\Xml\XmlConvert.cs (6)
722throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption))); 1233throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption))); 1534return new ArgumentException(res); 1551return new ArgumentException(string.Format(res, arg)); 1568return new ArgumentException(string.Format(res, args)); 1784throw new ArgumentException(SR.Format(SR.Sch_InvalidDateTimeOption, dateTimeOption, nameof(dateTimeOption)));
System\Xml\XmlNamespacemanager.cs (2)
133throw new ArgumentException(SR.Xml_XmlPrefix); 137throw new ArgumentException(SR.Xml_XmlnsPrefix);
System.Private.Xml.Linq (21)
System\Xml\Linq\XAttribute.cs (7)
710throw new ArgumentException(SR.Format(SR.Argument_NamespaceDeclarationPrefixed, name.LocalName)); 716if (name.LocalName != "xml") throw new ArgumentException(SR.Argument_NamespaceDeclarationXml); 722throw new ArgumentException(SR.Argument_NamespaceDeclarationXmlns); 731throw new ArgumentException(SR.Argument_NamespaceDeclarationXml); 736throw new ArgumentException(SR.Argument_NamespaceDeclarationXmlns); 746throw new ArgumentException(SR.Argument_NamespaceDeclarationXml); 752throw new ArgumentException(SR.Argument_NamespaceDeclarationXmlns);
System\Xml\Linq\XContainer.cs (2)
823XObject => throw new ArgumentException(SR.Argument_XObjectValue), 827if (s == null) throw new ArgumentException(SR.Argument_ConvertToString);
System\Xml\Linq\XDocument.cs (5)
857throw new ArgumentException(SR.Argument_AddAttribute); 862throw new ArgumentException(SR.Argument_AddAttribute); 910throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.CDATA)); 912throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.Document)); 940throw new ArgumentException(SR.Argument_AddNonWhitespace);
System\Xml\Linq\XElement.cs (2)
2125if (node is XDocument) throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.Document)); 2126if (node is XDocumentType) throw new ArgumentException(SR.Format(SR.Argument_AddNode, XmlNodeType.DocumentType));
System\Xml\Linq\XLinq.cs (1)
110if (content is XAttribute) throw new ArgumentException(SR.Argument_AddAttribute);
System\Xml\Linq\XName.cs (1)
78if (i <= 1 || i == expandedName.Length - 1) throw new ArgumentException(SR.Format(SR.Argument_InvalidExpandedName, expandedName));
System\Xml\Linq\XProcessingInstruction.cs (1)
162if (string.Equals(name, "xml", StringComparison.OrdinalIgnoreCase)) throw new ArgumentException(SR.Format(SR.Argument_InvalidPIName, name));
System\Xml\XPath\XNodeNavigator.cs (2)
927if (node is XDocumentType) throw new ArgumentException(SR.Format(SR.Argument_CreateNavigator, XmlNodeType.DocumentType)); 931if (text.GetParent() is XDocument) throw new ArgumentException(SR.Format(SR.Argument_CreateNavigator, XmlNodeType.Whitespace));
System.Reflection.Context (5)
System\Reflection\Context\Virtual\VirtualPropertyBase.cs (2)
106throw new ArgumentException(SR.Argument_GetMethNotFnd); 115throw new ArgumentException(SR.Argument_GetMethNotFnd);
System\Reflection\Context\Virtual\VirtualPropertyInfo.cs (2)
29throw new ArgumentException(SR.ArgumentNull_GetterOrSetterMustBeSpecified); 33throw new ArgumentException(SR.Argument_PropertyTypeFromDifferentContext);
System\Reflection\Context\Virtual\VirtualPropertyInfo.PropertySetter.cs (1)
50throw new ArgumentException(SR.Format(SR.Argument_ObjectArgumentMismatch, value.GetType(), ReturnType));
System.Reflection.Emit (21)
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\SymbolType.cs (5)
76throw new ArgumentException(SR.Argument_BadSigFormat); 137throw new ArgumentException(SR.Argument_BadSigFormat); 167throw new ArgumentException(SR.Argument_BadSigFormat); 185throw new ArgumentException(SR.Argument_BadSigFormat); 301throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\Emit\ILGeneratorImpl.cs (4)
99throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType); 518throw new ArgumentException(SR.Argument_InvalidLabel); 790throw new ArgumentException(SR.Argument_RedefinedLabel); 823throw new ArgumentException(SR.Argument_InvalidLabel);
System\Reflection\Emit\MethodBuilderImpl.cs (1)
55throw new ArgumentException(SR.Argument_NoStaticVirtual);
System\Reflection\Emit\ModuleBuilderImpl.cs (3)
1266throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 1295throw new ArgumentException(SR.Argument_GlobalMembersMustBeStatic); 1329throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\Emit\PseudoCustomAttributesData.cs (2)
34throw new ArgumentException(SR.Argument_DllNameCannotBeEmpty); 100throw new ArgumentException(SR.Argument_DllNameCannotBeEmpty);
System\Reflection\Emit\TypeBuilderImpl.cs (6)
320throw new ArgumentException(SR.ArgumentException_BadMethodImplBody); 385throw new ArgumentException(SR.Argument_BadPInvokeMethod); 390throw new ArgumentException(SR.Argument_BadPInvokeOnInterface); 402throw new ArgumentException(SR.Argument_MethodRedefined); 567throw new ArgumentException(SR.Argument_CannotSetParentToInterface); 633throw new ArgumentException(SR.Argument_MustBeEnum);
System.Reflection.Metadata (3)
System\Reflection\Metadata\BlobWriterImpl.cs (2)
216throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, type)); 289throw new ArgumentException(SR.Format(SR.InvalidConstantValueOfType, type));
System\Reflection\Throw.cs (1)
35throw new ArgumentException(SR.Format(SR.UnexpectedHandleKind, kind));
System.Reflection.MetadataLoadContext (17)
System\Reflection\TypeLoading\Assemblies\RoAssembly.cs (1)
213public sealed override object CreateInstance(string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder? binder, object?[]? args, CultureInfo? culture, object?[]? activationAttributes) => throw new ArgumentException(SR.Arg_ReflectionOnlyInvoke);
System\Reflection\TypeLoading\Assemblies\RoAssembly.Modules.cs (1)
106throw new ArgumentException(SR.Format(SR.SpecifiedFileNameInvalid, moduleName)); // Name not in manifest.
System\Reflection\TypeLoading\General\HashHelpers.cs (1)
50throw new ArgumentException(SR.Arg_HTCapacityOverflow);
System\Reflection\TypeLoading\Methods\RoDefinitionMethod.cs (1)
117throw new ArgumentException(SR.Format(SR.MakeGenericType_NotLoadedByMetadataLoadContext, typeArgument));
System\Reflection\TypeLoading\Types\Ecma\EcmaDefinitionType.cs (3)
107throw new ArgumentException(SR.Arg_MustBeEnum); 118throw new ArgumentException(SR.Argument_InvalidEnum); 123throw new ArgumentException(SR.Argument_InvalidEnum);
System\Reflection\TypeLoading\Types\RoByRefType.cs (1)
26public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\TypeLoading\Types\RoConstructedGenericType.cs (1)
132public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\TypeLoading\Types\RoDefinitionType.cs (2)
115throw new ArgumentException(SR.Format(SR.MakeGenericType_NotLoadedByMetadataLoadContext, typeArgument)); 223public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System\Reflection\TypeLoading\Types\RoFunctionPointerType.cs (2)
170public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass); 196protected internal sealed override RoType ComputeEnumUnderlyingType() => throw new ArgumentException(SR.Arg_MustBeEnum);
System\Reflection\TypeLoading\Types\RoGenericParameterType.cs (2)
42public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass); 64protected internal sealed override RoType ComputeEnumUnderlyingType() => throw new ArgumentException(SR.Arg_MustBeEnum);
System\Reflection\TypeLoading\Types\RoHasElementType.cs (1)
77protected internal sealed override RoType ComputeEnumUnderlyingType() => throw new ArgumentException(SR.Arg_MustBeEnum);
System\Reflection\TypeLoading\Types\RoPointerType.cs (1)
26public sealed override int GetArrayRank() => throw new ArgumentException(SR.Argument_HasToBeArrayClass);
System.Resources.Extensions (10)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (4)
69throw new ArgumentException(SR.Argument_StreamNotWritable); 149throw new ArgumentException(SR.NotSupported_UnseekableStream); 588throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength); 598throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (3)
129throw new ArgumentException(SR.Argument_StreamNotReadable); 808throw new ArgumentException(SR.Resources_StreamNotValid); 846throw new ArgumentException(SR.Format(SR.Arg_ResourceFileUnsupportedVersion, CurrentVersion, version));
System\Resources\Extensions\PreserializedResourceWriter.cs (3)
172throw new ArgumentException(SR.NotSupported_UnseekableStream); 228throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength); 253throw new ArgumentException(nameof(ResourceDataRecord.Format));
System.Resources.Writer (4)
src\libraries\Common\src\System\Resources\ResourceWriter.cs (4)
69throw new ArgumentException(SR.Argument_StreamNotWritable); 149throw new ArgumentException(SR.NotSupported_UnseekableStream); 588throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength); 598throw new ArgumentException(SR.ArgumentOutOfRange_StreamLength);
System.Runtime.Caching (6)
System\Runtime\Caching\HostFileChangeMonitor.cs (2)
166throw new ArgumentException(RH.Format(SR.Empty_collection, nameof(filePaths))); 183throw new ArgumentException(RH.Format(SR.Collection_contains_null_or_empty_string, nameof(filePaths)));
System\Runtime\Caching\MemoryCache.cs (4)
421throw new ArgumentException(RH.Format(SR.Empty_collection, nameof(keys))); 428throw new ArgumentException(RH.Format(SR.Collection_contains_null_element, nameof(keys))); 673throw new ArgumentException(SR.Invalid_argument_combination); 789throw new ArgumentException(RH.Format(SR.Collection_contains_null_element, nameof(keys)));
System.Runtime.Numerics (2)
System\Numerics\BigInteger.cs (1)
3942throw new ArgumentException(SR.Format(SR.Argument_MinMaxValue, min, max));
System\Numerics\Complex.cs (1)
2161throw new ArgumentException(SR.Arg_HexStyleNotSupported);
System.Runtime.Serialization.Formatters (7)
src\libraries\System.Private.CoreLib\src\System\Collections\HashHelpers.cs (1)
58throw new ArgumentException(SR.Arg_HTCapacityOverflow);
System\Runtime\Serialization\FormatterServices.cs (2)
213throw new ArgumentException(SR.Argument_InvalidFieldInfo); 224throw new ArgumentException(SR.Argument_DataLengthDifferent);
System\Runtime\Serialization\ObjectManager.cs (1)
779throw new ArgumentException(SR.Serialization_NotISer);
System\Runtime\Serialization\ValueTypeFixupInfo.cs (3)
37throw new ArgumentException(SR.Argument_MustSupplyParent); 53throw new ArgumentException(SR.Argument_MemberAndArray); 58throw new ArgumentException(SR.Argument_MustSupplyContainer);
System.Runtime.Serialization.Schema (1)
System\Runtime\Serialization\Schema\DiagnosticUtility.cs (1)
87return new ArgumentException(message);
System.Security.Cryptography (66)
src\libraries\Common\src\System\Security\Cryptography\AesGcm.cs (1)
296throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch);
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (3)
138throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 142throw new ArgumentException(SR.Argument_InvalidOffLen); 158throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\Common\src\System\Security\Cryptography\DSAOpenSsl.cs (4)
102throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MissingFields); 107throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedPJ); 113throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedPGY); 116throw new ArgumentException(SR.Cryptography_InvalidDsaParameters_MismatchedQX);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (1)
79throw new ArgumentException(SR.Cryptography_Pkcs9_AttributeMismatch);
System\Security\Cryptography\AesCcm.cs (1)
84throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch);
System\Security\Cryptography\AsnEncodedDataCollection.cs (2)
71throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 75throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\Base64Transforms.cs (1)
388public static void ThrowInvalidOffLen() => throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\CapiHelper.Unix.cs (3)
18_ => throw new ArgumentException(SR.Argument_InvalidValue), 48_ => throw new ArgumentException(SR.Argument_InvalidValue), 80throw new ArgumentException(SR.Argument_InvalidValue);
System\Security\Cryptography\ChaCha20Poly1305.cs (1)
99throw new ArgumentException(SR.Cryptography_PlaintextCiphertextLengthMismatch);
System\Security\Cryptography\CspParameters.cs (1)
43throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value)));
System\Security\Cryptography\DES.cs (1)
54throw new ArgumentException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\ECCurve.cs (1)
81throw new ArgumentException(SR.Format(SR.Cryptography_InvalidCurveOid, value.Value));
System\Security\Cryptography\HashAlgorithm.cs (4)
82throw new ArgumentException(SR.Argument_InvalidValue); 84throw new ArgumentException(SR.Argument_InvalidOffLen); 240throw new ArgumentException(SR.Argument_InvalidValue); 242throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\HashProvider.cs (1)
27throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\IncrementalHash.cs (1)
94throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\OidCollection.cs (2)
77throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 81throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\PemEncoding.cs (1)
412throw new ArgumentException(SR.Argument_PemEncoding_EncodedSizeTooLarge);
System\Security\Cryptography\RandomNumberGenerator.cs (2)
106throw new ArgumentException(SR.Argument_InvalidRandomRange); 445throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\TripleDES.cs (1)
54throw new ArgumentException(SR.Cryptography_InvalidKeySize);
System\Security\Cryptography\X509Certificates\CertificateRequest.cs (3)
634throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 783throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed); 969throw new ArgumentException(SR.Cryptography_CertReq_DatesReversed);
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (3)
142throw new ArgumentException(SR.Cryptography_CRLBuilder_DatesReversed); 189throw new ArgumentException(SR.Cryptography_CertReq_RSAPaddingRequired); 340throw new ArgumentException(SR.Cryptography_CRLBuilder_DatesReversed);
System\Security\Cryptography\X509Certificates\DSACertificateExtensions.cs (1)
44throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm);
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (1)
41throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm);
System\Security\Cryptography\X509Certificates\FindPal.cs (5)
178throw new ArgumentException(SR.Argument_InvalidOidValue); 222throw new ArgumentException(SR.Argument_InvalidOidValue); 227throw new ArgumentException(SR.Argument_InvalidOidValue); 229throw new ArgumentException(SR.Argument_InvalidOidValue); 239throw new ArgumentException(SR.Argument_InvalidOidValue);
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (1)
41throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm);
System\Security\Cryptography\X509Certificates\X500DistinguishedName.cs (1)
103throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, "flag"));
System\Security\Cryptography\X509Certificates\X509AuthorityInformationAccessExtension.cs (2)
285throw new ArgumentException(SR.Cryptography_X509_AIA_NullValue); 330throw new ArgumentException(SR.Cryptography_X509_AIA_MustNotBuildEmpty);
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (4)
769throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 860throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 961throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm); 1056throw new ArgumentException(SR.Cryptography_PrivateKey_WrongAlgorithm);
System\Security\Cryptography\X509Certificates\X509ChainElementCollection.cs (2)
63throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 67throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\X509Certificates\X509ChainPolicy.cs (4)
62throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 76throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 90throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value))); 104throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(value)));
System\Security\Cryptography\X509Certificates\X509Extension.cs (1)
84throw new ArgumentException(SR.Cryptography_X509_ExtensionMismatch);
System\Security\Cryptography\X509Certificates\X509ExtensionCollection.cs (2)
82throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 86throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\X509Certificates\X509SignatureGenerator.cs (1)
35throw new ArgumentException(SR.Cryptography_InvalidPaddingMode);
System\Security\Cryptography\X509Certificates\X509Store.cs (3)
40throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeLocation))); 52_ => throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeName))), 66throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, nameof(storeLocation)));
System.Security.Cryptography.Cose (1)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (1)
423throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels);
System.Security.Cryptography.Pkcs (11)
src\libraries\Common\src\System\Security\Cryptography\CryptographicAttributeObjectCollection.cs (3)
138throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 142throw new ArgumentException(SR.Argument_InvalidOffLen); 158throw new ArgumentException(SR.Argument_InvalidOffLen);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9AttributeObject.cs (1)
79throw new ArgumentException(SR.Cryptography_Pkcs9_AttributeMismatch);
System\Security\Cryptography\Pkcs\CmsRecipientCollection.cs (3)
87throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 91throw new ArgumentException(SR.Argument_InvalidOffLen); 107throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\Pkcs\CmsSigner.cs (1)
66throw new ArgumentException(SR.Format(SR.Cryptography_Cms_Invalid_Subject_Identifier_Type, value));
System\Security\Cryptography\Pkcs\RecipientInfoCollection.cs (2)
62throw new ArgumentException(SR.Arg_RankMultiDimNotSupported); 66throw new ArgumentException(SR.Argument_InvalidOffLen);
System\Security\Cryptography\Pkcs\SignerInfoCollection.cs (1)
64throw new ArgumentException(SR.Argument_InvalidOffLen);
System.Security.Cryptography.Xml (3)
System\Security\Cryptography\Xml\CanonicalXml.cs (1)
42throw new ArgumentException(nameof(nodeList));
System\Security\Cryptography\Xml\ExcCanonicalXml.cs (1)
41throw new ArgumentException(nameof(nodeList));
System\Security\Cryptography\Xml\XmlDsigBase64Transform.cs (1)
62if (inputStream == null) throw new ArgumentException("obj");
System.Security.Permissions (3)
System\Security\Permissions\PrincipalPermission.cs (3)
30throw new ArgumentException(SR.Argument_InvalidPermissionState); 275throw new ArgumentException(SR.Argument_NotAPermissionElement); 280throw new ArgumentException(SR.Argument_InvalidXMLBadVersion);
System.ServiceModel.Syndication (1)
System\ServiceModel\Syndication\SyndicationElementExtensionCollection.cs (1)
221throw new ArgumentException(SR.ExtensionNameNotSpecified);
System.Text.Encoding.CodePages (9)
System\Text\DBCSCodePageEncoding.cs (2)
541throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, EncodingName, encoder.Fallback.GetType())); 657throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, EncodingName, encoder.Fallback.GetType()));
System\Text\DecoderFallbackBufferHelper.cs (6)
65throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 72throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 88throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 121throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 128throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex); 138throw new ArgumentException(SR.Argument_InvalidCharSequenceNoIndex);
System\Text\EncodingByteBuffer.cs (1)
42throw new ArgumentException(SR.Format(SR.Argument_EncoderFallbackNotEmpty, _encoder.Encoding.EncodingName, _encoder.Fallback.GetType()));
System.Text.Encodings.Web (1)
System\Text\Encodings\Web\TextEncoder.cs (1)
624throw new ArgumentException(SR.TextEncoderDoesNotImplementMaxOutputCharsPerInputChar);
System.Text.Json (12)
System\Text\Json\Serialization\JsonSerializerOptions.cs (2)
326throw new ArgumentException(SR.SerializationInvalidBufferSize); 422throw new ArgumentException(SR.DefaultIgnoreConditionInvalid);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (2)
31throw new ArgumentException(nameof(propertyInfo.DeclaringType)); 37throw new ArgumentException(nameof(propertyInfo.PropertyName));
System\Text\Json\ThrowHelper.cs (5)
78throw new ArgumentException(SR.Argument_InvalidOffLen); 89return new ArgumentException(message); 526throw new ArgumentException(SR.CannotWriteCommentWithEmbeddedDelimiter); 554throw new ArgumentException(SR.Format(SR.CannotEncodeInvalidUTF8, builder)); 560throw new ArgumentException(SR.Format(SR.CannotEncodeInvalidUTF16, $"0x{charAsInt:X2}"));
System\Text\Json\ThrowHelper.Serialization.cs (1)
22throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type, value.GetType()));
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
240throw new ArgumentException(SR.StreamNotWritable); 302throw new ArgumentException(SR.StreamNotWritable);
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
System.Text.RegularExpressions (3)
System\Text\RegularExpressions\CaptureCollection.cs (1)
105throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System\Text\RegularExpressions\GroupCollection.cs (1)
119throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
System\Text\RegularExpressions\RegexParseException.cs (1)
29internal RegexParseException(RegexParseError error, int offset, string message) : base(message)
System.Text.RegularExpressions.Generator (2)
src\libraries\Common\src\Roslyn\GetBestTypeByMetadataName.cs (1)
90? throw new ArgumentException("The input type must correspond to a named type symbol.")
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexParseException.cs (1)
29internal RegexParseException(RegexParseError error, int offset, string message) : base(message)
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\Parallel.cs (1)
212throw new ArgumentException(SR.Parallel_Invoke_ActionNull);
System.Web.Services.Description (3)
System\Web\Services\Description\MimeFormatExtensions.cs (3)
116throw new ArgumentException(SR.Format(SR.WebNegativeValue, "group")); 129throw new ArgumentException(SR.Format(SR.WebNegativeValue, "capture")); 142throw new ArgumentException(SR.Format(SR.WebNegativeValue, "repeats"));
System.Windows.Controls.Ribbon (5)
Microsoft\Windows\Controls\ActivatingKeyTipEventArgs.cs (2)
86throw new ArgumentException(Microsoft.Windows.Controls.SR.InvalidKeyTipOffset); 105throw new ArgumentException(Microsoft.Windows.Controls.SR.InvalidKeyTipOffset);
Microsoft\Windows\Controls\Ribbon\RibbonControlLength.cs (3)
50throw new ArgumentException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidCtorParameterNoNaN, "value")); 55throw new ArgumentException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidCtorParameterNoInfinityForStarSize, "value")); 63throw new ArgumentException(Microsoft.Windows.Controls.SR.Format(Microsoft.Windows.Controls.SR.InvalidCtorParameterUnknownRibbonControlLengthUnitType, "type"));
System.Windows.Forms (186)
misc\CollectionHelper.cs (3)
25throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall); 48throw new ArgumentException(SR.Argument_IncompatibleArrayType); 63throw new ArgumentException(SR.Argument_IncompatibleArrayType);
System\Resources\AssemblyNamesTypeResolutionService.cs (1)
156throw new ArgumentException(string.Format(SR.InvalidResXNoType, name));
System\Resources\ResXResourceReader.cs (2)
440throw new ArgumentException(SR.InvalidResXFileReaderWriterTypes); 609throw new ArgumentException(string.Format(SR.InvalidResXResourceNoName, nodeInfo.ValueData));
System\Windows\Forms\ActiveX\AxHost.ConnectionPointCookie.cs (2)
60throw new ArgumentException(string.Format(SR.AXNoEventInterface, eventInterface.Name)); 75throw new ArgumentException(string.Format(SR.AXNoConnectionPoint, eventInterface.Name));
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1424throw new ArgumentException(string.Format(SR.AXNoConnectionPoint, eventInterface.Name));
System\Windows\Forms\ComponentModel\COM2Interop\COM2AboutBoxPropertyDescriptor.cs (1)
62public override void SetValue(object? component, object? value) => throw new ArgumentException(null);
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (2)
898VT_USERDEFINED => throw new ArgumentException(string.Format(SR.COM2UnhandledVT, "VT_USERDEFINED")), 899_ => throw new ArgumentException(string.Format(SR.COM2UnhandledVT, ((int)vt).ToString(CultureInfo.InvariantCulture))),
System\Windows\Forms\Control.ControlCollection.cs (3)
51throw new ArgumentException(SR.TopLevelControlAdd); 58throw new ArgumentException(SR.AddDifferentThreads); 408throw new ArgumentException(SR.ControlNotChild);
System\Windows\Forms\Control.cs (3)
810throw new ArgumentException(SR.TransparentBackColorNotAllowed); 4361throw new ArgumentException(SR.CircularOwner); 4374throw new ArgumentException(SR.CircularOwner);
System\Windows\Forms\Controls\Buttons\ButtonBase.ButtonBaseAccessibleObject.cs (1)
13: throw new ArgumentException(string.Format(SR.ConstructorArgumentInvalidValueType, nameof(owner), typeof(ButtonBase))))
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (4)
1024throw new ArgumentException(SR.ComboBoxSortWithDataSource); 1349throw new ArgumentException(SR.DataSourceLocksItems); 3158throw new ArgumentException(SR.AutoCompleteFailure); 3201throw new ArgumentException(SR.AutoCompleteFailureListItems);
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (9)
1016throw new ArgumentException(string.Format(SR.DataGridView_EmptyColor, "BackgroundColor")); 1018throw new ArgumentException(string.Format(SR.DataGridView_TransparentColor, "BackgroundColor")); 1244throw new ArgumentException(string.Format(SR.DataGridView_CustomCellBorderStyleInvalid, "CellBorderStyle")); 1461throw new ArgumentException(string.Format(SR.DataGridView_CustomCellBorderStyleInvalid, "ColumnHeadersBorderStyle")); 1735throw new ArgumentException(SR.DataGridView_CellDoesNotBelongToDataGridView); 2294throw new ArgumentException(SR.DataGridView_CellDoesNotBelongToDataGridView); 2642throw new ArgumentException(string.Format(SR.DataGridView_EmptyColor, nameof(GridColor))); 2644throw new ArgumentException(string.Format(SR.DataGridView_TransparentColor, nameof(GridColor))); 3248throw new ArgumentException(string.Format(SR.DataGridView_CustomCellBorderStyleInvalid, "RowHeadersBorderStyle"));
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (20)
1695throw new ArgumentException(string.Format(SR.DataGridView_NeedColumnAutoSizingCriteria, "autoSizeColumnMode")); 1986throw new ArgumentException(string.Format(SR.DataGridView_NeedAutoSizingCriteria, "rowHeadersWidthSizeMode")); 2132throw new ArgumentException(string.Format(SR.DataGridView_NeedAutoSizingCriteria, "rowHeadersWidthSizeMode")); 2364throw new ArgumentException(string.Format(SR.DataGridView_NeedAutoSizingCriteria, "autoSizeRowsMode")); 6847throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 9766throw new ArgumentException(SR.DataGridView_CellDoesNotBelongToDataGridView); 11240throw new ArgumentException(SR.DataGridView_PreviousModesHasWrongLength); 13244throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13308throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13323throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13349throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13421throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13497throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 13584throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14045throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14072throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14264throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14466throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 14476throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView); 28170throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
System\Windows\Forms\Controls\DataGridView\DataGridViewAdvancedBorderStyle.cs (7)
67throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "All")); 96throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Bottom")); 141throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Left")); 157throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Left")); 197throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Right")); 213throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Right")); 243throw new ArgumentException(string.Format(SR.DataGridView_AdvancedCellBorderStyleInvalid, "Top"));
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
1685throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(constraintSize), constraintSize)); 1707throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(constraintSize), constraintSize)); 1781throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(rowIndex), rowIndex)); 1806throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(rowIndex), rowIndex));
System\Windows\Forms\Controls\DataGridView\DataGridViewCellCollection.cs (1)
323throw new ArgumentException(SR.DataGridViewCellCollection_CellNotFound);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
59throw new ArgumentException(SR.DataGridViewCell_FormattedValueTypeNull); 66throw new ArgumentException(SR.DataGridViewCheckBoxCell_InvalidValueType); 102throw new ArgumentException(SR.DataGridViewCheckBoxCell_InvalidValueType);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
890throw new ArgumentException(string.Format(SR.DataGridView_NeedColumnAutoSizingCriteria, "autoSizeColumnMode"));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (11)
413throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 552throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 602throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 640throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 646throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 680throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 686throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 723throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 729throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 796throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 802throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter)));
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (7)
138throw new ArgumentException(SR.BadDataSourceForComplexBinding); 428throw new ArgumentException(SR.ComboBoxSortWithDataSource); 575throw new ArgumentException(SR.DataSourceLocksItems); 968new ArgumentException(SR.DataGridViewComboBoxCell_InvalidValue), 1003new ArgumentException(SR.DataGridViewComboBoxCell_InvalidValue), 1359throw new ArgumentException(string.Format(SR.DataGridViewComboBoxCell_PropertyNotFound, displayMember)); 1390throw new ArgumentException(string.Format(SR.DataGridViewComboBoxCell_PropertyNotFound, valueMember));
System\Windows\Forms\Controls\DataGridView\DataGridViewDataErrorEventArgs.cs (1)
33throw new ArgumentException(SR.DataGridView_CannotThrowNullException);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
1503throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewPaintPartsCombination, "paintParts"));
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (12)
883throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 933throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 939throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 983throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1042throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1068throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1074throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 1093throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1119throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1125throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter))); 1144throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter))); 1240throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (5)
186throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value))); 246throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value))); 269throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value))); 292throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value))); 315throw new ArgumentException(string.Format(SR.InvalidNullArgument, nameof(value)));
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (2)
142throw new ArgumentException(SR.ImageListBitmap); 345throw new ArgumentException(SR.ImageListBitmap);
System\Windows\Forms\Controls\Labels\LinkArea.LinkAreaConverter.cs (1)
66throw new ArgumentException(
System\Windows\Forms\Controls\Labels\LinkConverter.cs (1)
62throw new ArgumentException(
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
197throw new ArgumentException(SR.CheckedListBoxInvalidSelectionMode);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1279throw new ArgumentException(SR.DataSourceLocksItems);
System\Windows\Forms\Controls\ListBoxes\ListBox.IntegerCollection.cs (1)
186throw new ArgumentException(nameof(item));
System\Windows\Forms\Controls\ListView\ColumnHeaderConverter.cs (1)
72throw new ArgumentException(string.Format(SR.NoDefaultConstructor, t.FullName));
System\Windows\Forms\Controls\ListView\ListView.cs (2)
1862throw new ArgumentException(string.Format(SR.ListViewVirtualListSizeInvalidArgument, "value", value)); 4988throw new ArgumentException(SR.ListViewStartIndexCannotBeLargerThanEndIndex);
System\Windows\Forms\Controls\ListView\ListViewGroupCollection.cs (1)
180throw new ArgumentException(string.Format(SR.OnlyOneControl, item.Text));
System\Windows\Forms\Controls\ListView\ListViewVirtualItemsSelectionRangeChangedEventArgs.cs (1)
18throw new ArgumentException(SR.ListViewStartIndexCannotBeLargerThanEndIndex);
System\Windows\Forms\Controls\MonthCalendar\SelectionRangeConverter.cs (1)
72throw new ArgumentException(string.Format(SR.TextParseFailedFormat,
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (6)
920throw new ArgumentException(string.Format(SR.PropertyGridSetNull, count, value.Length)); 1691throw new ArgumentException(string.Format(SR.PropertyGridNoBitmap, tab.GetType().FullName)); 1696throw new ArgumentException(string.Format(SR.PropertyGridTabName, tab.GetType().FullName)); 3423throw new ArgumentException(SR.PropertyGridTabScope); 3526throw new ArgumentException(SR.PropertyGridRemoveStaticTabs); 3569throw new ArgumentException(SR.PropertyGridRemoveStaticTabs);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
504throw new ArgumentException(SR.PropertyGridInvalidGridEntry);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (4)
1862throw new ArgumentException(string.Format(SR.RichTextFindEndInvalid, end)); 2339throw new ArgumentException(SR.InvalidFileType); 2712_ => throw new ArgumentException(SR.UnknownAttr), 2878throw new ArgumentException(SR.InvalidFileFormat);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
245throw new ArgumentException(SR.SplitterInvalidDockEnum);
System\Windows\Forms\Controls\TabControl\TabControl.ControlCollection.cs (1)
25throw new ArgumentException(string.Format(SR.TabControlInvalidTabPageType, value.GetType().Name));
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
487throw new ArgumentException(string.Format(SR.TabControlTabPageNotOnTabControl, value.GetType().FullName));
System\Windows\Forms\Controls\TabControl\TabPage.TabPageControlCollection.cs (1)
31throw new ArgumentException(SR.TabControlTabPageOnTabPage);
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (3)
690throw new ArgumentException(SR.MaskedTextBoxMaskInvalidChar); 841throw new ArgumentException(SR.MaskedTextBoxInvalidCharError); 899throw new ArgumentException(SR.MaskedTextBoxInvalidCharError);
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
762throw new ArgumentException(SR.AutoCompleteFailure);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
275throw new ArgumentException(SR.ToolStripAllowItemReorderAndAllowDropCannotBeSetToTrue); 307throw new ArgumentException(SR.ToolStripAllowItemReorderAndAllowDropCannotBeSetToTrue);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
1087throw new ArgumentException(SR.ToolStripMergeImpossibleIdentical); 1271throw new ArgumentException(SR.ToolStripMergeImpossibleIdentical);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRow.ToolStripPanelRowControlCollection.cs (1)
290throw new ArgumentException(SR.ToolStripPanelRowControlCollectionIncorrectIndexLength);
System\Windows\Forms\Controls\TreeView\TreeNode.cs (1)
1774throw new ArgumentException(SR.TreeNodeCircularReference);
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (1)
117throw new ArgumentException(SR.HtmlDocumentInvalidDomain);
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
1290throw new ArgumentException(string.Format(SR.WebBrowserNavigateAbsoluteUri, "uri"));
System\Windows\Forms\DataBinding\BindingContext.cs (1)
267?? throw new ArgumentException(string.Format(SR.RelatedListManagerChild, dataField));
System\Windows\Forms\DataBinding\BindingSource.cs (3)
651?? throw new ArgumentException(string.Format(SR.DataSourceDataMemberPropNotFound, propertyName)); 999: throw new ArgumentException(SR.BindingSourceBadSortString); 1004?? throw new ArgumentException(SR.BindingSourceSortStringPropertyNotInIBindingList);
System\Windows\Forms\DataBinding\Command.cs (1)
90throw new ArgumentException(SR.CommandIdNotAllocated);
System\Windows\Forms\DataBinding\ListBindingHelper.cs (2)
49?? throw new ArgumentException(string.Format(SR.DataSourceDataMemberPropNotFound, dataMember)); 187listAccessors2[0] = dmProp ?? throw new ArgumentException(string.Format(SR.DataSourceDataMemberPropNotFound, dataMember));
System\Windows\Forms\DataBinding\PropertyManager.cs (1)
42throw new ArgumentException(string.Format(SR.PropertyManagerPropDoesNotExist, _propName, dataSource));
System\Windows\Forms\DataBinding\RelatedCurrencyManager.cs (1)
38throw new ArgumentException(string.Format(SR.RelatedListManagerChild, dataField));
System\Windows\Forms\DataBinding\RelatedPropertyManager.cs (1)
27throw new ArgumentException(string.Format(SR.RelatedListManagerChild, dataField));
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogButtonCollection.cs (2)
73throw new ArgumentException(SR.TaskDialogControlAlreadyAddedToCollection); 108throw new ArgumentException(SR.TaskDialogControlAlreadyAddedToCollection);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogRadioButtonCollection.cs (2)
72throw new ArgumentException(SR.TaskDialogControlAlreadyAddedToCollection); 107throw new ArgumentException(SR.TaskDialogControlAlreadyAddedToCollection);
System\Windows\Forms\Layout\TableLayout.cs (2)
259throw new ArgumentException(SR.TableLayoutPanelFullDesc); 264throw new ArgumentException(SR.TableLayoutPanelSpanDesc);
System\Windows\Forms\Layout\TableLayout.SorterObjectArray.cs (2)
35throw new ArgumentException(null); 79throw new ArgumentException(null);
System\Windows\Forms\NotifyIcon.cs (1)
551throw new ArgumentException(SR.NotifyIconEmptyOrNullTipText);
System\Windows\Forms\Printing\PageSetupDialog.cs (1)
268throw new ArgumentException(SR.PSDcantShowWithoutPage);
System\Windows\Forms\Printing\PrintDialog.cs (6)
275throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "FromPage")); 281throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "ToPage")); 286throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "FromPage")); 389throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "FromPage")); 395throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "ToPage")); 400throw new ArgumentException(string.Format(SR.PDpageOutOfRange, "FromPage"));
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
137throw new ArgumentException(SR.PrintPreviewControlZoomNegative);
System\Windows\Forms\SendKeys\SendKeys.cs (12)
406throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 440throw new ArgumentException(SR.SendKeysKeywordDelimError); 457throw new ArgumentException(SR.SendKeysKeywordDelimError); 474throw new ArgumentException(SR.SendKeysKeywordDelimError); 479throw new ArgumentException(SR.InvalidSendKeysRepeat); 516throw new ArgumentException(string.Format(SR.InvalidSendKeysKeyword, keys[(i + 1)..j])); 526throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 537throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 548throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 567throw new ArgumentException(SR.SendKeysNestingError); 590throw new ArgumentException(string.Format(SR.InvalidSendKeysString, keys)); 618throw new ArgumentException(SR.SendKeysGroupDelimError);
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (2)
139throw new ArgumentException(SR.VisualStylesInvalidCombination); 201throw new ArgumentException(SR.VisualStylesInvalidCombination);
System.Windows.Forms.Analyzers.CSharp (1)
System\Windows\Forms\CSharp\Generators\ApplicationConfiguration\ProjectFileReader.FontConverter.cs (1)
81throw new ArgumentException(string.Format(SR.TextParseFailedFormat,
System.Windows.Forms.Design (24)
System\ComponentModel\Design\EventBindingService.EventPropertyDescriptor.cs (1)
146throw new ArgumentException(string.Format(SR.EventBindingServiceBadArgType, Name, nameof(String)))
System\ComponentModel\Design\MenuCommandService.cs (1)
84throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.MenuCommandService_DuplicateCommand, commandId.ToString()));
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (4)
968Exception ex = new ArgumentException(SR.CodeDomDesignerLoaderBadSerializationObject) 1182Exception ex = new ArgumentException(SR.CodeDomDesignerLoaderInvalidBlankIdentifier) 1215Exception ex = new ArgumentException(string.Format(SR.CodeDomDesignerLoaderInvalidIdentifier, name)) 1258Exception ex = new ArgumentException(string.Format(SR.CodeDomDesignerLoaderDupComponentName, name))
System\ComponentModel\Design\Serialization\CodeDomSerializer.cs (1)
88throw new ArgumentException(string.Format(SR.SerializerBadElementTypes, codeObject.GetType().Name, supportedTypes));
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.cs (1)
112throw new ArgumentException(string.Format(SR.SerializerBadElementTypes, codeObject.GetType().Name, supportedTypes));
System\ComponentModel\Design\Serialization\ResourceCodeDomSerializer.SerializationResourceManager.cs (2)
161throw new ArgumentException("Serialization manager should have a PropertyDescriptor context"); 166throw new ArgumentException("Serialization manager should have an ExpressionContext context");
System\Resources\Tools\StronglyTypedResourceBuilder.cs (2)
174throw new ArgumentException(string.Format(SR.MismatchedResourceName, keyname, node.Name)); 339throw new ArgumentException(string.Format(SR.InvalidIdentifier, className));
System\Windows\Forms\Design\CommandSet.cs (1)
2579: throw new ArgumentException(SR.CommandSetUnknownSpacingCommand);
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (3)
249?? throw new ArgumentException(string.Format(SR.AXNotRegistered, controlKey)); 317throw new ArgumentException(string.Format(SR.AXNotRegistered, controlKey)); 335throw new ArgumentException(string.Format(SR.AXNotRegistered, controlKey));
System\Windows\Forms\Design\ListControlStringCollectionEditor.cs (1)
25throw new ArgumentException(SR.DataSourceLocksItems);
System\Windows\Forms\Design\ParentControlDesigner.cs (1)
255throw new ArgumentException(string.Format(SR.InvalidArgument,
System\Windows\Forms\Design\TabControlDesigner.cs (1)
123throw new ArgumentException(string.Format(SR.TabControlInvalidTabPageType, tool.DisplayName));
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (2)
66throw new ArgumentException(string.Format(SR.TableLayoutPanelDesignerInvalidColumnRowCount, "RowCount")); 82throw new ArgumentException(string.Format(SR.TableLayoutPanelDesignerInvalidColumnRowCount, "ColumnCount"));
System\Windows\Forms\Design\ToolStripDesigner.cs (2)
116throw new ArgumentException(SR.ToolStripAllowItemReorderAndAllowDropCannotBeSetToTrue); 133throw new ArgumentException(SR.ToolStripAllowItemReorderAndAllowDropCannotBeSetToTrue);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (1)
126throw new ArgumentException(string.Format(SR.InvalidArgument, "DropDown", value.ToString()));
System.Windows.Forms.IntegrationTests.Common (3)
TestHelpers.cs (3)
423throw new ArgumentException($"{nameof(process)} must not be null."); 428throw new ArgumentException($"{nameof(process)} must not have exited."); 433throw new ArgumentException($"{nameof(keys)} must not be null or empty.");
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\ScaleHelper.cs (1)
360?? throw new ArgumentException(string.Format(SR.ResourceNotFound, type, resource));
Windows\Win32\System\Com\ComSafeArrayScope.cs (1)
27throw new ArgumentException("Must pass in a SafeArray of type VARENUM.VT_UNKNOWN");
System.Windows.Forms.Primitives.TestUtilities (2)
Win32\WindowClass.cs (2)
82throw new ArgumentException($"Can't set both {nameof(menuName)} and {nameof(menuId)}."); 157throw new ArgumentException("Window class must be registered before using.");
System.Xaml (34)
src\Microsoft.DotNet.Wpf\src\Shared\System\Windows\Markup\ReflectionHelper.cs (3)
347throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 360throw new ArgumentException(SR.Format(SR.ParserAttributeArgsLow, attrType.Name)); 365throw new ArgumentException(SR.Format(SR.ParserAttributeArgsHigh, attrType.Name));
System\Windows\Markup\StaticExtension.cs (5)
68throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, _member)); 75throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, _member)); 84throw new ArgumentException(SR.Format(SR.MarkupExtensionNoContext, GetType().Name, nameof(IXamlTypeResolver))); 94throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, _member)); 110throw new ArgumentException(SR.Format(SR.MarkupExtensionBadStatic, typeNameForError is not null ? $"{typeNameForError}.{_member}" : _member));
System\Windows\Markup\StaticExtensionsToInstanceDescriptorsConverter.cs (1)
32throw new ArgumentException(SR.Format(SR.MustBeOfType, nameof(value), nameof(StaticExtension)));
System\Windows\Markup\TypeExtensionConverter.cs (1)
32throw new ArgumentException(SR.Format(SR.MustBeOfType, nameof(value), nameof(TypeExtension)));
System\Xaml\Context\ServiceProviderContext.cs (5)
139throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); 155throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "types")); 173throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties")); 189throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "types")); 209throw new ArgumentException(SR.Format(SR.ValueInArrayIsNull, "properties"));
System\Xaml\InfosetObjects\XamlObjectWriter.cs (2)
898throw new ArgumentException(SR.NamespaceDeclarationPrefixCannotBeNull); 903throw new ArgumentException(SR.NamespaceDeclarationNamespaceCannotBeNull);
System\Xaml\NameScope.cs (5)
33throw new ArgumentException(SR.NameScopeNameNotEmptyString); 38throw new ArgumentException(SR.Format(SR.NameScopeInvalidIdentifierName, name)); 56throw new ArgumentException(SR.Format(SR.NameScopeDuplicateNamesNotAllowed, name)); 71throw new ArgumentException(SR.NameScopeNameNotEmptyString); 76throw new ArgumentException(SR.Format(SR.NameScopeNameNotFound, name));
System\Xaml\NameScopeDictionary.cs (6)
43throw new ArgumentException(SR.NameScopeNameNotEmptyString); 47throw new ArgumentException(SR.Format(SR.NameScopeInvalidIdentifierName, name)); 72throw new ArgumentException(SR.Format(SR.NameScopeDuplicateNamesNotAllowed, name)); 83throw new ArgumentException(SR.NameScopeNameNotEmptyString); 98throw new ArgumentException(SR.Format(SR.NameScopeNameNotFound, name)); 108throw new ArgumentException(SR.NameScopeNameNotEmptyString);
System\Xaml\Parser\MeScanner.cs (1)
319throw new ArgumentException(SR.MalformedPropertyName);
System\Xaml\Schema\XamlValueConverter.cs (1)
33throw new ArgumentException(SR.Format(SR.ArgumentRequired, $"{nameof(converterType)}, {nameof(targetType)}, {nameof(name)}"));
System\Xaml\XamlMarkupExtensionWriter.cs (1)
177throw new ArgumentException(SR.XamlMarkupExtensionWriterCannotWriteNonstringValue);
System\Xaml\XamlSchemaContext.cs (2)
295throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "xamlTypeName.TypeArguments")); 319throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "typeArguments"));
System\Xaml\XamlType.cs (1)
1587throw new ArgumentException(SR.Format(SR.CollectionCannotContainNulls, "typeArguments"));
Templates.Blazor.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
Templates.Blazor.WebAssembly.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
Templates.Mvc.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
Templates.Tests (1)
src\ProjectTemplates\Shared\Project.cs (1)
549throw new ArgumentException($"AssemblyMetadataAttribute with key {key} was not found.");
Test.Utilities (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
TestProject.AppHost (2)
TestProgram.cs (1)
36throw new ArgumentException("Missing argument to --skip-resources option.");
tests\testproject\Common\TestResourceNames.cs (1)
30throw new ArgumentException($"Unknown resource name: {resourceName}");
TestProject.IntegrationServiceA (1)
tests\testproject\Common\TestResourceNames.cs (1)
30throw new ArgumentException($"Unknown resource name: {resourceName}");
Text.Analyzers (1)
src\RoslynAnalyzers\Utilities\Compiler\Options\SymbolNamesWithValueOption.cs (1)
286throw new ArgumentException($"Unsupported symbol kind '{symbol.Kind}' for symbol '{symbol}'");
UIAutomationClient (19)
MS\Internal\Automation\Misc.cs (3)
144throw new ArgumentException(SR.UnsupportedPattern); 166throw new ArgumentException(SR.Format(SR.GenericInvalidArgument, argName)); 174throw new ArgumentException(SR.GetResourceString(reason, null));
MS\Internal\Automation\ProxyManager.cs (1)
729throw new ArgumentException(SR.NonclientClassnameCannotBeUsedWithFlagsOrImagename);
System\Windows\Automation\Automation.cs (2)
171throw new ArgumentException( SR.ParamsNotApplicableToWindowClosedEvent ); 222throw new ArgumentException( SR.AtLeastOnePropertyMustBeSpecified );
System\Windows\Automation\AutomationElement.cs (4)
501return new ArgumentException(SR.UnsupportedProperty); 707throw new ArgumentException(SR.UnsupportedPattern); 1286throw new ArgumentException(SR.TreeScopeNeedAtLeastOne); 1290throw new ArgumentException(SR.TreeScopeElementChildrenDescendantsOnly);
System\Windows\Automation\CacheRequest.cs (2)
303throw new ArgumentException(SR.TreeScopeNeedAtLeastOne); 308throw new ArgumentException(SR.TreeScopeElementChildrenDescendantsOnly);
System\Windows\Automation\ItemContainerPattern.cs (2)
129throw new ArgumentException(SR.UnsupportedProperty); 140throw new ArgumentException(SR.Format(SR.PropertyConditionIncorrectType, property.ProgrammaticName, expectedType.Name));
System\Windows\Automation\PropertyCondition.cs (2)
127throw new ArgumentException(SR.UnsupportedProperty); 138throw new ArgumentException(SR.Format(SR.PropertyConditionIncorrectType, property.ProgrammaticName, expectedType.Name));
System\Windows\Automation\Text\TextRange.cs (2)
180throw new ArgumentException(SR.UnsupportedAttribute); 236throw new ArgumentException(SR.UnsupportedAttribute);
System\Windows\Automation\TextPattern.cs (1)
220throw new ArgumentException(SR.ScreenCoordinatesOutsideBoundingRect);
UIAutomationClientSideProviders (5)
MS\Internal\AutomationProxies\Accessible.cs (1)
1356throw new ArgumentException(SR.InvalidParameter);
MS\Internal\AutomationProxies\WindowsListView.cs (2)
825throw new ArgumentException(SR.InvalidParameter); 834throw new ArgumentException(SR.InvalidParameter);
MS\Internal\AutomationProxies\WindowsRichEditRange.cs (1)
1261throw new ArgumentException(name);
MS\Internal\AutomationProxies\WindowsUpDown.cs (1)
210throw new ArgumentException(SR.InvalidParameter);
UIAutomationProvider (2)
System\Windows\Automation\Provider\AutomationInteropProvider.cs (2)
182throw new ArgumentException(SR.Format(SR.GenericInvalidArgument, argName)); 190throw new ArgumentException(SR.GetResourceString(reason, null));
vbc (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
132throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
VBCSCompiler (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
132throw new ArgumentException($"Request is over {MaximumRequestSize >> 20}MB in length");
WindowsFormsIntegration (2)
System\Windows\Integration\PropertyMap.cs (1)
140throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, SR.WFI_PropertyDoesntExist, propertyName, SourceObject.GetType().FullName));
System\Windows\Integration\WindowsFormsHost.cs (1)
317throw new ArgumentException(SR.Host_ChildCantBeTopLevelForm);
xunit.console (34)
CommandLine.cs (24)
67var reporter = reporters.FirstOrDefault(r => r.RunnerSwitch == unknownOption) ?? throw new ArgumentException($"unknown option: -{unknownOption}"); 70throw new ArgumentException("only one reporter is allowed"); 103throw new ArgumentException($"error: unknown command line option: {option.Value}"); 218throw new ArgumentException($"expecting assembly, got config file: {assemblyFile}"); 220throw new ArgumentException($"file not found: {assemblyFile}"); 230throw new ArgumentException($"config file not found: {configFile}"); 245throw new ArgumentException($"unknown command line option: {option.Key}"); 321throw new ArgumentException("missing argument for -appdomains"); 337throw new ArgumentException("incorrect argument value for -appdomains (must be 'ifavailable', 'required', or 'denied')"); 344throw new ArgumentException("missing argument for -maxthreads"); 359throw new ArgumentException("incorrect argument value for -maxthreads (must be 'default', 'unlimited', or a positive number)"); 368throw new ArgumentException("missing argument for -parallel"); 371throw new ArgumentException("incorrect argument value for -parallel"); 405throw new ArgumentException("missing argument for -trait"); 409throw new ArgumentException("incorrect argument format for -trait (should be \"name=value\")"); 418throw new ArgumentException("missing argument for -notrait"); 422throw new ArgumentException("incorrect argument format for -notrait (should be \"name=value\")"); 431throw new ArgumentException("missing argument for -class"); 438throw new ArgumentException("missing argument for -noclass"); 445throw new ArgumentException("missing argument for -method"); 452throw new ArgumentException("missing argument for -nomethod"); 459throw new ArgumentException("missing argument for -namespace"); 466throw new ArgumentException("missing argument for -nonamespace"); 476throw new ArgumentException($"missing filename for {option.Key}");
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\Dependency.cs (2)
15throw new ArgumentException(nameof(name)); 19throw new ArgumentException(nameof(version));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\Library.cs (3)
35throw new ArgumentException(nameof(type)); 39throw new ArgumentException(nameof(name)); 43throw new ArgumentException(nameof(version));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\ResourceAssembly.cs (2)
14throw new ArgumentException(nameof(path)); 18throw new ArgumentException(nameof(locale));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\RuntimeFallbacks.cs (1)
20throw new ArgumentException(nameof(runtime));
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\TargetInfo.cs (1)
17throw new ArgumentException(nameof(framework));
ConsoleRunner.cs (1)
48throw new ArgumentException("must specify at least one assembly");