13 types derived from ArgumentException
dotnet-svcutil.xmlserializer (1)
dotnet-svcutil-lib (2)
System.ComponentModel.Primitives (2)
System.Private.CoreLib (6)
System.Text.RegularExpressions (1)
System.Text.RegularExpressions.Generator (1)
7672 instantiations of ArgumentException
aspire (4)
Aspire.Azure.Messaging.EventHubs (3)
Aspire.Azure.Messaging.ServiceBus (3)
Aspire.Azure.Messaging.WebPubSub (3)
Aspire.Confluent.Kafka (4)
Aspire.Dashboard (4)
Aspire.EndToEnd.Tests (13)
Aspire.Hosting (26)
Aspire.Hosting.Analyzers (1)
Aspire.Hosting.Azure.AppContainers (1)
Aspire.Hosting.Azure.CosmosDB (9)
Aspire.Hosting.Azure.KeyVault (2)
Aspire.Hosting.Azure.Tests (2)
Aspire.Hosting.Docker (3)
Aspire.Hosting.Python (2)
Aspire.Hosting.Testing (6)
DistributedApplicationHostingTestingExtensions.cs (4)
52throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.ResourceDoesNotExposeConnectionStringExceptionMessage, resourceName), nameof(resourceName));
85throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.ResourceNotFoundExceptionMessage, resourceName), nameof(resourceName));
96throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.ResourceHasNoAllocatedEndpointsExceptionMessage, resourceName), nameof(resourceName));
111throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Resources.EndpointForResourceNotFoundExceptionMessage, endpointName, resourceName), nameof(endpointName));
Aspire.Hosting.Testing.Tests (1)
Aspire.Hosting.Tests (6)
Aspire.Hosting.Yarp (5)
Aspire.Microsoft.Azure.Cosmos (3)
Aspire.Microsoft.Data.SqlClient (3)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (3)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (3)
Aspire.Playground.Tests (3)
Aspire.StackExchange.Redis (3)
Aspire.Templates.Tests (9)
Aspire.TestUtilities (1)
BoundTreeGenerator (26)
BoundNodeClassWriter.cs (26)
161throw new ArgumentException("Unexpected target language", nameof(_targetLang));
213throw new ArgumentException("Unexpected target language", nameof(_targetLang));
230throw new ArgumentException("Unexpected target language", nameof(_targetLang));
246throw new ArgumentException("Unexpected target language", nameof(_targetLang));
272throw new ArgumentException("Unexpected target language", nameof(_targetLang));
322throw new ArgumentException("Unexpected target language", nameof(_targetLang));
340throw new ArgumentException("Unexpected target language", nameof(_targetLang));
384throw new ArgumentException("Unexpected target language", nameof(_targetLang));
555throw new ArgumentException("Unexpected target language", nameof(_targetLang));
655throw new ArgumentException("Unexpected target language", nameof(_targetLang));
790throw new ArgumentException($"Field '{fieldName}' on node '{node.Name}' should have a nullable type, since it isn't a value type and it is marked null=allow or null=always");
806throw new ArgumentException("Unexpected value", nameof(f.Null));
875throw new ArgumentException("Unexpected target language", nameof(_targetLang));
900throw new ArgumentException("Unexpected target language", nameof(_targetLang));
952throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1176throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1234throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1362throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1489throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1679throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1723throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1755throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1790throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1867throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1885throw new ArgumentException("Unexpected target language", nameof(_targetLang));
1900throw new ArgumentException("Unexpected target language", nameof(_targetLang));
ClientSample (2)
CodeGenerator (1)
ConfigurationSchemaGenerator (2)
Crossgen2Tasks (3)
csc (1)
DemoConsole (2)
dotnet-dev-certs (2)
dotnet-getdocument (2)
dotnet-openapi (14)
dotnet-sql-cache (3)
dotnet-svcutil.xmlserializer (8)
dotnet-svcutil-lib (342)
FrameworkFork\Microsoft.CodeDom\Compiler\CodeValidator.cs (10)
62throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
99throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
500throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
701throw new ArgumentException(string.Format(SRCodeDom.ArityDoesntMatch, baseType, e.TypeArguments.Count));
710throw new ArgumentException(message, "typeName");
719throw new ArgumentException(message, "identifier");
833throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
1019throw new ArgumentException(string.Format(SRCodeDom.InvalidElementType, e.GetType().FullName), "e");
1025throw new ArgumentException(string.Format(SRCodeDom.InvalidPathCharsInChecksum, e.FileName));
1031throw new ArgumentException(string.Format(SRCodeDom.InvalidRegion, e.RegionText));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWellformedWriter.cs (28)
361throw new ArgumentException(ResXml.Xml_NoRoot);
381throw new ArgumentException(ResXml.Xml_EmptyName);
412throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), "pubid");
419throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), "sysid");
426throw new ArgumentException(string.Format(ResXml.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), "subset");
449throw new ArgumentException(ResXml.Xml_EmptyLocalName);
476throw new ArgumentException(ResXml.Xml_PrefixForEmptyNs);
640throw new ArgumentException(ResXml.Xml_EmptyLocalName);
679throw new ArgumentException(ResXml.Xml_XmlnsPrefix);
702throw new ArgumentException(ResXml.Xml_XmlnsPrefix);
712throw new ArgumentException(ResXml.Xml_XmlPrefix);
808throw new ArgumentException(ResXml.Xml_PrefixForEmptyNs);
812throw new ArgumentException(ResXml.Xml_CanNotBindToReservedNamespace);
852throw new ArgumentException(string.Format(ResXml.Xml_InvalidXmlSpace, value));
924throw new ArgumentException(ResXml.Xml_EmptyName);
939throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? ResXml.Xml_DupXmlDecl : ResXml.Xml_CannotWriteXmlDecl);
975throw new ArgumentException(ResXml.Xml_EmptyName);
1002throw new ArgumentException(ResXml.Xml_InvalidSurrogateMissingLowChar);
1058throw new ArgumentException(ResXml.Xml_NonWhitespace);
1368throw new ArgumentException(ResXml.Xml_EmptyLocalName);
1381throw new ArgumentException(string.Format(ResXml.Xml_UndefNamespace, ns));
1716throw new ArgumentException(ResXml.Xml_XmlPrefix);
1726throw new ArgumentException(ResXml.Xml_XmlnsPrefix);
1743throw new ArgumentException(string.Format(ResXml.Xml_NamespaceDeclXmlXmlns, prefix));
1827throw new ArgumentException(string.Format(ResXml.Xml_NamespaceDeclXmlXmlns, prefix));
1835throw new ArgumentException(ResXml.Xml_XmlPrefix);
1840throw new ArgumentException(ResXml.Xml_XmlnsPrefix);
2190return new ArgumentException(string.Format(ResXml.Xml_InvalidNameCharsDetail, args));
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationReader.cs (9)
1015throw new ArgumentException(string.Format(ResXml.XmlEmptyArrayType, CurrentTag()), "value");
1029throw new ArgumentException(ResXml.XmlInvalidArraySyntax, "value");
1037throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayDimentions, CurrentTag()), "value");
1042throw new ArgumentException(ResXml.XmlMismatchedArrayBrackets, "value");
1059throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayLength, lengthString), "value");
1074throw new ArgumentException(ResXml.XmlMismatchedArrayBrackets, "value");
1076throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayDimentions, CurrentTag()), "value");
1078throw new ArgumentException(ResXml.XmlInvalidArraySyntax, "value");
1128throw new ArgumentException(string.Format(ResXml.XmlInvalidArrayLength, dimensions[i]), "value");
FrameworkFork\Microsoft.Xml\Xml\XmlEncoding.cs (5)
35throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { -1 }), (string)null);
551throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null);
590throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null);
630throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null);
670throw new ArgumentException(string.Format(ResXml.Enc_InvalidByteInEncoding, new object[1] { i }), (string)null);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (25)
216throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlPrefixBoundToNamespace, "xml", xmlNamespace, ns), "ns"));
224throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), "ns"));
242throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlUndefinedPrefix, prefix), "prefix"));
249throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlEmptyNamespaceRequiresNullPrefix), "prefix"));
261throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xmlns", ns)));
263throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xml", ns)));
322throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidXmlSpace, _attributeValue)));
375throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidXmlSpace, _attributeValue)));
419throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlInvalidCommentChars), "text"));
478throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName"));
493throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlUndefinedPrefix, prefix), "prefix"));
523throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName"));
547throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlUndefinedPrefix, prefix), "prefix"));
780throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlNamespaceNotFound, namespaceUri), "namespaceUri"));
794throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName"));
813throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.InvalidLocalNameEmpty), "localName"));
858throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlProcessingInstructionNotSupported), "name"));
940throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlOnlyWhitespace), "whitespace"));
1090throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlMissingLowSurrogate), "ch"));
1210throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlNestedArraysNotSupported), "value"));
1923throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlReservedPrefix), "prefix"));
1936throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlPrefixBoundToNamespace, prefix, nameSpace.Uri, uri), "prefix"));
1940throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlEmptyNamespaceRequiresNullPrefix), "prefix"));
1942throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xmlns", uri)));
1945throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(string.Format(SRSerialization.XmlSpecificBindingNamespace, "xml", uri)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (2)
521new ArgumentException(string.Format(SRServiceModel.SFxParameterCountMismatch, "parts", parts.Length, "parameters", parameters.Length), "parameters"));
586new ArgumentException(string.Format(SRServiceModel.SFxParameterCountMismatch, "parts", parts.Length, "parameters", parameters.Length), "parameters"));
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)));
dotnet-user-jwts (3)
dotnet-user-secrets (3)
GenerateDocumentationAndConfigFiles (51)
GetDocument.Insider (2)
http2cat (1)
IdeBenchmarks (1)
IdeCoreBenchmarks (18)
IIS.Common.TestLib (1)
IIS.FunctionalTests (1)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (1)
illink (22)
ILLink.RoslynAnalyzer (16)
ILLink.Tasks (6)
InMemory.FunctionalTests (2)
installer.tasks (3)
InteropClient (1)
Metrics (38)
Metrics.Legacy (38)
Microsoft.Analyzers.Local.Tests (2)
Microsoft.Arcade.Test.Common (1)
Microsoft.AspNetCore.Antiforgery (1)
Microsoft.AspNetCore.Antiforgery.Test (1)
Microsoft.AspNetCore.App.Analyzers (4)
Microsoft.AspNetCore.App.Analyzers.Test (5)
RouteEmbeddedLanguage\Infrastructure\MarkupTestFile.cs (5)
124throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw multiple occurrences of {0}", PositionString));
137throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", SpanEndString, SpanStartString));
151throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", NamedSpanEndString, NamedSpanStartString));
164throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", SpanStartString, SpanEndString));
169throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, "Saw {0} without matching {1}", NamedSpanEndString, NamedSpanEndString));
Microsoft.AspNetCore.AsyncState (2)
Microsoft.AspNetCore.Authentication (1)
Microsoft.AspNetCore.Authentication.Abstractions (2)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
Microsoft.AspNetCore.Components (22)
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Microsoft.AspNetCore.Components.Endpoints (4)
Microsoft.AspNetCore.Components.Forms (8)
Microsoft.AspNetCore.Components.QuickGrid (2)
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Microsoft.AspNetCore.Components.Server (7)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Web (4)
Microsoft.AspNetCore.Components.WebAssembly (2)
Microsoft.AspNetCore.Components.WebAssembly.Tests (1)
Microsoft.AspNetCore.Components.WebView (1)
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
Microsoft.AspNetCore.ConcurrencyLimiter (3)
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.DataProtection (4)
Microsoft.AspNetCore.DataProtection.Abstractions (5)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Diagnostics.HealthChecks (2)
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.Hosting (3)
Microsoft.AspNetCore.Hosting.Abstractions (1)
Microsoft.AspNetCore.Http (2)
Microsoft.AspNetCore.Http.Abstractions (11)
Microsoft.AspNetCore.Http.Connections (3)
Microsoft.AspNetCore.Http.Connections.Client (6)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
Microsoft.AspNetCore.Http.Results (1)
Microsoft.AspNetCore.HttpLogging (1)
Microsoft.AspNetCore.InternalTesting (4)
Microsoft.AspNetCore.InternalTesting.Tests (1)
Microsoft.AspNetCore.JsonPatch (2)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Microsoft.AspNetCore.JsonPatch.SystemTextJson.Tests (1)
Microsoft.AspNetCore.JsonPatch.Tests (1)
Microsoft.AspNetCore.Localization (1)
Microsoft.AspNetCore.Mvc.Abstractions (6)
Microsoft.AspNetCore.Mvc.Api.Analyzers (1)
Microsoft.AspNetCore.Mvc.Core (36)
Microsoft.AspNetCore.Mvc.Core.Test (5)
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.Razor (4)
Microsoft.AspNetCore.Mvc.RazorPages (9)
Microsoft.AspNetCore.Mvc.TagHelpers (6)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (2)
Microsoft.AspNetCore.Mvc.ViewFeatures (18)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
Microsoft.AspNetCore.OutputCaching (3)
Microsoft.AspNetCore.Owin (3)
Microsoft.AspNetCore.RateLimiting (3)
Microsoft.AspNetCore.RateLimiting.Tests (2)
Microsoft.AspNetCore.ResponseCaching (2)
Microsoft.AspNetCore.ResponseCompression (2)
Microsoft.AspNetCore.Rewrite (5)
Microsoft.AspNetCore.Routing (15)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.IntegrationTesting (10)
Microsoft.AspNetCore.Server.Kestrel.Core (15)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Shared.Tests (9)
Microsoft.AspNetCore.SignalR.Common (1)
Microsoft.AspNetCore.SignalR.Tests (1)
Microsoft.AspNetCore.SpaServices.Extensions (3)
Microsoft.AspNetCore.StaticFiles (2)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.Testing (2)
Microsoft.AspNetCore.WebUtilities (10)
Microsoft.Build (13)
Microsoft.Build.Engine.OM.UnitTests (4)
Microsoft.Build.Engine.UnitTests (11)
Microsoft.Build.Framework (20)
Microsoft.Build.Tasks.CodeAnalysis (4)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (4)
Microsoft.Build.Tasks.Core (31)
Microsoft.Build.Tasks.UnitTests (1)
Microsoft.Build.UnitTests.Shared (1)
Microsoft.Build.Utilities.Core (9)
Microsoft.Cci.Extensions (3)
Microsoft.CodeAnalysis (159)
Compilation\Compilation.cs (32)
112throw new ArgumentException(CodeAnalysisResources.InconsistentSyntaxTreeFeature, nameof(trees));
234throw new ArgumentException(CodeAnalysisResources.ReturnTypeCannotBeValuePointerbyRefOrOpen, nameof(globalsType));
239throw new ArgumentException(CodeAnalysisResources.ReturnTypeCannotBeVoidByRefOrOpen, nameof(returnType));
250throw new ArgumentException(CodeAnalysisResources.TypeMustBeSameAsHostObjectTypeOfPreviousSubmission, nameof(globalsType));
274throw new ArgumentException(CodeAnalysisResources.InvalidOutputKindForSubmission, nameof(options));
283throw new ArgumentException(CodeAnalysisResources.InvalidCompilationOptions, nameof(options));
355throw new ArgumentException($"{nameof(arity)} must be >= 0", nameof(arity));
685throw new ArgumentException(string.Format(CodeAnalysisResources.ReferenceOfTypeIsInvalid1, reference.GetType()),
845throw new ArgumentException(string.Format(CodeAnalysisResources.MetadataRefNotFoundToRemove1, r),
1310throw new ArgumentException(CodeAnalysisResources.TuplesNeedAtLeastTwoElements, nameof(elementNames));
1353throw new ArgumentException(CodeAnalysisResources.TupleElementNullableAnnotationCountMismatch, nameof(elementNullableAnnotations));
1368throw new ArgumentException(CodeAnalysisResources.TupleElementNameCountMismatch, nameof(elementNames));
1375throw new ArgumentException(CodeAnalysisResources.TupleElementNameEmpty, $"{nameof(elementNames)}[{i}]");
1396throw new ArgumentException(CodeAnalysisResources.TupleElementLocationCountMismatch, nameof(elementLocations));
1472throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeMemberAndNamesCountMismatch2,
1478throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeArgumentCountMismatch2,
1484throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeArgumentCountMismatch2,
1490throw new ArgumentException(string.Format(CodeAnalysisResources.AnonymousTypeArgumentCountMismatch2,
1643throw new ArgumentException(string.Format(CodeAnalysisResources.IsSymbolAccessibleBadWithin, nameof(within)), nameof(within));
1659throw new ArgumentException(string.Format(CodeAnalysisResources.IsSymbolAccessibleWrongAssembly, parameterName), parameterName);
2833throw new ArgumentException(CodeAnalysisResources.StreamMustSupportWrite, nameof(peStream));
2840throw new ArgumentException(CodeAnalysisResources.PdbStreamUnexpectedWhenEmbedding, nameof(pdbStream));
2845throw new ArgumentException(CodeAnalysisResources.StreamMustSupportWrite, nameof(pdbStream));
2850throw new ArgumentException(CodeAnalysisResources.PdbStreamUnexpectedWhenEmittingMetadataOnly, nameof(pdbStream));
2856throw new ArgumentException(CodeAnalysisResources.MetadataPeStreamUnexpectedWhenEmittingMetadataOnly, nameof(metadataPEStream));
2861throw new ArgumentException(CodeAnalysisResources.IncludingPrivateMembersUnexpectedWhenEmittingToMetadataPeStream, nameof(metadataPEStream));
2873throw new ArgumentException(CodeAnalysisResources.EmbeddingPdbUnexpectedWhenEmittingMetadata, nameof(metadataPEStream));
2880throw new ArgumentException(CodeAnalysisResources.CannotTargetNetModuleWhenEmittingRefAssembly, nameof(metadataPEStream));
2884throw new ArgumentException(CodeAnalysisResources.CannotTargetNetModuleWhenEmittingRefAssembly, nameof(options.EmitMetadataOnly));
2892throw new ArgumentException(CodeAnalysisResources.StreamMustSupportReadAndSeek, nameof(win32Resources));
2898throw new ArgumentException(CodeAnalysisResources.StreamMustSupportRead, nameof(sourceLinkStream));
2906throw new ArgumentException(CodeAnalysisResources.EmbeddedTextsRequirePdb, nameof(embeddedTexts));
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (10)
137throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(analyzers));
142throw new ArgumentException(CodeAnalysisResources.ArgumentElementCannotBeNull, nameof(analyzers));
148throw new ArgumentException(CodeAnalysisResources.DuplicateAnalyzerInstances, nameof(analyzers));
158throw new ArgumentException(CodeAnalysisResources.UnsupportedAnalyzerInstance, nameof(analyzer));
166throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(analyzer));
176throw new ArgumentException(CodeAnalysisResources.UnsupportedAnalyzerInstance, nameof(_analyzers));
182throw new ArgumentException(CodeAnalysisResources.DuplicateAnalyzerInstances, nameof(analyzers));
195throw new ArgumentException(CodeAnalysisResources.InvalidTree, nameof(model));
208throw new ArgumentException(CodeAnalysisResources.InvalidTree, nameof(tree));
221throw new ArgumentException(CodeAnalysisResources.InvalidAdditionalFile, nameof(file));
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (7)
63throw new ArgumentException(string.Format(CodeAnalysisResources.UnsupportedDiagnosticReported, diagnostic.Id), nameof(diagnostic));
71throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticIdReported, diagnostic.Id), nameof(diagnostic));
99throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticLocationReported, id, location.SourceTree.FilePath), "diagnostic");
105throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticSpanReported, id, location.SourceSpan, location.SourceTree.FilePath), "diagnostic");
126throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(symbolKinds));
140throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(syntaxKinds));
153throw new ArgumentException(CodeAnalysisResources.ArgumentCannotBeEmpty, nameof(operationKinds));
SourceGeneration\AdditionalSourcesCollection.cs (5)
64throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameInvalidChar, hintName, c, i), nameof(hintName));
72throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameInvalidSegment, hintName, match.Value, match.Index), nameof(hintName));
78throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameUniquePerGenerator, hintName), nameof(hintName));
83throw new ArgumentException(string.Format(CodeAnalysisResources.SourceTextRequiresEncoding, hintName), nameof(source));
129throw new ArgumentException(string.Format(CodeAnalysisResources.HintNameUniquePerGenerator, source.HintName), "hintName");
Microsoft.CodeAnalysis.Analyzers (50)
Microsoft.CodeAnalysis.Analyzers.UnitTests (7)
Microsoft.CodeAnalysis.AnalyzerUtilities (46)
Microsoft.CodeAnalysis.BannedApiAnalyzers (50)
Microsoft.CodeAnalysis.CodeStyle (35)
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
Microsoft.CodeAnalysis.Collections.Package (20)
Microsoft.CodeAnalysis.CSharp (104)
Compilation\CSharpCompilation.cs (29)
546throw new ArgumentException(CodeAnalysisResources.InconsistentLanguageVersions, nameof(syntaxTrees));
874throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, $"{nameof(trees)}[{i}]");
879throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, $"{nameof(trees)}[{i}]");
884throw new ArgumentException(CSharpResources.SubmissionCanOnlyInclude, $"{nameof(trees)}[{i}]");
896throw new ArgumentException(CSharpResources.SubmissionCanHaveAtMostOne, nameof(trees));
947throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, $"{nameof(trees)}[{i}]");
950throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, $"{nameof(trees)}[{i}]");
1004throw new ArgumentException(CSharpResources.TreeMustHaveARootNodeWith, nameof(newTree));
1015throw new ArgumentException(CSharpResources.SyntaxTreeFromLoadNoRemoveReplace, nameof(oldTree));
1018throw new ArgumentException(CSharpResources.SyntaxTreeNotFoundToRemove, nameof(oldTree));
1023throw new ArgumentException(CSharpResources.SyntaxTreeAlreadyPresent, nameof(newTree));
2401throw new ArgumentException(nameof(rank));
2547throw new ArgumentException(CSharpResources.SyntaxTreeNotFound, nameof(syntaxTree));
4121throw new ArgumentException(string.Format(CSharpResources.NotSameNumberParameterTypesAndRefKinds, parameterTypes.Length, parameterRefKinds.Length));
4127throw new ArgumentException(CSharpResources.OutIsNotValidForReturn);
4132throw new ArgumentException(string.Format(CSharpResources.CallingConventionTypesRequireUnmanaged, nameof(callingConventionTypes), nameof(callingConvention)));
4167throw new ArgumentException(string.Format(CSharpResources.CallingConventionTypeIsInvalid, type.ToDisplayString()));
4220throw new ArgumentException(CodeAnalysisResources.TupleUnderlyingTypeMustBeTupleCompatible, nameof(underlyingType));
4253throw new ArgumentException($"Non-ReadOnly members are not supported in C# anonymous types.");
4289throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name));
4293throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name));
4488throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps2, $"{csharpReturnType.ToDisplayString()} operator {name}({csharpLeftType.ToDisplayString()}, {csharpRightType.ToDisplayString()})"));
4515throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps1, name), nameof(name));
4519throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps3, name), nameof(name));
4570throw new ArgumentException(string.Format(CodeAnalysisResources.BadBuiltInOps2, $"{csharpReturnType.ToDisplayString()} operator {name}({csharpOperandType.ToDisplayString()})"));
4637throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
4655throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
4676throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
4702throw new ArgumentException(CSharpResources.NoNoneSearchCriteria, nameof(filter));
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Features (4)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (13)
Microsoft.CodeAnalysis.EditorFeatures (9)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (8)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (6)
Microsoft.CodeAnalysis.Extensions.Package (21)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (4)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Microsoft.CodeAnalysis.Features (22)
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (3)
155throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_in_file_1_which_is_not_part_of_the_compilation_being_analyzed, id, location.SourceTree.FilePath), "diagnostic");
161throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_1_in_file_2_which_is_outside_of_the_given_file, id, location.SourceSpan, location.SourceTree.FilePath), "diagnostic");
184throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_1_in_file_2_which_is_outside_of_the_given_file, id, location.SourceSpan, filePath), "diagnostic");
Microsoft.CodeAnalysis.InteractiveHost (21)
Microsoft.CodeAnalysis.LanguageServer (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol (9)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (50)
Microsoft.CodeAnalysis.PublicApiAnalyzers (38)
Microsoft.CodeAnalysis.Rebuild (2)
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (38)
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Microsoft.CodeAnalysis.Scripting (12)
Microsoft.CodeAnalysis.Test.Utilities (16)
Microsoft.CodeAnalysis.Threading.Package (20)
Microsoft.CodeAnalysis.UnitTests (14)
Diagnostics\OperationTests.cs (7)
158Assert.Equal(new ArgumentException(argumentExceptionMessage, "body").Message, ex.Message);
176Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message);
194Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message);
212Assert.Equal(new ArgumentException(argumentExceptionMessage, "initializer").Message, ex.Message);
234Assert.Equal(new ArgumentException(argumentExceptionMessage, "constructorBody").Message, ex.Message);
254Assert.Equal(new ArgumentException(argumentExceptionMessage, "methodBody").Message, ex.Message);
315Assert.Equal(ex.Message, new ArgumentException(CodeAnalysisResources.NotARootOperation, "operation").Message);
Microsoft.CodeAnalysis.VisualBasic (5)
Microsoft.CodeAnalysis.Workspaces (150)
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (24)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (10)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
Microsoft.CommonLanguageServerProtocol.Framework.Package (2)
Microsoft.CSharp (2)
Microsoft.Data.Analysis (107)
DataFrame.BinaryOperations.cs (14)
20throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
59throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
98throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
137throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
176throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
214throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
251throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
288throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
362throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
395throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
428throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
461throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
494throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
527throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
DataFrame.cs (8)
339throw new ArgumentException(string.Format(Strings.ExceedsNumberOfRows, Rows.Count), nameof(numberOfRows));
371throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName));
403throw new ArgumentException(String.Format("{0} {1}", Strings.MismatchedRowCount, Columns[i].Name));
484throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values));
566throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.DataType), column.Name);
575throw new ArgumentException(string.Format(Strings.ExceedsNumberOfColumns, Columns.Count), nameof(row));
631throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName));
641throw new ArgumentException(string.Format(Strings.MismatchedValueType, column.DataType), column.Name);
DataFrameColumnCollection.cs (22)
82throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
87throw new ArgumentException(string.Format(Strings.DuplicateColumnName, column.Name), nameof(column));
108throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
113throw new ArgumentException(string.Format(Strings.DuplicateColumnName, column.Name), nameof(column));
188throw new ArgumentException(String.Format(Strings.InvalidColumnName, columnName), nameof(columnName));
223throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(T)), nameof(T));
240throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(DateTime)));
257throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string)));
274throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string)));
291throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Boolean)));
308throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Byte)));
325throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Char)));
342throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Double)));
359throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Decimal)));
376throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Single)));
393throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int32)));
410throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int64)));
427throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(SByte)));
444throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(Int16)));
461throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(string)));
478throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(UInt64)));
495throw new ArgumentException(string.Format(Strings.BadColumnCast, column.DataType, typeof(UInt16)));
DataFrameColumns\StringDataFrameColumn.cs (5)
60throw new ArgumentException(Strings.CannotResizeDown, nameof(length));
153throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(string)), nameof(value));
307throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices));
329throw new ArgumentException(Strings.MapIndicesExceedsColumnLength, nameof(boolColumn));
467throw new ArgumentException(String.Format(Strings.MismatchedValueType, typeof(string)), nameof(value));
PrimitiveDataFrameColumn.cs (15)
136throw new ArgumentException(Strings.SpansMultipleBuffers, nameof(numberOfRows));
245throw new ArgumentException(string.Format(Strings.MismatchedValueType, DataType), nameof(value));
430throw new ArgumentException(String.Format(Strings.MultipleMismatchedValueType, typeof(long), typeof(int), typeof(bool)), nameof(mapIndices));
463throw new ArgumentException(Strings.MapIndicesExceedsColumnLength, nameof(boolColumn));
479throw new ArgumentException(String.Format(Strings.MismatchedValueType, Strings.NumericColumnType), nameof(mapIndices));
720throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(U));
750throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(U));
957throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
987throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column));
1022throw new ArgumentException(string.Format(Strings.MismatchedColumnValueType, typeof(T)), nameof(column));
1065throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value));
1100throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value));
1142throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value));
1176throw new ArgumentException(string.Format(Strings.MismatchedValueType, typeof(T)), nameof(value));
1284throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(column));
Microsoft.Data.Analysis.Tests (3)
Microsoft.DotNet.Build.Manifest (3)
Microsoft.DotNet.Build.Tasks.Feed (9)
Microsoft.DotNet.Build.Tasks.Installers (5)
Microsoft.DotNet.Build.Tasks.Packaging (2)
Microsoft.DotNet.Build.Tasks.Workloads (8)
Microsoft.DotNet.GenFacades (1)
Microsoft.DotNet.Git.IssueManager (7)
Microsoft.DotNet.Helix.Client (5)
Microsoft.DotNet.Helix.JobSender (3)
Microsoft.DotNet.Helix.Sdk (3)
Microsoft.DotNet.Internal.SymbolHelper (3)
Microsoft.DotNet.RemoteExecutor (3)
Microsoft.DotNet.SignCheckLibrary (4)
Microsoft.DotNet.SourceBuild.Tasks (2)
Microsoft.DotNet.SwaggerGenerator.CodeGenerator (3)
Microsoft.DotNet.XliffTasks (4)
Microsoft.DotNet.XUnitAssert.Tests (14)
Microsoft.Extensions.AI (2)
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.AI.AzureAIInference (2)
Microsoft.Extensions.AI.Evaluation (2)
Microsoft.Extensions.AI.Evaluation.Console (2)
Microsoft.Extensions.AI.Evaluation.Console.Tests (1)
Microsoft.Extensions.AI.Evaluation.NLP (2)
Microsoft.Extensions.AI.Evaluation.Quality (2)
Microsoft.Extensions.AI.Evaluation.Reporting (2)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (2)
Microsoft.Extensions.AI.Evaluation.Safety (2)
Microsoft.Extensions.AI.Integration.Tests (2)
Microsoft.Extensions.AI.Ollama (2)
Microsoft.Extensions.AI.OpenAI (4)
Microsoft.Extensions.AI.Tests (2)
Microsoft.Extensions.AmbientMetadata.Application (2)
Microsoft.Extensions.AsyncState (2)
Microsoft.Extensions.Caching.Abstractions (1)
Microsoft.Extensions.Caching.Hybrid (4)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Caching.SqlServer (4)
Microsoft.Extensions.Caching.StackExchangeRedis (1)
Microsoft.Extensions.Compliance.Abstractions (3)
Microsoft.Extensions.Compliance.Redaction (2)
Microsoft.Extensions.Compliance.Testing (2)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Configuration.CommandLine (2)
Microsoft.Extensions.Configuration.Ini (1)
Microsoft.Extensions.Configuration.Json (1)
Microsoft.Extensions.Configuration.UserSecrets (2)
Microsoft.Extensions.Configuration.Xml (1)
Microsoft.Extensions.DependencyInjection (8)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.DependencyInjection.AutoActivation (2)
Microsoft.Extensions.DependencyModel (14)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (2)
Microsoft.Extensions.Diagnostics.HealthChecks (4)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (2)
Microsoft.Extensions.Diagnostics.Probes (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Diagnostics.Testing (2)
Microsoft.Extensions.FileProviders.Physical (1)
Microsoft.Extensions.FileSystemGlobbing (1)
Microsoft.Extensions.Hosting (1)
Microsoft.Extensions.Hosting.Testing (2)
Microsoft.Extensions.Http (2)
Microsoft.Extensions.Http.Resilience (2)
Microsoft.Extensions.Identity.Core (4)
Microsoft.Extensions.Identity.Stores (1)
Microsoft.Extensions.Logging (1)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.Generators (1)
Microsoft.Extensions.ML (3)
Microsoft.Extensions.ObjectPool.DependencyInjection (2)
Microsoft.Extensions.Options.Contextual (2)
Microsoft.Extensions.Options.SourceGeneration (1)
Microsoft.Extensions.Primitives (3)
Microsoft.Extensions.Resilience (2)
Microsoft.Extensions.ServiceDiscovery (1)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (1)
Microsoft.Extensions.Telemetry (2)
Microsoft.Extensions.Telemetry.Abstractions (2)
Microsoft.Extensions.TimeProvider.Testing (2)
Microsoft.Extensions.Validation (1)
Microsoft.Gen.Logging (1)
Microsoft.Gen.Logging.Generated.Tests (8)
LogMethodTests.cs (8)
212CollectionTestExtensions.M9(logger, LogLevel.Critical, 0, new ArgumentException("Foo"), 1);
526ExceptionTestExtensions.M0(logger, new ArgumentException("Foo"), new ArgumentException("Bar"));
533ExceptionTestExtensions.M1(new ArgumentException("Foo"), logger, new ArgumentException("Bar"));
540ExceptionTestExtensions.M2(logger, "One", new ArgumentException("Foo"));
547var exception = new ArgumentException("Foo");
791AtSymbolsTestExtensions.UseAtSymbol4(logger, LogLevel.Debug, "42", 42, new ArgumentException("Foo"));
Microsoft.Gen.Metrics (1)
Microsoft.Interop.ComInterfaceGenerator (1)
Microsoft.Interop.LibraryImportGenerator (1)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
Microsoft.Interop.SourceGeneration (10)
Microsoft.JSInterop (7)
Microsoft.Maui (21)
Microsoft.Maui.Controls (58)
HybridWebView\HybridWebView.cs (8)
92 throw new ArgumentException($"The method name cannot be null or empty.", nameof(methodName));
96 throw new ArgumentException($"The parameter values were provided, but the parameter JSON type infos were not.", nameof(paramJsonTypeInfos));
100 throw new ArgumentException($"The parameter JSON type infos were provided, but the parameter values were not.", nameof(paramValues));
104 throw new ArgumentException($"The number of parameter values does not match the number of parameter JSON type infos.", nameof(paramValues));
121 throw new ArgumentException($"The method name cannot be null or empty.", nameof(methodName));
125 throw new ArgumentException($"The parameter values were provided, but the parameter JSON type infos were not.", nameof(paramJsonTypeInfos));
129 throw new ArgumentException($"The parameter JSON type infos were provided, but the parameter values were not.", nameof(paramValues));
133 throw new ArgumentException($"The number of parameter values does not match the number of parameter JSON type infos.", nameof(paramValues));
Microsoft.Maui.Controls.BindingSourceGen (2)
Microsoft.Maui.Controls.Build.Tasks (3)
Microsoft.Maui.Controls.Maps (1)
Microsoft.Maui.Controls.Xaml (11)
Microsoft.Maui.Essentials (8)
Microsoft.ML.AutoML (34)
Utils\UserInputValidationUtil.cs (17)
57throw new ArgumentException($"{nameof(numberOfCVFolds)} must be at least 2", nameof(numberOfCVFolds));
65throw new ArgumentException($"If provided, {nameof(samplingKeyColumnName)} must be the same as {nameof(groupIdColumnName)} for Ranking Experiments", samplingKeyColumnName);
78throw new ArgumentException("Training data has 0 rows", nameof(trainData));
85throw new ArgumentException($"{DefaultColumnNames.Features} column must be of data type {NumberDataViewType.Single}", nameof(trainData));
97throw new ArgumentException($"Only supported feature column types are " +
144throw new ArgumentException($"Duplicate column name {duplicateColName} is present in two or more distinct properties of provided column information", nameof(columnInformation));
152throw new ArgumentException($"Null column string was specified as {columnPurpose} in column information");
160throw new ArgumentException("Provided label column cannot be null");
175throw new ArgumentException($"File '{path}' does not exist", nameof(path));
180throw new ArgumentException($"File at path '{path}' cannot be empty", nameof(path));
193throw new ArgumentException("Validation data has 0 rows", nameof(validationData));
200throw new ArgumentException($"{schemaMismatchError} Train data has '{trainData.Schema.Count}' columns," +
217throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' exists in train data, but not in validation data.", nameof(validationData));
222throw new ArgumentException($"{schemaMismatchError} Column '{trainCol.Name}' is of type {trainCol.Type} in train data, and type " +
260throw new ArgumentException(exceptionMessage);
273throw new ArgumentException($"Provided {columnPurpose} column '{columnName}' was of type {itemType}, " +
278throw new ArgumentException($"Provided {columnPurpose} column '{columnName}' was of type {itemType}, " +
Microsoft.ML.AutoML.SourceGenerator (2)
Microsoft.ML.AutoML.Tests (3)
Microsoft.ML.CodeGenerator (5)
Microsoft.ML.Core (2)
Microsoft.ML.DataView (5)
Microsoft.ML.GenAI.Core (10)
Microsoft.ML.GenAI.LLaMA (2)
Microsoft.ML.GenAI.Mistral (2)
Microsoft.ML.GenAI.Phi (6)
Microsoft.ML.ImageAnalytics (10)
MLImage.cs (9)
46throw new ArgumentException($"Invalid input stream contents", nameof(imageStream));
67throw new ArgumentException($"Invalid path", nameof(imagePath));
85throw new ArgumentException($"Unsupported pixel format", nameof(pixelFormat));
90throw new ArgumentException($"Invalid width value.", nameof(width));
95throw new ArgumentException($"Invalid height value.", nameof(height));
100throw new ArgumentException($"Invalid {nameof(imagePixelData)} buffer size.");
236throw new ArgumentException($"Path has invalid image file extension.", nameof(imagePath));
242throw new ArgumentException($"Saving image with the format '{ext}' is not supported. Try save it with `Jpeg`, `Png`, or `Webp` format.", nameof(imagePath));
297_ => throw new ArgumentException($"Invalid resize mode value.", nameof(mode))
Microsoft.ML.OnnxTransformer (2)
Microsoft.ML.SearchSpace (5)
Microsoft.ML.TensorFlow (1)
Microsoft.ML.TestFramework (1)
Microsoft.ML.TestFrameworkCommon (4)
Microsoft.ML.TimeSeries (1)
Microsoft.ML.Tokenizers (25)
Microsoft.ML.Tokenizers.Tests (3)
Microsoft.ML.TorchSharp (11)
Microsoft.ML.Transforms (1)
Microsoft.Net.Http.Headers (7)
Microsoft.NET.StringTools.net35 (1)
Microsoft.VisualBasic.Core (2)
Microsoft.VisualBasic.Tests (3)
Microsoft.VisualStudio.LanguageServices (12)
Microsoft.VisualStudio.LanguageServices.CSharp (7)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.Web.Xdt.Extensions (4)
MSBuild (3)
MSBuildTaskHost (4)
MyFrontend (1)
PresentationBuildTasks (14)
PresentationCore (678)
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (22)
420throw new ArgumentException(SR.InvalidSizeSpecified, nameof(cbSize));
430throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Custom Attribute tag embedded in ISF stream does not match guid table"), nameof(tag));
437throw new ArgumentException(SR.InvalidSizeSpecified, nameof(cbSize));
450throw new ArgumentException();
457throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), nameof(cbSize));
478throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), nameof(cbSize));
773throw new ArgumentException(SR.InvalidGuid);
780throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(System.Windows.Media.Color)), nameof(value));
788throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(int)), nameof(value));
796throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(DrawingFlags)), nameof(value));
807throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(StylusTip), typeof(int)), nameof(value));
811throw new ArgumentException(SR.Format(SR.InvalidValueOfType, value, typeof(StylusTip)), nameof(value));
822throw new ArgumentException(SR.Format(SR.InvalidValueType1, typeof(String), typeof(Matrix)), nameof(value));
829throw new ArgumentException(SR.MatrixNotInvertible, nameof(value));
833throw new ArgumentException(SR.InvalidMatrixContainsNaN, nameof(value));
837throw new ArgumentException(SR.InvalidMatrixContainsInfinity, nameof(value));
845throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(bool)), nameof(value));
852throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(double)), nameof(value));
876throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte)), nameof(value));
889throw new ArgumentException(SR.Format(SR.InvalidValueType, typeof(byte[])), nameof(value));
949throw new ArgumentException(SR.InvalidDataInISF, ex);
954throw new ArgumentException(SR.InvalidDataInISF, ex);
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (60)
133throw new ArgumentException(SR.IsfOperationFailed, ex);
138throw new ArgumentException(SR.IsfOperationFailed, ex);
143throw new ArgumentException(SR.IsfOperationFailed, ex);
148throw new ArgumentException(SR.IsfOperationFailed, ex);
153throw new ArgumentException(SR.IsfOperationFailed, ex);
158throw new ArgumentException(SR.IsfOperationFailed, ex);
208throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(isfStream));
222throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Read different size from stream then expected"), nameof(isfStream));
227throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(isfStream));
342throw new ArgumentException(SR.InvalidStream);
361throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
385throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), nameof(inputStream));
472throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
506throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
569throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
582throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
604throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
618throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
667throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
741throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Global Custom Attribute tag embedded in ISF stream does not match guid table"), "inkdata");
751throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "inkdata");
765throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
780throw new ArgumentException(ISFDebugMessage("Invalid ISF data"));
798throw new ArgumentException(ISFDebugMessage("Invalid ISF data"), "inkdata");
829throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
834throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
849throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
859throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
891throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
904throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
914throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
931throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
940throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
963throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
993throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
998throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1006throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1016throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1048throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1057throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1065throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1097throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1105throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1133throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1171throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1192throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1210throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid argument passed to ReliableRead"));
1262throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1297throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1331throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1337throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1342throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1348throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1353throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1359throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1364throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1370throw new ArgumentException(ISFDebugMessage("Invalid ISF data"),nameof(strm));
1587throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Button guid tag embedded in ISF stream does not match guid table"),nameof(strd));
1603throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Invalid ISF with NoX or NoY specified"), nameof(strd));
1627throw new ArgumentException(StrokeCollectionSerializer.ISFDebugMessage("Packet Description Property tag embedded in ISF stream does not match guid table"), nameof(strd));
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (15)
813return new System.ArgumentException(SR.Image_PropertyNotFound, exceptionForHR);
819return new System.ArgumentException(SR.Image_PropertySize, exceptionForHR);
831return new System.ArgumentException(SR.Image_TooManyScanlines, exceptionForHR);
837return new System.ArgumentException(SR.Image_BadDimensions, exceptionForHR);
851return new System.ArgumentException(SR.Image_FrameMissing, exceptionForHR);
854return new System.ArgumentException(SR.Image_BadMetadataHeader, exceptionForHR);
857return new System.ArgumentException(SR.Image_BadStreamData, exceptionForHR);
869return new System.ArgumentException(SR.Image_SizeOutOfRange, exceptionForHR);
899return new System.ArgumentException(SR.Image_InsufficientBuffer, exceptionForHR);
902return new System.ArgumentException(SR.Format(SR.Media_InvalidArgument, null), exceptionForHR);
945return new System.ArgumentException(SR.D3DImage_InvalidUsage, exceptionForHR);
947return new System.ArgumentException(SR.D3DImage_SurfaceTooBig, exceptionForHR);
949return new System.ArgumentException(SR.D3DImage_InvalidPool, exceptionForHR);
951return new System.ArgumentException(SR.D3DImage_InvalidDevice, exceptionForHR);
953return new System.ArgumentException(SR.D3DImage_AARequires9Ex, exceptionForHR);
System\Windows\Generated\ContentElement.cs (8)
71throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
77throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock));
82throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
136throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
142throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation));
147throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
521throw new ArgumentException(SR.HandlerTypeIllegal);
576throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\Generated\UIElement.cs (8)
71throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
77throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock));
82throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
136throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
142throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation));
147throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
521throw new ArgumentException(SR.HandlerTypeIllegal);
576throw new ArgumentException(SR.HandlerTypeIllegal);
System\Windows\Ink\StrokeCollection.cs (13)
47throw new ArgumentException(SR.StrokeIsDuplicated, nameof(strokes));
60throw new ArgumentException(SR.Image_StreamRead, nameof(stream));
66throw new ArgumentException(SR.Invalid_isfData_Length, nameof(stream));
84throw new ArgumentException(SR.Image_StreamWrite, nameof(stream));
187throw new ArgumentException(SR.InvalidGuid, nameof(propertyDataId));
225throw new ArgumentException(SR.MatrixNotInvertible, nameof(transformMatrix));
309throw new ArgumentException(SR.StrokeIsDuplicated, nameof(stroke));
327throw new ArgumentException(SR.StrokeIsDuplicated, nameof(stroke));
383ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, nameof(strokes));
427throw new ArgumentException(SR.StrokeIsDuplicated, nameof(strokes));
475ArgumentException ae = new ArgumentException(SR.EmptyScToReplace, nameof(strokesToReplace));
488ArgumentException ae = new ArgumentException(SR.InvalidRemovedStroke, nameof(strokesToReplace));
504throw new ArgumentException(SR.StrokeIsDuplicated, nameof(strokesToReplaceWith));
System\Windows\Media\Animation\Generated\Animatable.cs (6)
70throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
76throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock));
81throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
135throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
141throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation));
146throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
System\Windows\Media\CharacterMetricsDictionary.cs (11)
121throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array"));
139throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array"));
178throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array"));
181throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array"));
196throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional);
201throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(SC.DictionaryEntry), elementType));
363throw new ArgumentException(SR.Format(SR.CollectionDuplicateKey, key));
492throw new ArgumentException(SR.Format(SR.CannotConvertStringToType, s, "int"), nameof(key));
500throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), "int"), nameof(key));
504throw new ArgumentException(SR.Format(SR.CodePointOutOfRange, value), nameof(key));
517throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(CharacterMetrics), value.GetType()));
System\Windows\Media\CultureSpecificStringDictionary.cs (8)
113throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array"));
116throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array"));
147throw new ArgumentException(SR.Format(SR.Collection_CopyTo_IndexGreaterThanOrEqualToArrayLength, "index", "array"));
150throw new ArgumentException(SR.Format(SR.Collection_CopyTo_NumberOfElementsExceedsArrayLength, index, "array"));
165throw new ArgumentException(SR.Collection_CopyTo_ArrayCannotBeMultidimensional);
170throw new ArgumentException(SR.Format(SR.CannotConvertType, typeof(SC.DictionaryEntry), elementType));
312throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(string)), nameof(value));
325throw new ArgumentException(SR.Format(SR.CannotConvertType, key.GetType(), typeof(XmlLanguage)), nameof(key));
System\Windows\Media\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\GlyphRun.cs (13)
384throw new ArgumentException(SR.ClusterMapEntriesShouldNotDecrease, nameof(clusterMap));
387throw new ArgumentException(SR.ClusterMapEntryShouldPointWithinGlyphIndices, nameof(clusterMap));
393throw new ArgumentException(SR.ClusterMapFirstEntryMustBeZero, nameof(clusterMap));
398throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, characters.Count), nameof(clusterMap));
404throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, GlyphCount), nameof(clusterMap));
411throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, CodepointCount + 1), nameof(caretStops));
415throw new ArgumentException(SR.SidewaysRTLTextIsNotSupported);
433throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(glyphIndices));
437throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsMustBeLessOrEqualTo, MaxGlyphCount), nameof(glyphIndices));
443throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), nameof(advanceWidths));
446throw new ArgumentException(SR.Format(SR.CollectionNumberOfElementsShouldBeEqualTo, glyphIndices.Count), nameof(glyphOffsets));
1084throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(value));
1114throw new ArgumentException(SR.CollectionNumberOfElementsMustBeGreaterThanZero, nameof(value));
System\Windows\Media3D\Generated\Visual3D.cs (6)
70throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
76throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, clock.Timeline.GetType(), dp.Name, dp.PropertyType), nameof(clock));
81throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
135throw new ArgumentException(SR.Format(SR.Animation_DependencyPropertyIsNotAnimatable, dp.Name, this.GetType()), nameof(dp));
141throw new ArgumentException(SR.Format(SR.Animation_AnimationTimelineTypeMismatch, animation.GetType(), dp.Name, dp.PropertyType), nameof(animation));
146throw new ArgumentException(SR.Animation_UnrecognizedHandoffBehavior);
PresentationFramework (486)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (11)
99throw new ArgumentException(SR.Format(SR.SelectionDoesNotResolveToAPage, "start"), nameof(selection));
106throw new ArgumentException(SR.Format(SR.SelectionDoesNotResolveToAPage, "end"), nameof(selection));
193throw new ArgumentException(SR.StartNodeMustBeFixedPageProxy, nameof(startNode));
281throw new ArgumentException(SR.StartNodeMustBeDocumentPageViewOrFixedPage, nameof(startNode));
303throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.CountAttribute));
449throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}");
455throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}");
475throw new ArgumentException(SR.WrongSelectionType, $"selection: type={selection.GetType()}");
493throw new ArgumentException(SR.Format(SR.IncorrectLocatorPartType, $"{locatorPart.PartType.Namespace}:{locatorPart.PartType.Name}"), nameof(locatorPart));
497throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)));
503throw new ArgumentException(SR.Format(SR.InvalidLocatorPart, TextSelectionProcessor.SegmentAttribute + segmentNumber.ToString(NumberFormatInfo.InvariantInfo)));
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\Controls\ColumnDefinition.cs (9)
78throw new ArgumentException(SR.GridCollection_DestArrayInvalidRank);
86throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array"));
108throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array"));
313throw new ArgumentException(SR.TableCollectionRangeOutOfRange);
516throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(Grid), nameof(ColumnDefinitionCollection)));
540throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(ColumnDefinitionCollection), nameof(Grid)));
593throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "ColumnDefinitionCollection", "ColumnDefinition"));
598throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, "value", "ColumnDefinitionCollection"));
614throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "ColumnDefinitionCollection", "ColumnDefinition"));
System\Windows\Controls\RowDefinition.cs (9)
73throw new ArgumentException(SR.GridCollection_DestArrayInvalidRank);
81throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array"));
103throw new ArgumentException(SR.Format(SR.GridCollection_DestArrayInvalidLength, "array"));
308throw new ArgumentException(SR.TableCollectionRangeOutOfRange);
511throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(Grid), nameof(RowDefinitionCollection)));
535throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, nameof(RowDefinitionCollection), nameof(Grid)));
588throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "RowDefinitionCollection", "RowDefinition"));
593throw new ArgumentException(SR.Format(SR.GridCollection_InOtherCollection, "value", "RowDefinitionCollection"));
609throw new ArgumentException(SR.Format(SR.GridCollection_MustBeCertainType, "RowDefinitionCollection", "RowDefinition"));
System\Windows\Documents\DocumentStructures\SemanticBasicElement.cs (9)
69throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
114throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType1, value.GetType(),
152throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(NamedElement)), nameof(value));
201throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(ListItemStructure)), nameof(value));
243throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
296throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowGroupStructure)), nameof(value));
338throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableRowStructure)), nameof(value));
381throw new ArgumentException(SR.Format(SR.UnexpectedParameterType, value.GetType(), typeof(TableCellStructure)), nameof(value));
425throw new ArgumentException(SR.Format(SR.DocumentStructureUnexpectedParameterType4, value.GetType(),
System\Windows\Documents\TextElement.cs (6)
100throw new ArgumentException(SR.TextElement_UnmatchedEndPointer);
123throw new ArgumentException(SR.Format(SR.InDifferentScope, "start", "end"));
808throw new ArgumentException(SR.Format(SR.TextSchema_ThisInlineUIContainerHasAChildUIElementAlready, this.GetType().Name, ((InlineUIContainer)this).Child.GetType().Name, value.GetType().Name));
820throw new ArgumentException(SR.Format(SR.TextSchema_ThisBlockUIContainerHasAChildUIElementAlready, this.GetType().Name, ((BlockUIContainer)this).Child.GetType().Name, value.GetType().Name));
836throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name));
843throw new ArgumentException(SR.Format(SR.TextSchema_ChildTypeIsInvalid, this.GetType().Name, value.GetType().Name));
System\Windows\Documents\TextElementCollection.cs (11)
253throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name));
292throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name));
321throw new ArgumentException(SR.TextElementCollection_NoEnumerator, nameof(range));
335throw new ArgumentException(SR.Format(SR.TextElementCollection_ItemHasUnexpectedType, "range", typeof(TextElementType).Name, typeof(TextElementType).Name), "value");
398throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value));
453throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value));
463throw new ArgumentException(SR.Format(SR.TextSchema_TheChildElementBelongsToAnotherTreeAlready, this.GetType().Name));
564throw new ArgumentException(SR.Format(SR.TextElementCollection_TextElementTypeExpected, typeof(TextElementType).Name), nameof(value));
602throw new ArgumentException("array");
609throw new ArgumentException("arrayIndex");
614throw new ArgumentException(SR.Format(SR.TextElementCollection_CannotCopyToArrayNotSufficientMemory, count, arrayIndex, array.Length));
System\Windows\Documents\TextRangeBase.cs (6)
65throw new ArgumentException(SR.NotInAssociatedTree, nameof(textPointer));
1538throw new ArgumentException(SR.Format(SR.TextRange_UnsupportedDataFormat, dataFormat), nameof(dataFormat));
1572throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), nameof(stream));
1584throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), nameof(stream));
1589throw new ArgumentException(SR.Format(SR.TextRange_UnrecognizedStructureInDataFormat, dataFormat), nameof(stream));
1596throw new ArgumentException(SR.Format(SR.TextRange_UnsupportedDataFormat, dataFormat), nameof(dataFormat));
System\Windows\Standard\Verify.cs (16)
66throw new ArgumentException(errorMessage, name);
90throw new ArgumentException(errorMessage, name);
103throw new ArgumentException("The parameter must not be the default value.", name);
129throw new ArgumentException("The parameter must be null.", name);
161throw new ArgumentException("", name);
176throw new ArgumentException(message, name);
188throw new ArgumentException(message, parameterName);
193throw new ArgumentException(message, parameterName);
205throw new ArgumentException(message, parameterName);
210throw new ArgumentException(message, parameterName);
220throw new ArgumentException("The URI must be absolute.", parameterName);
235throw new ArgumentException(string.Create(CultureInfo.InvariantCulture, $"The integer value must be bounded with [{lowerBoundInclusive}, {upperBoundExclusive})"), parameterName);
244throw new ArgumentException(message, parameter);
257throw new ArgumentException("The type of this parameter does not support a required interface", parameterName);
267throw new ArgumentException($"No file exists at \"{filePath}\"", parameterName);
290throw new ArgumentException($"The parameter must implement interface {interfaceType}.", parameterName);
PresentationFramework.Fluent.Tests (1)
PresentationUI (3)
ReachFramework (20)
Replay (1)
ResultsOfTGenerator (1)
Roslyn.Diagnostics.Analyzers (50)
Roslyn.Diagnostics.Analyzers.UnitTests (4)
Roslyn.Diagnostics.CSharp.Analyzers (7)
Roslyn.Test.PdbUtilities (5)
RunTests (1)
ScenarioTests.Common.Tests (1)
Shared (4)
Sockets.BindTests (1)
Sockets.FunctionalTests (1)
Swaggatherer (2)
System.CodeDom (23)
Microsoft\CSharp\CSharpCodeGenerator.cs (5)
613throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
750throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e));
914throw new ArgumentException(SR.Format(SR.Argument_NullComment, nameof(e)), nameof(e));
1234throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
2683throw new ArgumentException(SR.Format(SR.InvalidIdentifier, value), nameof(value));
System\CodeDom\Compiler\CodeGenerator.cs (5)
608throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
938throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
1426throw new ArgumentException(SR.Format(SR.InvalidPrimitiveType, e.Value.GetType()), nameof(e));
1471throw new ArgumentException(SR.Format(SR.Argument_NullComment, nameof(e)), nameof(e));
1549throw new ArgumentException(SR.Format(SR.InvalidIdentifier, value), nameof(value));
System\CodeDom\Compiler\CodeValidator.cs (10)
59throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
94throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
455throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
641throw new ArgumentException(SR.Format(SR.ArityDoesntMatch, baseType, e.TypeArguments.Count), nameof(e));
650throw new ArgumentException(message, nameof(e));
659throw new ArgumentException(message, nameof(e));
768throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
938throw new ArgumentException(SR.Format(SR.InvalidElementType, e.GetType().FullName), nameof(e));
945throw new ArgumentException(SR.Format(SR.InvalidPathCharsInChecksum, e.FileName), nameof(e));
951throw new ArgumentException(SR.Format(SR.InvalidRegion, e.RegionText), nameof(e));
System.Collections (84)
System\Collections\Generic\OrderedDictionary.cs (25)
299throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value));
330throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
338throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
1215throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
1242throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
1255throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
1290throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1295throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
1302throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
1315throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1325throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1335throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value));
1364throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(KeyValuePair<TKey, TValue>)), nameof(value));
1515throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array));
1533throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1538throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
1545throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
1558throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1568throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1704throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall, nameof(array));
1842throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1847throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
1854throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
1867throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1877throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System\Collections\Generic\SortedDictionary.cs (15)
328throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
333throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
357throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
362throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
544throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
556throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
561throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
568throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
584throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
705throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
717throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
722throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
729throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
745throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
898throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, item));
System\Collections\Generic\SortedList.cs (15)
167throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, keys[i]));
185throw new ArgumentException(SR.Format(SR.Argument_AddingDuplicate, key), nameof(key));
273throw new ArgumentException(SR.Format(SR.Arg_WrongType, key, typeof(TKey)), nameof(key));
276throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
442throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
458throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
463throw new ArgumentException(SR.Arg_NonZeroLowerBound, nameof(array));
473throw new ArgumentException(SR.Arg_ArrayPlusOffTooSmall);
488throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
500throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
627throw new ArgumentException(SR.Format(SR.Arg_WrongType, value, typeof(TValue)), nameof(value));
1055throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1064throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
1169throw new ArgumentException(SR.Arg_RankMultiDimNotSupported, nameof(array));
1178throw new ArgumentException(SR.Argument_IncompatibleArrayType, nameof(array));
System.Collections.Concurrent (21)
System.Collections.Immutable (24)
System.Collections.NonGeneric (10)
System.Collections.Specialized (9)
System.ComponentModel.Annotations (5)
System.ComponentModel.Composition (35)
System\ComponentModel\Composition\ExceptionBuilder.cs (10)
25return new ArgumentException(message, parameterName);
41throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(memberName)), nameof(memberName));
55throw new ArgumentException(SR.ArgumentException_EmptyString);
61return new ArgumentException(message, parameterName);
70throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName));
75return new ArgumentException(message, parameterName);
94throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(parameterName)), nameof(parameterName));
99return new ArgumentException(SR.Format(SR.ReflectionModel_InvalidPartDefinition, partDefinitionType), parameterName);
108throw new ArgumentException(SR.Format(SR.ArgumentException_EmptyString, nameof(typeName)), nameof(typeName));
113return new ArgumentException(message, typeName);
System.ComponentModel.Composition.Registration (2)
System.ComponentModel.TypeConverter (73)
System.Composition.Convention (12)
System.Composition.Hosting (2)
System.Configuration.ConfigurationManager (48)
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.Console (3)
System.Data.Common (16)
System.Data.Odbc (7)
System.Diagnostics.DiagnosticSource (7)
System.Diagnostics.Process (2)
System.Diagnostics.TraceSource (5)
System.Drawing.Primitives (4)
System.Formats.Asn1 (27)
System.Formats.Cbor (5)
System.Formats.Nrbf (1)
System.Formats.Tar (22)
System.IO.Compression (9)
System.IO.Compression.Brotli (4)
System.IO.Compression.ZipFile (3)
System.IO.FileSystem.DriveInfo (2)
System.IO.FileSystem.Watcher (5)
System\IO\FileSystemWatcher.cs (5)
116throw new ArgumentException(SR.Format(SR.InvalidEnumArgument, nameof(value), (int)value, nameof(NotifyFilters)));
243throw new ArgumentException(SR.Format(SR.InvalidDirName, value), nameof(Path));
246throw new ArgumentException(SR.Format(SR.InvalidDirName_NotExists, value), nameof(Path));
365throw new ArgumentException(SR.Format(SR.InvalidDirName, path), nameof(path));
368throw new ArgumentException(SR.Format(SR.InvalidDirName_NotExists, path), nameof(path));
System.IO.Hashing (1)
System.IO.IsolatedStorage (4)
System.IO.MemoryMappedFiles (11)
System.IO.Packaging (39)
System.IO.Pipes (8)
System.IO.Ports (17)
System.Linq.Expressions (118)
System\Linq\Expressions\Error.cs (115)
19return new ArgumentException(Strings.ReducibleMustOverrideReduce);
26return new ArgumentException(Strings.ArgCntMustBeGreaterThanNameCnt);
47return new ArgumentException(Strings.SameKeyExistsInExpando(key), nameof(key));
75return new ArgumentException(Strings.MustReduceToDifferent);
117return new ArgumentException(Strings.ReducedNotCompatible);
124return new ArgumentException(Strings.SetterHasNoParams, paramName);
131return new ArgumentException(Strings.PropertyCannotHaveRefType, paramName);
138return new ArgumentException(Strings.IndexesOfSetGetMustMatch, paramName);
152return new ArgumentException(Strings.FirstArgumentMustBeCallSite);
159return new ArgumentException(Strings.AccessorsCannotHaveVarArgs, paramName);
166return new ArgumentException(Strings.AccessorsCannotHaveByRefArgs, paramName);
180return new ArgumentException(Strings.TypeMustBeDerivedFromSystemDelegate);
194return new ArgumentException(Strings.BoundsCannotBeLessThanOne, paramName);
201return new ArgumentException(Strings.TypeMustNotBeByRef, paramName);
209return new ArgumentException(Strings.TypeMustNotBePointer, paramName);
217return new ArgumentException(Strings.SetterMustBeVoid, paramName);
225return new ArgumentException(Strings.PropertyTypeMustMatchGetter, paramName);
233return new ArgumentException(Strings.PropertyTypeMustMatchSetter, paramName);
240return new ArgumentException(Strings.BothAccessorsMustBeStatic, paramName);
247return new ArgumentException(Strings.OnlyStaticFieldsHaveNullInstance, paramName);
254return new ArgumentException(Strings.OnlyStaticPropertiesHaveNullInstance, paramName);
261return new ArgumentException(Strings.OnlyStaticMethodsHaveNullInstance);
268return new ArgumentException(Strings.PropertyTypeCannotBeVoid, paramName);
275return new ArgumentException(Strings.InvalidUnboxType, paramName);
282return new ArgumentException(Strings.ExpressionMustBeWriteable, paramName);
289return new ArgumentException(Strings.ArgumentMustNotHaveValueType, paramName);
296return new ArgumentException(Strings.MustBeReducible);
303return new ArgumentException(Strings.AllTestValuesMustHaveSameType, paramName);
310return new ArgumentException(Strings.AllCaseBodiesMustHaveSameType, paramName);
317return new ArgumentException(Strings.DefaultBodyMustBeSupplied, paramName);
324return new ArgumentException(Strings.LabelMustBeVoidOrHaveExpression, paramName);
331return new ArgumentException(Strings.LabelTypeMustBeVoid, paramName);
338return new ArgumentException(Strings.QuotedExpressionMustBeLambda, paramName);
345return new ArgumentException(Strings.VariableMustNotBeByRef(p0, p1), paramName);
359return new ArgumentException(Strings.DuplicateVariable(p0), paramName);
373return new ArgumentException(Strings.StartEndMustBeOrdered);
380return new ArgumentException(Strings.FaultCannotHaveCatchOrFinally, paramName);
387return new ArgumentException(Strings.TryMustHaveCatchFinallyOrFault);
394return new ArgumentException(Strings.BodyOfCatchMustHaveSameTypeAsBodyOfTry);
408return new ArgumentException(Strings.UserDefinedOperatorMustBeStatic(p0), paramName);
415return new ArgumentException(Strings.UserDefinedOperatorMustNotBeVoid(p0), paramName);
471return new ArgumentException(Strings.ArgumentTypeCannotBeVoid);
478return new ArgumentException(Strings.ArgumentMustBeArray, paramName);
485return new ArgumentException(Strings.ArgumentMustBeBoolean, paramName);
492return new ArgumentException(Strings.EqualityMustReturnBoolean(p0), paramName);
499return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertyInfo, paramName);
506return new ArgumentException(Strings.ArgumentMustBeFieldInfoOrPropertyInfoOrMethod, paramName);
521return new ArgumentException(Strings.ArgumentMustBeInstanceMember, paramName);
535return new ArgumentException(Strings.ArgumentMustBeInteger, paramName);
549return new ArgumentException(Strings.ArgumentMustBeArrayIndexType, paramName);
563return new ArgumentException(Strings.ArgumentMustBeSingleDimensionalArrayType, paramName);
570return new ArgumentException(Strings.ArgumentTypesMustMatch);
577return new ArgumentException(Strings.ArgumentTypesMustMatch, paramName);
598return new ArgumentException(Strings.IncorrectTypeForTypeAs(p0), paramName);
620return new ArgumentException(Strings.ArgumentTypeDoesNotMatchMember(p0, p1), paramName);
634return new ArgumentException(Strings.ArgumentMemberNotDeclOnType(p0, p1), paramName);
649return new ArgumentException(Strings.ExpressionTypeDoesNotMatchReturn(p0, p1));
656return new ArgumentException(Strings.ExpressionTypeDoesNotMatchAssignment(p0, p1));
663return new ArgumentException(Strings.ExpressionTypeDoesNotMatchLabel(p0, p1));
670return new ArgumentException(Strings.ExpressionTypeNotInvocable(p0), paramName);
677return new ArgumentException(Strings.FieldNotDefinedForType(p0, p1));
684return new ArgumentException(Strings.InstanceFieldNotDefinedForType(p0, p1));
691return new ArgumentException(Strings.FieldInfoNotDefinedForType(p0, p1, p2));
698return new ArgumentException(Strings.IncorrectNumberOfIndexes);
705return new ArgumentException(Strings.IncorrectNumberOfLambdaDeclarationParameters);
713return new ArgumentException(Strings.IncorrectNumberOfMembersForGivenConstructor);
720return new ArgumentException(Strings.IncorrectNumberOfArgumentsForMembers);
727return new ArgumentException(Strings.LambdaTypeMustBeDerivedFromSystemDelegate, paramName);
734return new ArgumentException(Strings.MemberNotFieldOrProperty(p0), paramName);
741return new ArgumentException(Strings.MethodContainsGenericParameters(p0), paramName);
748return new ArgumentException(Strings.MethodIsGeneric(p0), paramName);
755return new ArgumentException(Strings.MethodNotPropertyAccessor(p0, p1), paramName);
769return new ArgumentException(Strings.PropertyDoesNotHaveGetter(p0), paramName);
783return new ArgumentException(Strings.PropertyDoesNotHaveSetter(p0), paramName);
790return new ArgumentException(Strings.PropertyDoesNotHaveAccessor(p0), paramName);
797return new ArgumentException(Strings.NotAMemberOfType(p0, p1), paramName);
812return new ArgumentException(Strings.NotAMemberOfAnyType(p0), paramName);
820return new ArgumentException(Strings.ParameterExpressionNotValidAsDelegate(p0, p1));
827return new ArgumentException(Strings.PropertyNotDefinedForType(p0, p1), paramName);
834return new ArgumentException(Strings.InstancePropertyNotDefinedForType(p0, p1), paramName);
841return new ArgumentException(Strings.InstancePropertyWithoutParameterNotDefinedForType(p0, p1));
848return new ArgumentException(Strings.InstancePropertyWithSpecifiedParametersNotDefinedForType(p0, p1, p2), paramName);
855return new ArgumentException(Strings.InstanceAndMethodTypeMismatch(p0, p1, p2));
863return new ArgumentException(Strings.TypeMissingDefaultConstructor(p0), paramName);
871return new ArgumentException(Strings.ElementInitializerMethodNotAdd, paramName);
878return new ArgumentException(Strings.ElementInitializerMethodNoRefOutParam(p0, p1), paramName);
885return new ArgumentException(Strings.ElementInitializerMethodWithZeroArgs, paramName);
892return new ArgumentException(Strings.ElementInitializerMethodStatic, paramName);
899return new ArgumentException(Strings.TypeNotIEnumerable(p0), paramName);
907return new ArgumentException(Strings.UnhandledBinary(p0), paramName);
914return new ArgumentException(Strings.UnhandledBinding);
921return new ArgumentException(Strings.UnhandledBindingType(p0));
929return new ArgumentException(Strings.UnhandledUnary(p0), paramName);
936return new ArgumentException(Strings.UnknownBindingType, $"bindings[{index}]");
943return new ArgumentException(Strings.UserDefinedOpMustHaveConsistentTypes(p0, p1));
950return new ArgumentException(Strings.UserDefinedOpMustHaveValidReturnType(p0, p1));
957return new ArgumentException(Strings.LogicalOperatorMustHaveBooleanOperators(p0, p1));
992return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForFunc, paramName);
999return new ArgumentException(Strings.IncorrectNumberOfTypeArgsForAction, paramName);
1006return new ArgumentException(Strings.ArgumentCannotBeOfTypeVoid, paramName);
1172return new ArgumentException(Strings.TestValueTypeDoesNotMatchComparisonMethodParameter(p0, p1));
1179return new ArgumentException(Strings.SwitchValueTypeDoesNotMatchComparisonMethodParameter(p0, p1));
1213return new ArgumentException(Strings.NonStaticConstructorRequired, paramName);
1245return new ArgumentException(Strings.TypeContainsGenericParameters(p0), paramName);
1261return new ArgumentException(Strings.TypeIsGeneric(p0), paramName);
1277return new ArgumentException(Strings.IncorrectNumberOfConstructorArguments);
1285return new ArgumentException(Strings.ExpressionTypeDoesNotMatchMethodParameter(p0, p1, p2), paramName);
1301return new ArgumentException(Strings.ExpressionTypeDoesNotMatchParameter(p0, p1), paramName);
1325return new ArgumentException(Strings.IncorrectNumberOfMethodCallArguments(p0), paramName);
1333return new ArgumentException(Strings.ExpressionTypeDoesNotMatchConstructorParameter(p0, p1), paramName);
1350return new ArgumentException(Strings.ExpressionMustBeReadable, paramName);
1363return new ArgumentException(Strings.InvalidArgumentValue_ParamName, paramName);
1368return new ArgumentException(Strings.NonEmptyCollectionRequired, paramName);
1373return new ArgumentException(Strings.InvalidNullValue(type), paramName);
1378return new ArgumentException(Strings.InvalidObjectType(value?.GetType() as object ?? "null", type), paramName);
System.Linq.Parallel (2)
System.Linq.Queryable (2)
System.Memory (3)
System.Net.Http (7)
System.Net.Http.Json (1)
System.Net.HttpListener (16)
System.Net.Mail (5)
System.Net.NameResolution (5)
System.Net.Ping (2)
System.Net.Primitives (9)
System.Net.Quic (5)
System.Net.Requests (23)
System\Net\HttpWebRequest.cs (10)
383throw new ArgumentException(SR.net_invalid_host, nameof(value));
477throw new ArgumentException(SR.net_nochunked, nameof(value));
615throw new ArgumentException(SR.net_connarg, nameof(value));
664throw new ArgumentException(SR.net_no100, nameof(value));
836throw new ArgumentException(SR.net_wrongversion, nameof(value));
937throw new ArgumentException(SR.net_badmethod, nameof(value));
1171throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
1444throw new ArgumentException(SR.net_io_invalidasyncresult, nameof(asyncResult));
1532throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier));
1551throw new ArgumentException(SR.net_nottoken, nameof(rangeSpecifier));
System.Net.Security (14)
System.Net.ServerSentEvents (2)
System.Net.Sockets (43)
System\Net\Sockets\Socket.cs (28)
243throw new ArgumentException(SR.Arg_InvalidHandle, nameof(handle));
939throw new ArgumentException(SR.net_sockets_invalid_ipaddress_length, nameof(addresses));
977throw new ArgumentException(SR.net_invalidAddressList, nameof(addresses));
1146throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
1633throw new ArgumentException(SR.Format(SR.net_sockets_zerolist, nameof(buffers)), nameof(buffers));
1751throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEP.AddressFamily, _addressFamily), nameof(remoteEP));
2123throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "LingerOption"), nameof(optionValue));
2127throw new ArgumentException(SR.Format(SR.ArgumentOutOfRange_Bounds_Lower_Upper_Named, 0, (int)ushort.MaxValue, "optionValue.LingerTime"), nameof(optionValue));
2136throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "MulticastOption"), nameof(optionValue));
2146throw new ArgumentException(SR.Format(SR.net_sockets_invalid_optionValue, "IPv6MulticastOption"), nameof(optionValue));
2152throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(optionValue));
2309throw new ArgumentException(SR.net_sockets_invalid_optionValue_all, nameof(level));
2691throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint));
2731throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPoint.AddressFamily, _addressFamily), nameof(endPoint));
2840throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e));
2889throw new ArgumentException(SR.net_multibuffernotsupported, "BufferList");
2986throw new ArgumentException(SR.net_multibuffernotsupported, nameof(e));
2990throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3094throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, "e.RemoteEndPoint"), nameof(e));
3099throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3103throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, endPointSnapshot.AddressFamily, _addressFamily), nameof(e));
3148throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3152throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, e.RemoteEndPoint.AddressFamily, _addressFamily), nameof(e));
3220throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.SendPacketsElements"), nameof(e));
3258throw new ArgumentException(SR.Format(SR.InvalidNullArgument, "e.RemoteEndPoint"), nameof(e));
3340throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, nameof(remoteEP)), nameof(remoteEP));
3955throw new ArgumentException(SR.Format(SR.net_sockets_invalid_dnsendpoint, remoteEndPointArgumentName), remoteEndPointArgumentName);
3960throw new ArgumentException(SR.Format(SR.net_InvalidEndPointAddressFamily, remoteEndPoint.AddressFamily, _addressFamily), remoteEndPointArgumentName);
System.Net.WebClient (1)
System.Net.WebHeaderCollection (7)
System.Net.WebSockets (9)
System.Net.WebSockets.Client (9)
System.Numerics.Tensors (38)
System\ThrowHelper.cs (33)
18throw new ArgumentException(SR.Argument_DestinationTooShort, destinationName);
22throw new ArgumentException(SR.Argument_SpansMustHaveSameLength);
26throw new ArgumentException(SR.Argument_SpansMustBeNonEmpty);
30throw new ArgumentException(SR.Argument_InputAndDestinationSpanMustNotOverlap, "destination");
50throw new ArgumentException(SR.Argument_DestinationSpansMustNotOverlap);
67throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType));
96throw new ArgumentException(SR.ThrowArgument_IndicesLengthMustEqualRank);
100return new ArgumentException(message);
112throw new ArgumentException(SR.ThrowArgument_FilterTensorMustEqualTensorLength);
118throw new ArgumentException(SR.ThrowArgument_SetSliceNoRange, paramNames);
124throw new ArgumentException(SR.ThrowArgument_SetSliceInvalidShapes, paramNames);
130throw new ArgumentException(SR.ThrowArgument_LengthsNotCompatible);
136throw new ArgumentException(SR.ThrowArgument_SplitNotSplitEvenly);
142throw new ArgumentException(SR.ThrowArgument_DimensionsNotSame, paramNames);
148throw new ArgumentException(SR.ThrowArgument_1DTensorRequired, paramNames);
154throw new ArgumentException(SR.Argument_2DTensorRequired, paramNames);
160throw new ArgumentException(SR.ThrowArgument_IncorrectNumberOfFilterItems, paramNames);
166throw new ArgumentException(SR.ThrowArgument_StackTooFewTensors);
172throw new ArgumentException(SR.ThrowArgument_OnlyOneWildcard);
178throw new ArgumentException(SR.ThrowArgument_InvalidReshapeDimensions);
184throw new ArgumentException(SR.ThrowArgument_AxisLargerThanRank);
190throw new ArgumentException(SR.ThrowArgument_InvalidSqueezeAxis);
196throw new ArgumentException(SR.ThrowArgument_ConcatenateTooFewTensors);
202throw new ArgumentException(SR.ThrowArgument_InvalidDimension);
208throw new ArgumentException(SR.ThrowArgument_InvalidConcatenateShape);
214throw new ArgumentException(SR.ThrowArgument_TransposeTooFewDimensions);
220throw new ArgumentException(SR.ThrowArgument_PermuteAxisOrder);
226throw new ArgumentException(SR.ThrowArgument_InPlaceInvalidShape);
232throw new ArgumentException(SR.ThrowArgument_InvalidStridesAndLengths);
250throw new ArgumentException(SR.Format(SR.Argument_IncompatibleDimensions, leftDim, rightDim));
256throw new ArgumentException(SR.ThrowArgument_StackShapesNotSame);
262throw new ArgumentException(SR.Argument_CannotReshapeNonContiguousOrDense);
268throw new ArgumentException(SR.Argument_MinGreaterThanMax);
System.ObjectModel (16)
System\Collections\Specialized\NotifyCollectionChangedEventArgs.cs (11)
30throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Reset), nameof(action));
59throw new ArgumentException(SR.ResetActionRequiresNullItem, nameof(action));
63throw new ArgumentException(SR.ResetActionRequiresIndexMinus1, nameof(action));
78throw new ArgumentException(SR.MustBeResetAddOrRemoveActionForCtor, nameof(action));
107throw new ArgumentException(SR.ResetActionRequiresNullItem, nameof(action));
111throw new ArgumentException(SR.ResetActionRequiresIndexMinus1, nameof(action));
133throw new ArgumentException(SR.MustBeResetAddOrRemoveActionForCtor, nameof(action));
161throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Replace), nameof(action));
192throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Replace), nameof(action));
214throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Move), nameof(action));
235throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Move), nameof(action));
System.Private.CoreLib (891)
src\libraries\System.Private.CoreLib\src\System\Enum.cs (9)
404throw new ArgumentException(SR.Format(SR.Argument_EnumTypeDoesNotMatch, flag.GetType(), GetType()));
887throw new ArgumentException(SR.Arg_MustBeEnum, nameof(TEnum));
1121throw new ArgumentException(SR.Format(SR.Arg_EnumValueNotFound, originalValue.ToString()));
1289throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, target.GetType(), GetType()));
1636throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, rtType));
1649throw new ArgumentException(SR.Format(SR.Arg_EnumFormatUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType));
2147throw new ArgumentException(enumType is not RuntimeType ? SR.Arg_MustBeType : SR.Arg_MustBeEnum, nameof(enumType));
2150throw new ArgumentException(SR.Arg_MustContainEnumInfo, "value");
2220throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value));
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (11)
1071throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1096throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1116throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 7), nameof(value));
1138throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1159throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1327_ => throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format)),
1603throw new ArgumentException(SR.Arg_ArrayZeroError, nameof(patterns));
1649throw new ArgumentException(SR.Format(SR.Format_BadFormatSpecifier, format), nameof(format));
1665throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1686throw new ArgumentException(SR.Format(SR.Argument_InvalidArrayLength, 13), nameof(value));
1747throw new ArgumentException(message, styles ? nameof(styles) : nameof(style));
src\libraries\System.Private.CoreLib\src\System\Globalization\IdnMapping.cs (37)
79throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
83throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, index + count - 1), nameof(unicode));
128throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
204throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, unicode.Length - 1), nameof(unicode));
222throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
232throw new ArgumentException(SR.Format(SR.Argument_InvalidCharSequence, i), nameof(unicode));
244throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
248throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
268throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
272throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
311throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
333throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
362throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode));
381throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode));
388throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(unicode));
414throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(unicode));
499throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(unicode));
511throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
538throw new ArgumentException(SR.Format(SR.Argument_IdnBadStd3, c), nameof(c));
553throw new ArgumentException(SR.Argument_IdnIllegalName, nameof(ascii));
583throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
587throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize,
610throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
618throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
638throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
653throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
688throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
695throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
703throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
714throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
720throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
735throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(ascii));
779throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii));
786throw new ArgumentException(SR.Argument_IdnBadBidi, nameof(ascii));
792throw new ArgumentException(SR.Argument_IdnBadLabelSize, nameof(ascii));
804throw new ArgumentException(SR.Format(SR.Argument_IdnBadNameSize, c_defaultNameLimit - (IsDot(output[^1]) ? 0 : 1)), nameof(ascii));
827throw new ArgumentException(SR.Argument_IdnBadPunycode, nameof(cp));
src\libraries\System.Private.CoreLib\src\System\Globalization\RegionInfo.cs (7)
33throw new ArgumentException(SR.Argument_NoRegionInvariantCulture, nameof(name));
38throw new ArgumentException(SR.Format(SR.Argument_InvalidCultureName, name), nameof(name));
43throw new ArgumentException(SR.Format(SR.Argument_InvalidNeutralRegionName, name), nameof(name));
54throw new ArgumentException(SR.Argument_NoRegionInvariantCulture);
60throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
66throw new ArgumentException(SR.Format(SR.Argument_CustomCultureCannotBePassedByNumber, culture), nameof(culture));
75throw new ArgumentException(SR.Format(SR.Argument_CultureIsNeutral, culture), nameof(culture));
src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs (16)
90throw new ArgumentException(SR.Arg_EmptyArray, nameof(names));
128throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeOptionalCustomModifiers), nameof(parameterTypes)));
131throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(parameterTypeRequiredCustomModifiers), nameof(parameterTypes)));
331throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type));
343throw new ArgumentException(SR.Argument_NeedGenericMethodDefinition, nameof(method));
348throw new ArgumentException(SR.Argument_MethodNeedGenericDeclaringType, nameof(method));
353throw new ArgumentException(SR.Argument_InvalidMethodDeclaringType, nameof(type));
366throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
378throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type));
383throw new ArgumentException(SR.Argument_ConstructorNeedGenericDeclaringType, nameof(constructor));
388throw new ArgumentException(SR.Argument_InvalidConstructorDeclaringType, nameof(type));
399throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
411throw new ArgumentException(SR.Argument_MustBeTypeBuilder, nameof(type));
416throw new ArgumentException(SR.Argument_FieldNeedGenericDeclaringType, nameof(field));
421throw new ArgumentException(SR.Argument_InvalidFieldDeclaringType, nameof(type));
432throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (14)
112throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t));
116throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t));
127throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T));
569throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structureType));
573throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structureType));
617throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(T));
1055throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
1073throw new ArgumentException(SR.Argument_TypeMustNotBeComImport, nameof(type));
1077throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
1099throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t));
1103throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t));
1111throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(t));
1124throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(TDelegate));
1132throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(TDelegate));
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (5)
37throw new ArgumentException(SR.Format(SR.Argument_ResourceScopeWrongDirection, fromResType, toResType), nameof(from));
112throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, consumeAsScope), nameof(consumeAsScope));
126throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeTypeBits, calleeScope), nameof(calleeScope));
147throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, consumeAsScope), nameof(consumeAsScope));
161throw new ArgumentException(SR.Format(SR.Argument_BadResourceScopeVisibilityBits, calleeScope), nameof(calleeScope));
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (25)
46throw new ArgumentException(SR.Argument_HasToBeArrayClass);
63throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
105throw new ArgumentException(SR.Arg_MustBeEnumBaseTypeOrEnum, nameof(value));
114throw new ArgumentException(SR.Arg_MustBeEnum, "enumType");
196throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
214throw new ArgumentException(SR.Format(SR.Arg_EnumAndObjectMustBeSameType, valueType, this));
229throw new ArgumentException(SR.Format(SR.Arg_EnumUnderlyingTypeAndObjectMustBeSameType, valueType, underlyingType));
319throw new ArgumentException(SR.Arg_NoAccessSpec, nameof(bindingFlags));
336throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams));
341throw new ArgumentException(SR.Arg_NamedParamTooBig, nameof(namedParams));
394throw new ArgumentException(SR.Arg_NamedParamNull, nameof(namedParams));
405throw new ArgumentException(SR.Arg_CreatInstAccess, nameof(bindingFlags));
430throw new ArgumentException(SR.Arg_FldSetGet, nameof(bindingFlags));
433throw new ArgumentException(SR.Arg_FldGetPropSet, nameof(bindingFlags));
442throw new ArgumentException(SR.Arg_FldSetPropGet, nameof(bindingFlags));
445throw new ArgumentException(SR.Arg_FldSetInvoke, nameof(bindingFlags));
496throw new ArgumentException(SR.Arg_IndexMustBeInt);
519throw new ArgumentException(SR.Arg_FldGetArgErr, nameof(bindingFlags));
526throw new ArgumentException(SR.Arg_FldSetArgErr, nameof(bindingFlags));
548throw new ArgumentException(SR.Arg_PropSetGet, nameof(bindingFlags));
557throw new ArgumentException(SR.Arg_PropSetInvoke, nameof(bindingFlags));
739throw new ArgumentException(
754throw new ArgumentException(
822throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this));
893throw new ArgumentException(SR.Format(SR.Arg_ObjObjEx, value?.GetType(), this));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (19)
83throw new ArgumentException(SR.Format(SR.Argument_InvalidTypeWithPointersNotSupported, targetType));
101throw new ArgumentException(SR.Argument_DestinationTooShort, "destination");
107throw new ArgumentException(SR.Argument_InvalidTimeSpanStyles, "styles");
113throw new ArgumentException(SR.Format(SR.Argument_InvalidEnumValue, value, typeof(TEnum).Name), argumentName);
119throw new ArgumentException(SR.Argument_OverlapAlignmentMismatch);
137throw new ArgumentException(SR.Format(SR.ArgumentException_ValueTupleIncorrectType, obj.GetType()), "other");
157throw new ArgumentException(SR.Format(SR.Arg_BogusIComparer, comparer));
284throw new ArgumentException(SR.Arg_CannotBeNaN);
290throw new ArgumentException(SR.Arg_CannotBeNaN, GetArgumentName(argument));
309return new ArgumentException(SR.Format(SR.Argument_AddingDuplicateWithKey, key));
341throw new ArgumentException(SR.Arg_HandleNotSync, paramName);
347throw new ArgumentException(SR.Arg_HandleNotAsync, paramName);
524throw new ArgumentException(SR.Argument_IncompatibleArrayType);
530throw new ArgumentException(SR.Arg_InvalidHandle, paramName);
715return new ArgumentException(SR.Argument_InvalidOffLen);
720return new ArgumentException(GetResourceString(resource));
730return new ArgumentException(SR.Format(SR.Arg_WrongType, key, targetType), nameof(key));
735return new ArgumentException(SR.Format(SR.Arg_WrongType, value, targetType), nameof(value));
750return new ArgumentException(GetResourceString(resource), GetArgumentName(argument));
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (9)
154throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
274throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
399throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
534throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
679throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
834throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
999throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
1128throw new ArgumentException(SR.ArgumentException_TupleLastArgumentNotATuple);
1179throw new ArgumentException(SR.Format(SR.ArgumentException_TupleIncorrectType, GetType()), nameof(other));
src\System\Delegate.CoreCLR.cs (22)
51throw new ArgumentException(SR.Arg_DlgtTargMeth);
63throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target));
65throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target));
232throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
234throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
251throw new ArgumentException(SR.Arg_DlgtTargMeth);
267throw new ArgumentException(SR.Arg_UnboundGenParam, nameof(target));
269throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
271throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(target));
274throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
287throw new ArgumentException(SR.Arg_DlgtTargMeth);
302throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
305throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method));
308throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
325throw new ArgumentException(SR.Arg_DlgtTargMeth);
337throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
340throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(method));
343throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
357throw new ArgumentException(SR.Arg_DlgtTargMeth);
375throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
378throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(type));
391throw new ArgumentException(SR.Arg_DlgtTargMeth);
src\System\Reflection\Emit\DynamicILGenerator.cs (15)
40throw new ArgumentException(SR.Argument_MustBeRuntimeType);
65throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(meth));
79throw new ArgumentException(SR.Argument_InvalidOpCodeOnDynamicMethod);
114throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(con));
133RuntimeType rtType = type as RuntimeType ?? throw new ArgumentException(SR.Argument_MustBeRuntimeType);
145throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(field));
252throw new ArgumentException(SR.Argument_NotMethodCallOpcode, nameof(opcode));
255throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo));
258throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(methodInfo));
347throw new ArgumentException(SR.Argument_ShouldNotSpecifyExceptionType);
360throw new ArgumentException(SR.Argument_MustBeRuntimeType);
409throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(methodInfo));
476throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(parameterTypes)));
479throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(parameterTypes)));
1024throw new ArgumentException(SR.Format(SR.Argument_MethodDeclaringTypeGenericLcg, m, t));
src\System\Reflection\Emit\SignatureHelper.cs (19)
102throw new ArgumentException(SR.Argument_UnknownUnmanagedCallConv, nameof(unmanagedCallConv));
198throw new ArgumentException(SR.Argument_BadFieldSig);
227throw new ArgumentException(SR.NotSupported_MustBeModuleBuilder);
285throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers));
288throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers));
307throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers));
310throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers));
487throw new ArgumentException(SR.Argument_LargeInteger);
512throw new ArgumentException(SR.Argument_LargeInteger);
723throw new ArgumentException(SR.Argument_LargeInteger);
745throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(optionalCustomModifiers));
748throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(optionalCustomModifiers));
751throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(optionalCustomModifiers));
768throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(requiredCustomModifiers));
771throw new ArgumentException(SR.Argument_ArraysInvalid, nameof(requiredCustomModifiers));
774throw new ArgumentException(SR.Argument_GenericsInvalid, nameof(requiredCustomModifiers));
806throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(requiredCustomModifiers), nameof(arguments)));
809throw new ArgumentException(SR.Format(SR.Argument_MismatchedArrays, nameof(optionalCustomModifiers), nameof(arguments)));
823throw new ArgumentException(SR.Argument_SigIsFinalized);
src\System\Reflection\RuntimeModule.cs (19)
39throw new ArgumentException(SR.Argument_InvalidGenericInstArray);
56throw new ArgumentException(SR.Format(SR.Argument_InvalidToken, tk, this),
82throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this),
90throw new ArgumentException(SR.Format(SR.Argument_ResolveMethod, tk, this),
125throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e);
153throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this), nameof(metadataToken));
183throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this),
191throw new ArgumentException(SR.Format(SR.Argument_ResolveField, tk, this),
214throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e);
226throw new ArgumentException(SR.Format(SR.Argument_ResolveModuleType, tk), nameof(metadataToken));
229throw new ArgumentException(SR.Format(SR.Argument_ResolveType, tk, this), nameof(metadataToken));
246throw new ArgumentException(SR.Argument_BadImageFormatExceptionResolve, e);
256throw new ArgumentException(SR.InvalidOperation_PropertyInfoNotAvailable);
259throw new ArgumentException(SR.InvalidOperation_EventInfoNotAvailable);
291throw new ArgumentException(SR.Format(SR.Argument_ResolveMember, tk, this),
300throw new ArgumentException(
308throw new ArgumentException(SR.Format(SR.Argument_ResolveString, metadataToken, this));
363throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
373throw new ArgumentException(SR.Arg_MustBeType, nameof(attributeType));
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (10)
46throw new ArgumentException(SR.Format(SR.Argument_OffsetOfFieldNotFound, t.FullName), nameof(fieldName));
50throw new ArgumentException(SR.Argument_MustBeRuntimeFieldInfo, nameof(fieldName));
219throw new ArgumentException(SR.Argument_MustBeRuntimeMethodInfo, nameof(m));
252throw new ArgumentException(SR.Argument_NeedNonGenericObject, nameof(structure));
257throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure));
282throw new ArgumentException(SR.Argument_StructMustNotBeValueClass, nameof(structure));
287throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structure));
311throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structuretype));
314throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structuretype));
319throw new ArgumentException(SR.Argument_MustHaveLayoutOrBeBlittable, nameof(structuretype));
System.Private.DataContractSerialization (58)
System\Runtime\Serialization\Json\XmlJsonWriter.cs (13)
511throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, _attributeText));
661throw new ArgumentException(SR.JsonXmlProcessingInstructionNotSupported, nameof(name));
676throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName));
714throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns));
719throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix));
742throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns));
748throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName));
804throw new ArgumentException(SR.Format(SR.JsonUnexpectedAttributeLocalName, localName), nameof(localName));
833throw new ArgumentException(SR.JsonInvalidLocalNameEmpty, nameof(localName));
839throw new ArgumentException(SR.Format(SR.JsonPrefixMustBeNullOrEmpty, prefix), nameof(prefix));
846throw new ArgumentException(SR.Format(SR.JsonNamespaceMustBeEmpty, ns), nameof(ns));
1061throw new ArgumentException(SR.Format(SR.JsonOnlyWhitespace, ws[pos].ToString(), "WriteWhitespace"), nameof(ws));
1432throw new ArgumentException(SR.JsonNestedArraysNotSupported, nameof(value));
System\Xml\XmlBaseWriter.cs (23)
231throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xml", xmlNamespace, ns), nameof(ns));
239throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, "xmlns", xmlnsNamespace, ns), nameof(ns));
253throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix));
260throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix));
272throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xmlns", ns));
274throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xml", ns));
334throw new ArgumentException(SR.Format(SR.XmlInvalidXmlSpace, _attributeValue));
398throw new ArgumentException(SR.Format(SR.XmlInvalidXmlSpace, _attributeValue));
442throw new ArgumentException(SR.XmlInvalidCommentChars, nameof(text));
499throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName));
513throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix));
563throw new ArgumentException(SR.Format(SR.XmlUndefinedPrefix, prefix), nameof(prefix));
819throw new ArgumentException(SR.Format(SR.XmlNamespaceNotFound, namespaceUri), nameof(namespaceUri));
847throw new ArgumentException(SR.InvalidLocalNameEmpty, nameof(localName));
891throw new ArgumentException(SR.XmlProcessingInstructionNotSupported, nameof(name));
967throw new ArgumentException(SR.XmlOnlyWhitespace, nameof(whitespace));
1106throw new ArgumentException(SR.XmlMissingLowSurrogate, nameof(ch));
1227throw new ArgumentException(SR.XmlNestedArraysNotSupported, nameof(value));
2150throw new ArgumentException(SR.XmlReservedPrefix, nameof(prefix));
2163throw new ArgumentException(SR.Format(SR.XmlPrefixBoundToNamespace, prefix, nameSpace.Uri, uri), nameof(prefix));
2167throw new ArgumentException(SR.XmlEmptyNamespaceRequiresNullPrefix, nameof(prefix));
2169throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xmlns", uri));
2172throw new ArgumentException(SR.Format(SR.XmlSpecificBindingNamespace, "xml", uri));
System.Private.Uri (7)
System.Private.Windows.Core (41)
System.Private.Windows.Core.Tests (2)
System.Private.Windows.Core.TestUtilities (2)
System.Private.Xml (180)
System\Xml\Core\XmlWellFormedWriter.cs (23)
345throw new ArgumentException(SR.Xml_NoRoot);
393throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid));
400throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid));
407throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset));
448throw new ArgumentException(SR.Xml_PrefixForEmptyNs);
613throw new ArgumentException(SR.Xml_EmptyLocalName);
648throw new ArgumentException(SR.Xml_XmlnsPrefix);
671throw new ArgumentException(SR.Xml_XmlnsPrefix);
681throw new ArgumentException(SR.Xml_XmlPrefix);
778throw new ArgumentException(SR.Xml_PrefixForEmptyNs);
782throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace);
825throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value));
900throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? SR.Xml_DupXmlDecl : SR.Xml_CannotWriteXmlDecl);
960throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar);
1013throw new ArgumentException(SR.Xml_NonWhitespace);
1294throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
1616throw new ArgumentException(SR.Xml_XmlPrefix);
1626throw new ArgumentException(SR.Xml_XmlnsPrefix);
1643throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix));
1727throw new ArgumentException(SR.Format(SR.Xml_NamespaceDeclXmlXmlns, prefix));
1735throw new ArgumentException(SR.Xml_XmlPrefix);
1740throw new ArgumentException(SR.Xml_XmlnsPrefix);
2067return new ArgumentException(SR.Format(SR.Xml_InvalidNameCharsDetail, args));
System\Xml\Core\XmlWellFormedWriterAsync.cs (16)
45throw new ArgumentException(SR.Xml_NoRoot);
94throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(pubid, i)), nameof(pubid));
101throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(sysid, i)), nameof(sysid));
108throw new ArgumentException(SR.Format(SR.Xml_InvalidCharacter, XmlException.BuildCharExceptionArgs(subset, i)), nameof(subset));
221throw new ArgumentException(SR.Xml_PrefixForEmptyNs);
453throw new ArgumentException(SR.Xml_EmptyLocalName);
506throw new ArgumentException(SR.Xml_XmlnsPrefix);
529throw new ArgumentException(SR.Xml_XmlnsPrefix);
539throw new ArgumentException(SR.Xml_XmlPrefix);
683throw new ArgumentException(SR.Xml_PrefixForEmptyNs);
687throw new ArgumentException(SR.Xml_CanNotBindToReservedNamespace);
729throw new ArgumentException(SR.Format(SR.Xml_InvalidXmlSpace, value));
801throw new ArgumentException(_conformanceLevel == ConformanceLevel.Document ? SR.Xml_DupXmlDecl : SR.Xml_CannotWriteXmlDecl);
861throw new ArgumentException(SR.Xml_InvalidSurrogateMissingLowChar);
915throw new ArgumentException(SR.Xml_NonWhitespace);
1145throw new ArgumentException(SR.Format(SR.Xml_UndefNamespace, ns));
System\Xml\Serialization\XmlSerializationReader.cs (11)
972throw new ArgumentException(SR.Format(SR.XmlEmptyArrayType, CurrentTag()), nameof(value));
985throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value));
993throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value));
998throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value));
1006throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, new string(lengthStringSpan)), nameof(value));
1020throw new ArgumentException(SR.XmlMismatchedArrayBrackets, nameof(value));
1022throw new ArgumentException(SR.Format(SR.XmlInvalidArrayDimentions, CurrentTag()), nameof(value));
1024throw new ArgumentException(SR.XmlInvalidArraySyntax, nameof(value));
1074throw new ArgumentException(SR.Format(SR.XmlInvalidArrayLength, dimensions[i]), "value");
2332throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
2338throw new ArgumentException(SR.XmlInternalError, nameof(xmlMapping));
System\Xml\XmlEncoding.cs (5)
32throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, -1), (string?)null);
524throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
565throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
607throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
649throw new ArgumentException(SR.Format(SR.Enc_InvalidByteInEncoding, new object[1] { i }), (string?)null);
System.Private.Xml.Linq (26)
System.Reflection.Context (7)
System.Reflection.DispatchProxy (5)
System.Reflection.Emit (44)
System\Reflection\Emit\CustomAttributeWrapper.cs (4)
44throw new ArgumentException(SR.Format(SR.Argument_InvalidCustomAttributeLength, ctor.DeclaringType, binaryAttribute.Length), nameof(binaryAttribute));
48throw new ArgumentException(SR.Format(SR.Argument_InvalidProlog, ctor.DeclaringType), nameof(binaryAttribute));
88throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, ctor.DeclaringType, namedType), nameof(binaryAttribute));
174_ => throw new ArgumentException(SR.Argument_InvalidTypeCodeForTypeArgument, "binaryAttribute"),
System\Reflection\Emit\PseudoCustomAttributesData.cs (8)
34throw new ArgumentException(SR.Argument_DllNameCannotBeEmpty);
100throw new ArgumentException(SR.Argument_DllNameCannotBeEmpty);
346throw new ArgumentException(SR.Argument_InvalidArgumentForAttribute, nameof(con));
372throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType, paramNames[i], "ByValTStr"), "binaryAttribute");
380throw new ArgumentException(SR.Argument_SizeConstMustBeSpecified, "binaryAttribute");
406throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType, paramNames[i], "SafeArray"), "binaryAttribute");
422throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType, elementType, "SafeArray"), "binaryAttribute");
459throw new ArgumentException(SR.Format(SR.Argument_InvalidParameterForUnmanagedType,
System\Reflection\Emit\TypeBuilderImpl.cs (13)
282throw new ArgumentException(SR.Argument_BadSizeForData, nameof(data.Length));
309throw new ArgumentException(SR.ArgumentException_BadMethodImplBody);
318throw new ArgumentException(SR.Format(SR.Argument_MethodOverridden, methodInfoBody.Name, FullName), nameof(methodInfoDeclaration));
359new ArgumentException(SR.Format(SR.Argument_InvalidMethodOverride, FullName, methodName), "methodInfoBody");
374throw new ArgumentException(SR.Argument_BadPInvokeMethod);
379throw new ArgumentException(SR.Argument_BadPInvokeOnInterface);
391throw new ArgumentException(SR.Argument_MethodRedefined);
421throw new ArgumentException(SR.Argument_BadSizeForData, nameof(size));
541throw new ArgumentException(SR.Format(SR.Argument_UnknownNamedType, con.DeclaringType, name), nameof(binaryAttribute));
556throw new ArgumentException(SR.Argument_CannotSetParentToInterface);
622throw new ArgumentException(SR.Argument_MustBeEnum);
1310throw new ArgumentException(SR.Argument_MustBeInterface, nameof(interfaceType));
1315throw new ArgumentException(SR.Argument_InterfaceNotFound, nameof(interfaceType));
System.Reflection.Metadata (39)
System.Reflection.MetadataLoadContext (28)
System.Resources.Extensions (11)
System.Resources.Writer (4)
System.Runtime.Caching (19)
System\Runtime\Caching\Configuration\ConfigUtil.cs (5)
37throw new ArgumentException(RH.Format(SR.Value_must_be_non_negative_integer, valueName, sValue), nameof(config));
40throw new ArgumentException(RH.Format(SR.Value_must_be_positive_integer, valueName, sValue), nameof(config));
45throw new ArgumentException(RH.Format(SR.Value_too_big,
71throw new ArgumentException(RH.Format(SR.TimeSpan_invalid_format, valueName, sValue), nameof(config));
91throw new ArgumentException(RH.Format(SR.Value_must_be_boolean, valueName, sValue), nameof(config));
System\Runtime\Caching\MemoryCache.cs (11)
233throw new ArgumentException(SR.Invalid_expiration_combination, nameof(policy));
242throw new ArgumentException(SR.Invalid_callback_combination, nameof(policy));
328throw new ArgumentException(SR.Empty_string_invalid, nameof(name));
332throw new ArgumentException(SR.Default_is_reserved, nameof(name));
346throw new ArgumentException(SR.Empty_string_invalid, nameof(name));
350throw new ArgumentException(SR.Default_is_reserved, nameof(name));
383throw new ArgumentException(SR.Update_callback_must_be_null, nameof(policy));
421throw new ArgumentException(RH.Format(SR.Empty_collection, nameof(keys)));
428throw new ArgumentException(RH.Format(SR.Collection_contains_null_element, nameof(keys)));
673throw new ArgumentException(SR.Invalid_argument_combination);
789throw new ArgumentException(RH.Format(SR.Collection_contains_null_element, nameof(keys)));
System.Runtime.InteropServices (4)
System.Runtime.Numerics (6)
System.Runtime.Serialization.Formatters (11)
System.Runtime.Serialization.Schema (1)
System.Security.Claims (1)
System.Security.Cryptography (379)
System\Security\Cryptography\HKDF.cs (7)
57throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk));
92throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk));
123throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output));
126throw new ArgumentException(SR.Format(SR.Cryptography_Prk_TooSmall, hashLength), nameof(prk));
131throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output));
180throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(output));
185throw new ArgumentException(SR.Format(SR.Cryptography_Okm_TooLarge, maxOkmLength), nameof(output));
System\Security\Cryptography\SymmetricAlgorithm.cs (11)
377throw new ArgumentException(SR.Cryptography_MatchBlockSize, nameof(plaintextLength));
448throw new ArgumentException(SR.Argument_BitsMustBeWholeBytes, nameof(feedbackSizeInBits));
456throw new ArgumentException(SR.Cryptography_MatchFeedbackSize, nameof(plaintextLength));
564throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
682throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
826throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
979throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
1200throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
1432throw new ArgumentException(SR.Argument_DestinationTooShort, nameof(destination));
1674throw new ArgumentException(SR.Cryptography_InvalidIVSize, nameof(iv));
1681throw new ArgumentException(SR.Cryptography_InvalidFeedbackSize, nameof(feedbackSizeInBits));
System.Security.Cryptography.Cose (48)
System\Security\Cryptography\Cose\CoseHeaderMap.cs (6)
264throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value));
290throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value));
297throw new ArgumentException(SR.CriticalHeadersMustBeArrayOfAtLeastOne, nameof(value));
304throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value));
311throw new ArgumentException(SR.Format(SR.CoseHeaderMapHeaderDoesNotAcceptSpecifiedValue, label.LabelName), nameof(value));
328throw new ArgumentException(SR.Format(SR.CoseHeaderMapArgumentCoseHeaderValueIncorrect, label.LabelName), nameof(value), ex);
System\Security\Cryptography\Cose\CoseKey.cs (6)
111throw new ArgumentException(SR.Format(SR.Sign1UnsupportedKey, key.GetType().Name), nameof(key));
263throw new ArgumentException(SR.Sign1UnsupportedKey, KeyType.ToString());
279_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm))
290_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm))
301_ => throw new ArgumentException(SR.Format(SR.Sign1SignUnsupportedHashAlgorithm, hashAlgorithm.Name), nameof(hashAlgorithm))
322throw new ArgumentException(SR.Format(SR.Sign1UnknownCoseAlgorithm, algorithm.Name), "key");
System\Security\Cryptography\Cose\CoseSign1Message.cs (14)
159throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
162throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
210throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
213throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
297throw new ArgumentException(SR.Sign1SignHeaderDuplicateLabels, nameof(signer));
302throw new ArgumentException(SR.Format(SR.CriticalHeaderMissing, labelName), nameof(signer));
693throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
698throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
755throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
760throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
860throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
865throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
922throw new ArgumentException(SR.Sign1ArgumentStreamNotReadable, nameof(detachedContent));
927throw new ArgumentException(SR.Sign1ArgumentStreamNotSeekable, nameof(detachedContent));
System.Security.Cryptography.Pkcs (22)
System.Security.Cryptography.ProtectedData (2)
System.Security.Cryptography.Xml (34)
System.Security.Permissions (6)
System.ServiceModel.Federation (2)
System.ServiceModel.NetFramingBase (2)
System.ServiceModel.Primitives.Tests (1)
System.ServiceModel.Syndication (10)
System.Text.Encoding.CodePages (13)
System.Text.Encodings.Web (3)
System.Text.Json (29)
System\Text\Json\ThrowHelper.Serialization.cs (5)
22throw new ArgumentException(SR.Format(SR.DeserializeWrongType, type, value.GetType()));
28throw new ArgumentException(SR.JsonSerializerDoesNotSupportComments, paramName);
157throw new ArgumentException(SR.Format(SR.CannotSerializeInvalidType, typeToConvert), paramName);
161throw new ArgumentException(SR.Format(SR.CannotSerializeInvalidMember, typeToConvert, propertyName, declaringType), paramName);
973throw new ArgumentException(SR.JsonPolymorphismOptionsAssociatedWithDifferentJsonTypeInfo, paramName: parameterName);
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions (2)
System.Text.RegularExpressions.Generator (1)
System.Threading.RateLimiting (15)
System.Threading.Tasks.Dataflow (40)
Base\DataflowBlock.cs (11)
135if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
621if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
666if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
683if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
1149if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
1150if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
1462if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
2104if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
2105if (source == null && consumeToAccept) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
2611if (!messageHeader.IsValid) throw new ArgumentException(SR.Argument_InvalidMessageHeader, nameof(messageHeader));
2616if (source == null) throw new ArgumentException(SR.Argument_CantConsumeFromANullSource, nameof(consumeToAccept));
System.Threading.Tasks.Parallel (1)
System.Transactions.Local (17)
System.Windows.Controls.Ribbon (7)
System.Windows.Forms (345)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (31)
1695throw new ArgumentException(string.Format(SR.DataGridView_NeedColumnAutoSizingCriteria, "autoSizeColumnMode"));
1986throw new ArgumentException(string.Format(SR.DataGridView_NeedAutoSizingCriteria, "rowHeadersWidthSizeMode"));
2132throw new ArgumentException(string.Format(SR.DataGridView_NeedAutoSizingCriteria, "rowHeadersWidthSizeMode"));
2364throw new ArgumentException(string.Format(SR.DataGridView_NeedAutoSizingCriteria, "autoSizeRowsMode"));
6847throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
9766throw new ArgumentException(SR.DataGridView_CellDoesNotBelongToDataGridView);
11240throw new ArgumentException(SR.DataGridView_PreviousModesHasWrongLength);
13244throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
13308throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
13323throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
13349throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
13421throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
13497throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
13584throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
14045throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
14072throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
14264throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
14466throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
14476throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
16655throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
17583throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
17603throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
17641throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
17763throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
17847throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
18280throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
18364throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
18714throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
19000throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, "e.Row");
28170throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView);
28213throw new ArgumentException(SR.DataGridView_ColumnNeedsToBeDataBoundWhenSortingDataBoundDataGridView, nameof(dataGridViewColumn));
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (13)
413throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
552throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
602throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
640throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
646throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter)));
680throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
686throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter)));
723throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
729throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter)));
796throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
802throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter)));
993throw new ArgumentException(SR.DataGridView_ColumnDoesNotBelongToDataGridView, nameof(dataGridViewColumn));
1028throw new ArgumentException(string.Format(SR.DataGridViewColumnCollection_ColumnNotFound, columnName), nameof(columnName));
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (17)
398throw new ArgumentException(SR.DataGridViewRowCollection_TooManyCells, nameof(dataGridViewRow));
883throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
933throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
939throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter)));
983throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
1042throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
1068throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
1074throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter)));
1093throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
1119throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
1125throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(excludeFilter)));
1144throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
1240throw new ArgumentException(string.Format(SR.DataGridView_InvalidDataGridViewElementStateCombination, nameof(includeFilter)));
1481throw new ArgumentException(SR.DataGridViewRowCollection_TooManyCells, nameof(dataGridViewRow));
1513throw new ArgumentException(SR.DataGridViewRowCollection_TooManyCells, nameof(dataGridViewRow));
2148throw new ArgumentException(SR.DataGridView_RowDoesNotBelongToDataGridView, nameof(dataGridViewRow));
2153throw new ArgumentException(SR.DataGridView_RowMustBeUnshared, nameof(dataGridViewRow));
System\Windows\Forms\Controls\ListView\ListView.cs (8)
258throw new ArgumentException(SR.ListViewActivationMustBeOnWhenHotTrackingIsOn, nameof(value));
1094throw new ArgumentException(SR.ListViewHoverMustBeOnWhenHotTrackingIsOn, nameof(value));
1874throw new ArgumentException(string.Format(SR.ListViewVirtualListSizeInvalidArgument, "value", value));
2268throw new ArgumentException(string.Format(SR.InvalidArgument, nameof(value), value), nameof(value));
3829throw new ArgumentException(string.Format(SR.OnlyOneControl, ch.Text), nameof(ch));
4025throw new ArgumentException(string.Format(SR.OnlyOneControl, items[i].Text), nameof(items));
4052throw new ArgumentException(string.Format(SR.OnlyOneControl, item.Text), nameof(items));
5043throw new ArgumentException(SR.ListViewStartIndexCannotBeLargerThanEndIndex);
System\Windows\Forms\Form.cs (8)
1464throw new ArgumentException(SR.AddDifferentThreads, nameof(value));
1481throw new ArgumentException(SR.FormMDIParentAndChild, nameof(value));
1486throw new ArgumentException(SR.MDIParentNotContainer, nameof(value));
1639throw new ArgumentException(SR.NonTopLevelCantHaveOwner, nameof(value));
2045throw new ArgumentException(SR.MDIContainerMustBeTopLevel, nameof(value));
5511throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(Show)), nameof(owner));
5659throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(ShowDialog)), nameof(owner));
5738throw new ArgumentException(string.Format(SR.OwnsSelfOrOwner, nameof(ShowDialog)), nameof(owner));
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutStyleCollection.cs (5)
33throw new ArgumentException(string.Format(SR.InvalidArgumentType, nameof(style), typeof(TableLayoutStyle)), nameof(style));
48throw new ArgumentException(string.Format(SR.InvalidArgumentType, nameof(style), typeof(TableLayoutStyle)), nameof(style));
65throw new ArgumentException(string.Format(SR.InvalidArgumentType, nameof(value), typeof(TableLayoutStyle)), nameof(value));
90throw new ArgumentException(string.Format(SR.InvalidArgumentType, nameof(style), typeof(TableLayoutStyle)), nameof(style));
143throw new ArgumentException(string.Format(SR.OnlyOneControl, style.GetType().Name), nameof(style));
System.Windows.Forms.Analyzers.CSharp (2)
System.Windows.Forms.Design (37)
System.Windows.Forms.IntegrationTests.Common (3)
System.Windows.Forms.Primitives (7)
System.Windows.Forms.Primitives.TestUtilities (2)
System.Windows.Forms.Tests (1)
System.Windows.Forms.UI.IntegrationTests (3)
System.Xaml (60)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Utility\FrugalList.cs (6)
331throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
612throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1096throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1135throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1424throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
1499throw new ArgumentException(SR.Format(SR.FrugalList_TargetMapCannotHoldAllData, oldList.ToString(), this.ToString()), nameof(oldList));
Templates.Blazor.Tests (3)
Templates.Blazor.WebAssembly.Auth.Tests (3)
Templates.Blazor.WebAssembly.Tests (3)
Templates.Mvc.Tests (3)
Templates.Tests (3)
Test.Utilities (38)
TestProject.AppHost (2)
TestProject.IntegrationServiceA (1)
Text.Analyzers (50)
UIAutomationClient (21)
UIAutomationClientSideProviders (7)
UIAutomationProvider (2)
UIAutomationTypes (1)
vbc (1)
VBCSCompiler (1)
VersioningWebSite (1)
VisualBasicRuntimeTest (2)
Wasm.Performance.ConsoleHost (2)
WindowsFormsIntegration (2)
xunit.assert (4)
xunit.console (35)
8253 references to ArgumentException
Aspire.Azure.AI.Inference (3)
Aspire.Azure.AI.Inference.Tests (4)
Aspire.Azure.AI.OpenAI (4)
Aspire.Azure.AI.OpenAI.Tests (10)
Aspire.Azure.Data.Tables (2)
Aspire.Azure.Data.Tables.Tests (4)
Aspire.Azure.Messaging.EventHubs (15)
Aspire.Azure.Messaging.EventHubs.Tests (20)
Aspire.Azure.Messaging.ServiceBus (6)
Aspire.Azure.Messaging.ServiceBus.Tests (4)
Aspire.Azure.Messaging.WebPubSub (8)
Aspire.Azure.Messaging.WebPubSub.Tests (7)
Aspire.Azure.Npgsql (3)
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL (1)
Aspire.Azure.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
Aspire.Azure.Npgsql.Tests (4)
Aspire.Azure.Search.Documents (2)
Aspire.Azure.Search.Documents.Tests (4)
Aspire.Azure.Security.KeyVault (7)
Aspire.Azure.Security.KeyVault.Tests (12)
Aspire.Azure.Storage.Blobs (4)
Aspire.Azure.Storage.Blobs.Tests (5)
Aspire.Azure.Storage.Queues (2)
Aspire.Azure.Storage.Queues.Tests (4)
Aspire.Confluent.Kafka (19)
Aspire.Confluent.Kafka.Tests (8)
Aspire.Dashboard (5)
Aspire.EndToEnd.Tests (2)
Aspire.Hosting (22)
Aspire.Hosting.Azure (5)
Aspire.Hosting.Azure.AIFoundry (4)
Aspire.Hosting.Azure.AppConfiguration (1)
Aspire.Hosting.Azure.AppContainers (1)
Aspire.Hosting.Azure.ApplicationInsights (1)
Aspire.Hosting.Azure.CognitiveServices (8)
Aspire.Hosting.Azure.ContainerRegistry (2)
Aspire.Hosting.Azure.CosmosDB (15)
Aspire.Hosting.Azure.EventHubs (7)
Aspire.Hosting.Azure.Functions (1)
Aspire.Hosting.Azure.KeyVault (2)
Aspire.Hosting.Azure.PostgreSQL (3)
Aspire.Hosting.Azure.Redis (1)
Aspire.Hosting.Azure.Search (1)
Aspire.Hosting.Azure.ServiceBus (15)
Aspire.Hosting.Azure.SignalR (1)
Aspire.Hosting.Azure.Sql (3)
Aspire.Hosting.Azure.Storage (6)
Aspire.Hosting.Azure.Tests (145)
Aspire.Hosting.Azure.WebPubSub (4)
Aspire.Hosting.Containers.Tests (6)
Aspire.Hosting.Docker (3)
Aspire.Hosting.Docker.Tests (4)
Aspire.Hosting.Garnet (2)
Aspire.Hosting.Garnet.Tests (6)
Aspire.Hosting.Kafka (2)
Aspire.Hosting.Kafka.Tests (8)
Aspire.Hosting.Keycloak (4)
Aspire.Hosting.Keycloak.Tests (8)
Aspire.Hosting.Kubernetes (1)
Aspire.Hosting.Milvus (6)
Aspire.Hosting.Milvus.Tests (18)
Aspire.Hosting.MongoDB (6)
Aspire.Hosting.MongoDB.Tests (20)
Aspire.Hosting.MySql (6)
Aspire.Hosting.MySql.Tests (18)
Aspire.Hosting.Nats (2)
Aspire.Hosting.Nats.Tests (10)
Aspire.Hosting.NodeJs (5)
Aspire.Hosting.NodeJs.Tests (12)
Aspire.Hosting.Oracle (7)
Aspire.Hosting.Oracle.Tests (18)
Aspire.Hosting.PostgreSQL (6)
Aspire.Hosting.PostgreSQL.Tests (20)
Aspire.Hosting.Python (8)
Aspire.Hosting.Python.Tests (44)
Aspire.Hosting.Qdrant (2)
Aspire.Hosting.Qdrant.Tests (6)
Aspire.Hosting.RabbitMQ (2)
Aspire.Hosting.RabbitMQ.Tests (6)
Aspire.Hosting.Redis (2)
Aspire.Hosting.Redis.Tests (12)
Aspire.Hosting.SqlServer (4)
Aspire.Hosting.SqlServer.Tests (12)
Aspire.Hosting.Testing (10)
Aspire.Hosting.Testing.Tests (27)
Aspire.Hosting.Tests (43)
Utils\PasswordGeneratorTests.cs (5)
26Assert.Throws<ArgumentException>(() => Generate(10, false, true, true, true, 1, 0, 0, 0));
27Assert.Throws<ArgumentException>(() => Generate(10, true, false, true, true, 0, 1, 0, 0));
28Assert.Throws<ArgumentException>(() => Generate(10, true, true, false, true, 0, 0, 1, 0));
29Assert.Throws<ArgumentException>(() => Generate(10, true, true, true, false, 0, 0, 0, 1));
31Assert.Throws<ArgumentException>(() => Generate(10, false, false, false, false, 0, 0, 0, 0));
Aspire.Hosting.Valkey (3)
Aspire.Hosting.Valkey.Tests (6)
Aspire.Keycloak.Authentication (6)
Aspire.Keycloak.Authentication.Tests (40)
Aspire.Microsoft.Azure.Cosmos (6)
Aspire.Microsoft.Azure.Cosmos.Tests (6)
Aspire.Microsoft.Data.SqlClient (2)
Aspire.Microsoft.Data.SqlClient.Tests (4)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (7)
Aspire.Microsoft.EntityFrameworkCore.Cosmos.Tests (6)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer.Tests (2)
Aspire.Milvus.Client (2)
Aspire.Milvus.Client.Tests (4)
Aspire.MongoDB.Driver (2)
Aspire.MongoDB.Driver.Tests (4)
Aspire.MongoDB.Driver.v3.Tests (4)
Aspire.MySqlConnector (3)
Aspire.MySqlConnector.Tests (4)
Aspire.NATS.Net (8)
Aspire.NATS.Net.Tests (4)
Aspire.Npgsql (3)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (1)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL.Tests (2)
Aspire.Npgsql.Tests (4)
Aspire.OpenAI (4)
Aspire.OpenAI.Tests (10)
Aspire.Oracle.EntityFrameworkCore (1)
Aspire.Oracle.EntityFrameworkCore.Tests (2)
Aspire.Playground.Tests (1)
Aspire.Pomelo.EntityFrameworkCore.MySql (1)
Aspire.Pomelo.EntityFrameworkCore.MySql.Tests (2)
Aspire.Qdrant.Client (2)
Aspire.Qdrant.Client.Tests (4)
Aspire.RabbitMQ.Client (2)
Aspire.RabbitMQ.Client.Tests (4)
Aspire.Seq (1)
Aspire.Seq.Tests (2)
Aspire.StackExchange.Redis (2)
Aspire.StackExchange.Redis.DistributedCaching (2)
Aspire.StackExchange.Redis.DistributedCaching.Tests (4)
Aspire.StackExchange.Redis.OutputCaching (2)
Aspire.StackExchange.Redis.OutputCaching.Tests (4)
Aspire.StackExchange.Redis.Tests (4)
Aspire.Templates.Tests (2)
BasicTestApp (1)
BinaryFormatTests (2)
dotnet-openapi (11)
dotnet-sql-cache (2)
dotnet-svcutil.xmlserializer (1)
dotnet-svcutil-lib (66)
dotnet-user-jwts (1)
dotnet-user-secrets (1)
GenerateDocumentationAndConfigFiles (19)
InMemory.FunctionalTests (1)
InProcessWebSite (2)
Metrics (19)
Metrics.Legacy (19)
Microsoft.Analyzers.Local.Tests (11)
Microsoft.Arcade.Test.Common (1)
Microsoft.AspNetCore.AsyncState (8)
Microsoft.AspNetCore.Authentication.Facebook (2)
Microsoft.AspNetCore.Authentication.Negotiate (2)
Microsoft.AspNetCore.Authentication.OAuth (4)
Microsoft.AspNetCore.Authentication.OpenIdConnect (3)
Microsoft.AspNetCore.Authentication.Test (3)
Microsoft.AspNetCore.Authentication.Twitter (2)
Microsoft.AspNetCore.Authorization (2)
Microsoft.AspNetCore.Components (5)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.Forms.Tests (4)
Microsoft.AspNetCore.Components.Server (3)
Microsoft.AspNetCore.Components.Server.Tests (3)
Microsoft.AspNetCore.Components.Tests (24)
Microsoft.AspNetCore.Components.Web (1)
Microsoft.AspNetCore.CookiePolicy (1)
Microsoft.AspNetCore.Cryptography.KeyDerivation (2)
Microsoft.AspNetCore.DataProtection (4)
Microsoft.AspNetCore.DataProtection.Abstractions (2)
Microsoft.AspNetCore.DataProtection.Extensions (6)
Microsoft.AspNetCore.DataProtection.StackExchangeRedis (2)
Microsoft.AspNetCore.DataProtection.Tests (1)
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Microsoft.AspNetCore.HeaderParsing (8)
Microsoft.AspNetCore.Hosting (2)
Microsoft.AspNetCore.Hosting.Tests (1)
Microsoft.AspNetCore.Http (1)
Microsoft.AspNetCore.Http.Abstractions (2)
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
Microsoft.AspNetCore.Http.Connections (2)
Microsoft.AspNetCore.Http.Connections.Client (2)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
Microsoft.AspNetCore.Http.Results (4)
Microsoft.AspNetCore.Http.Results.Tests (7)
Microsoft.AspNetCore.Http.Tests (3)
Microsoft.AspNetCore.HttpLogging (2)
Microsoft.AspNetCore.HttpLogging.Tests (2)
Microsoft.AspNetCore.HttpOverrides (8)
Microsoft.AspNetCore.Identity (3)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (4)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (4)
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
Microsoft.AspNetCore.Identity.Test (3)
Microsoft.AspNetCore.InternalTesting (19)
ExceptionAssertions.cs (16)
76/// Verifies that the code throws an <see cref="ArgumentException"/>.
82public static ArgumentException ThrowsArgument(Action testCode, string paramName, string exceptionMessage)
84return ThrowsArgumentInternal<ArgumentException>(testCode, paramName, exceptionMessage);
91where TException : ArgumentException
103/// Verifies that the code throws an <see cref="ArgumentException"/>.
109public static Task<ArgumentException> ThrowsArgumentAsync(Func<Task> testCode, string paramName, string exceptionMessage)
111return ThrowsArgumentAsyncInternal<ArgumentException>(testCode, paramName, exceptionMessage);
118where TException : ArgumentException
152public static ArgumentException ThrowsArgumentNullOrEmpty(Action testCode, string paramName)
154return ThrowsArgumentInternal<ArgumentException>(testCode, paramName, "Value cannot be null or empty.");
164public static Task<ArgumentException> ThrowsArgumentNullOrEmptyAsync(Func<Task> testCode, string paramName)
166return ThrowsArgumentAsyncInternal<ArgumentException>(testCode, paramName, "Value cannot be null or empty.");
176public static ArgumentException ThrowsArgumentNullOrEmptyString(Action testCode, string paramName)
178return ThrowsArgumentInternal<ArgumentException>(testCode, paramName, "Value cannot be null or an empty string.");
188public static Task<ArgumentException> ThrowsArgumentNullOrEmptyStringAsync(Func<Task> testCode, string paramName)
190return ThrowsArgumentAsyncInternal<ArgumentException>(testCode, paramName, "Value cannot be null or an empty string.");
Microsoft.AspNetCore.JsonPatch (1)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Microsoft.AspNetCore.Mvc.Abstractions (3)
Microsoft.AspNetCore.Mvc.Core (19)
Microsoft.AspNetCore.Mvc.Core.Test (13)
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
Microsoft.AspNetCore.Mvc.Razor (5)
Microsoft.AspNetCore.Mvc.RazorPages (40)
Microsoft.AspNetCore.Mvc.RazorPages.Test (4)
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (4)
Microsoft.AspNetCore.Mvc.ViewFeatures (9)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (6)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (2)
Microsoft.AspNetCore.OutputCaching.Tests (2)
Microsoft.AspNetCore.Owin.Tests (1)
Microsoft.AspNetCore.RateLimiting.Tests (2)
Microsoft.AspNetCore.ResponseCaching.Tests (1)
Microsoft.AspNetCore.Rewrite (10)
Microsoft.AspNetCore.Rewrite.Tests (1)
Microsoft.AspNetCore.Routing (12)
Microsoft.AspNetCore.Routing.Tests (27)
Microsoft.AspNetCore.Server.HttpSys (2)
Microsoft.AspNetCore.Server.HttpSys.Tests (1)
Microsoft.AspNetCore.Server.IIS (2)
Microsoft.AspNetCore.Server.IISIntegration (1)
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
Microsoft.AspNetCore.Server.Kestrel.Tests (6)
Microsoft.AspNetCore.Session (2)
Microsoft.AspNetCore.Shared.Tests (10)
Microsoft.AspNetCore.SignalR.Client (2)
Microsoft.AspNetCore.SignalR.Client.Core (2)
Microsoft.AspNetCore.SignalR.Client.Tests (8)
Microsoft.AspNetCore.SignalR.Common (6)
Microsoft.AspNetCore.SignalR.Core (2)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
Microsoft.AspNetCore.SignalR.Tests (4)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.AspNetCore.SpaServices.Extensions (9)
Microsoft.AspNetCore.Testing (8)
Microsoft.AspNetCore.WebUtilities (2)
Microsoft.AspNetCore.WebUtilities.Tests (4)
Microsoft.Bcl.Cryptography (2)
Microsoft.Build (35)
Microsoft.Build.Engine.OM.UnitTests (35)
Microsoft.Build.Engine.UnitTests (17)
Microsoft.Build.Framework (6)
Microsoft.Build.Framework.UnitTests (1)
Microsoft.Build.Tasks.CodeAnalysis (3)
Microsoft.Build.Tasks.CodeAnalysis.Sdk (3)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
Microsoft.Build.Tasks.Core (64)
Microsoft.Build.Tasks.UnitTests (6)
Microsoft.Build.Utilities.Core (12)
Microsoft.Build.Utilities.UnitTests (63)
ToolLocationHelper_Tests.cs (57)
730Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey((TargetDotNetFrameworkVersion)99, vsVersion));
736Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(dotNetVersion, (VisualStudioVersion)99));
748Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version30, vsVersion));
780Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version100));
781Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version110));
786Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version452, VisualStudioVersion.Version100));
787Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version452, VisualStudioVersion.Version110));
792Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version100));
793Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version110));
794Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version120));
798Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version100));
799Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version110));
800Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version461, VisualStudioVersion.Version120));
804Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version100));
805Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version110));
806Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version462, VisualStudioVersion.Version120));
810Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version100));
811Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version110));
812Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version47, VisualStudioVersion.Version120));
816Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version100));
817Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version110));
818Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version471, VisualStudioVersion.Version120));
822Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version100));
823Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version110));
824Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version472, VisualStudioVersion.Version120));
828Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version100));
829Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version110));
830Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version120));
831Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version48, VisualStudioVersion.Version140));
837Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version100));
838Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version110));
839Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version120));
840Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version140));
841Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version150));
842Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkRootRegistryKey(TargetDotNetFrameworkVersion.Version481, VisualStudioVersion.Version160));
855Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue((TargetDotNetFrameworkVersion)99, vsVersion));
861Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(dotNetVersion, (VisualStudioVersion)99));
875Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version30, vsVersion));
888Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version100));
889Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version110));
894Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version100));
895Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version110));
896Should.Throw<ArgumentException>(() => ToolLocationHelper.GetDotNetFrameworkSdkInstallKeyValue(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version120));
910Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk((TargetDotNetFrameworkVersion)99, vsVersion));
916Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(dotNetVersion, (VisualStudioVersion)99));
950Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version30, vsVersion));
969Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version100));
970Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version451, VisualStudioVersion.Version110));
975Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version100));
976Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version110));
977Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPathToDotNetFrameworkSdk(TargetDotNetFrameworkVersion.Version46, VisualStudioVersion.Version120));
1876Should.Throw<ArgumentException>(() =>
1889Should.Throw<ArgumentException>(() =>
2978Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPlatformExtensionSDKLocations(identifier, version));
2979Should.Throw<ArgumentException>(() => ToolLocationHelper.GetPlatformSDKLocation(identifier, version));
3097Should.Throw<ArgumentException>(() => { ToolLocationHelper.GatherSDKListFromDirectory(paths, targetPlatform); });
3120Should.Throw<ArgumentException>(() => new SDKManifest(""));
Microsoft.Cci.Extensions (1)
Microsoft.CodeAnalysis (82)
Microsoft.CodeAnalysis.Analyzers (19)
Microsoft.CodeAnalysis.AnalyzerUtilities (19)
Microsoft.CodeAnalysis.BannedApiAnalyzers (19)
Microsoft.CodeAnalysis.CodeStyle (13)
Microsoft.CodeAnalysis.Collections.Package (5)
Microsoft.CodeAnalysis.CSharp (18)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (36)
CodeGen\CodeGenTupleTest.cs (29)
5795var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt2, new[] { "Item1" }.AsImmutable()));
5800e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt2, elementLocations: new[] { loc1 }.AsImmutable()));
5832Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt8, default));
6213Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType: vt2));
6217Assert.Throws<ArgumentException>(() => comp.CreateErrorTypeSymbol(null, "a", -1));
6218Assert.Throws<ArgumentException>(() => comp.CreateErrorTypeSymbol(vbComp.GlobalNamespace, "a", 1));
6222Assert.Throws<ArgumentException>(() => comp.CreateErrorNamespaceSymbol(vbComp.GlobalNamespace, "a"));
6283var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(intType));
6296var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vt2, ImmutableArray.Create("123", "")));
6314var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(vbType, default(ImmutableArray<string>)));
6331var e = Assert.Throws<ArgumentException>(() => comp.CreateAnonymousTypeSymbol(ImmutableArray.Create(vbType), ImmutableArray.Create("m1")));
6344Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(ImmutableArray<ITypeSymbol>.Empty, default(ImmutableArray<string>)));
6345Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(new[] { intType }.AsImmutable(), default(ImmutableArray<string>)));
6348Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(new[] { intType, intType }.AsImmutable(), new[] { "Item1" }.AsImmutable()));
6352Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(new[] { intType, intType }.AsImmutable(), elementLocations: ImmutableArray.Create(loc1)));
6586Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(ImmutableArray.Create(intType, vbType), default(ImmutableArray<string>)));
6802var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty));
6842var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(underlyingType, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.NotAnnotated, 8)));
6871var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(elementTypes, elementNullableAnnotations: ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty));
6911var e = Assert.Throws<ArgumentException>(() => comp.CreateTupleTypeSymbol(elementTypes, elementNullableAnnotations: CreateAnnotations(CodeAnalysis.NullableAnnotation.NotAnnotated, 8)));
Emit\CompilationEmitTests.cs (7)
2530Assert.Throws<ArgumentException>(() => comp.Emit(output, pdbOutput,
2544Assert.Throws<ArgumentException>(() => comp.Emit(output, metadataPEStream: metadataPeOutput,
2558Assert.Throws<ArgumentException>(() => comp.Emit(output, metadataPEStream: metadataPeOutput,
2586Assert.Throws<ArgumentException>(() => comp.Emit(output, metadataPEStream: metadataPeOutput,
2599Assert.Throws<ArgumentException>(() => comp.Emit(output,
2638Assert.Throws<ArgumentException>(() => comp.Emit(output,
5181Assert.Throws<ArgumentException>(() => compilation.Emit(outReal));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (14)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Scripting (2)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (9)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (29)
SourceGeneration\AdditionalSourcesCollectionTests.cs (10)
110var exception = Assert.Throws<ArgumentException>(nameof(hintName), () => asc.Add(hintName, SourceText.From("public class D{}", Encoding.UTF8)));
167var exception = Assert.Throws<ArgumentException>("hintName", () => asc.Add(hintName2, SourceText.From("", Encoding.UTF8)));
183var exception = Assert.Throws<ArgumentException>("hintName", () => asc.CopyTo(asc2));
229Assert.Throws<ArgumentException>(() => asc.Add("file4.cs", SourceText.From("")));
232Assert.Throws<ArgumentException>(() => asc.Add("file5.cs", SourceText.From("", encoding: null)));
234var exception = Assert.Throws<ArgumentException>(() => asc.Add("file5.cs", SourceText.From("", encoding: null)));
SourceGeneration\GeneratorDriverTests.cs (7)
463Assert.Throws<ArgumentException>("hintName", () => sgc.AddSource("test", SourceText.From("public class D{}", Encoding.UTF8)));
466Assert.Throws<ArgumentException>("hintName", () => sgc.AddSource("test.cs", SourceText.From("public class D{}", Encoding.UTF8)));
494Assert.Throws<ArgumentException>("hintName", () => spc.AddSource("test", SourceText.From("public class D{}", Encoding.UTF8)));
497Assert.Throws<ArgumentException>("hintName", () => spc.AddSource("test.cs", SourceText.From("public class D{}", Encoding.UTF8)));
2556Assert.Throws<ArgumentException>("hintName", () => c.AddEmbeddedAttributeDefinition());
4251VerifyGeneratorExceptionDiagnostic<ArgumentException>(diagnostic, generatorName, expectedMessage, initialization);
4713Assert.IsType<ArgumentException>(result.Exception);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (112)
Compilation\CompilationAPITests.cs (87)
388Assert.Throws<ArgumentException>(() => c.Emit(peStream));
389Assert.Throws<ArgumentException>(() => c.Emit(new MemoryStream(), pdbStream));
446Assert.Throws<ArgumentException>("peStream", () => comp.Emit(peStream: new TestStream(canRead: true, canWrite: false, canSeek: true)));
447Assert.Throws<ArgumentException>("pdbStream", () => comp.Emit(peStream: new MemoryStream(), pdbStream: new TestStream(canRead: true, canWrite: false, canSeek: true)));
448Assert.Throws<ArgumentException>("pdbStream", () => comp.Emit(peStream: new MemoryStream(), pdbStream: new MemoryStream(), options: EmitOptions.Default.WithDebugInformationFormat(DebugInformationFormat.Embedded)));
450Assert.Throws<ArgumentException>("sourceLinkStream", () => comp.Emit(
456Assert.Throws<ArgumentException>("embeddedTexts", () => comp.Emit(
462Assert.Throws<ArgumentException>("embeddedTexts", () => comp.Emit(
468Assert.Throws<ArgumentException>("win32Resources", () => comp.Emit(
472Assert.Throws<ArgumentException>("win32Resources", () => comp.Emit(
818Assert.Throws<ArgumentException>(() => comp.AddSyntaxTrees(t1));
821Assert.Throws<ArgumentException>(() => comp.ReplaceSyntaxTree(t1, comp.SyntaxTrees[0]));
824Assert.Throws<ArgumentException>(() => comp = comp.RemoveSyntaxTrees(SyntaxFactory.ParseSyntaxTree(s1)));
828Assert.Throws<ArgumentException>(() => comp = comp.RemoveSyntaxTrees(withErrorTree));
856Assert.Throws<ArgumentException>(() => compCollection = compCollection.AddSyntaxTrees(t4, t5).RemoveSyntaxTrees(col));
867Assert.Throws<ArgumentException>(() => compCollection = compCollection.AddSyntaxTrees(t4, t6).RemoveSyntaxTrees(stack));
878Assert.Throws<ArgumentException>(() => compCollection = compCollection.AddSyntaxTrees(t4, t6).RemoveSyntaxTrees(queue));
913Assert.Throws<ArgumentException>(() => CSharpCompilation.Create("Compilation", new SyntaxTree[] { withExpressionRootTree }));
916Assert.Throws<ArgumentException>(() => comp.AddSyntaxTrees(withExpressionRootTree));
919Assert.Throws<ArgumentException>(() => comp.ReplaceSyntaxTree(comp.SyntaxTrees[0], withExpressionRootTree));
956Assert.Throws<ArgumentException>(() => comp = comp.AddSyntaxTrees(listSyntaxTree).AddReferences().ReplaceSyntaxTree(t1, t2));
1296Assert.Throws<ArgumentException>(() => comp.AddReferences(compRef));
1381Assert.Throws<ArgumentException>(() => comp.AddReferences(compRef));
1427Assert.Throws<ArgumentException>(() => comp.AddReferences(listRef).AddReferences(ref2).RemoveReferences(ref1, ref2, ref3, ref4).ReplaceReference(ref2, ref2));
1437Assert.Throws<ArgumentException>(() => comp = comp.RemoveReferences(ref1));
1442Assert.Throws<ArgumentException>(() => comp = comp.ReplaceReference(MscorlibRef, ref1));
1453Assert.Throws<ArgumentException>(
1474Assert.Throws<ArgumentException>(
1482Assert.Throws<ArgumentException>(
1488Assert.Throws<ArgumentException>(() => comp.ReplaceSyntaxTree(newTree: SyntaxFactory.ParseSyntaxTree("Using System;"), oldTree: t1));
1541Assert.Throws<ArgumentException>(
1555Assert.Throws<ArgumentException>(() => (comp.AddSyntaxTrees(t1, t1)));
1619Assert.Throws<ArgumentException>(
2385Assert.Throws<ArgumentException>(() =>
2399Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", returnType: genericParameter));
2400Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", returnType: open));
2401Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", returnType: typeof(void)));
2402Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", returnType: byref));
2404Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: genericParameter));
2405Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: open));
2406Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: typeof(void)));
2407Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: typeof(int)));
2408Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: ptr));
2409Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", globalsType: byref));
2412Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a1", previousScriptCompilation: s0, globalsType: typeof(List<bool>)));
2415Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseExe));
2416Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithOutputKind(OutputKind.NetModule)));
2417Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithOutputKind(OutputKind.WindowsRuntimeMetadata)));
2418Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithOutputKind(OutputKind.WindowsRuntimeApplication)));
2419Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithOutputKind(OutputKind.WindowsApplication)));
2420Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithCryptoKeyContainer("goo")));
2421Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithCryptoKeyFile("goo.snk")));
2422Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithDelaySign(true)));
2423Assert.Throws<ArgumentException>(() => CSharpCompilation.CreateScriptCompilation("a", options: TestOptions.ReleaseDll.WithDelaySign(false)));
2467Assert.Throws<ArgumentException>(() => comp.CreateArrayTypeSymbol(elementType, default));
2468Assert.Throws<ArgumentException>(() => comp.CreateArrayTypeSymbol(elementType, 0));
2475Assert.Throws<ArgumentException>(() => comp.CreateArrayTypeSymbol(elementType, rank: default));
2476Assert.Throws<ArgumentException>(() => comp.CreateArrayTypeSymbol(elementType, rank: 0));
2507Assert.Throws<ArgumentException>(() =>
2517Assert.Throws<ArgumentException>(() =>
2529Assert.Throws<ArgumentException>(() =>
2541Assert.Throws<ArgumentException>(() =>
2704Assert.Throws<ArgumentException>(() => comp.CreateAnonymousTypeSymbol(memberTypes, memberNames, memberNullableAnnotations: ImmutableArray.Create(CodeAnalysis.NullableAnnotation.NotAnnotated)));
2770Assert.Throws<ArgumentException>(() =>
2792Assert.Throws<ArgumentException>("name", () =>
2796Assert.Throws<ArgumentException>("name", () =>
2800Assert.Throws<ArgumentException>(null, () =>
2804Assert.Throws<ArgumentException>(null, () =>
2808Assert.Throws<ArgumentException>(null, () =>
2960Assert.Throws<ArgumentException>(null, () => compilation.CreateBuiltinOperator(
2982Assert.Throws<ArgumentException>("name", () =>
2986Assert.Throws<ArgumentException>(null, () =>
2990Assert.Throws<ArgumentException>(null, () =>
2994Assert.Throws<ArgumentException>("name", () =>
2998Assert.Throws<ArgumentException>("name", () =>
3002Assert.Throws<ArgumentException>("name", () =>
3006Assert.Throws<ArgumentException>("name", () =>
3033Assert.Throws<ArgumentException>(() => genericType.Construct(default(ImmutableArray<ITypeSymbol>), default(ImmutableArray<CodeAnalysis.NullableAnnotation>)));
3034Assert.Throws<ArgumentException>(() => genericType.Construct(typeArguments: default, typeArgumentNullableAnnotations: default));
3041Assert.Throws<ArgumentException>(() => genericType.Construct(typeArguments, ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty));
3042Assert.Throws<ArgumentException>(() => genericType.Construct(ImmutableArray.Create<ITypeSymbol>(null, null), default));
3052Assert.Throws<ArgumentException>(() => genericType.Construct(typeArguments, default));
3068Assert.Throws<ArgumentException>(() => genericMethod.Construct(default(ImmutableArray<ITypeSymbol>), default(ImmutableArray<CodeAnalysis.NullableAnnotation>)));
3069Assert.Throws<ArgumentException>(() => genericMethod.Construct(typeArguments: default, typeArgumentNullableAnnotations: default));
3076Assert.Throws<ArgumentException>(() => genericMethod.Construct(typeArguments, ImmutableArray<CodeAnalysis.NullableAnnotation>.Empty));
3077Assert.Throws<ArgumentException>(() => genericMethod.Construct(ImmutableArray.Create<ITypeSymbol>(null, null), default));
3087Assert.Throws<ArgumentException>(() => genericMethod.Construct(typeArguments, default));
Symbols\FunctionPointerTypeSymbolTests.cs (9)
1539Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray.Create(RefKind.None)));
1540Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.Out, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty));
1542Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Default, callingConventionTypes: ImmutableArray.Create(cdeclType)!));
1543Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.StdCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!));
1544Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.FastCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!));
1545Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.CDecl, callingConventionTypes: ImmutableArray.Create(cdeclType)!));
1546Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.ThisCall, callingConventionTypes: ImmutableArray.Create(cdeclType)!));
1547Assert.Throws<ArgumentException>(() => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Unmanaged, callingConventionTypes: ImmutableArray.Create(@string)!));
1967Assert.Throws<ArgumentException>(() => mainComp.CreateFunctionPointerTypeSymbol(
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (16)
Syntax\SyntaxFactoryTests.cs (7)
103Assert.Throws<ArgumentException>(() => SyntaxFactory.Token(SyntaxKind.NumericLiteralExpression));
141Assert.Throws<ArgumentException>(() => SyntaxFactory.Token(default(SyntaxTriviaList), SyntaxKind.IdentifierToken, "text", "valueText", default(SyntaxTriviaList)));
142Assert.Throws<ArgumentException>(() => SyntaxFactory.Token(default(SyntaxTriviaList), SyntaxKind.CharacterLiteralToken, "text", "valueText", default(SyntaxTriviaList)));
143Assert.Throws<ArgumentException>(() => SyntaxFactory.Token(default(SyntaxTriviaList), SyntaxKind.NumericLiteralToken, "text", "valueText", default(SyntaxTriviaList)));
154catch (ArgumentException e)
165catch (ArgumentException e)
176catch (ArgumentException e)
Microsoft.CodeAnalysis.Debugging.Package (1)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Microsoft.CodeAnalysis.Extensions.Package (6)
Microsoft.CodeAnalysis.Features (5)
Microsoft.CodeAnalysis.InteractiveHost (9)
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (19)
Microsoft.CodeAnalysis.PublicApiAnalyzers (19)
Microsoft.CodeAnalysis.ResxSourceGenerator (19)
Microsoft.CodeAnalysis.Scripting (14)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (13)
Microsoft.CodeAnalysis.Test.Utilities (12)
Microsoft.CodeAnalysis.Threading.Package (5)
Microsoft.CodeAnalysis.UnitTests (128)
EmbeddedTextTests.cs (10)
26Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromBytes("", default(ArraySegment<byte>)));
28Assert.Throws<ArgumentException>("checksumAlgorithm", () => EmbeddedText.FromBytes("path", new ArraySegment<byte>(new byte[0], 0, 0), SourceHashAlgorithm.None));
35Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromSource("", null));
39Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From("source")));
42Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new byte[0], 0, Encoding.UTF8, canBeEmbedded: false)));
43Assert.Throws<ArgumentException>("text", () => EmbeddedText.FromSource("path", SourceText.From(new MemoryStream(new byte[0]), Encoding.UTF8, canBeEmbedded: false)));
50Assert.Throws<ArgumentException>("filePath", () => EmbeddedText.FromStream("", null));
52Assert.Throws<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotReadStream()));
53Assert.Throws<ArgumentException>("stream", () => EmbeddedText.FromStream("path", new CannotSeekStream()));
54Assert.Throws<ArgumentException>("checksumAlgorithm", () => EmbeddedText.FromStream("path", new MemoryStream(), SourceHashAlgorithm.None));
IsSymbolAccessibleWithinTests.cs (8)
34Assert.Throws<ArgumentException>(() => csc.IsSymbolAccessibleWithin(Av, Av));
35Assert.Throws<ArgumentException>(() => csc.IsSymbolAccessibleWithin(Av, Ac));
36Assert.Throws<ArgumentException>(() => csc.IsSymbolAccessibleWithin(Ac, Av));
37Assert.Throws<ArgumentException>(() => csc.IsSymbolAccessibleWithin(Ac, Ac, Av));
39Assert.Throws<ArgumentException>(() => vbc.IsSymbolAccessibleWithin(Ac, Ac));
40Assert.Throws<ArgumentException>(() => vbc.IsSymbolAccessibleWithin(Ac, Av));
41Assert.Throws<ArgumentException>(() => vbc.IsSymbolAccessibleWithin(Av, Ac));
42Assert.Throws<ArgumentException>(() => vbc.IsSymbolAccessibleWithin(Av, Av, Ac));
ResourceDescriptionTests.cs (12)
35Assert.Throws<ArgumentException>(() => new ResourceDescription("", "file", data, isPublic: true));
36Assert.Throws<ArgumentException>(() => new ResourceDescription("res", "", data, isPublic: true));
37Assert.Throws<ArgumentException>(() => new ResourceDescription("res", "", data, isPublic: true));
38Assert.Throws<ArgumentException>(() => new ResourceDescription("", "file", data, isPublic: true));
41Assert.Throws<ArgumentException>(() => new ResourceDescription("x", "x/x", data, isPublic: true));
42Assert.Throws<ArgumentException>(() => new ResourceDescription("x", "x\\x", data, isPublic: true));
43Assert.Throws<ArgumentException>(() => new ResourceDescription("x", "x:x", data, isPublic: true));
44Assert.Throws<ArgumentException>(() => new ResourceDescription("x", "\0", data, isPublic: true));
45Assert.Throws<ArgumentException>(() => new ResourceDescription("", "x", data, isPublic: true));
46Assert.Throws<ArgumentException>(() => new ResourceDescription("xxx\0xxxx", "", data, isPublic: true));
47Assert.Throws<ArgumentException>(() => new ResourceDescription("xxx\uD800asdas", "", data, isPublic: true));
48Assert.Throws<ArgumentException>(() => new ResourceDescription("xxx", "xxx\uD800asdas", data, isPublic: true));
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces (34)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (10)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (39)
SolutionTests\SolutionTests.cs (12)
338Assert.Throws<ArgumentException>(() => provider.TryGetDiagnosticValue(tree, "CA1234", CancellationToken.None, out _));
1987Assert.Throws<ArgumentException>("projectReferences[1]", () => solution.AddProjectReferences(projectId, [projectRef2, projectRef2]));
1988Assert.Throws<ArgumentException>("projectReferences[1]", () => solution.AddProjectReferences(projectId, [new ProjectReference(projectId2), new ProjectReference(projectId2)]));
2027Assert.Throws<ArgumentException>("projectReference", () => solution.RemoveProjectReference(projectId, new ProjectReference(ProjectId.CreateNewId())));
2106Assert.Throws<ArgumentException>("metadataReferences[1]", () => solution.AddMetadataReferences(projectId, [metadataRef1, metadataRef1]));
2179Assert.Throws<ArgumentException>("analyzerReferences[1]", () => solution.AddAnalyzerReferences(projectId, [analyzerRef1, analyzerRef1]));
2246Assert.Throws<ArgumentException>("analyzerReferences[1]", () => solution.AddAnalyzerReferences([analyzerRef1, analyzerRef1]));
2764Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveDocuments(ImmutableArray.Create(documentInfo1.Id)));
2783Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAdditionalDocuments(ImmutableArray.Create(documentInfo1.Id)));
2802Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAnalyzerConfigDocuments(ImmutableArray.Create(documentInfo1.Id)));
4702Assert.Throws<ArgumentException>(() => solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.Create<DocumentId>()));
4705Assert.Throws<ArgumentException>(() => solution = solution.WithProjectDocumentsOrder(pid, ImmutableList.CreateRange([did3, did2, did1])));
Microsoft.CSharp (1)
Microsoft.Data.Analysis (19)
DataFrameColumnCollection.cs (18)
180/// <exception cref="ArgumentException">Throws if <paramref name="columnName"/> is not present in this <see cref="DataFrame"/></exception>
213/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
231/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
248/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
265/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
282/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
299/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
316/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
333/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
350/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
367/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
384/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
401/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
418/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
435/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
452/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
469/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
486/// <exception cref="ArgumentException">A column named <paramref name="name"/> cannot be found, or if the column's type doesn't match.</exception>
Microsoft.Data.Analysis.Tests (42)
Microsoft.DotNet.Build.Tasks.Feed (2)
Microsoft.DotNet.Build.Tasks.Feed.Tests (4)
Microsoft.DotNet.Build.Tasks.Workloads (1)
Microsoft.DotNet.Helix.Client (2)
Microsoft.DotNet.Helix.JobSender.Tests (4)
Microsoft.DotNet.Helix.Sdk (1)
Microsoft.DotNet.Internal.SymbolHelper (5)
Microsoft.DotNet.NuGetRepack.Tests (1)
Microsoft.DotNet.XUnitAssert.Tests (65)
ExceptionAssertsTests.cs (56)
27 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
43 Assert.Throws(typeof(ArgumentException), testCode);
52 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
70 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
110 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
126 Assert.Throws(typeof(ArgumentException), testCode);
135 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
153 var ex = Record.Exception(() => Assert.Throws(typeof(ArgumentException), testCode));
175 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Action)!));
183 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
199 Assert.Throws<ArgumentException>(testCode);
208 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
226 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
244 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Func<object>)!));
263 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
279 Assert.Throws<ArgumentException>(testCode);
288 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
306 var ex = Record.Exception(() => Assert.Throws<ArgumentException>(testCode));
327 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Action)!));
335 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
351 Assert.Throws<ArgumentException>("paramName", testCode);
359 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName2", testCode));
377 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
395 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
413 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Func<object>)!));
421 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
437 Assert.Throws<ArgumentException>("paramName", testCode);
445 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName2", testCode));
463 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
481 var ex = Record.Exception(() => Assert.Throws<ArgumentException>("paramName", testCode));
502 Assert.Throws<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Action)!));
510 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode));
526 Assert.ThrowsAny<ArgumentException>(testCode);
535 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode));
552 Assert.ThrowsAny<ArgumentException>(testCode);
561 Assert.Throws<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Func<object>)!));
580 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode));
596 Assert.ThrowsAny<ArgumentException>(testCode);
605 var ex = Record.Exception(() => Assert.ThrowsAny<ArgumentException>(testCode));
622 Assert.ThrowsAny<ArgumentException>(testCode);
632 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.ThrowsAnyAsync<ArgumentException>(default(Func<Task>)!));
640 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAnyAsync<ArgumentException>(testCode));
656 await Assert.ThrowsAnyAsync<ArgumentException>(testCode);
665 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAnyAsync<ArgumentException>(testCode));
682 await Assert.ThrowsAnyAsync<ArgumentException>(testCode);
691 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.ThrowsAsync<ArgumentException>(default(Func<Task>)!));
699 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>(testCode));
715 await Assert.ThrowsAsync<ArgumentException>(testCode);
724 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>(testCode));
742 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>(testCode));
760 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.ThrowsAsync<ArgumentException>("paramName", default(Func<Task>)!));
768 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName", testCode));
784 await Assert.ThrowsAsync<ArgumentException>("paramName", testCode);
792 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName2", testCode));
810 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName", testCode));
828 var ex = await Record.ExceptionAsync(() => Assert.ThrowsAsync<ArgumentException>("paramName", testCode));
Microsoft.Extensions.AI (8)
Microsoft.Extensions.AI.Abstractions (29)
Microsoft.Extensions.AI.Abstractions.Tests (28)
Contents\DataContentTests.cs (8)
16[InlineData("", typeof(ArgumentException))]
17[InlineData("invalid", typeof(ArgumentException))]
18[InlineData("data", typeof(ArgumentException))]
21[InlineData("http://localhost/blah.png", typeof(ArgumentException))]
22[InlineData("https://localhost/blah.png", typeof(ArgumentException))]
23[InlineData("ftp://localhost/blah.png", typeof(ArgumentException))]
24[InlineData("a://localhost/blah.png", typeof(ArgumentException))]
58Assert.Throws<ArgumentException>("mediaType", () => new DataContent("data:image/png;base64,aGVsbG8=", type));
Contents\UriContentTests.cs (6)
20Assert.Throws<ArgumentException>("mediaType", () => new UriContent("data:image/png;base64,aGVsbG8=", ""));
21Assert.Throws<ArgumentException>("mediaType", () => new UriContent("data:image/png;base64,aGVsbG8=", "image"));
24Assert.Throws<ArgumentException>("mediaType", () => new UriContent(new Uri("data:image/png;base64,aGVsbG8="), ""));
25Assert.Throws<ArgumentException>("mediaType", () => new UriContent(new Uri("data:image/png;base64,aGVsbG8="), "audio"));
40Assert.Throws<ArgumentException>("mediaType", () => new UriContent("http://localhost/something", type));
43Assert.Throws<ArgumentException>("value", () => c.MediaType = type);
Microsoft.Extensions.AI.AzureAIInference (10)
Microsoft.Extensions.AI.AzureAIInference.Tests (3)
Microsoft.Extensions.AI.Evaluation (8)
Microsoft.Extensions.AI.Evaluation.Console (8)
Microsoft.Extensions.AI.Evaluation.NLP (8)
Microsoft.Extensions.AI.Evaluation.Quality (8)
Microsoft.Extensions.AI.Evaluation.Reporting (8)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (8)
Microsoft.Extensions.AI.Evaluation.Safety (8)
Microsoft.Extensions.AI.Integration.Tests (8)
Microsoft.Extensions.AI.Ollama (10)
Microsoft.Extensions.AI.Ollama.Tests (2)
Microsoft.Extensions.AI.OpenAI (11)
Microsoft.Extensions.AI.Tests (7)
Microsoft.Extensions.AmbientMetadata.Application (11)
Microsoft.Extensions.AmbientMetadata.Application.Tests (3)
Microsoft.Extensions.AsyncState (8)
Microsoft.Extensions.Caching.Hybrid (8)
Microsoft.Extensions.Caching.Hybrid.Tests (4)
Microsoft.Extensions.Caching.SqlServer (3)
Microsoft.Extensions.Caching.StackExchangeRedis (1)
Microsoft.Extensions.Compliance.Abstractions (11)
Microsoft.Extensions.Compliance.Abstractions.Tests (4)
Microsoft.Extensions.Compliance.Redaction (8)
Microsoft.Extensions.Compliance.Redaction.Tests (3)
Microsoft.Extensions.Compliance.Testing (8)
Microsoft.Extensions.Compliance.Testing.Tests (1)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (3)
Microsoft.Extensions.DependencyInjection (1)
Microsoft.Extensions.DependencyInjection.AutoActivation (8)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (8)
Microsoft.Extensions.Diagnostics.HealthChecks (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (8)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (2)
Microsoft.Extensions.Diagnostics.Probes (8)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (9)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (1)
Microsoft.Extensions.Diagnostics.Testing (8)
Microsoft.Extensions.Diagnostics.Testing.Tests (4)
Microsoft.Extensions.Features (2)
Microsoft.Extensions.FileProviders.Embedded (6)
Microsoft.Extensions.Hosting.Testing (8)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Microsoft.Extensions.Http.Resilience (8)
Microsoft.Extensions.Http.Resilience.Tests (7)
Microsoft.Extensions.Identity.Core (1)
Microsoft.Extensions.Identity.Stores (1)
Microsoft.Extensions.Localization (6)
Microsoft.Extensions.Localization.Abstractions (2)
Microsoft.Extensions.Logging.AzureAppServices (6)
Microsoft.Extensions.ObjectPool (2)
Microsoft.Extensions.ObjectPool.DependencyInjection (8)
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (2)
Microsoft.Extensions.Options.Contextual (8)
Microsoft.Extensions.Primitives (2)
Microsoft.Extensions.Resilience (8)
Microsoft.Extensions.SecretManager.Tools.Tests (1)
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
Microsoft.Extensions.ServiceDiscovery.Tests (2)
Microsoft.Extensions.Telemetry (8)
Microsoft.Extensions.Telemetry.Abstractions (12)
Microsoft.Extensions.Telemetry.Abstractions.Tests (5)
Microsoft.Extensions.Telemetry.Tests (18)
Latency\Internal\LatencyContextRegistrySetTests.cs (6)
49Assert.Throws<ArgumentException>(() => GetRegistry(n, e, e));
50Assert.Throws<ArgumentException>(() => GetRegistry(e, n, e));
51Assert.Throws<ArgumentException>(() => GetRegistry(e, e, n));
54Assert.Throws<ArgumentException>(() => GetRegistry(n, e, e));
55Assert.Throws<ArgumentException>(() => GetRegistry(e, n, e));
56Assert.Throws<ArgumentException>(() => GetRegistry(e, e, n));
Microsoft.Extensions.TimeProvider.Testing (8)
Microsoft.Extensions.WebEncoders (2)
Microsoft.Gen.Logging.Generated.Tests (1)
Microsoft.JSInterop (3)
Microsoft.JSInterop.Tests (15)
Infrastructure\DotNetDispatcherTest.cs (14)
43var ex = Assert.Throws<ArgumentException>(() =>
65var ex = Assert.Throws<ArgumentException>(() =>
239var ex = Assert.Throws<ArgumentException>(
258var ex = Assert.Throws<ArgumentException>(
543var ex = Assert.Throws<ArgumentException>(() => DotNetDispatcher.Invoke(jsRuntime, new DotNetInvocationInfo(thisAssemblyName, methodIdentifier, 0, default), "[7]"));
558var ex = Assert.Throws<ArgumentException>(() => DotNetDispatcher.Invoke(jsRuntime, new DotNetInvocationInfo(null, methodIdentifier, 1, default), argsJson));
588var ex = Assert.Throws<ArgumentException>(() =>
Microsoft.Maui (3)
Microsoft.Maui.Controls (3)
Microsoft.Maui.Controls.Xaml (2)
Microsoft.Maui.Essentials (3)
Microsoft.ML.AutoML.Tests (38)
UserInputValidationTests.cs (36)
36var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data,
48var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data,
62var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data,
78var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, columnInfo, null, task));
89var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, columnInfo, null, TaskKind.Regression));
99var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data, columnInfo, null, TaskKind.Regression));
118var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainData,
141var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainData,
164var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainData,
180var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateInferColumnsArgs("idontexist", "Label"));
189var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateInferColumnsArgs(emptyFilePath, "Label"));
208var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, new ColumnInformation(), null, TaskKind.Regression));
228var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, columnInfo, null, task));
302var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, new ColumnInformation(),
315var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, new ColumnInformation(),
338var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainingData, new ColumnInformation(),
403var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data,
418var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(_data,
Microsoft.ML.Tests (9)
ImagesTests.cs (9)
120Assert.Throws<ArgumentException>(() => new ImageLoadingTransformer(env, incorrectImageFolder, ("ImageReal", "ImagePath")).Transform(data));
1265Assert.Throws<ArgumentException>(() => MLImage.CreateFromFile("This is Invalid Path"));
1267Assert.Throws<ArgumentException>(() => MLImage.CreateFromStream(new MemoryStream(new byte[10])));
1268Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Unknown, Array.Empty<byte>()));
1269Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, Array.Empty<byte>()));
1270Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(0, 10, MLPixelFormat.Bgra32, new byte[10]));
1271Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 0, MLPixelFormat.Bgra32, new byte[10]));
1272Assert.Throws<ArgumentException>(() => MLImage.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, new byte[401]));
1302Assert.Throws<ArgumentException>(() => image1.Save(imageTempPath));
Microsoft.ML.Tokenizers (1)
Microsoft.ML.Tokenizers.Tests (5)
Microsoft.ML.TorchSharp (2)
Microsoft.Net.Http.Headers (3)
Microsoft.Net.Http.Headers.Tests (24)
Microsoft.VisualBasic.Core (10)
Microsoft.VisualBasic.IntegrationTests (4)
Microsoft.VisualBasic.Tests (7)
Microsoft.VisualStudio.LanguageServices (7)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (7)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Microsoft.Web.Xdt.Extensions (3)
MSBuild (7)
MSBuildTaskHost (7)
mscorlib (1)
netstandard (1)
PresentationBuildTasks (4)
PresentationCore (52)
PresentationCore.Tests (9)
PresentationFramework (170)
PresentationFramework.Tests (1)
PresentationUI (4)
ReachFramework (20)
Roslyn.Diagnostics.Analyzers (19)
Roslyn.VisualStudio.Next.UnitTests (1)
ScenarioTests.Common.Tests (2)
Security.TransportSecurity.IntegrationTests (2)
Shared (12)
Shared.Tests (16)
Throw\ThrowTest.cs (16)
41var exception = Assert.Throws<ArgumentException>(() => Throw.ArgumentException(paramName, message));
54var exception = Assert.Throws<ArgumentException>(() => Throw.ArgumentException(paramName, message, innerException));
231var exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrWhitespace(" ", "paramName"));
253var exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty("", "paramName"));
294var exception = Assert.Throws<ArgumentException>(() => Throw.IfBufferTooSmall(23, 24, "paramName"));
322ArgumentException exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((ICollection<int>?)null, "foo"));
339exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty((ICollection<int>?)list, "foo"));
343exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty((IReadOnlyCollection<int>?)list, "foo"));
347exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty(list, "foo"));
353exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty(queue, "foo"));
359exception = Assert.Throws<ArgumentException>(() => Throw.IfNullOrEmpty(enumerable, "foo"));
System.Collections (3)
System.Collections.Concurrent (34)
System.Collections.Immutable (20)
System.ComponentModel.Annotations (18)
System.ComponentModel.Composition (48)
System.ComponentModel.TypeConverter (2)
System.Configuration.ConfigurationManager (7)
System.Data.Common (44)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (18)
44internal static ArgumentException Argument(string error)
46ArgumentException e = new ArgumentException(error);
51internal static ArgumentException Argument(string error, Exception? inner)
53ArgumentException e = new ArgumentException(error, inner);
58internal static ArgumentException Argument(string error, string? parameter)
60ArgumentException e = new ArgumentException(error, parameter);
203internal static ArgumentException InvalidMultipartName(string property, string value)
205ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartName, property, value));
210internal static ArgumentException InvalidMultipartNameIncorrectUsageOfQuotes(string property, string value)
212ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameQuoteUsage, property, value));
217internal static ArgumentException InvalidMultipartNameToManyParts(string property, string value, int limit)
219ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameToManyParts, property, value, limit));
282internal static ArgumentException ConnectionStringSyntax(int index)
286internal static ArgumentException KeywordNotSupported(string keyword)
290internal static ArgumentException ConvertFailed(Type fromType, Type toType, Exception? innerException)
310internal static ArgumentException CollectionRemoveInvalidObject(Type itemType, ICollection collection)
396internal static ArgumentException ParametersIsNotParent(Type parameterType, ICollection collection)
400internal static ArgumentException ParametersIsParent(Type parameterType, ICollection collection)
System.Data.Odbc (32)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (18)
44internal static ArgumentException Argument(string error)
46ArgumentException e = new ArgumentException(error);
51internal static ArgumentException Argument(string error, Exception? inner)
53ArgumentException e = new ArgumentException(error, inner);
58internal static ArgumentException Argument(string error, string? parameter)
60ArgumentException e = new ArgumentException(error, parameter);
203internal static ArgumentException InvalidMultipartName(string property, string value)
205ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartName, property, value));
210internal static ArgumentException InvalidMultipartNameIncorrectUsageOfQuotes(string property, string value)
212ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameQuoteUsage, property, value));
217internal static ArgumentException InvalidMultipartNameToManyParts(string property, string value, int limit)
219ArgumentException e = new ArgumentException(SR.Format(SR.ADP_InvalidMultipartNameToManyParts, property, value, limit));
282internal static ArgumentException ConnectionStringSyntax(int index)
286internal static ArgumentException KeywordNotSupported(string keyword)
290internal static ArgumentException ConvertFailed(Type fromType, Type toType, Exception? innerException)
310internal static ArgumentException CollectionRemoveInvalidObject(Type itemType, ICollection collection)
396internal static ArgumentException ParametersIsNotParent(Type parameterType, ICollection collection)
400internal static ArgumentException ParametersIsParent(Type parameterType, ICollection collection)
System.Diagnostics.Process (2)
System.Diagnostics.TextWriterTraceListener (1)
System.Diagnostics.TraceSource (2)
System.Drawing.Common.Tests (1080)
mono\System.Drawing\GraphicsTests.cs (34)
347Exception exception = AssertExtensions.Throws<ArgumentException, Exception>(() => Graphics.FromImage(img));
348if (exception is ArgumentException argumentException)
425Assert.Throws<ArgumentException>(() => g.Transform = matrix);
436Assert.Throws<ArgumentException>(() => g.MultiplyTransform(matrix));
658Assert.Throws<ArgumentException>(() => g.ScaleTransform(0, 1));
666Assert.Throws<ArgumentException>(() => g.ScaleTransform(1, 0));
728Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, [new(10, 10)], 0.5f));
738Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, s_tooSmallCurve, 0, 2, 0.5f));
772Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, s_smallCurveF, 0, 0));
780Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, s_smallCurveF, 0, -1));
789Assert.Throws<ArgumentException>(() => g.DrawCurve(Pens.Black, s_smallCurveF, 1, 2));
1056Assert.Throws<ArgumentException>(() => BeginContainer_GraphicsUnit(GraphicsUnit.Display));
1072Assert.Throws<ArgumentException>(() => BeginContainer_GraphicsUnit(GraphicsUnit.World));
1078Assert.Throws<ArgumentException>(() => BeginContainer_GraphicsUnit((GraphicsUnit)int.MinValue));
1158Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<Rectangle>()));
1182Assert.Throws<ArgumentException>(() => g.FillRectangles(Brushes.Red, Array.Empty<RectangleF>()));
1942Assert.Throws<ArgumentException>(() => MeasureCharacterRanges(text, text.Length, 1, useSpan));
1951Assert.Throws<ArgumentException>(() => MeasureCharacterRanges(text, 0, text.Length + 1, useSpan));
1999Assert.Throws<ArgumentException>(() => g.MeasureCharacterRanges("Mono", _font, default, null));
2000Assert.Throws<ArgumentException>(() => g.MeasureCharacterRanges("Mono".AsSpan(), _font, default, null));
2146Assert.Throws<ArgumentException>(() => g.ReleaseHdcInternal(IntPtr.Zero));
2156Assert.Throws<ArgumentException>(() => g.ReleaseHdcInternal(hdc));
2176Assert.Throws<ArgumentException>(g.ReleaseHdc);
2186Assert.Throws<ArgumentException>(g.ReleaseHdc);
2452Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<PointF>()));
2526Assert.Throws<ArgumentException>(() => g.DrawImage(bmp, Array.Empty<Point>()));
2604Assert.Throws<ArgumentException>(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.Display));
2617Assert.Throws<ArgumentException>(() => DrawImage_ImageRectangleRectangleGraphicsUnit(GraphicsUnit.World));
2647Assert.Throws<ArgumentException>(() => DrawImage_ImagePointRectangleGraphicsUnit([]));
2654Assert.Throws<ArgumentException>(() => DrawImage_ImagePointRectangleGraphicsUnit([p]));
2661Assert.Throws<ArgumentException>(() => DrawImage_ImagePointRectangleGraphicsUnit([p, p]));
2705Assert.Throws<ArgumentException>(() => DrawImage_ImagePointFRectangleGraphicsUnit([]));
2712Assert.Throws<ArgumentException>(() => DrawImage_ImagePointFRectangleGraphicsUnit([p]));
2719Assert.Throws<ArgumentException>(() => DrawImage_ImagePointFRectangleGraphicsUnit([p, p]));
System\Drawing\BitmapTests.cs (78)
78AssertExtensions.Throws<ArgumentException>(paramName, null, () => new Bitmap(filename));
79AssertExtensions.Throws<ArgumentException>(paramName, null, () => new Bitmap(filename, false));
80AssertExtensions.Throws<ArgumentException>(paramName, null, () => new Bitmap(filename, true));
106AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(type, resource));
112AssertExtensions.Throws<ArgumentNullException, ArgumentException>("resource", null, () => new Bitmap(typeof(Bitmap), null));
145AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Bitmap((Stream)null));
146AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Bitmap((Stream)null, false));
153AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(stream));
154AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(stream, false));
155AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(stream, true));
220AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(width, 1));
221AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(width, 1, Graphics.FromImage(new Bitmap(1, 1))));
222AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), width, 1));
223AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), new Size(width, 1)));
224AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(width, 1, PixelFormat.Format16bppArgb1555));
225AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(width, 1, 0, PixelFormat.Format16bppArgb1555, IntPtr.Zero));
235AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, height));
236AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, height, Graphics.FromImage(new Bitmap(1, 1))));
237AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), 1, height));
238AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(new Bitmap(1, 1), new Size(1, height)));
239AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, height, PixelFormat.Format16bppArgb1555));
240AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, height, 0, PixelFormat.Format16bppArgb1555, IntPtr.Zero));
256AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, 1, format));
257AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, 1, 0, format, IntPtr.Zero));
263AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, 1, 0, PixelFormat.Format16bppArgb1555, 10));
351AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(image));
352AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(image, 1, 1));
353AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(image, new Size(1, 1)));
425AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new Rectangle(0, 0, width, height), bitmap.PixelFormat));
426AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new RectangleF(0, 0, width, height), bitmap.PixelFormat));
483AssertExtensions.Throws<ArgumentException>(null, bitmap.Clone);
484AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new Rectangle(0, 0, 1, 1), PixelFormat.Format32bppArgb));
485AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Clone(new RectangleF(0, 0, 1, 1), PixelFormat.Format32bppArgb));
504AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetFrameCount(FrameDimension.Page));
526AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SelectActiveFrame(FrameDimension.Page, 0));
574AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPixel(0, 0));
583AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPixel(0, 0));
639AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetHbitmap());
648AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetHbitmap());
712AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetHicon());
721AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetHicon());
759AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromHicon(IntPtr.Zero));
760AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromHicon(10));
767AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromHicon(icon.Handle));
773AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(IntPtr.Zero, "Name"));
774AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(10, "Name"));
780AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(IntPtr.Zero, "Name"));
781AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(10, "Name"));
884AssertExtensions.Throws<ArgumentException>(null, bitmap.MakeTransparent);
885AssertExtensions.Throws<ArgumentException>(null, () => bitmap.MakeTransparent(Color.Red));
892AssertExtensions.Throws<ArgumentException>(null, bitmap.MakeTransparent);
957AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0, Color.Red));
966AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetPixel(0, 0, Color.Red));
987AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetResolution(xDpi, 1));
998AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetResolution(1, yDpi));
1007AssertExtensions.Throws<ArgumentException>(null, () => bitmap.SetResolution(1, 1));
1077AssertExtensions.Throws<ArgumentException>(null, () => bitmap.UnlockBits(data));
1112AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat));
1115AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, bitmap.PixelFormat, bitmapData));
1133AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, format));
1136AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, format, bitmapData));
1145AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format16bppGrayScale));
1146AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format16bppGrayScale, new BitmapData()));
1148AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format16bppGrayScale));
1149AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadWrite, PixelFormat.Format16bppGrayScale, new BitmapData()));
1152AssertExtensions.Throws<ArgumentException>(null, () => bitmap.UnlockBits(data));
1162AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.PixelFormat));
1165AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), lockMode, bitmap.PixelFormat, bitmapData));
1174AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb));
1177AssertExtensions.Throws<ArgumentException>(null, () => bitmap.LockBits(new Rectangle(0, 0, 1, 1), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb, bitmapData));
1260AssertExtensions.Throws<ArgumentException>(null, () => bitmap.UnlockBits(new BitmapData()));
1269AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Width);
1270AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Height);
1271AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Size);
1456AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Palette);
1457AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Palette = palette);
1458AssertExtensions.Throws<ArgumentException>(null, () => bitmap.Size);
1660bitmap.Invoking(b => b.ConvertFormat(format, dither, palette)).Should().Throw<ArgumentException>();
System\Drawing\BufferedGraphicsContextTests.cs (5)
123AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(-1, new Rectangle(0, 0, 10, 10)));
151AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(graphics, largeRectangle));
152AssertExtensions.Throws<ArgumentException>(null, () => context.Allocate(graphics, Rectangle.Empty));
200AssertExtensions.Throws<ArgumentException>("value", null, () => context.MaximumBuffer = new Size(width, 1));
209AssertExtensions.Throws<ArgumentException>("value", null, () => context.MaximumBuffer = new Size(1, height));
System\Drawing\ColorTranslatorTests.cs (10)
210Exception exception = AssertExtensions.Throws<ArgumentException, Exception>(() => ColorTranslator.FromHtml(htmlColor));
211if (exception is ArgumentException argumentException)
219[InlineData("1,2", typeof(ArgumentException))]
220[InlineData("1,2,3,4,5", typeof(ArgumentException))]
221[InlineData("-1,2,3", typeof(ArgumentException))]
222[InlineData("256,2,3", typeof(ArgumentException))]
223[InlineData("1,-1,3", typeof(ArgumentException))]
224[InlineData("1,256,3", typeof(ArgumentException))]
225[InlineData("1,2,-1", typeof(ArgumentException))]
226[InlineData("1,2,256", typeof(ArgumentException))]
System\Drawing\Drawing2D\CustomLineCapTests.cs (10)
72AssertExtensions.Throws<ArgumentException>(null, () => new CustomLineCap(fillPath, null));
112AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.SetStrokeCaps(startCap, endCap));
161AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.BaseCap = baseCap);
213AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.StrokeJoin);
214AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.BaseCap);
215AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.BaseInset);
216AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.WidthScale);
217AssertExtensions.Throws<ArgumentException>(null, customLineCap.Clone);
218AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.SetStrokeCaps(LineCap.Flat, LineCap.Flat));
219AssertExtensions.Throws<ArgumentException>(null, () => customLineCap.GetStrokeCaps(out LineCap startCap, out LineCap endCap));
System\Drawing\Drawing2D\GraphicsPathIteratorTests.cs (5)
264AssertExtensions.Throws<ArgumentException>(null, () => gpi.Enumerate(ref points, ref types));
277AssertExtensions.Throws<ArgumentException>(null, () => gpi.Enumerate(ref points, ref types));
302AssertExtensions.Throws<ArgumentException>(null, () => gpi.CopyData(ref points, ref types, 0, points.Length));
324AssertExtensions.Throws<ArgumentException>(null, () => gpi.CopyData(ref resultPoints, ref resultTypes, startIndex, endIndex));
343AssertExtensions.Throws<ArgumentException>(null, () => gpi.CopyData(ref resultPoints, ref resultTypes, startIndex, endIndex));
System\Drawing\Drawing2D\GraphicsPathTests.cs (27)
95AssertExtensions.Throws<ArgumentException>(null, () => new GraphicsPath(new Point[pointsLength], new byte[typesLength]));
96AssertExtensions.Throws<ArgumentException>(null, () => new GraphicsPath(new PointF[pointsLength], new byte[typesLength]));
132Assert.ThrowsAny<ArgumentException>(() => gp.FillMode = fillMode);
323AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<Point>()));
324AssertExtensions.Throws<ArgumentException>("points", null, () => new GraphicsPath().AddLines(Array.Empty<PointF>()));
360AssertExtensions.Throws<ArgumentException>(null, () => gp.AddArc(1, 1, width, height, Pi4, Pi4));
361AssertExtensions.Throws<ArgumentException>(null, () => gp.AddArc(1.0f, 1.0f, width, height, Pi4, Pi4));
444AssertExtensions.Throws<ArgumentException>(null, () => gp.AddBeziers(points));
558AssertExtensions.Throws<ArgumentException>(null, () => gp.AddCurve((PointF[])null));
559AssertExtensions.Throws<ArgumentException>(null, () => gp.AddCurve((Point[])null));
573AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(() => gp.AddCurve(points));
574AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(() => gp.AddCurve(points, 0, 2, 0.5f));
588AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(() => gp.AddCurve(points));
589AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(() => gp.AddCurve(points, 0, 2, 0.5f));
603AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(
606AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(
614AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(
617AssertExtensions.ThrowsAny<ArgumentException, ArgumentOutOfRangeException>(
682AssertExtensions.Throws<ArgumentException>(null, () => gp.AddClosedCurve(points));
697AssertExtensions.Throws<ArgumentException>(null, () => gp.AddClosedCurve(points));
879AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(1, 1, height, width, Pi4, Pi4));
880AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(1f, 1f, height, width, Pi4, Pi4));
881AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPie(new Rectangle(1, 1, height, width), Pi4, Pi4));
955AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPolygon(points));
970AssertExtensions.Throws<ArgumentException>(null, () => gp.AddPolygon(points));
1080AssertExtensions.Throws<ArgumentNullException, ArgumentException>("family", null, () =>
1288AssertExtensions.Throws<ArgumentException>(null, () => new GraphicsPath().Warp([], default));
System\Drawing\Drawing2D\HatchBrushTests.cs (6)
52AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.Empty));
53AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.Empty, Color.Empty));
85AssertExtensions.Throws<ArgumentException>(null, brush.Clone);
94AssertExtensions.Throws<ArgumentException>(null, () => brush.HatchStyle);
103AssertExtensions.Throws<ArgumentException>(null, () => brush.ForegroundColor);
112AssertExtensions.Throws<ArgumentException>(null, () => brush.BackgroundColor);
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (62)
206AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0f));
207AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0f));
208AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
209AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
210AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true));
211AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.Empty, Color.Empty, 0, true));
217AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0f));
218AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0f));
219AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
220AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, LinearGradientMode.BackwardDiagonal));
221AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true));
222AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.Empty, Color.Empty, 0, true));
230Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode));
231Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new RectangleF(1, 2, 3, 4), Color.Empty, Color.Empty, linearGradientMode));
254AssertExtensions.Throws<ArgumentException>(null, brush.Clone);
307AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = blend);
328AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () => brush.Blend = new Blend { Factors = new float[2], Positions = null });
335AssertExtensions.Throws<ArgumentException>("value", null, () => brush.Blend = new Blend { Factors = new float[2], Positions = new float[1] });
342AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = new Blend { Factors = [], Positions = [] });
351AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend);
352AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = new Blend());
370AssertExtensions.Throws<ArgumentException>(null, () => brush.GammaCorrection);
371AssertExtensions.Throws<ArgumentException>(null, () => brush.GammaCorrection = true);
430AssertExtensions.Throws<ArgumentException>(
439Assert.Throws<ArgumentException>(() => brush.InterpolationColors = new ColorBlend { Colors = new Color[2], Positions = null });
449AssertExtensions.Throws<ArgumentException>("value", () => brush.InterpolationColors = new ColorBlend
462AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend
482AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors);
483AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend
563AssertExtensions.Throws<ArgumentException>(null, () => brush.LinearColors);
564AssertExtensions.Throws<ArgumentException>(null, () => brush.LinearColors = [Color.Red, Color.Wheat]);
573AssertExtensions.Throws<ArgumentException>(null, () => brush.Rectangle);
597AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform);
598AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform = new Matrix());
618Assert.ThrowsAny<ArgumentException>(() => brush.WrapMode = wrapMode);
625AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode = WrapMode.Clamp);
634AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode);
635AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode = WrapMode.TileFlipX);
654AssertExtensions.Throws<ArgumentException>(null, brush.ResetTransform);
721AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix));
722AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Append));
731AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(new Matrix()));
732AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(new Matrix(), MatrixOrder.Prepend));
772AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(0, 0, order));
781AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(0, 0));
782AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(0, 0, MatrixOrder.Append));
822AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0, 0, order));
831AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0, 0));
832AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0, 0, MatrixOrder.Append));
873AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(0, order));
882AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(0));
883AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(0, MatrixOrder.Append));
905AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(focus));
906AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(focus, 1));
917AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(0.1f, scale));
926AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(0));
927AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(0, 1));
965AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(focus));
966AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(focus, 1));
977AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(0.1f, scale));
986AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(0));
987AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(0, 1));
System\Drawing\Drawing2D\MatrixTests.cs (45)
141AssertExtensions.Throws<ArgumentException>(null, () => new Matrix(default, new PointF[length]));
142AssertExtensions.Throws<ArgumentException>(null, () => new Matrix(default, new Point[length]));
171AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Clone());
217AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Equals(new Matrix()));
223AssertExtensions.Throws<ArgumentException>(null, () => new Matrix().Equals(CreateDisposedMatrix()));
229AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Elements);
262AssertExtensions.Throws<ArgumentException>(null, matrix1.Invert);
263AssertExtensions.Throws<ArgumentException>(null, matrix2.Invert);
264AssertExtensions.Throws<ArgumentException>(null, matrix3.Invert);
265AssertExtensions.Throws<ArgumentException>(null, matrix4.Invert);
266AssertExtensions.Throws<ArgumentException>(null, matrix5.Invert);
267AssertExtensions.Throws<ArgumentException>(null, matrix6.Invert);
273AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Invert());
279AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().IsIdentity);
285AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().IsInvertible);
349AssertExtensions.Throws<ArgumentException>(null, () => matrix.Multiply(other, order));
358AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Multiply(other));
359AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Multiply(other, MatrixOrder.Prepend));
368AssertExtensions.Throws<ArgumentException>(null, () => matrix.Multiply(disposedMatrix));
369AssertExtensions.Throws<ArgumentException>(null, () => matrix.Multiply(disposedMatrix, MatrixOrder.Prepend));
394AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Reset());
478AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedMatrix().Rotate(1, MatrixOrder.Append));
487AssertExtensions.Throws<ArgumentException>(null, () => matrix.Rotate(1, order));
495AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.RotateAt(1, PointF.Empty));
496AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.RotateAt(1, PointF.Empty, MatrixOrder.Append));
505AssertExtensions.Throws<ArgumentException>(null, () => matrix.RotateAt(1, PointF.Empty, order));
562AssertExtensions.Throws<ArgumentException>(null, () => matrix.Shear(1, 2, order));
570AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Scale(1, 2));
571AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Scale(1, 2, MatrixOrder.Append));
628AssertExtensions.Throws<ArgumentException>(null, () => matrix.Shear(1, 2, order));
636AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Shear(1, 2));
637AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Shear(1, 2, MatrixOrder.Append));
685AssertExtensions.Throws<ArgumentException>(null, () => matrix.Translate(1, 2, order));
693AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Translate(1, 2));
694AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.Translate(1, 2, MatrixOrder.Append));
739AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<Point>()));
740AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformPoints(Array.Empty<PointF>()));
748AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new Point[1]));
749AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new PointF[1]));
806AssertExtensions.Throws<ArgumentException>(null, () => matrix.VectorTransformPoints([]));
807AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<Point>()));
808AssertExtensions.Throws<ArgumentException>(null, () => matrix.TransformVectors(Array.Empty<PointF>()));
816AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.VectorTransformPoints(new Point[1]));
817AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformPoints(new Point[1]));
818AssertExtensions.Throws<ArgumentException>(null, () => disposedMatrix.TransformVectors(new PointF[1]));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (48)
80Assert.Throws<ArgumentException>(() => new PathGradientBrush(new Point[pointsLength]));
81Assert.Throws<ArgumentException>(() => new PathGradientBrush(new Point[pointsLength], WrapMode.Clamp));
82Assert.Throws<ArgumentException>(() => new PathGradientBrush(new PointF[pointsLength]));
83Assert.Throws<ArgumentException>(() => new PathGradientBrush(new PointF[pointsLength], WrapMode.Clamp));
89Assert.ThrowsAny<ArgumentException>(() =>
92Assert.ThrowsAny<ArgumentException>(() =>
136AssertExtensions.Throws<ArgumentException>(null, brush.Clone);
156AssertExtensions.Throws<ArgumentException>(null, () => brush.CenterColor = Color.Blue);
194AssertExtensions.Throws<ArgumentException>(null, () => brush.SurroundColors = colors);
208AssertExtensions.Throws<ArgumentException>(null, () => brush.SurroundColors = colors);
242AssertExtensions.Throws<ArgumentException>(null, () => brush.CenterPoint);
294AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend);
311AssertExtensions.Throws<ArgumentException>(null, () => brush.Blend = blend);
320AssertExtensions.Throws<ArgumentException>("value", null, () => brush.Blend = invalidBlend);
336AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () =>
420AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(1f));
421AssertExtensions.Throws<ArgumentException>(null, () => brush.SetSigmaBellShape(1f, 1f));
430AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(focus));
431AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(focus, 1f));
440AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetSigmaBellShape(1f, scale));
504AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(1f));
505AssertExtensions.Throws<ArgumentException>(null, () => brush.SetBlendTriangularShape(1f, 1f));
514AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(focus));
515AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(focus, 1f));
524AssertExtensions.Throws<ArgumentException>(null, null, () => brush.SetBlendTriangularShape(1f, scale));
570AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors);
595AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () =>
603AssertExtensions.Throws<ArgumentException>(null, () => brush.InterpolationColors = new ColorBlend());
610AssertExtensions.Throws<ArgumentException>(null, () =>
618AssertExtensions.Throws<ArgumentException, ArgumentException>("value", null, () =>
626Assert.Throws<ArgumentException>(() =>
656AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform);
671AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform = nonInvertible);
693AssertExtensions.Throws<ArgumentException>(null, brush.ResetTransform);
727AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Append));
757AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, (MatrixOrder)int.MinValue));
765AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(nonInvertible));
766AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(nonInvertible, MatrixOrder.Append));
797AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(20f, 30f, MatrixOrder.Append));
804AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(20f, 30f, (MatrixOrder)int.MinValue));
847AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(0.25f, 2, MatrixOrder.Append));
854AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 1, (MatrixOrder)int.MinValue));
888AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(45, MatrixOrder.Append));
895AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(45, (MatrixOrder)int.MinValue));
914AssertExtensions.Throws<ArgumentException>(null, () => brush.FocusScales);
932AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode);
939Assert.ThrowsAny<ArgumentException>(() => brush.WrapMode = (WrapMode)int.MinValue);
System\Drawing\FontFamilyTests.cs (9)
49AssertExtensions.Throws<ArgumentException>(null, () => new FontFamily(name));
50AssertExtensions.Throws<ArgumentException>(null, () => new FontFamily(name, null));
64AssertExtensions.Throws<ArgumentException>(null, () => new FontFamily("Times New Roman", fontCollection));
196AssertExtensions.Throws<ArgumentException>(null, () => family.IsStyleAvailable(FontStyle.Italic));
208AssertExtensions.Throws<ArgumentException>(null, () => family.GetEmHeight(FontStyle.Italic));
237AssertExtensions.Throws<ArgumentException>(null, () => family.GetName(0));
249AssertExtensions.Throws<ArgumentException>(null, () => family.GetCellAscent(FontStyle.Italic));
261AssertExtensions.Throws<ArgumentException>(null, () => family.GetCellDescent(FontStyle.Italic));
273AssertExtensions.Throws<ArgumentException>(null, () => family.GetLineSpacing(FontStyle.Italic));
System\Drawing\FontTests.cs (40)
343AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10));
344AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic));
345AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, GraphicsUnit.Display));
346AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display));
347AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display, 10));
348AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, GraphicsUnit.Display, 10, gdiVerticalFont: true));
360AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize));
361AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize));
362AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic));
363AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic));
364AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, GraphicsUnit.Document));
365AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, GraphicsUnit.Document));
366AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document));
367AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document));
368AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document, 10));
369AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10));
370AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family, emSize, FontStyle.Italic, GraphicsUnit.Document, 10, gdiVerticalFont: true));
371AssertExtensions.Throws<ArgumentException>("emSize", () => new Font(family.Name, emSize, FontStyle.Italic, GraphicsUnit.Document, 10, gdiVerticalFont: true));
381AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, unit));
382AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, unit));
383AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit));
384AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit));
385AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit, 10));
386AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10));
387AssertExtensions.Throws<ArgumentException>(null, () => new Font(family, 10, FontStyle.Italic, unit, 10, gdiVerticalFont: true));
388AssertExtensions.Throws<ArgumentException>(null, () => new Font(family.Name, 10, FontStyle.Italic, unit, 10, gdiVerticalFont: true));
414AssertExtensions.Throws<ArgumentException>(null, font.Clone);
461AssertExtensions.Throws<ArgumentException>(null, () => Font.FromHdc(IntPtr.Zero));
472AssertExtensions.Throws<ArgumentException>(null, () => Font.FromHdc(hdc));
483AssertExtensions.Throws<ArgumentException>(null, () => Font.FromHfont(IntPtr.Zero));
538AssertExtensions.Throws<ArgumentException>("graphics", () => font.GetHeight(graphics));
550AssertExtensions.Throws<ArgumentException>(null, () => font.GetHeight());
551AssertExtensions.Throws<ArgumentException>(null, () => font.GetHeight(10));
552AssertExtensions.Throws<ArgumentException>(null, () => font.GetHeight(graphics));
598AssertExtensions.Throws<ArgumentException>(null, () => Font.FromLogFont(null));
599AssertExtensions.Throws<ArgumentException>(null, () => Font.FromLogFont(null, hdc));
622AssertExtensions.Throws<ArgumentException>(null, () => Font.FromLogFont(logFont));
623AssertExtensions.Throws<ArgumentException>(null, () => Font.FromLogFont(logFont, hdc));
787Assert.Throws<ArgumentException>(() => font.ToLogFont(new LOGFONT(), graphics));
845AssertExtensions.Throws<ArgumentException>(null, () => font.ToHfont());
System\Drawing\Graphics_DrawBezierTests.cs (13)
78AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, 1, 2, 3, 4, 5, 6, 7, 8));
79AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, Point.Empty, Point.Empty, Point.Empty, Point.Empty));
80AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBezier(pen, PointF.Empty, PointF.Empty, PointF.Empty, PointF.Empty));
110AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90));
111AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90));
112AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90));
113AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90));
133AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new Point[2]));
134AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new PointF[2]));
153AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<Point>()));
154AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, Array.Empty<PointF>()));
183AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new Point[2]));
184AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawBeziers(pen, new PointF[2]));
System\Drawing\Graphics_DrawLineTests.cs (14)
57AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, Point.Empty, Point.Empty));
58AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0, 0, 0, 0));
59AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, PointF.Empty, PointF.Empty));
60AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0f, 0f, 0f, 0f));
91AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, Point.Empty, Point.Empty));
92AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0, 0, 0, 0));
93AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, PointF.Empty, PointF.Empty));
94AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLine(pen, 0f, 0f, 0f, 0f));
114AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[2]));
115AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new PointF[2]));
136AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[length]));
137AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new PointF[length]));
166AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new Point[2]));
167AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawLines(pen, new PointF[2]));
System\Drawing\GraphicsTests.Core.cs (9)
19AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformElements = matrix);
46AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformElements);
47AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformElements = Matrix3x2.Identity);
88AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f)));
119AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new RectangleF(0f, 0f, 1f, 1f)));
142AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90));
153AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 0, 1), 0, 90));
164AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 0), 0, 90));
195AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new RectangleF(0, 0, 1, 1), 0, 90));
System\Drawing\GraphicsTests.cs (197)
78AssertExtensions.Throws<ArgumentException>(null, () => graphics.GetHdc());
140AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(hdc));
141AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(hdc));
145AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc);
146AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(hdc));
150AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc);
151AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(hdc));
161AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(10));
165AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(10));
180AssertExtensions.Throws<ArgumentException>(null, () => graphics1.ReleaseHdc(hdc1));
183AssertExtensions.Throws<ArgumentException>(null, () => graphics2.ReleaseHdc(hdc2));
191AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc);
192AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(IntPtr.Zero));
193AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(IntPtr.Zero));
203AssertExtensions.Throws<ArgumentException>(null, graphics.ReleaseHdc);
204AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(IntPtr.Zero));
205AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(IntPtr.Zero));
269Exception exception = AssertExtensions.Throws<ArgumentException, Exception>(() => Graphics.FromImage(image));
270if (exception is ArgumentException argumentException)
280AssertExtensions.Throws<ArgumentException>(null, () => Graphics.FromImage(image));
367AssertExtensions.Throws<ArgumentException>(null, () => graphics.CompositingMode);
368AssertExtensions.Throws<ArgumentException>(null, () => graphics.CompositingMode = CompositingMode.SourceCopy);
451AssertExtensions.Throws<ArgumentException>(null, () => graphics.CompositingQuality);
452AssertExtensions.Throws<ArgumentException>(null, () => graphics.CompositingQuality = CompositingQuality.AssumeLinear);
504AssertExtensions.Throws<ArgumentException>(null, () => graphics.DpiX);
530AssertExtensions.Throws<ArgumentException>(null, () => graphics.DpiX);
576AssertExtensions.Throws<ArgumentException>(null, graphics.Flush);
577AssertExtensions.Throws<ArgumentException>(null, () => graphics.Flush(FlushIntention.Flush));
612AssertExtensions.Throws<ArgumentException>(null, () => graphics.InterpolationMode = InterpolationMode.Invalid);
639AssertExtensions.Throws<ArgumentException>(null, () => graphics.InterpolationMode);
640AssertExtensions.Throws<ArgumentException>(null, () => graphics.InterpolationMode = InterpolationMode.HighQualityBilinear);
665AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageScale = pageScale);
692AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageScale);
693AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageScale = 10);
726AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageUnit = GraphicsUnit.World);
753AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageUnit);
754AssertExtensions.Throws<ArgumentException>(null, () => graphics.PageUnit = GraphicsUnit.Document);
786AssertExtensions.Throws<ArgumentException>(null, () => graphics.PixelOffsetMode = PixelOffsetMode.Invalid);
813AssertExtensions.Throws<ArgumentException>(null, () => graphics.PixelOffsetMode);
814AssertExtensions.Throws<ArgumentException>(null, () => graphics.PixelOffsetMode = PixelOffsetMode.Default);
895AssertExtensions.Throws<ArgumentException>(null, () => graphics.RenderingOrigin);
896AssertExtensions.Throws<ArgumentException>(null, () => graphics.RenderingOrigin = Point.Empty);
928AssertExtensions.Throws<ArgumentException>(null, () => graphics.SmoothingMode = SmoothingMode.Invalid);
955AssertExtensions.Throws<ArgumentException>(null, () => graphics.SmoothingMode);
956AssertExtensions.Throws<ArgumentException>(null, () => graphics.SmoothingMode = SmoothingMode.AntiAlias);
978AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextContrast = textContrast);
1005AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextContrast);
1006AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextContrast = 5);
1058AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextRenderingHint);
1059AssertExtensions.Throws<ArgumentException>(null, () => graphics.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit);
1104AssertExtensions.Throws<ArgumentException>(null, () => graphics.Transform = matrix);
1113AssertExtensions.Throws<ArgumentException>(null, () => graphics.Transform = matrix);
1142AssertExtensions.Throws<ArgumentException>(null, () => graphics.Transform);
1143AssertExtensions.Throws<ArgumentException>(null, () => graphics.Transform = matrix);
1182AssertExtensions.Throws<ArgumentException>(null, graphics.ResetTransform);
1247AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix));
1248AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix, MatrixOrder.Append));
1259AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix, order));
1288AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix));
1289AssertExtensions.Throws<ArgumentException>(null, () => graphics.MultiplyTransform(matrix, MatrixOrder.Prepend));
1336AssertExtensions.Throws<ArgumentException>(null, () => graphics.TranslateTransform(0, 0, order));
1363AssertExtensions.Throws<ArgumentException>(null, () => graphics.TranslateTransform(0, 0));
1364AssertExtensions.Throws<ArgumentException>(null, () => graphics.TranslateTransform(0, 0, MatrixOrder.Append));
1406AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0));
1407AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0, MatrixOrder.Append));
1417AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0, order));
1444AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0));
1445AssertExtensions.Throws<ArgumentException>(null, () => graphics.ScaleTransform(0, 0, MatrixOrder.Append));
1493AssertExtensions.Throws<ArgumentException>(null, () => graphics.RotateTransform(0, order));
1520AssertExtensions.Throws<ArgumentException>(null, () => graphics.RotateTransform(0));
1521AssertExtensions.Throws<ArgumentException>(null, () => graphics.RotateTransform(0, MatrixOrder.Append));
1649Assert.ThrowsAny<ArgumentException>(() => graphics.CopyFromScreen(1, 2, 3, 4, Size.Empty, copyPixelOperation));
1679AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty));
1680AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(0, 0, 0, 0, Size.Empty, CopyPixelOperation.MergeCopy));
1681AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty));
1682AssertExtensions.Throws<ArgumentException>(null, () => graphics.CopyFromScreen(Point.Empty, Point.Empty, Size.Empty, CopyPixelOperation.MergeCopy));
1854AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(destSpace, CoordinateSpace.World, [new(1, 1)]));
1855AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(destSpace, CoordinateSpace.World, new PointF[] { new(1, 1) }));
1865AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.World, srcSpace, [new(1, 1)]));
1866AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.World, srcSpace, new PointF[] { new(1, 1) }));
1883AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<Point>()));
1884AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, Array.Empty<PointF>()));
1911AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [Point.Empty]));
1912AssertExtensions.Throws<ArgumentException>(null, () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, [PointF.Empty]));
1953AssertExtensions.Throws<ArgumentException>(null, () => graphics.GetNearestColor(Color.Red));
1975AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90));
1976AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90));
1977AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90));
1978AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90));
1987AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 0, 1), 0, 90));
1988AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 0, 1, 0, 90));
1989AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 0, 1), 0, 90));
1990AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 0f, 1f, 0, 90));
1999AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 0), 0, 90));
2000AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 0, 0, 90));
2001AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 0), 0, 90));
2002AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 0f, 0, 90));
2033AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 1), 0, 90));
2034AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 1, 0, 90));
2035AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 1), 0, 90));
2036AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 1f, 0, 90));
2057AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1)));
2058AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0, 0, 1, 1));
2059AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0f, 0f, 1f, 1f));
2089AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, new Rectangle(0, 0, 1, 1)));
2090AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0, 0, 1, 1));
2091AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangle(pen, 0f, 0f, 1f, 1f));
2111AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new Rectangle[2]));
2112AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new RectangleF[2]));
2131AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<Rectangle>()));
2132AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, Array.Empty<RectangleF>()));
2161AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new Rectangle[2]));
2162AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawRectangles(pen, new RectangleF[2]));
2184AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1)));
2185AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0, 0, 1, 1));
2186AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1)));
2187AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0f, 0f, 1f, 1f));
2218AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new Rectangle(0, 0, 1, 1)));
2219AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0, 0, 1, 1));
2220AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, new RectangleF(0, 0, 1, 1)));
2221AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawEllipse(pen, 0f, 0f, 1f, 1f));
2243AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90));
2244AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0, 0, 1, 1, 0, 90));
2245AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90));
2246AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0f, 0f, 1f, 1f, 0, 90));
2255AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 0, 1), 0, 90));
2256AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0, 0, 0, 1, 0, 90));
2257AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 0, 1), 0, 90));
2258AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0f, 0f, 0f, 1f, 0, 90));
2267AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new Rectangle(0, 0, 1, 0), 0, 90));
2268AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0, 0, 1, 0, 0, 90));
2269AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, new RectangleF(0, 0, 1, 0), 0, 90));
2270AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawArc(pen, 0f, 0f, 1f, 0f, 0, 90));
2301AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new Rectangle(0, 0, 1, 1), 0, 90));
2302AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0, 0, 1, 1, 0, 90));
2303AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, new RectangleF(0, 0, 1, 1), 0, 90));
2304AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPie(pen, 0f, 0f, 1f, 1f, 0, 90));
2324AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[2]));
2325AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new PointF[2]));
2346AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[length]));
2347AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new PointF[length]));
2376AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new Point[2]));
2377AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPolygon(pen, new PointF[2]));
2398AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPath(pen, graphicsPath));
2419AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPath(pen, graphicsPath));
2449AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawPath(pen, graphicsPath));
2474AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2]));
2475AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2]));
2476AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 1));
2477AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 1));
2478AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2));
2479AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 0, 2, 1));
2480AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2, 1));
2506AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length]));
2507AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length]));
2508AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], 1));
2509AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], 1));
2510AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], 0, length));
2511AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], 0, length, 1));
2512AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], 0, length, 1));
2526AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], offset, numberOfSegments));
2527AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[length], offset, numberOfSegments, 1));
2528AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[length], offset, numberOfSegments, 1));
2562AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2]));
2563AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2]));
2564AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 1));
2565AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 1));
2566AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2));
2567AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new Point[2], 0, 2, 1));
2568AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawCurve(pen, new PointF[2], 0, 2, 1));
2590AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3]));
2591AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Winding));
2592AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3]));
2593AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3], 1, FillMode.Winding));
2617AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[length]));
2618AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[length], 1, FillMode.Winding));
2619AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[length]));
2620AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[length], 1, FillMode.Winding));
2651AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3]));
2652AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new Point[3], 1, FillMode.Alternate));
2653AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3]));
2654AssertExtensions.Throws<ArgumentException>(null, () => graphics.DrawClosedCurve(pen, new PointF[3], 1, FillMode.Alternate));
2675AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90));
2676AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 1, 1, 0, 90));
2677AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 1f, 1f, 0, 90));
2686AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 0, 1), 0, 90));
2687AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 0, 1, 0, 90));
2688AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 0f, 1f, 0, 90));
2697AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 0), 0, 90));
2698AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 1, 0, 0, 90));
2699AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 1f, 0f, 0, 90));
2729AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, new Rectangle(0, 0, 1, 1), 0, 90));
2730AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0, 0, 1, 1, 0, 90));
2731AssertExtensions.Throws<ArgumentException>(null, () => graphics.FillPie(brush, 0f, 0f, 1f, 1f, 0, 90));
2777AssertExtensions.Throws<ArgumentException>(null, () => graphics.Clear(Color.Red));
2795AssertExtensions.Throws<ArgumentException>(
2879Assert.Throws<ArgumentException>(() => graphics.DrawCachedBitmap(cachedBitmap, 0, 0));
System\Drawing\IconTests.cs (25)
145AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null));
146AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null, 32, 32));
147AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Icon((Stream)null, new Size(32, 32)));
153yield return new object[] { Array.Empty<byte>(), typeof(ArgumentException) };
154yield return new object[] { new byte[6], typeof(ArgumentException) };
155yield return new object[] { new byte[21], typeof(ArgumentException) };
158yield return new object[] { new byte[] { 10, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) };
159yield return new object[] { new byte[] { 0, 10, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) };
162yield return new object[] { new byte[] { 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) };
163yield return new object[] { new byte[] { 0, 0, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) };
164yield return new object[] { new byte[] { 0, 0, 1, 2, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) };
167yield return new object[] { new byte[] { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) };
170yield return new object[] { new byte[] { 0, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, typeof(ArgumentException) };
179PlatformDetection.IsNetFramework ? typeof(Win32Exception) : typeof(ArgumentException)
186yield return new object[] { new byte[] { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255 }, typeof(ArgumentException) };
189yield return new object[] { new byte[] { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 12, 0, 0, 0 }, typeof(ArgumentException) };
197PlatformDetection.IsNetFramework ? typeof(Win32Exception) : typeof(ArgumentException)
201yield return new object[] { new byte[] { 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 127 }, typeof(ArgumentException) };
245AssertExtensions.Throws<ArgumentNullException, ArgumentException>("original", null, () => new Icon((Icon)null, 32, 32));
246AssertExtensions.Throws<ArgumentNullException, ArgumentException>("original", null, () => new Icon((Icon)null, new Size(32, 32)));
269AssertExtensions.Throws<ArgumentException>(null, () => new Icon(type, resource));
275AssertExtensions.Throws<ArgumentNullException, ArgumentException>("resource", null, () => new Icon(typeof(Icon), null));
401AssertExtensions.Throws<ArgumentNullException, ArgumentException>("filePath", null, () => Icon.ExtractAssociatedIcon(null));
407AssertExtensions.Throws<ArgumentException>("filePath", null, () => Icon.ExtractAssociatedIcon(""));
700AssertExtensions.Throws<ArgumentException>("handle", null, () => Icon.FromHandle(IntPtr.Zero));
System\Drawing\ImageTests.cs (23)
114AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(propid));
124AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(propid));
141AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagExifUserComment));
142AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagExifUserComment));
146AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagLuminanceTable));
147AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagLuminanceTable));
151AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagChrominanceTable));
161AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagExifUserComment));
162AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagExifUserComment));
166AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagLuminanceTable));
167AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(PropertyTagLuminanceTable));
171AssertExtensions.Throws<ArgumentException>(null, () => bitmap.GetPropertyItem(PropertyTagChrominanceTable));
210AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(propid));
220AssertExtensions.Throws<ArgumentException>(null, () => bitmap.RemovePropertyItem(propid));
512AssertExtensions.Throws<ArgumentException>("path", null, () => Image.FromFile(string.Empty));
513AssertExtensions.Throws<ArgumentException>("path", null, () => Image.FromFile(string.Empty, useEmbeddedColorManagement: true));
553AssertExtensions.Throws<ArgumentException>(null, () => Image.FromStream(stream));
556AssertExtensions.Throws<ArgumentException>(null, () => Image.FromStream(stream, useEmbeddedColorManagement: true));
557AssertExtensions.Throws<ArgumentException>(null, () => Image.FromStream(stream, useEmbeddedColorManagement: true, validateImageData: true));
564AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null));
565AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true));
566AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true, validateImageData: true));
691action.Should().Throw<ArgumentException>();
System\Drawing\Imaging\EncoderParameterTests.cs (6)
214[InlineData(new int[] { 1, 2 }, new int[] { 1 }, new int[] { 1 }, new int[] { 1 }, typeof(ArgumentException))]
215[InlineData(new int[] { 1 }, new int[] { 1, 2 }, new int[] { 1 }, new int[] { 1 }, typeof(ArgumentException))]
233[InlineData(new int[] { 0 }, new int[] { 0, 1 }, typeof(ArgumentException))]
234[InlineData(new int[] { 0, 1 }, new int[] { 0 }, typeof(ArgumentException))]
243[InlineData(new long[] { 0 }, new long[] { 0, 1 }, typeof(ArgumentException))]
244[InlineData(new long[] { 0, 1 }, new long[] { 0 }, typeof(ArgumentException))]
System\Drawing\Imaging\ImageAttributesTests.cs (67)
88AssertExtensions.Throws<ArgumentException>(null, imageAttr.Clone);
221AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix));
222AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, ColorMatrixFlag.Default));
223AssertExtensions.Throws<ArgumentException>(null, () =>
250AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, ColorMatrixFlag.Default, type));
267AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, flag));
268AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrix(_greenComponentToZeroColorMatrix, flag, ColorAdjustType.Default));
327AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearColorMatrix);
328AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorMatrix(ColorAdjustType.Default));
336AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorMatrix(type));
439AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix));
440AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, ColorMatrixFlag.Default));
441AssertExtensions.Throws<ArgumentException>(null, () =>
451AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, null, ColorMatrixFlag.AltGrays));
454AssertExtensions.Throws<ArgumentException>(null, () =>
463AssertExtensions.Throws<ArgumentException>(null, () =>
475AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorMatrices(_greenComponentToZeroColorMatrix, _grayMatrix, flag));
476AssertExtensions.Throws<ArgumentException>(null, () =>
524AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetThreshold(0.5f));
532AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetThreshold(0.5f, type));
568AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearThreshold(ColorAdjustType.Default));
576AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearThreshold(type));
623AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f));
624AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f, ColorAdjustType.Default));
632AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetGamma(2.2f, type));
656AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearGamma(ColorAdjustType.Default));
664AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearGamma(type));
703AssertExtensions.Throws<ArgumentException>(null, imageAttr.SetNoOp);
704AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetNoOp(ColorAdjustType.Default));
712AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetNoOp(type));
771AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearNoOp);
772AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearNoOp(ColorAdjustType.Default));
780AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearNoOp(type));
832AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetColorKey(Color.FromArgb(50, 50, 50), Color.FromArgb(150, 150, 150)));
833AssertExtensions.Throws<ArgumentException>(null, () =>
842AssertExtensions.Throws<ArgumentException>(null, () =>
881AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearColorKey);
882AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorKey(ColorAdjustType.Default));
890AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearColorKey(type));
977AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY));
978AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY, ColorAdjustType.Default));
986AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(ColorChannelFlag.ColorChannelY, type));
1003AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(flag));
1004AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannel(flag, ColorAdjustType.Default));
1042AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearOutputChannel);
1043AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannel(ColorAdjustType.Default));
1051AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannel(type));
1073AssertExtensions.Throws<ArgumentException>(null, () =>
1075AssertExtensions.Throws<ArgumentException>(null, () =>
1091Assert.Throws<ArgumentException>(() => imageAttr.SetOutputChannelColorProfile(string.Empty));
1092Assert.Throws<ArgumentException>(() => imageAttr.SetOutputChannelColorProfile(string.Empty, ColorAdjustType.Default));
1117AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetOutputChannelColorProfile("path", type));
1157AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearOutputChannelColorProfile);
1158AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannelColorProfile(ColorAdjustType.Default));
1166AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearOutputChannelColorProfile(type));
1213AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable(_yellowToRedColorMap));
1214AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable(_yellowToRedColorMap, ColorAdjustType.Default));
1222AssertExtensions.ThrowsAny<ArgumentNullException, ArgumentException>(() => imageAttr.SetRemapTable(_yellowToRedColorMap, type));
1243AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetRemapTable([], ColorAdjustType.Default));
1279AssertExtensions.Throws<ArgumentException>(null, imageAttr.ClearRemapTable);
1280AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearRemapTable(ColorAdjustType.Default));
1288AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.ClearRemapTable(type));
1297AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp));
1298AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black));
1299AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.SetWrapMode(WrapMode.Clamp, Color.Black, true));
1309AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.Palette, ColorAdjustType.Default));
1325AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.Palette, type));
System\Drawing\Imaging\MetafileTests.cs (75)
43AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, false));
90AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(path));
104AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Metafile((Stream)null));
146AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(g.GetHdc(), emfType));
152AssertExtensions.Throws<ArgumentException>(null, () => new Metafile((IntPtr)null, EmfType.EmfOnly));
158AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly));
181AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly, description));
277AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangleF));
278AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel));
279AssertExtensions.Throws<ArgumentException>(null, () =>
281AssertExtensions.Throws<ArgumentException>(null, () =>
284AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangle));
285AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel));
286AssertExtensions.Throws<ArgumentException>(null, () =>
288AssertExtensions.Throws<ArgumentException>(null, () =>
307AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangleF, farameUnit));
308AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangleF, farameUnit, EmfType.EmfOnly));
309AssertExtensions.Throws<ArgumentException>(null, () =>
312AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangle, farameUnit));
313AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(referenceHdc, _rectangle, farameUnit, EmfType.EmfOnly));
314AssertExtensions.Throws<ArgumentException>(null, () =>
325AssertExtensions.Throws<ArgumentException>(null, () =>
327AssertExtensions.Throws<ArgumentException>(null, () =>
330AssertExtensions.Throws<ArgumentException>(null, () =>
332AssertExtensions.Throws<ArgumentException>(null, () =>
389AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero));
390AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly));
391AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly, "description"));
403AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, emfType));
404AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, emfType, "description"));
427AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc));
428AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly));
429AssertExtensions.Throws<ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, EmfType.EmfOnly, "description"));
617AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangleF));
618AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible));
619AssertExtensions.Throws<ArgumentException>(null, () =>
621AssertExtensions.Throws<ArgumentException>(null, () =>
624AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangle));
625AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible));
626AssertExtensions.Throws<ArgumentException>(null, () =>
628AssertExtensions.Throws<ArgumentException>(null, () =>
641AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, _rectangleF, frameUnit));
642AssertExtensions.Throws<ArgumentException>(null, () =>
644AssertExtensions.Throws<ArgumentException>(null, () =>
647AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, referenceHdc, _rectangle, frameUnit));
648AssertExtensions.Throws<ArgumentException>(null, () =>
650AssertExtensions.Throws<ArgumentException>(null, () =>
663AssertExtensions.Throws<ArgumentException>(null, () =>
665AssertExtensions.Throws<ArgumentException>(null, () =>
668AssertExtensions.Throws<ArgumentException>(null, () =>
670AssertExtensions.Throws<ArgumentException>(null, () =>
698AssertExtensions.Throws<ArgumentException, ArgumentException>("path", null, () => new Metafile(fileName, referenceHdc, _rectangleF));
699AssertExtensions.Throws<ArgumentException, ArgumentException>("path", null, () =>
701AssertExtensions.Throws<ArgumentException, ArgumentException>("path", null, () =>
703AssertExtensions.Throws<ArgumentException, ArgumentException>("path", null, () =>
787AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(stream, IntPtr.Zero, _rectangle));
788AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible));
789AssertExtensions.Throws<ArgumentException>(null, () =>
791AssertExtensions.Throws<ArgumentException>(null, () =>
803AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(stream, referenceHdc, _rectangle, frameUnit));
804AssertExtensions.Throws<ArgumentException>(null, () =>
806AssertExtensions.Throws<ArgumentException>(null, () =>
818AssertExtensions.Throws<ArgumentException>(null, () =>
820AssertExtensions.Throws<ArgumentException>(null, () =>
848AssertExtensions.Throws<ArgumentException>(null, () => Metafile.GetMetafileHeader(IntPtr.Zero));
850AssertExtensions.Throws<ArgumentException>(null, () => Metafile.GetMetafileHeader(metafile.GetHenhmetafile()));
858AssertExtensions.Throws<ArgumentException>("path", null, () => Metafile.GetMetafileHeader(fileName));
885AssertExtensions.Throws<ArgumentException>(null, () => Metafile.GetMetafileHeader(stream));
904AssertExtensions.Throws<ArgumentException>(null, metafile.GetMetafileHeader);
920AssertExtensions.Throws<ArgumentException>(null, () => metafile.GetHenhmetafile());
929AssertExtensions.Throws<ArgumentException>(null, () =>
System\Drawing\PenTests.cs (73)
87AssertExtensions.Throws<ArgumentException>(null, () => new Pen(brush));
88AssertExtensions.Throws<ArgumentException>(null, () => new Pen(brush, 10));
135Assert.ThrowsAny<ArgumentException>(() => pen.Alignment = alignment);
145AssertExtensions.Throws<ArgumentException>(null, () => pen.Alignment);
146AssertExtensions.Throws<ArgumentException>(null, () => pen.Alignment = PenAlignment.Center);
163AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush = new SubBrush());
185AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush = brush);
195AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush);
196AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush = brush);
231AssertExtensions.Throws<ArgumentException>(null, pen.Clone);
260AssertExtensions.Throws<ArgumentException>(null, () => pen.Color);
290AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.Black);
300AssertExtensions.Throws<ArgumentException>(null, () => pen.Color);
301AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.Red);
333AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray = []);
349AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray = compoundArray);
359AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray);
360AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray = [1]);
385AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap = null);
398AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap = lineCap);
411AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap);
412AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap = lineCap);
437AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap = null);
450AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap = lineCap);
463AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap);
464AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap = lineCap);
487Assert.ThrowsAny<ArgumentException>(() => pen.DashCap = dashCap);
497AssertExtensions.Throws<ArgumentException>(null, () => pen.DashCap);
498AssertExtensions.Throws<ArgumentException>(null, () => pen.DashCap = DashCap.Triangle);
523AssertExtensions.Throws<ArgumentException>(null, () => pen.DashOffset);
524AssertExtensions.Throws<ArgumentException>(null, () => pen.DashOffset = 10);
550AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = null);
558AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = []);
570AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = pattern);
580AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern);
581AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = [1]);
627Assert.ThrowsAny<ArgumentException>(() => pen.DashStyle = dashStyle);
637AssertExtensions.Throws<ArgumentException>(null, () => pen.DashStyle);
638AssertExtensions.Throws<ArgumentException>(null, () => pen.DashStyle = DashStyle.Dash);
681Assert.ThrowsAny<ArgumentException>(() => pen.EndCap = lineCap);
691AssertExtensions.Throws<ArgumentException>(null, () => pen.EndCap);
692AssertExtensions.Throws<ArgumentException>(null, () => pen.EndCap = LineCap.ArrowAnchor);
715Assert.ThrowsAny<ArgumentException>(() => pen.LineJoin = lineJoin);
725AssertExtensions.Throws<ArgumentException>(null, () => pen.LineJoin);
726AssertExtensions.Throws<ArgumentException>(null, () => pen.LineJoin = LineJoin.Miter);
751AssertExtensions.Throws<ArgumentException>(null, () => pen.MiterLimit);
752AssertExtensions.Throws<ArgumentException>(null, () => pen.MiterLimit = 10);
807AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix));
808AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix, MatrixOrder.Prepend));
851AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix));
852AssertExtensions.Throws<ArgumentException>(null, () => pen.MultiplyTransform(matrix, MatrixOrder.Prepend));
878AssertExtensions.Throws<ArgumentException>(null, pen.ResetTransform);
924AssertExtensions.Throws<ArgumentException>(null, () => pen.RotateTransform(10, matrixOrder));
935AssertExtensions.Throws<ArgumentException>(null, () => pen.RotateTransform(1));
936AssertExtensions.Throws<ArgumentException>(null, () => pen.RotateTransform(1, MatrixOrder.Prepend));
984AssertExtensions.Throws<ArgumentException>(null, () => pen.ScaleTransform(1, 2, matrixOrder));
995AssertExtensions.Throws<ArgumentException>(null, () => pen.ScaleTransform(1, 2));
996AssertExtensions.Throws<ArgumentException>(null, () => pen.ScaleTransform(1, 2, MatrixOrder.Prepend));
1026AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(LineCap.AnchorMask, LineCap.ArrowAnchor, DashCap.Flat));
1045Assert.ThrowsAny<ArgumentException>(() => pen.StartCap = lineCap);
1055AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap);
1056AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap = LineCap.ArrowAnchor);
1088AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform = matrix);
1099AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform = matrix);
1110AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform);
1111AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform = matrix);
1159AssertExtensions.Throws<ArgumentException>(null, () => pen.TranslateTransform(1, 2, matrixOrder));
1170AssertExtensions.Throws<ArgumentException>(null, () => pen.TranslateTransform(1, 2));
1171AssertExtensions.Throws<ArgumentException>(null, () => pen.TranslateTransform(1, 2, MatrixOrder.Prepend));
1196AssertExtensions.Throws<ArgumentException>(null, () => pen.Width);
1197AssertExtensions.Throws<ArgumentException>(null, () => pen.Width = 10);
1208AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap);
1209AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap);
System\Drawing\Printing\MarginsConverterTests.cs (4)
56Assert.Throws<ArgumentException>(() => mc.CreateInstance(context, values));
89AssertExtensions.Throws<ArgumentException, Exception>(() => mc.ConvertFrom(context, culture, "1;2;3;4"));
112AssertExtensions.Throws<ArgumentException, Exception>(() => mc.ConvertFrom(context, null, "wrong string format"));
113AssertExtensions.Throws<ArgumentException, Exception>(() => mc.ConvertFrom(context, culture, "wrong string format"));
System\Drawing\Printing\MarginsTests.cs (8)
58AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("left", null, () => new Margins(-1, 2, 3, 4));
64AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("right", null, () => new Margins(1, -1, 3, 4));
70AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("top", null, () => new Margins(1, 2, -1, 4));
76AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("bottom", null, () => new Margins(1, 2, 3, -1));
178AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Left = -1);
200AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Right = -1);
222AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Top = -1);
244AssertExtensions.Throws<ArgumentOutOfRangeException, ArgumentException>("value", null, () => margins.Bottom = -1);
System\Drawing\RegionTests.cs (61)
130AssertExtensions.Throws<ArgumentException>(null, () => new Region(regionData));
254AssertExtensions.Throws<ArgumentException>(null, () => new Region(path));
275AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().Clone());
412AssertExtensions.Throws<ArgumentException>(null, () => new Region().Complement(CreateDisposedRegion()));
519AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(graphicPath));
520AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(default(Rectangle)));
521AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(default(RectangleF)));
522AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Complement(disposedRegion));
610AssertExtensions.Throws<ArgumentException>(null, () => region.Equals(region, graphics));
618AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Equals(new Region(), s_graphic));
619AssertExtensions.Throws<ArgumentException>(null, () => new Region().Equals(disposedRegion, s_graphic));
819AssertExtensions.Throws<ArgumentException>(null, () => new Region().Exclude(CreateDisposedRegion()));
902AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(graphicsPath));
903AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(default(Rectangle)));
904AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(default(RectangleF)));
905AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Exclude(other));
930AssertExtensions.Throws<ArgumentException>(null, () => Region.FromHrgn(IntPtr.Zero));
967AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetHrgn(s_graphic));
991AssertExtensions.Throws<ArgumentException>(null, () => region.GetBounds(graphics));
997AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetBounds(s_graphic));
1003AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetRegionData());
1030AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().GetRegionScans(matrix));
1039AssertExtensions.Throws<ArgumentException>(null, () => region.GetRegionScans(matrix));
1152AssertExtensions.Throws<ArgumentException>(null, () => new Region().Intersect(CreateDisposedRegion()));
1259AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(graphicsPath));
1260AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(default(Rectangle)));
1261AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(default(RectangleF)));
1262AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Intersect(other));
1275AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().IsEmpty(s_graphic));
1292AssertExtensions.Throws<ArgumentException>(null, () => region.IsInfinite(graphics));
1298AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().IsInfinite(s_graphic));
1415AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f));
1416AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new PointF(1, 2)));
1417AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Point(1, 2)));
1419AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, s_graphic));
1420AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new PointF(1, 2), s_graphic));
1421AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Point(1, 2), s_graphic));
1423AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, 3f, 4f));
1424AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Rectangle(1, 2, 3, 4)));
1425AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new RectangleF(1, 2, 3, 4)));
1427AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1f, 2f, 3f, 4f, s_graphic));
1428AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new Rectangle(1, 2, 3, 4), s_graphic));
1429AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(new RectangleF(1, 2, 3, 4), s_graphic));
1431AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, s_graphic));
1432AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, 3, 4));
1433AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.IsVisible(1, 2, 3, 4, s_graphic));
1460AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().MakeEmpty());
1483AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().MakeInfinite());
1715AssertExtensions.Throws<ArgumentException>(null, () => region.Union(CreateDisposedRegion()));
1798AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(graphicsPath));
1799AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(default(Rectangle)));
1800AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(default(RectangleF)));
1801AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Union(disposedRegion));
1883AssertExtensions.Throws<ArgumentException>(null, () => CreateDisposedRegion().Transform(matrix));
1967AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Translate(1, 2));
1968AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Translate(1f, 2f));
2073AssertExtensions.Throws<ArgumentException>(null, () => region.Xor(CreateDisposedRegion()));
2156AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(graphicsPath));
2157AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(default(Rectangle)));
2158AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(default(RectangleF)));
2159AssertExtensions.Throws<ArgumentException>(null, () => disposedRegion.Xor(other));
System\Drawing\StringFormatTests.cs (24)
87AssertExtensions.Throws<ArgumentException>(null, () => new StringFormat(format));
122AssertExtensions.Throws<ArgumentException>(null, format.Clone);
144AssertExtensions.Throws<ArgumentException>(null, () => format.SetDigitSubstitution(0, StringDigitSubstitute.None));
170AssertExtensions.Throws<ArgumentException>(null, () => format.SetTabStops(-1, []));
186AssertExtensions.Throws<ArgumentException>(null, () => format.SetTabStops(0, []));
195AssertExtensions.Throws<ArgumentException>(null, () => format.GetTabStops(out float firstTabOffset));
234AssertExtensions.Throws<ArgumentException>(null, () => format.SetMeasurableCharacterRanges([]));
253Assert.ThrowsAny<ArgumentException>(() => format.Alignment = alignment);
262AssertExtensions.Throws<ArgumentException>(null, () => format.Alignment);
263AssertExtensions.Throws<ArgumentException>(null, () => format.Alignment = StringAlignment.Center);
272AssertExtensions.Throws<ArgumentException>(null, () => format.DigitSubstitutionMethod);
281AssertExtensions.Throws<ArgumentException>(null, () => format.DigitSubstitutionLanguage);
300AssertExtensions.Throws<ArgumentException>(null, () => format.FormatFlags);
301AssertExtensions.Throws<ArgumentException>(null, () => format.FormatFlags = StringFormatFlags.NoClip);
320Assert.ThrowsAny<ArgumentException>(() => format.LineAlignment = alignment);
329AssertExtensions.Throws<ArgumentException>(null, () => format.LineAlignment);
330AssertExtensions.Throws<ArgumentException>(null, () => format.LineAlignment = StringAlignment.Center);
349Assert.ThrowsAny<ArgumentException>(() => format.HotkeyPrefix = prefix);
358AssertExtensions.Throws<ArgumentException>(null, () => format.HotkeyPrefix);
359AssertExtensions.Throws<ArgumentException>(null, () => format.HotkeyPrefix = HotkeyPrefix.Hide);
376Assert.ThrowsAny<ArgumentException>(() => format.Trimming = trimming);
385AssertExtensions.Throws<ArgumentException>(null, () => format.Trimming);
386AssertExtensions.Throws<ArgumentException>(null, () => format.Trimming = StringTrimming.Word);
432AssertExtensions.Throws<ArgumentException>(null, format.ToString);
System\Drawing\SystemPensTest.cs (19)
58AssertExtensions.Throws<ArgumentException>(null, pen.Dispose);
59AssertExtensions.Throws<ArgumentException>(null, () => pen.SetLineCap(LineCap.ArrowAnchor, LineCap.Custom, DashCap.Round));
61AssertExtensions.Throws<ArgumentException>(null, () => pen.Alignment = PenAlignment.Center);
62AssertExtensions.Throws<ArgumentException>(null, () => pen.Brush = null);
63AssertExtensions.Throws<ArgumentException>(null, () => pen.Color = Color.AliceBlue);
64AssertExtensions.Throws<ArgumentException>(null, () => pen.CompoundArray = null);
65AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomEndCap = null);
66AssertExtensions.Throws<ArgumentException>(null, () => pen.CustomStartCap = null);
67AssertExtensions.Throws<ArgumentException>(null, () => pen.DashCap = DashCap.Flat);
68AssertExtensions.Throws<ArgumentException>(null, () => pen.DashStyle = DashStyle.Custom);
69AssertExtensions.Throws<ArgumentException>(null, () => pen.DashOffset = 10);
70AssertExtensions.Throws<ArgumentException>(null, () => pen.DashPattern = null);
71AssertExtensions.Throws<ArgumentException>(null, () => pen.EndCap = LineCap.RoundAnchor);
72AssertExtensions.Throws<ArgumentException>(null, () => pen.LineJoin = LineJoin.MiterClipped);
73AssertExtensions.Throws<ArgumentException>(null, () => pen.MiterLimit = 10);
74AssertExtensions.Throws<ArgumentException>(null, () => pen.StartCap = LineCap.RoundAnchor);
77AssertExtensions.Throws<ArgumentException>(null, () => pen.Transform = matrix);
80AssertExtensions.Throws<ArgumentException>(null, () => pen.Width = 10);
86AssertExtensions.Throws<ArgumentException>(null, () => SystemPens.FromSystemColor(Color.Blue));
System\Drawing\TextureBrushTests.cs (33)
258AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image));
259AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile));
260AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, RectangleF.Empty));
261AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, Rectangle.Empty));
262AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, RectangleF.Empty, null));
263AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, Rectangle.Empty, null));
264AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, RectangleF.Empty));
265AssertExtensions.Throws<ArgumentException>(null, () => new TextureBrush(image, WrapMode.Tile, Rectangle.Empty));
274Assert.ThrowsAny<ArgumentException>(() => new TextureBrush(image, wrapMode));
275Assert.ThrowsAny<ArgumentException>(() => new TextureBrush(image, wrapMode, RectangleF.Empty));
276Assert.ThrowsAny<ArgumentException>(() => new TextureBrush(image, wrapMode, Rectangle.Empty));
319AssertExtensions.Throws<ArgumentException>(null, brush.Clone);
329AssertExtensions.Throws<ArgumentException>(null, () => brush.Image);
384AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix));
385AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Prepend));
428AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix));
429AssertExtensions.Throws<ArgumentException>(null, () => brush.MultiplyTransform(matrix, MatrixOrder.Prepend));
454AssertExtensions.Throws<ArgumentException>(null, brush.ResetTransform);
504AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(10, matrixOrder));
515AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(1));
516AssertExtensions.Throws<ArgumentException>(null, () => brush.RotateTransform(1, MatrixOrder.Prepend));
568AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 2, matrixOrder));
579AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 2));
580AssertExtensions.Throws<ArgumentException>(null, () => brush.ScaleTransform(1, 2, MatrixOrder.Prepend));
609AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform = matrix);
620AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform);
621AssertExtensions.Throws<ArgumentException>(null, () => brush.Transform = matrix);
673AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(1, 2, matrixOrder));
684AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(1, 2));
685AssertExtensions.Throws<ArgumentException>(null, () => brush.TranslateTransform(1, 2, MatrixOrder.Prepend));
709Assert.ThrowsAny<ArgumentException>(() => brush.WrapMode = wrapMode);
719AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode);
720AssertExtensions.Throws<ArgumentException>(null, () => brush.WrapMode = WrapMode.Tile);
System.Formats.Asn1 (91)
System.Formats.Cbor (5)
System.Formats.Nrbf (4)
System.Formats.Tar (47)
System.IO.Compression (14)
System.IO.Compression.Brotli (4)
System.IO.Compression.ZipFile (54)
System\IO\Compression\ZipFile.Create.Async.cs (11)
17/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace, or contains one
41/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace,
80/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace,
149/// otherwise an <see cref="ArgumentException"/> is thrown.</para>
193/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length
237/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length
285/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length
331/// otherwise an <see cref="ArgumentException"/> is thrown.</para>
350/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
378/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
408/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System\IO\Compression\ZipFile.Create.cs (11)
15/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace, or contains one
37/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace,
74/// <exception cref="ArgumentException">archiveFileName is a zero-length string, contains only whitespace,
142/// otherwise an <see cref="ArgumentException"/> is thrown.</para>
183/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length
225/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length
271/// <exception cref="ArgumentException"><code>sourceDirectoryName</code> or <code>destinationArchiveFileName</code> is a zero-length
316/// otherwise an <see cref="ArgumentException"/> is thrown.</para>
333/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
359/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
387/// <exception cref="ArgumentException"><paramref name="sourceDirectoryName" /> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System\IO\Compression\ZipFile.Extract.Async.cs (10)
22/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace,
56/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace,
91/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace,
131/// otherwise an <see cref="ArgumentException"/> is thrown.</para>
147/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace,
188/// otherwise an <see cref="ArgumentException"/> is thrown.</para>
214/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.</exception>
245/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.</exception>
282/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
322/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System\IO\Compression\ZipFile.Extract.cs (10)
20/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace,
52/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace,
85/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace,
124/// otherwise an <see cref="ArgumentException"/> is thrown.</para>
139/// <exception cref="ArgumentException">sourceArchive or destinationDirectoryName is a zero-length string, contains only whitespace,
179/// otherwise an <see cref="ArgumentException"/> is thrown.</para>
200/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.</exception>
229/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.</exception>
264/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
302/// <exception cref="ArgumentException"><paramref name="destinationDirectoryName" />> is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System.IO.FileSystem.Watcher (1)
System.IO.Hashing (4)
System.IO.IsolatedStorage (11)
System.IO.MemoryMappedFiles (4)
System.IO.Packaging (73)
System.IO.Pipes (2)
System.Linq (10)
System.Linq.AsyncEnumerable (12)
System.Linq.Expressions (165)
System\Linq\Expressions\Error.cs (133)
17internal static ArgumentException ReducibleMustOverrideReduce()
24internal static ArgumentException ArgCntMustBeGreaterThanNameCnt()
45internal static ArgumentException SameKeyExistsInExpando(object? key)
73internal static ArgumentException MustReduceToDifferent()
115internal static ArgumentException ReducedNotCompatible()
122internal static ArgumentException SetterHasNoParams(string? paramName)
129internal static ArgumentException PropertyCannotHaveRefType(string? paramName)
136internal static ArgumentException IndexesOfSetGetMustMatch(string? paramName)
150internal static ArgumentException FirstArgumentMustBeCallSite()
157internal static ArgumentException AccessorsCannotHaveVarArgs(string? paramName)
164private static ArgumentException AccessorsCannotHaveByRefArgs(string? paramName)
171internal static ArgumentException AccessorsCannotHaveByRefArgs(string? paramName, int index)
178internal static ArgumentException TypeMustBeDerivedFromSystemDelegate()
192internal static ArgumentException BoundsCannotBeLessThanOne(string? paramName)
199internal static ArgumentException TypeMustNotBeByRef(string? paramName)
207internal static ArgumentException TypeMustNotBePointer(string? paramName)
215internal static ArgumentException SetterMustBeVoid(string? paramName)
223internal static ArgumentException PropertyTypeMustMatchGetter(string? paramName)
231internal static ArgumentException PropertyTypeMustMatchSetter(string? paramName)
238internal static ArgumentException BothAccessorsMustBeStatic(string? paramName)
245internal static ArgumentException OnlyStaticFieldsHaveNullInstance(string? paramName)
252internal static ArgumentException OnlyStaticPropertiesHaveNullInstance(string? paramName)
259internal static ArgumentException OnlyStaticMethodsHaveNullInstance()
266internal static ArgumentException PropertyTypeCannotBeVoid(string? paramName)
273internal static ArgumentException InvalidUnboxType(string? paramName)
280internal static ArgumentException ExpressionMustBeWriteable(string? paramName)
287internal static ArgumentException ArgumentMustNotHaveValueType(string? paramName)
294internal static ArgumentException MustBeReducible()
301internal static ArgumentException AllTestValuesMustHaveSameType(string? paramName)
308internal static ArgumentException AllCaseBodiesMustHaveSameType(string? paramName)
315internal static ArgumentException DefaultBodyMustBeSupplied(string? paramName)
322internal static ArgumentException LabelMustBeVoidOrHaveExpression(string? paramName)
329internal static ArgumentException LabelTypeMustBeVoid(string? paramName)
336internal static ArgumentException QuotedExpressionMustBeLambda(string? paramName)
343internal static ArgumentException VariableMustNotBeByRef(object? p0, object? p1, string? paramName)
350internal static ArgumentException VariableMustNotBeByRef(object? p0, object? p1, string? paramName, int index)
357private static ArgumentException DuplicateVariable(object? p0, string? paramName)
364internal static ArgumentException DuplicateVariable(object? p0, string? paramName, int index)
371internal static ArgumentException StartEndMustBeOrdered()
378internal static ArgumentException FaultCannotHaveCatchOrFinally(string? paramName)
385internal static ArgumentException TryMustHaveCatchFinallyOrFault()
392internal static ArgumentException BodyOfCatchMustHaveSameTypeAsBodyOfTry()
406internal static ArgumentException UserDefinedOperatorMustBeStatic(object? p0, string? paramName)
413internal static ArgumentException UserDefinedOperatorMustNotBeVoid(object? p0, string? paramName)
469internal static ArgumentException ArgumentTypeCannotBeVoid()
476internal static ArgumentException ArgumentMustBeArray(string? paramName)
483internal static ArgumentException ArgumentMustBeBoolean(string? paramName)
490internal static ArgumentException EqualityMustReturnBoolean(object? p0, string? paramName)
497internal static ArgumentException ArgumentMustBeFieldInfoOrPropertyInfo(string? paramName)
504private static ArgumentException ArgumentMustBeFieldInfoOrPropertyInfoOrMethod(string? paramName)
511internal static ArgumentException ArgumentMustBeFieldInfoOrPropertyInfoOrMethod(string? paramName, int index)
519private static ArgumentException ArgumentMustBeInstanceMember(string? paramName)
526internal static ArgumentException ArgumentMustBeInstanceMember(string? paramName, int index)
533private static ArgumentException ArgumentMustBeInteger(string? paramName)
540internal static ArgumentException ArgumentMustBeInteger(string? paramName, int index)
547internal static ArgumentException ArgumentMustBeArrayIndexType(string? paramName)
554internal static ArgumentException ArgumentMustBeArrayIndexType(string? paramName, int index)
561internal static ArgumentException ArgumentMustBeSingleDimensionalArrayType(string? paramName)
568internal static ArgumentException ArgumentTypesMustMatch()
575internal static ArgumentException ArgumentTypesMustMatch(string? paramName)
596internal static ArgumentException IncorrectTypeForTypeAs(object? p0, string? paramName)
618private static ArgumentException ArgumentTypeDoesNotMatchMember(object? p0, object? p1, string? paramName)
625internal static ArgumentException ArgumentTypeDoesNotMatchMember(object? p0, object? p1, string? paramName, int index)
632private static ArgumentException ArgumentMemberNotDeclOnType(object? p0, object? p1, string? paramName)
639internal static ArgumentException ArgumentMemberNotDeclOnType(object? p0, object? p1, string? paramName, int index)
647internal static ArgumentException ExpressionTypeDoesNotMatchReturn(object? p0, object? p1)
654internal static ArgumentException ExpressionTypeDoesNotMatchAssignment(object? p0, object? p1)
661internal static ArgumentException ExpressionTypeDoesNotMatchLabel(object? p0, object? p1)
668internal static ArgumentException ExpressionTypeNotInvocable(object? p0, string? paramName)
675internal static ArgumentException FieldNotDefinedForType(object? p0, object? p1)
682internal static ArgumentException InstanceFieldNotDefinedForType(object? p0, object? p1)
689internal static ArgumentException FieldInfoNotDefinedForType(object? p0, object? p1, object? p2)
696internal static ArgumentException IncorrectNumberOfIndexes()
703internal static ArgumentException IncorrectNumberOfLambdaDeclarationParameters()
711internal static ArgumentException IncorrectNumberOfMembersForGivenConstructor()
718internal static ArgumentException IncorrectNumberOfArgumentsForMembers()
725internal static ArgumentException LambdaTypeMustBeDerivedFromSystemDelegate(string? paramName)
732internal static ArgumentException MemberNotFieldOrProperty(object? p0, string? paramName)
739internal static ArgumentException MethodContainsGenericParameters(object? p0, string? paramName)
746internal static ArgumentException MethodIsGeneric(object? p0, string? paramName)
753private static ArgumentException MethodNotPropertyAccessor(object? p0, object? p1, string? paramName)
760internal static ArgumentException MethodNotPropertyAccessor(object? p0, object? p1, string? paramName, int index)
767internal static ArgumentException PropertyDoesNotHaveGetter(object? p0, string? paramName)
774internal static ArgumentException PropertyDoesNotHaveGetter(object? p0, string? paramName, int index)
781internal static ArgumentException PropertyDoesNotHaveSetter(object? p0, string? paramName)
788internal static ArgumentException PropertyDoesNotHaveAccessor(object? p0, string? paramName)
795internal static ArgumentException NotAMemberOfType(object? p0, object? p1, string? paramName)
802internal static ArgumentException NotAMemberOfType(object? p0, object? p1, string? paramName, int index)
810internal static ArgumentException NotAMemberOfAnyType(object? p0, string? paramName)
818internal static ArgumentException ParameterExpressionNotValidAsDelegate(object? p0, object? p1)
825internal static ArgumentException PropertyNotDefinedForType(object? p0, object? p1, string? paramName)
832internal static ArgumentException InstancePropertyNotDefinedForType(object? p0, object? p1, string? paramName)
839internal static ArgumentException InstancePropertyWithoutParameterNotDefinedForType(object? p0, object? p1)
846internal static ArgumentException InstancePropertyWithSpecifiedParametersNotDefinedForType(object? p0, object? p1, object? p2, string? paramName)
853internal static ArgumentException InstanceAndMethodTypeMismatch(object? p0, object? p1, object? p2)
861internal static ArgumentException TypeMissingDefaultConstructor(object? p0, string? paramName)
869internal static ArgumentException ElementInitializerMethodNotAdd(string? paramName)
876internal static ArgumentException ElementInitializerMethodNoRefOutParam(object? p0, object? p1, string? paramName)
883internal static ArgumentException ElementInitializerMethodWithZeroArgs(string? paramName)
890internal static ArgumentException ElementInitializerMethodStatic(string? paramName)
897internal static ArgumentException TypeNotIEnumerable(object? p0, string? paramName)
905internal static ArgumentException UnhandledBinary(object? p0, string? paramName)
912internal static ArgumentException UnhandledBinding()
919internal static ArgumentException UnhandledBindingType(object? p0)
927internal static ArgumentException UnhandledUnary(object? p0, string? paramName)
934internal static ArgumentException UnknownBindingType(int index)
941internal static ArgumentException UserDefinedOpMustHaveConsistentTypes(object? p0, object? p1)
948internal static ArgumentException UserDefinedOpMustHaveValidReturnType(object? p0, object? p1)
955internal static ArgumentException LogicalOperatorMustHaveBooleanOperators(object? p0, object? p1)
990internal static ArgumentException IncorrectNumberOfTypeArgsForFunc(string? paramName)
997internal static ArgumentException IncorrectNumberOfTypeArgsForAction(string? paramName)
1004internal static ArgumentException ArgumentCannotBeOfTypeVoid(string? paramName)
1170internal static ArgumentException TestValueTypeDoesNotMatchComparisonMethodParameter(object? p0, object? p1)
1177internal static ArgumentException SwitchValueTypeDoesNotMatchComparisonMethodParameter(object? p0, object? p1)
1211internal static ArgumentException NonStaticConstructorRequired(string? paramName)
1243private static ArgumentException TypeContainsGenericParameters(object? p0, string? paramName)
1251internal static ArgumentException TypeContainsGenericParameters(object? p0, string? paramName, int index)
1259internal static ArgumentException TypeIsGeneric(object? p0, string? paramName)
1267internal static ArgumentException TypeIsGeneric(object? p0, string? paramName, int index)
1275internal static ArgumentException IncorrectNumberOfConstructorArguments()
1283internal static ArgumentException ExpressionTypeDoesNotMatchMethodParameter(object? p0, object? p1, object? p2, string? paramName)
1291internal static ArgumentException ExpressionTypeDoesNotMatchMethodParameter(object? p0, object? p1, object? p2, string? paramName, int index)
1299internal static ArgumentException ExpressionTypeDoesNotMatchParameter(object? p0, object? p1, string? paramName)
1307internal static ArgumentException ExpressionTypeDoesNotMatchParameter(object? p0, object? p1, string? paramName, int index)
1323internal static ArgumentException IncorrectNumberOfMethodCallArguments(object? p0, string? paramName)
1331internal static ArgumentException ExpressionTypeDoesNotMatchConstructorParameter(object? p0, object? p1, string? paramName)
1340internal static ArgumentException ExpressionTypeDoesNotMatchConstructorParameter(object? p0, object? p1, string? paramName, int index)
1348internal static ArgumentException ExpressionMustBeReadable(string? paramName)
1356internal static ArgumentException ExpressionMustBeReadable(string? paramName, int index)
1361internal static ArgumentException InvalidArgumentValue(string? paramName)
1366internal static ArgumentException NonEmptyCollectionRequired(string? paramName)
1371internal static ArgumentException InvalidNullValue(Type? type, string? paramName)
1376internal static ArgumentException InvalidTypeException(object? value, Type? type, string? paramName)
System.Linq.Parallel (2)
System.Linq.Queryable (7)
System.Memory (6)
System.Net.Http (18)
System.Net.Http.Json (1)
System.Net.HttpListener (5)
System.Net.Mail (23)
System.Net.Ping (6)
System.Net.Primitives (4)
System.Net.Quic (2)
System.Net.Requests (6)
System.Net.Security (5)
System.Net.ServerSentEvents (2)
System.Net.Sockets (3)
System.Net.WebClient (1)
System.Net.WebHeaderCollection (1)
System.Net.WebSockets (1)
System.Net.WebSockets.Client (1)
System.Numerics.Tensors (574)
System.Private.CoreLib (493)
System.Private.DataContractSerialization (40)
System.Private.Uri (6)
System.Private.Windows.Core (13)
System.Private.Windows.Core.Tests (3)
System.Private.Xml (59)
System.Private.Xml.Linq (8)
System.Reflection.DispatchProxy (2)
System.Reflection.Emit (5)
System.Reflection.Metadata (81)
System.Reflection.MetadataLoadContext (1)
System.Resources.Extensions (2)
System.Runtime (1)
System.Runtime.InteropServices (3)
System.Runtime.Numerics (3)
System.Security.Claims (3)
System.Security.Cryptography (503)
System\Security\Cryptography\DSA.cs (24)
119/// <exception cref="ArgumentException">
129ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
146ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
182/// <exception cref="ArgumentException">
203ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
244ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
265/// <exception cref="ArgumentException">
274ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
317ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
354/// <exception cref="ArgumentException">
377ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
388ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
543ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
574/// <exception cref="ArgumentException">
587ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
631ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
652/// <exception cref="ArgumentException">
666ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
689/// <exception cref="ArgumentException">
703ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
755ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
1124/// <exception cref="ArgumentException">
1169/// <exception cref="ArgumentException">
1240/// <exception cref="ArgumentException">
System\Security\Cryptography\ECDsa.cs (31)
60ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
96/// <exception cref="ArgumentException">
117ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
195/// <exception cref="ArgumentException">
204ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
226/// <exception cref="ArgumentException">
235ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
360/// <exception cref="ArgumentException">
392/// <exception cref="ArgumentException">
468ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
494/// <exception cref="ArgumentException">
507ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
549ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
567/// <exception cref="ArgumentException">
581ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
601/// <exception cref="ArgumentException">
613ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
639/// <exception cref="ArgumentException">
661ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
689/// <exception cref="ArgumentException">
709ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
737ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
774/// <exception cref="ArgumentException">
797ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
824/// <exception cref="ArgumentException">
834ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
843ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
872ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
919ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
941/// <exception cref="ArgumentException">
956ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
System\Security\Cryptography\RSA.cs (19)
188/// <exception cref="ArgumentException">
275/// <exception cref="ArgumentException">
394ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
404ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
413ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
436/// <exception cref="ArgumentException">
458ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
489/// <exception cref="ArgumentException">
521ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
542/// <exception cref="ArgumentException">
564ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
591/// <exception cref="ArgumentException">
623ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
658ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
669ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
678ArgumentException.ThrowIfNullOrEmpty(hashAlgorithm.Name, nameof(hashAlgorithm));
1051/// <exception cref="ArgumentException">
1104/// <exception cref="ArgumentException">
1175/// <exception cref="ArgumentException">
System.Security.Cryptography.Cose (52)
System.Security.Cryptography.Pkcs (45)
System.Security.Cryptography.ProtectedData (4)
System.ServiceModel.Federation (1)
System.ServiceModel.Http.Tests (4)
System.ServiceModel.Primitives.Tests (6)
System.ServiceModel.Syndication (6)
System.Text.Encodings.Web (1)
System.Text.Json (147)
System.Text.RegularExpressions (5)
System.Text.RegularExpressions.Generator (1)
System.Threading.RateLimiting (2)
System.Threading.Tasks.Parallel (2)
System.Transactions.Local (1)
System.Windows.Forms (21)
System.Windows.Forms.Analyzers.CSharp.Tests (1)
System.Windows.Forms.Design (14)
System.Windows.Forms.Design.Tests (31)
System.Windows.Forms.IntegrationTests.Common (1)
System.Windows.Forms.Primitives.Tests (31)
System.Windows.Forms.Primitives.TestUtilities (10)
System.Windows.Forms.Tests (316)
System.Windows.Forms.UI.IntegrationTests (1)
System.Xaml (4)
System.Xaml.Tests (29)
System\Xaml\XamlMemberTests.cs (8)
233Assert.Throws<ArgumentException>("getter", () => new XamlMember("name", getter, null, new XamlSchemaContext()));
234Assert.Throws<ArgumentException>("getter", () => new XamlMember("name", getter, null, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker));
243Assert.Throws<ArgumentException>("setter", () => new XamlMember("name", null, setter, new XamlSchemaContext()));
244Assert.Throws<ArgumentException>("setter", () => new XamlMember("name", null, setter, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker));
317Assert.Throws<ArgumentException>("adder", () => new XamlMember("name", adder, new XamlSchemaContext()));
318Assert.Throws<ArgumentException>("adder", () => new XamlMember("name", adder, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker));
1399Assert.Throws<ArgumentException>(() => member.LookupMarkupExtensionBracketCharactersEntry());
1400Assert.Throws<ArgumentException>(() => member.MarkupExtensionBracketCharacters);
Test.Utilities (19)
Text.Analyzers (19)
UIAutomationClientSideProviders (3)
WindowsBase.Tests (139)
System\Windows\DependencyPropertyTests.cs (56)
222Assert.Throws<ArgumentException>("name", () => DependencyProperty.Register(string.Empty, typeof(int), typeof(DependencyPropertyTests)));
249Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata));
250Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata, value => true));
266Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata()));
267Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata { DefaultValue = 1 }));
268Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata(), value => true));
269Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata { DefaultValue = 1 }, value => true));
276Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata));
277Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true));
284Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata));
285Assert.Throws<ArgumentException>(() => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true));
292Assert.Throws<ArgumentException>(() => DependencyProperty.Register(property.Name, typeof(int), typeof(DependencyPropertyTests)));
293Assert.Throws<ArgumentException>(() => DependencyProperty.Register(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata()));
294Assert.Throws<ArgumentException>(() => DependencyProperty.Register(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
318Assert.Throws<ArgumentException>(() => DependencyProperty.Register(name, propertyType, ownerType, typeMetadata, validateValueCallback));
537Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttached(string.Empty, typeof(int), typeof(DependencyPropertyTests)));
538Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttached(string.Empty, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata()));
539Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttached(string.Empty, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
566Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata));
567Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata, value => true));
582Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata));
583Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true));
590Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata));
591Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true));
598Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(property.Name, typeof(int), typeof(DependencyPropertyTests)));
599Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata()));
600Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
624Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttached(name, propertyType, ownerType, typeMetadata, validateValueCallback));
822Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterReadOnly(string.Empty, typeof(int), typeof(DependencyObject), new PropertyMetadata()));
823Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterReadOnly(string.Empty, typeof(int), typeof(DependencyObject), new PropertyMetadata(), value => true));
848Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyProperty), metadata));
849Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyProperty), metadata, value => true));
864Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, null));
865Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata()));
866Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata { DefaultValue = 1 }));
867Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, null, value => true));
868Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata(), value => true));
869Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), ownerType, new PropertyMetadata { DefaultValue = 1 }, value => true));
876Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata));
877Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true));
884Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata));
885Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true));
892Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(property.Name, typeof(int), typeof(DependencyObject), new PropertyMetadata()));
893Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(property.Name, typeof(int), typeof(DependencyObject), new PropertyMetadata(), value => true));
917Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterReadOnly(name, propertyType, ownerType, typeMetadata, validateValueCallback));
1117Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttachedReadOnly(string.Empty, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata()));
1118Assert.Throws<ArgumentException>("name", () => DependencyProperty.RegisterAttachedReadOnly(string.Empty, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
1143Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata));
1144Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, propertyType, typeof(DependencyPropertyTests), metadata, value => true));
1158Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata));
1159Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true));
1166Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata));
1167Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(object), typeof(SubDependencyObject), metadata, value => true));
1174Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata()));
1175Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(property.Name, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
1199Assert.Throws<ArgumentException>(() => DependencyProperty.RegisterAttachedReadOnly(name, propertyType, ownerType, typeMetadata, validateValueCallback));
System\Windows\NameScopeTests.cs (21)
190Assert.Throws<ArgumentException>(() => nameScope.Add(string.Empty, scopedElement));
201Assert.Throws<ArgumentException>(() => nameScope[name] = scopedElement);
217Assert.Throws<ArgumentException>(() => nameScope["name"] = new object());
311Assert.Throws<ArgumentException>(() => nameScope.Add(string.Empty, scopedElement));
322Assert.Throws<ArgumentException>(() => nameScope.Add(name, scopedElement));
397Assert.Throws<ArgumentException>("item", () => nameScope.Add(new KeyValuePair<string, object>(null!, scopedElement)));
405Assert.Throws<ArgumentException>(() => nameScope.Add(new KeyValuePair<string, object>(string.Empty, scopedElement)));
416Assert.Throws<ArgumentException>(() => nameScope.Add(new KeyValuePair<string, object>(name, scopedElement)));
423Assert.Throws<ArgumentException>("item", () => nameScope.Add(new KeyValuePair<string, object>("name", null!)));
432Assert.Throws<ArgumentException>(() => nameScope.Add("name", new object()));
433Assert.Throws<ArgumentException>(() => nameScope.Add(new KeyValuePair<string, object>("name", new object())));
614Assert.Throws<ArgumentException>("item", () => nameScope.Contains(new KeyValuePair<string, object>(null!, new object())));
615Assert.Throws<ArgumentException>("item", () => nameScope.Contains(default));
908Assert.Throws<ArgumentException>(() => nameScope.RegisterName(string.Empty, scopedElement));
919Assert.Throws<ArgumentException>(() => nameScope.RegisterName(name, scopedElement));
935Assert.Throws<ArgumentException>(() => nameScope.RegisterName("name", new object()));
1018Assert.Throws<ArgumentException>("item", () => nameScope.Remove(new KeyValuePair<string, object>(null!, new object())));
1136Assert.Throws<ArgumentException>(() => nameScope.UnregisterName("name"));
1152Assert.Throws<ArgumentException>(() => nameScope.UnregisterName(string.Empty));
1168Assert.Throws<ArgumentException>(() => nameScope.UnregisterName(name));
1186Assert.Throws<ArgumentException>(() => nameScope.UnregisterName(name));
System\Windows\WeakEventManagerTTests.cs (4)
213Assert.Throws<ArgumentException>(() => WeakEventManager<object, EventArgs>.AddHandler(source, eventName, handler));
216Assert.Throws<ArgumentException>(() => WeakEventManager<object, EventArgs>.AddHandler(source, eventName, handler));
372Assert.Throws<ArgumentException>(() => WeakEventManager<object, EventArgs>.RemoveHandler(source, eventName, handler));
375Assert.Throws<ArgumentException>(() => WeakEventManager<object, EventArgs>.RemoveHandler(source, eventName, handler));
xunit.assert (8)
xunit.console (1)