5005 instantiations of ArgumentNullException
Aspire.Confluent.Kafka (1)
Aspire.Dashboard (3)
Aspire.EndToEnd.Tests (1)
Aspire.Hosting (20)
Aspire.Hosting.Analyzers (2)
Aspire.Hosting.Azure.PostgreSQL (1)
Aspire.Hosting.Azure.Sql (1)
Aspire.Hosting.Garnet (1)
Aspire.Hosting.Keycloak (1)
Aspire.Hosting.Nats (1)
Aspire.Hosting.NodeJs (1)
Aspire.Hosting.PostgreSQL (3)
Aspire.Hosting.Python (2)
Aspire.Hosting.Testing (1)
Aspire.Microsoft.Data.SqlClient (1)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
Aspire.StackExchange.Redis (1)
Aspire.Workload.Tests (1)
Binding.UDS.IntegrationTests (1)
Crossgen2Tasks (1)
DesignSurfaceExt (1)
dotnet-dev-certs (2)
dotnet-getdocument (3)
dotnet-openapi (1)
dotnet-sql-cache (1)
dotnet-svcutil-lib (745)
dotnet-user-jwts (1)
dotnet-user-secrets (1)
Extensibility.MessageEncoder.IntegrationTests (8)
Extensibility.MessageInterceptor.IntegrationTests (1)
GetDocument.Insider (4)
HealthChecksSample (1)
illink (3)
Microsoft.Analyzers.Local (4)
Microsoft.Analyzers.Local.Tests (2)
Microsoft.AspNetCore (3)
Microsoft.AspNetCore.Analyzers (6)
Microsoft.AspNetCore.Antiforgery (4)
Microsoft.AspNetCore.App.Analyzers (12)
Microsoft.AspNetCore.App.Analyzers.Test (2)
Microsoft.AspNetCore.AsyncState (2)
Microsoft.AspNetCore.Authentication (1)
Microsoft.AspNetCore.Authentication.Cookies (1)
Microsoft.AspNetCore.Authentication.Core (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
Microsoft.AspNetCore.Authentication.Twitter (1)
Microsoft.AspNetCore.Authentication.WsFederation (2)
Microsoft.AspNetCore.Authorization (1)
Microsoft.AspNetCore.Authorization.Policy (7)
Microsoft.AspNetCore.Components (11)
Microsoft.AspNetCore.Components.Analyzers (12)
Microsoft.AspNetCore.Components.Authorization (1)
Microsoft.AspNetCore.Components.Endpoints (3)
Microsoft.AspNetCore.Components.Forms (4)
Microsoft.AspNetCore.Components.SdkAnalyzers (12)
Microsoft.AspNetCore.Components.Server (19)
Microsoft.AspNetCore.Components.Server.Tests (1)
Microsoft.AspNetCore.Components.Web (2)
Microsoft.AspNetCore.Components.WebAssembly (3)
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
Microsoft.AspNetCore.Components.WebView (7)
Microsoft.AspNetCore.Components.WebView.Maui (4)
Microsoft.AspNetCore.Components.WebView.Photino (2)
Microsoft.AspNetCore.Components.WebView.Test (3)
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
Microsoft.AspNetCore.Components.WebView.Wpf (1)
Microsoft.AspNetCore.Connections.Abstractions (1)
Microsoft.AspNetCore.CookiePolicy (1)
Microsoft.AspNetCore.Cors (1)
Microsoft.AspNetCore.Cryptography.KeyDerivation (1)
Microsoft.AspNetCore.DataProtection (6)
Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (1)
Microsoft.AspNetCore.DataProtection.Extensions (1)
Microsoft.AspNetCore.DataProtection.StackExchangeRedis (1)
Microsoft.AspNetCore.Diagnostics.Abstractions (2)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
Microsoft.AspNetCore.HeaderParsing (2)
Microsoft.AspNetCore.HeaderPropagation (2)
Microsoft.AspNetCore.HostFiltering (3)
Microsoft.AspNetCore.Hosting.WindowsServices (1)
Microsoft.AspNetCore.Http (5)
Microsoft.AspNetCore.Http.Abstractions (4)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Connections.Client (5)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Http.Results (1)
Microsoft.AspNetCore.HttpLogging (5)
Microsoft.AspNetCore.HttpsPolicy (2)
Microsoft.AspNetCore.Identity (1)
Microsoft.AspNetCore.Identity.UI (2)
Microsoft.AspNetCore.JsonPatch (6)
Microsoft.AspNetCore.Localization (2)
Microsoft.AspNetCore.Mvc.Abstractions (3)
Microsoft.AspNetCore.Mvc.Analyzers (12)
Microsoft.AspNetCore.Mvc.Api.Analyzers (13)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
Microsoft.AspNetCore.Mvc.Core (50)
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (4)
Microsoft.AspNetCore.Mvc.Razor (3)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (6)
Microsoft.AspNetCore.Mvc.RazorPages (17)
Microsoft.AspNetCore.Mvc.TagHelpers (3)
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
Microsoft.AspNetCore.OpenApi.Tests (1)
Microsoft.AspNetCore.Razor (1)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Routing (15)
Microsoft.AspNetCore.Routing.Abstractions (2)
Microsoft.AspNetCore.Server.Kestrel.Core (14)
Microsoft.AspNetCore.Session (1)
Microsoft.AspNetCore.Shared.Tests (4)
Microsoft.AspNetCore.SignalR.Client.Core (4)
Microsoft.AspNetCore.SignalR.Core (6)
Microsoft.AspNetCore.SpaProxy (8)
Microsoft.AspNetCore.SpaServices.Extensions (4)
Microsoft.AspNetCore.StaticFiles (2)
Microsoft.AspNetCore.TestHost (15)
Microsoft.AspNetCore.Testing (2)
Microsoft.AspNetCore.WebUtilities (8)
Microsoft.Build (17)
Microsoft.Build.Engine.OM.UnitTests (1)
Microsoft.Build.Engine.UnitTests (11)
Microsoft.Build.Framework (40)
Microsoft.Build.Tasks.Core (41)
Microsoft.Build.Tasks.UnitTests (1)
Microsoft.Build.Utilities.Core (4)
Microsoft.Cci.Extensions (8)
Microsoft.CodeAnalysis (309)
Microsoft.CodeAnalysis.CodeStyle (120)
Microsoft.CodeAnalysis.CodeStyle.Fixes (8)
Microsoft.CodeAnalysis.Collections.Package (52)
Microsoft.CodeAnalysis.CSharp (80)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.CSharp.Features (2)
Microsoft.CodeAnalysis.CSharp.Scripting (4)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Microsoft.CodeAnalysis.EditorFeatures (16)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Microsoft.CodeAnalysis.EditorFeatures.Text (6)
Microsoft.CodeAnalysis.EditorFeatures.Wpf (13)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (18)
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (6)
Microsoft.CodeAnalysis.ExternalAccess.Razor (3)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
Microsoft.CodeAnalysis.Features (59)
Microsoft.CodeAnalysis.InteractiveHost (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol (27)
Microsoft.CodeAnalysis.Remote.Workspaces (1)
Microsoft.CodeAnalysis.Scripting (23)
Microsoft.CodeAnalysis.Test.Utilities (6)
Microsoft.CodeAnalysis.UnitTests (9)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces (383)
CodeRefactorings\FixAllOccurences\FixAllState.cs (2)
41: this(fixAllProvider, document ?? throw new ArgumentNullException(nameof(document)), document.Project, selectionSpan, codeRefactoringProvider,
53: this(fixAllProvider, document: null, project ?? throw new ArgumentNullException(nameof(project)), selectionSpan, codeRefactoringProvider,
Microsoft.CodeAnalysis.Workspaces.Desktop (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild (8)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (76)
Microsoft.CodeAnalysis.Workspaces.UnitTests (5)
Microsoft.CommonLanguageServerProtocol.Framework.Package (3)
Microsoft.Data.Analysis (23)
Microsoft.Data.Analysis.Interactive (1)
Microsoft.Data.Analysis.Tests (5)
Microsoft.DotNet.AsmDiff (2)
Microsoft.DotNet.Build.Tasks.Feed (1)
Microsoft.DotNet.Build.Tasks.Packaging (1)
Microsoft.DotNet.Build.Tasks.Workloads (3)
Microsoft.DotNet.Helix.Client (94)
Microsoft.DotNet.Helix.Sdk (6)
Microsoft.DotNet.Internal.SymbolHelper (1)
Microsoft.DotNet.MacOsPkg (1)
Microsoft.DotNet.RemoteExecutor (2)
Microsoft.DotNet.SignCheckLibrary (14)
Microsoft.DotNet.VersionTools (22)
Microsoft.DotNet.XliffTasks (4)
Microsoft.DotNet.XUnitAssert.Tests (11)
Microsoft.Extensions.AI (2)
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.AI.Abstractions.Tests (1)
Microsoft.Extensions.AI.AzureAIInference (2)
Microsoft.Extensions.AI.Integration.Tests (2)
Microsoft.Extensions.AI.Ollama (2)
Microsoft.Extensions.AI.OpenAI (3)
Microsoft.Extensions.AmbientMetadata.Application (2)
Microsoft.Extensions.AsyncState (2)
Microsoft.Extensions.Caching.Abstractions (1)
Microsoft.Extensions.Caching.Hybrid (2)
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.Caching.SqlServer (1)
Microsoft.Extensions.Compliance.Abstractions (2)
Microsoft.Extensions.Compliance.Redaction (2)
Microsoft.Extensions.Compliance.Testing (2)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Configuration.Abstractions (1)
Microsoft.Extensions.Configuration.Binder (1)
Microsoft.Extensions.Configuration.CommandLine (1)
Microsoft.Extensions.Configuration.FileExtensions (1)
Microsoft.Extensions.Configuration.Ini (1)
Microsoft.Extensions.Configuration.Json (1)
Microsoft.Extensions.Configuration.KeyPerFile (1)
Microsoft.Extensions.Configuration.UserSecrets (1)
Microsoft.Extensions.Configuration.Xml (1)
Microsoft.Extensions.DependencyInjection (5)
Microsoft.Extensions.DependencyInjection.Abstractions (4)
Microsoft.Extensions.DependencyInjection.AutoActivation (2)
Microsoft.Extensions.DependencyModel (4)
Microsoft.Extensions.Diagnostics (9)
Microsoft.Extensions.Diagnostics.Abstractions (1)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (2)
Microsoft.Extensions.Diagnostics.HealthChecks (4)
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (1)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (2)
Microsoft.Extensions.Diagnostics.Probes (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (2)
Microsoft.Extensions.Diagnostics.Testing (2)
Microsoft.Extensions.FileProviders.Composite (1)
Microsoft.Extensions.FileProviders.Physical (3)
Microsoft.Extensions.FileSystemGlobbing (2)
Microsoft.Extensions.Hosting (2)
Microsoft.Extensions.Hosting.Abstractions (1)
Microsoft.Extensions.Hosting.Systemd (1)
Microsoft.Extensions.Hosting.Testing (2)
Microsoft.Extensions.Hosting.WindowsServices (1)
Microsoft.Extensions.Http (2)
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Microsoft.Extensions.Http.Polly (27)
Microsoft.Extensions.Http.Resilience (2)
Microsoft.Extensions.Identity.Core (1)
Microsoft.Extensions.Identity.Stores (1)
Microsoft.Extensions.Logging (2)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.AzureAppServices (1)
Microsoft.Extensions.Logging.Configuration (1)
Microsoft.Extensions.Logging.Console (1)
Microsoft.Extensions.Logging.Debug (1)
Microsoft.Extensions.Logging.EventLog (1)
Microsoft.Extensions.Logging.EventSource (1)
Microsoft.Extensions.Logging.TraceSource (1)
Microsoft.Extensions.ML (6)
Microsoft.Extensions.ObjectPool.DependencyInjection (2)
Microsoft.Extensions.Options (1)
Microsoft.Extensions.Options.ConfigurationExtensions (1)
Microsoft.Extensions.Options.Contextual (2)
Microsoft.Extensions.Options.DataAnnotations (1)
Microsoft.Extensions.Primitives (2)
Microsoft.Extensions.Resilience (2)
Microsoft.Extensions.Telemetry (2)
Microsoft.Extensions.Telemetry.Abstractions (2)
Microsoft.Extensions.Telemetry.Tests (1)
Microsoft.Extensions.TimeProvider.Testing (2)
Microsoft.Extensions.WebEncoders (3)
Microsoft.JSInterop (2)
Microsoft.Maui (56)
Microsoft.Maui.Controls (205)
Microsoft.Maui.Controls.Build.Tasks (7)
Microsoft.Maui.Controls.Compatibility (27)
Microsoft.Maui.Controls.Maps (2)
Microsoft.Maui.Controls.SourceGen (5)
Microsoft.Maui.Controls.Xaml (9)
Microsoft.Maui.Essentials (28)
Microsoft.Maui.Graphics (4)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (3)
Microsoft.ML.AutoML (4)
Microsoft.ML.AutoML.SourceGenerator (10)
Microsoft.ML.Benchmarks.Tests (1)
Microsoft.ML.CodeGenerator (23)
Microsoft.ML.Core (11)
Microsoft.ML.CpuMath (6)
Microsoft.ML.Data (1)
Microsoft.ML.DataView (22)
Microsoft.ML.GenAI.LLaMA (7)
Microsoft.ML.GenAI.Mistral (4)
Microsoft.ML.GenAI.Phi (8)
Microsoft.ML.GenAI.Samples (1)
Microsoft.ML.ImageAnalytics (2)
Microsoft.ML.IntegrationTests (1)
Microsoft.ML.TestFrameworkCommon (2)
Microsoft.ML.Tokenizers (62)
Model\TiktokenTokenizer.cs (12)
47this(string.IsNullOrEmpty(vocabFilePath) ? throw new ArgumentNullException(nameof(vocabFilePath)) : File.OpenRead(vocabFilePath), preTokenizer, specialTokens, normalizer, cacheSize, disposeStream: true)
62this(vocabStream ?? throw new ArgumentNullException(nameof(vocabStream)), preTokenizer, specialTokens, normalizer, cacheSize, disposeStream: false)
85_encoder = encoder ?? throw new ArgumentNullException(nameof(encoder));
86_decoder = decoder ?? throw new ArgumentNullException(nameof(decoder));
87_vocab = vocab ?? throw new ArgumentNullException(nameof(vocab));
806throw new ArgumentNullException(nameof(ids));
874throw new ArgumentNullException(nameof(ids));
1309throw new ArgumentNullException(nameof(vocabStream));
1341throw new ArgumentNullException(nameof(vocabFilePath));
1366throw new ArgumentNullException(nameof(modelName));
1406throw new ArgumentNullException(nameof(modelName));
1447throw new ArgumentNullException(nameof(encodingName));
Microsoft.ML.Tokenizers.Data.Tests (2)
Microsoft.ML.Tokenizers.Tests (2)
Microsoft.ML.TorchSharp (12)
Microsoft.Net.Http.Headers (8)
Microsoft.NET.StringTools (3)
Microsoft.NET.StringTools.net35 (2)
Microsoft.VisualBasic.Core (2)
Microsoft.VisualStudio.LanguageServices (43)
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Microsoft.VisualStudio.LanguageServices.LiveShare (8)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Microsoft.Web.Xdt.Extensions (1)
MSBuild (3)
MSBuildTaskHost (4)
PresentationBuildTasks (37)
PresentationCore (68)
PresentationFramework (68)
ReachFramework (1)
Roslyn.Test.PdbUtilities (1)
ScenarioTests.Common.Tests (3)
Security.TransportSecurity.IntegrationTests (1)
Shared (3)
Shared.Tests (1)
System.CodeDom (96)
System.Collections (6)
System.Collections.Concurrent (3)
System.Collections.Immutable (5)
System.Collections.NonGeneric (3)
System.Collections.Specialized (1)
System.ComponentModel.Annotations (2)
System.ComponentModel.Composition (10)
System.ComponentModel.Composition.Registration (32)
System.Composition.AttributedModel (2)
System.Composition.Convention (61)
System.Composition.Hosting (19)
System.Composition.Runtime (6)
System.Composition.TypedParts (19)
System.Configuration.ConfigurationManager (22)
System.Data.Common (4)
System.Data.Odbc (2)
System.Diagnostics.DiagnosticSource (27)
System.Diagnostics.Process (1)
System.Formats.Asn1 (8)
System.Formats.Cbor (2)
System.IO.Hashing (9)
System.IO.Packaging (39)
System.IO.Pipelines (2)
System.IO.Ports (9)
System.Linq (1)
System.Linq.AsyncEnumerable (1)
System.Linq.Expressions (6)
System.Memory (1)
System.Memory.Data (6)
System.Net.Http.Json (21)
System.Net.HttpListener (2)
System.Net.Mail (1)
System.Net.Ping (2)
System.Net.Primitives (1)
System.Net.Quic (2)
System.Net.Requests (1)
System.Net.Security (3)
System.Net.ServerSentEvents (1)
System.Net.Sockets (1)
System.Net.WebHeaderCollection (3)
System.Net.WebSockets (1)
System.Net.WebSockets.Client (1)
System.ObjectModel (2)
System.Private.CoreLib (50)
System.Private.DataContractSerialization (9)
System.Private.Windows.Core (9)
System.Private.Windows.GdiPlus (2)
System.Private.Xml (5)
System.Reflection.Context (7)
System.Reflection.Metadata (4)
System.Reflection.MetadataLoadContext (26)
System.Resources.Extensions (22)
System.Resources.Writer (6)
System.Runtime.Caching (26)
System.Runtime.Numerics (1)
System.Runtime.Serialization.Formatters (2)
System.Runtime.Serialization.Schema (19)
System.Security.Cryptography (43)
System.Security.Cryptography.Cose (51)
System.Security.Cryptography.Pkcs (64)
System.Security.Cryptography.ProtectedData (2)
System.Security.Cryptography.Xml (88)
System.Security.Permissions (1)
System.ServiceModel.Federation (19)
System.ServiceModel.Syndication (140)
System.ServiceModel.UnixDomainSocket (1)
System.Text.Encoding.CodePages (36)
System.Text.Encodings.Web (2)
System.Text.Json (5)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions (1)
System.Threading.Channels (2)
System.Threading.RateLimiting (6)
System.Threading.Tasks.Dataflow (84)
System.Windows.Forms (2)
System.Windows.Forms.Design (4)
System.Windows.Forms.IntegrationTests.Common (4)
System.Windows.Forms.Primitives (2)
System.Windows.Forms.Tests (1)
System.Windows.Forms.UI.IntegrationTests (1)
System.Xaml (33)
UIAutomationClient (2)
UnitTests.Common (1)
WindowsFormsIntegration (6)
XmlFileLogger (2)
xunit.assert (2)
xunit.console (19)
Xunit.NetCore.Extensions (1)
18932 references to ArgumentNullException
Aspire.Azure.AI.OpenAI (3)
Aspire.Azure.Data.Tables (1)
Aspire.Azure.Messaging.EventHubs (1)
Aspire.Azure.Messaging.ServiceBus (1)
Aspire.Azure.Messaging.WebPubSub (1)
Aspire.Azure.Search.Documents (2)
Aspire.Azure.Security.KeyVault (2)
Aspire.Azure.Storage.Blobs (1)
Aspire.Azure.Storage.Queues (1)
Aspire.Confluent.Kafka (5)
Aspire.Dashboard (5)
Aspire.Dashboard.Components.Tests (2)
Aspire.Dashboard.Tests (2)
Aspire.Elastic.Clients.Elasticsearch (4)
Aspire.Elastic.Clients.Elasticsearch.Tests (8)
Aspire.Hosting (222)
Aspire.Hosting.Azure (15)
Aspire.Hosting.Azure.CognitiveServices (1)
Aspire.Hosting.Azure.CosmosDB (1)
Aspire.Hosting.Azure.EventHubs (2)
Aspire.Hosting.Azure.PostgreSQL (3)
Aspire.Hosting.Azure.Redis (1)
Aspire.Hosting.Azure.ServiceBus (4)
Aspire.Hosting.Azure.Sql (2)
Aspire.Hosting.Azure.Storage (1)
Aspire.Hosting.Azure.Tests (2)
Aspire.Hosting.Containers.Tests (1)
Aspire.Hosting.Elasticsearch (7)
Aspire.Hosting.Elasticsearch.Tests (12)
Aspire.Hosting.Garnet (6)
Aspire.Hosting.Garnet.Tests (14)
Aspire.Hosting.Kafka (7)
Aspire.Hosting.Kafka.Tests (18)
Aspire.Hosting.Keycloak (7)
Aspire.Hosting.Keycloak.Tests (18)
Aspire.Hosting.Milvus (11)
Aspire.Hosting.Milvus.Tests (24)
Aspire.Hosting.MongoDB (13)
Aspire.Hosting.MongoDB.Tests (32)
Aspire.Hosting.MySql (12)
Aspire.Hosting.MySql.Tests (26)
Aspire.Hosting.Nats (6)
Aspire.Hosting.Nats.Tests (16)
Aspire.Hosting.NodeJs (7)
Aspire.Hosting.NodeJs.Tests (20)
Aspire.Hosting.Oracle (1)
Aspire.Hosting.PostgreSQL (12)
Aspire.Hosting.PostgreSQL.Tests (34)
Aspire.Hosting.Python (14)
Aspire.Hosting.Python.Tests (28)
Aspire.Hosting.Qdrant (9)
Aspire.Hosting.Qdrant.Tests (18)
Aspire.Hosting.RabbitMQ (8)
Aspire.Hosting.RabbitMQ.Tests (18)
Aspire.Hosting.Redis (13)
Aspire.Hosting.Redis.Tests (24)
Aspire.Hosting.SqlServer (6)
Aspire.Hosting.SqlServer.Tests (24)
Aspire.Hosting.Testing (5)
Aspire.Hosting.Testing.Tests (15)
Aspire.Hosting.Tests (11)
Aspire.Keycloak.Authentication (2)
Aspire.Microsoft.Azure.Cosmos (1)
Aspire.Microsoft.Data.SqlClient (2)
Aspire.Microsoft.EntityFrameworkCore.Cosmos (4)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (4)
Aspire.Milvus.Client (4)
Aspire.Milvus.Client.Tests (8)
Aspire.MongoDB.Driver (4)
Aspire.MongoDB.Driver.Tests (8)
Aspire.MongoDB.Driver.v3.Tests (8)
Aspire.MySqlConnector (3)
Aspire.NATS.Net (5)
Aspire.NATS.Net.Tests (10)
Aspire.Npgsql (3)
Aspire.Npgsql.EntityFrameworkCore.PostgreSQL (4)
Aspire.OpenAI (4)
Aspire.Oracle.EntityFrameworkCore (4)
Aspire.Playground.Tests (9)
Aspire.Pomelo.EntityFrameworkCore.MySql (4)
Aspire.Qdrant.Client (2)
Aspire.RabbitMQ.Client (1)
Aspire.Seq (1)
Aspire.StackExchange.Redis (1)
CodeGenerator (1)
ConfigurationSchemaGenerator (1)
CorsMiddlewareWebSite (1)
CustomEncryptorSample (2)
dotnet-razorpagegenerator (2)
dotnet-svcutil-lib (13)
dotnet-user-jwts (1)
HtmlGenerationWebSite (2)
http2cat (1)
Identity.DefaultUI.WebSite (1)
IIS.FunctionalTests (1)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IIS.ShadowCopy.Tests (1)
IISExpress.FunctionalTests (1)
Infrastructure.Common (1)
InProcessWebSite (1)
Microsoft.Analyzers.Local.Tests (12)
Microsoft.Arcade.Test.Common (1)
Microsoft.AspNetCore (4)
Microsoft.AspNetCore.Antiforgery (18)
Microsoft.AspNetCore.Antiforgery.Test (4)
Microsoft.AspNetCore.AsyncState (8)
Microsoft.AspNetCore.AsyncState.Tests (1)
Microsoft.AspNetCore.Authentication (29)
Microsoft.AspNetCore.Authentication.Abstractions (15)
Microsoft.AspNetCore.Authentication.BearerToken (3)
Microsoft.AspNetCore.Authentication.Cookies (12)
Microsoft.AspNetCore.Authentication.Core (4)
Microsoft.AspNetCore.Authentication.JwtBearer (1)
Microsoft.AspNetCore.Authentication.Negotiate (1)
Microsoft.AspNetCore.Authentication.Negotiate.Test (2)
Microsoft.AspNetCore.Authentication.OAuth (14)
Microsoft.AspNetCore.Authentication.OpenIdConnect (2)
Microsoft.AspNetCore.Authentication.Test (9)
Microsoft.AspNetCore.Authentication.Twitter (4)
Microsoft.AspNetCore.Authentication.WsFederation (2)
Microsoft.AspNetCore.Authorization (1)
Microsoft.AspNetCore.Authorization.Policy (13)
Microsoft.AspNetCore.AzureAppServicesIntegration (1)
Microsoft.AspNetCore.BrowserTesting (2)
Microsoft.AspNetCore.Components (117)
Microsoft.AspNetCore.Components.Authorization (2)
Microsoft.AspNetCore.Components.Endpoints (29)
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
Microsoft.AspNetCore.Components.Forms (3)
Microsoft.AspNetCore.Components.Forms.Tests (10)
Microsoft.AspNetCore.Components.Server (17)
Microsoft.AspNetCore.Components.Tests (4)
Microsoft.AspNetCore.Components.Web (33)
Microsoft.AspNetCore.Components.WebAssembly (29)
Microsoft.AspNetCore.Components.WebAssembly.Server (2)
Microsoft.AspNetCore.Components.WebView (5)
Microsoft.AspNetCore.Components.WebView.Maui (6)
Microsoft.AspNetCore.Components.WebView.Test (3)
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
Microsoft.AspNetCore.Components.WebView.Wpf (3)
Microsoft.AspNetCore.ConcurrencyLimiter (1)
Microsoft.AspNetCore.CookiePolicy (10)
Microsoft.AspNetCore.CookiePolicy.Test (8)
Microsoft.AspNetCore.Cors (36)
Microsoft.AspNetCore.Cors.Test (2)
Microsoft.AspNetCore.Cryptography.KeyDerivation (1)
Microsoft.AspNetCore.DataProtection (1)
Microsoft.AspNetCore.DataProtection.Abstractions (2)
Microsoft.AspNetCore.DataProtection.EntityFrameworkCore (1)
Microsoft.AspNetCore.DataProtection.Extensions (3)
Microsoft.AspNetCore.DataProtection.StackExchangeRedis (1)
Microsoft.AspNetCore.Diagnostics (41)
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (23)
Microsoft.AspNetCore.Diagnostics.HealthChecks (18)
Microsoft.AspNetCore.Diagnostics.Middleware (10)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (13)
Microsoft.AspNetCore.Grpc.JsonTranscoding (5)
Microsoft.AspNetCore.Grpc.Swagger (1)
Microsoft.AspNetCore.HeaderParsing (7)
Microsoft.AspNetCore.HeaderPropagation (25)
Microsoft.AspNetCore.HostFiltering (3)
Microsoft.AspNetCore.Hosting (21)
Microsoft.AspNetCore.Hosting.Abstractions (11)
Microsoft.AspNetCore.Hosting.Tests (3)
Microsoft.AspNetCore.Html.Abstractions (24)
Microsoft.AspNetCore.Http (31)
Microsoft.AspNetCore.Http.Abstractions (52)
Microsoft.AspNetCore.Http.Abstractions.Tests (10)
Microsoft.AspNetCore.Http.Connections (5)
Microsoft.AspNetCore.Http.Connections.Client (1)
Microsoft.AspNetCore.Http.Extensions (79)
Microsoft.AspNetCore.Http.Extensions.Tests (8)
UriHelperTests.cs (2)
180Assert.Throws<ArgumentNullException>(() => UriHelper.BuildAbsolute(null, resHost, resPath, resPath, resQuery, resFragment));
192Assert.Throws<ArgumentNullException>(() => UriHelper.FromAbsolute(null, out resScheme, out resHost, out resPath, out resQuery, out resFragment));
Microsoft.AspNetCore.Http.Features (10)
Microsoft.AspNetCore.Http.Results (118)
Microsoft.AspNetCore.Http.Results.Tests (128)
ResultsOfTTests.Generated.cs (15)
75await Assert.ThrowsAsync<ArgumentNullException>(async () =>
223Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
224Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2>>(((Delegate)GeneratedCodeIsUpToDate).GetMethodInfo(), null));
290await Assert.ThrowsAsync<ArgumentNullException>(async () =>
503Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
504Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3>>(((Delegate)GeneratedCodeIsUpToDate).GetMethodInfo(), null));
574await Assert.ThrowsAsync<ArgumentNullException>(async () =>
860Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3, ProvidesMetadataResult4>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
861Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3, ProvidesMetadataResult4>>(((Delegate)GeneratedCodeIsUpToDate).GetMethodInfo(), null));
935await Assert.ThrowsAsync<ArgumentNullException>(async () =>
1302Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3, ProvidesMetadataResult4, ProvidesMetadataResult5>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
1303Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3, ProvidesMetadataResult4, ProvidesMetadataResult5>>(((Delegate)GeneratedCodeIsUpToDate).GetMethodInfo(), null));
1381await Assert.ThrowsAsync<ArgumentNullException>(async () =>
1837Assert.Throws<ArgumentNullException>("method", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3, ProvidesMetadataResult4, ProvidesMetadataResult5, ProvidesMetadataResult6>>(null, new RouteEndpointBuilder(requestDelegate: null, RoutePatternFactory.Parse("/"), order: 0)));
1838Assert.Throws<ArgumentNullException>("builder", () => PopulateMetadata<Results<ProvidesMetadataResult1, ProvidesMetadataResult2, ProvidesMetadataResult3, ProvidesMetadataResult4, ProvidesMetadataResult5, ProvidesMetadataResult6>>(((Delegate)GeneratedCodeIsUpToDate).GetMethodInfo(), null));
ResultsTests.cs (15)
344Assert.Throws<ArgumentNullException>("contents", () => Results.Bytes(null));
350Assert.Throws<ArgumentNullException>("fileContents", () => Results.File(default(byte[])));
356Assert.Throws<ArgumentNullException>("fileStream", () => Results.File(default(Stream)));
362Assert.Throws<ArgumentNullException>("stream", () => Results.Stream(default(Stream)));
368Assert.Throws<ArgumentNullException>("pipeReader", () => Results.Stream(default(PipeReader)));
374Assert.Throws<ArgumentNullException>("streamWriterCallback", () => TypedResults.Stream(default(Func<Stream, Task>)));
478Assert.Throws<ArgumentNullException>("principal", () => Results.SignIn(null));
1039Assert.Throws<ArgumentNullException>("context", () => Results.Json<object>(null, context: null));
1045Assert.Throws<ArgumentNullException>("context", () => Results.Json(null, type: typeof(object), context: null));
1065Assert.Throws<ArgumentNullException>("jsonTypeInfo", () => Results.Json(null, jsonTypeInfo: null));
1071Assert.Throws<ArgumentNullException>("jsonTypeInfo", () => Results.Json<object>(null, jsonTypeInfo: null));
1077Assert.Throws<ArgumentNullException>("localUrl", () => Results.LocalRedirect(default(string)));
1244Assert.Throws<ArgumentNullException>("problemDetails", () => Results.Problem(default(ProblemDetails)));
1392Assert.Throws<ArgumentNullException>("errors", () => Results.ValidationProblem(default(IDictionary<string, string[]>)));
1460Assert.Throws<ArgumentNullException>("url", () => Results.Redirect(default(string)));
TypedResultsTests.cs (17)
99Assert.Throws<ArgumentNullException>("uri", () => TypedResults.Accepted(default(Uri)));
105Assert.Throws<ArgumentNullException>("uri", () => TypedResults.Accepted(default(Uri), default(object)));
318Assert.Throws<ArgumentNullException>("contents", () => TypedResults.Bytes(null));
324Assert.Throws<ArgumentNullException>("fileContents", () => TypedResults.File(default(byte[])));
330Assert.Throws<ArgumentNullException>("fileStream", () => TypedResults.File(default(Stream)));
336Assert.Throws<ArgumentNullException>("stream", () => TypedResults.Stream(default(Stream)));
342Assert.Throws<ArgumentNullException>("pipeReader", () => TypedResults.Stream(default(PipeReader)));
348Assert.Throws<ArgumentNullException>("streamWriterCallback", () => TypedResults.Stream(default(Func<Stream, Task>)));
354Assert.Throws<ArgumentNullException>("path", () => TypedResults.PhysicalFile(default(string)));
366Assert.Throws<ArgumentNullException>("path", () => TypedResults.VirtualFile(default(string)));
488Assert.Throws<ArgumentNullException>("principal", () => TypedResults.SignIn(null));
899Assert.Throws<ArgumentNullException>("context", () => TypedResults.Json(data, context: null));
915Assert.Throws<ArgumentNullException>("jsonTypeInfo", () => TypedResults.Json(data, jsonTypeInfo: null));
921Assert.Throws<ArgumentNullException>("localUrl", () => TypedResults.LocalRedirect(default(string)));
1060Assert.Throws<ArgumentNullException>("problemDetails", () => TypedResults.Problem(default(ProblemDetails)));
1184Assert.Throws<ArgumentNullException>("errors", () => TypedResults.ValidationProblem(default(IDictionary<string, string[]>)));
1242Assert.Throws<ArgumentNullException>("url", () => TypedResults.Redirect(default(string)));
Microsoft.AspNetCore.Http.Tests (4)
Microsoft.AspNetCore.HttpLogging (21)
Microsoft.AspNetCore.HttpLogging.Tests (11)
Microsoft.AspNetCore.HttpOverrides (17)
Microsoft.AspNetCore.HttpsPolicy (10)
Microsoft.AspNetCore.HttpsPolicy.Tests (2)
Microsoft.AspNetCore.Identity (18)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (52)
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (45)
UserStoreTest.cs (45)
99Assert.Throws<ArgumentNullException>("context", () => new UserStore(null));
101await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetUserIdAsync(null));
102await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetUserNameAsync(null));
103await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.SetUserNameAsync(null, null));
104await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.CreateAsync(null));
105await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.UpdateAsync(null));
106await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.DeleteAsync(null));
107await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.AddClaimsAsync(null, null));
108await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.ReplaceClaimAsync(null, null, null));
109await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.RemoveClaimsAsync(null, null));
110await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetClaimsAsync(null));
111await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetLoginsAsync(null));
112await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetRolesAsync(null));
113await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.AddLoginAsync(null, null));
115Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.RemoveLoginAsync(null, null, null));
116await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.AddToRoleAsync(null, null));
118Assert.ThrowsAsync<ArgumentNullException>("user",
120await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.IsInRoleAsync(null, null));
121await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetPasswordHashAsync(null));
123Assert.ThrowsAsync<ArgumentNullException>("user",
125await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetSecurityStampAsync(null));
126await Assert.ThrowsAsync<ArgumentNullException>("user",
128await Assert.ThrowsAsync<ArgumentNullException>("login", async () => await store.AddLoginAsync(new IdentityUser("fake"), null));
129await Assert.ThrowsAsync<ArgumentNullException>("claims",
131await Assert.ThrowsAsync<ArgumentNullException>("claims",
133await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetEmailConfirmedAsync(null));
134await Assert.ThrowsAsync<ArgumentNullException>("user",
136await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetEmailAsync(null));
137await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.SetEmailAsync(null, null));
138await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetPhoneNumberAsync(null));
139await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.SetPhoneNumberAsync(null, null));
140await Assert.ThrowsAsync<ArgumentNullException>("user",
142await Assert.ThrowsAsync<ArgumentNullException>("user",
144await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetTwoFactorEnabledAsync(null));
145await Assert.ThrowsAsync<ArgumentNullException>("user",
147await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetAccessFailedCountAsync(null));
148await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetLockoutEnabledAsync(null));
149await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.SetLockoutEnabledAsync(null, false));
150await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.GetLockoutEndDateAsync(null));
151await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.SetLockoutEndDateAsync(null, new DateTimeOffset()));
152await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.ResetAccessFailedCountAsync(null));
153await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await store.IncrementAccessFailedCountAsync(null));
154await Assert.ThrowsAsync<ArgumentNullException>("normalizedRoleName", async () => await store.AddToRoleAsync(new IdentityUser("fake"), null));
155await Assert.ThrowsAsync<ArgumentNullException>("normalizedRoleName", async () => await store.RemoveFromRoleAsync(new IdentityUser("fake"), null));
156await Assert.ThrowsAsync<ArgumentNullException>("normalizedRoleName", async () => await store.IsInRoleAsync(new IdentityUser("fake"), null));
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Microsoft.AspNetCore.Identity.InMemory.Test (1)
Microsoft.AspNetCore.Identity.Test (79)
SignInManagerTest.cs (3)
21Assert.Throws<ArgumentNullException>("userManager", () => new SignInManager<PocoUser>(null, null, null, null, null, null, null));
23Assert.Throws<ArgumentNullException>("contextAccessor", () => new SignInManager<PocoUser>(userManager, null, null, null, null, null, null));
27Assert.Throws<ArgumentNullException>("claimsFactory", () => new SignInManager<PocoUser>(userManager, contextAccessor.Object, null, null, null, null, null));
UserManagerTest.cs (64)
1018Assert.Throws<ArgumentNullException>("store",
1023await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await manager.CreateAsync(null));
1024await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await manager.CreateAsync(null, null));
1026Assert.ThrowsAsync<ArgumentNullException>("password",
1028await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await manager.UpdateAsync(null));
1029await Assert.ThrowsAsync<ArgumentNullException>("user", async () => await manager.DeleteAsync(null));
1030await Assert.ThrowsAsync<ArgumentNullException>("claim", async () => await manager.AddClaimAsync(null, null));
1031await Assert.ThrowsAsync<ArgumentNullException>("claim", async () => await manager.ReplaceClaimAsync(null, null, null));
1032await Assert.ThrowsAsync<ArgumentNullException>("claims", async () => await manager.AddClaimsAsync(null, null));
1033await Assert.ThrowsAsync<ArgumentNullException>("userName", async () => await manager.FindByNameAsync(null));
1034await Assert.ThrowsAsync<ArgumentNullException>("login", async () => await manager.AddLoginAsync(null, null));
1035await Assert.ThrowsAsync<ArgumentNullException>("loginProvider",
1037await Assert.ThrowsAsync<ArgumentNullException>("providerKey",
1039await Assert.ThrowsAsync<ArgumentNullException>("email", async () => await manager.FindByEmailAsync(null));
1040Assert.Throws<ArgumentNullException>("provider", () => manager.RegisterTokenProvider("whatever", null));
1041await Assert.ThrowsAsync<ArgumentNullException>("roles", async () => await manager.AddToRolesAsync(new PocoUser(), null));
1042await Assert.ThrowsAsync<ArgumentNullException>("roles", async () => await manager.RemoveFromRolesAsync(new PocoUser(), null));
1050await Assert.ThrowsAsync<ArgumentNullException>("user",
1052await Assert.ThrowsAsync<ArgumentNullException>("user",
1054await Assert.ThrowsAsync<ArgumentNullException>("user",
1056await Assert.ThrowsAsync<ArgumentNullException>("user",
1058await Assert.ThrowsAsync<ArgumentNullException>("user",
1060await Assert.ThrowsAsync<ArgumentNullException>("user",
1062await Assert.ThrowsAsync<ArgumentNullException>("user",
1064await Assert.ThrowsAsync<ArgumentNullException>("user",
1066await Assert.ThrowsAsync<ArgumentNullException>("user",
1068await Assert.ThrowsAsync<ArgumentNullException>("user",
1070await Assert.ThrowsAsync<ArgumentNullException>("user",
1072await Assert.ThrowsAsync<ArgumentNullException>("user",
1074await Assert.ThrowsAsync<ArgumentNullException>("user",
1076await Assert.ThrowsAsync<ArgumentNullException>("user",
1078await Assert.ThrowsAsync<ArgumentNullException>("user",
1080await Assert.ThrowsAsync<ArgumentNullException>("user",
1082await Assert.ThrowsAsync<ArgumentNullException>("user",
1084await Assert.ThrowsAsync<ArgumentNullException>("user",
1086await Assert.ThrowsAsync<ArgumentNullException>("user",
1088await Assert.ThrowsAsync<ArgumentNullException>("user",
1090await Assert.ThrowsAsync<ArgumentNullException>("user",
1092await Assert.ThrowsAsync<ArgumentNullException>("user",
1094await Assert.ThrowsAsync<ArgumentNullException>("user",
1096await Assert.ThrowsAsync<ArgumentNullException>("user",
1098await Assert.ThrowsAsync<ArgumentNullException>("user",
1100await Assert.ThrowsAsync<ArgumentNullException>("user",
1102await Assert.ThrowsAsync<ArgumentNullException>("user",
1104await Assert.ThrowsAsync<ArgumentNullException>("user",
1106await Assert.ThrowsAsync<ArgumentNullException>("user",
1108await Assert.ThrowsAsync<ArgumentNullException>("user",
1110await Assert.ThrowsAsync<ArgumentNullException>("user",
1112await Assert.ThrowsAsync<ArgumentNullException>("user",
1114await Assert.ThrowsAsync<ArgumentNullException>("user",
1116await Assert.ThrowsAsync<ArgumentNullException>("user",
1118await Assert.ThrowsAsync<ArgumentNullException>("user",
1120await Assert.ThrowsAsync<ArgumentNullException>("user",
1122await Assert.ThrowsAsync<ArgumentNullException>("user",
1124await Assert.ThrowsAsync<ArgumentNullException>("user",
1126await Assert.ThrowsAsync<ArgumentNullException>("user",
1128await Assert.ThrowsAsync<ArgumentNullException>("user",
1130await Assert.ThrowsAsync<ArgumentNullException>("user",
1132await Assert.ThrowsAsync<ArgumentNullException>("user",
1134await Assert.ThrowsAsync<ArgumentNullException>("user",
1136await Assert.ThrowsAsync<ArgumentNullException>("user",
1138await Assert.ThrowsAsync<ArgumentNullException>("user",
1140await Assert.ThrowsAsync<ArgumentNullException>("user",
1142await Assert.ThrowsAsync<ArgumentNullException>("user",
Microsoft.AspNetCore.InternalTesting (8)
Microsoft.AspNetCore.JsonPatch (4)
Microsoft.AspNetCore.Localization (25)
Microsoft.AspNetCore.Localization.Routing (1)
Microsoft.AspNetCore.Localization.Tests (1)
Microsoft.AspNetCore.MiddlewareAnalysis (1)
Microsoft.AspNetCore.Mvc (9)
Microsoft.AspNetCore.Mvc.Abstractions (100)
Microsoft.AspNetCore.Mvc.ApiExplorer (7)
Microsoft.AspNetCore.Mvc.Core (736)
Microsoft.AspNetCore.Mvc.Core.Test (12)
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
Microsoft.AspNetCore.Mvc.Cors (14)
Microsoft.AspNetCore.Mvc.DataAnnotations (46)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
Microsoft.AspNetCore.Mvc.Formatters.Xml (64)
Microsoft.AspNetCore.Mvc.FunctionalTests (3)
Microsoft.AspNetCore.Mvc.IntegrationTests (7)
Microsoft.AspNetCore.Mvc.Localization (52)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (54)
Microsoft.AspNetCore.Mvc.Razor (77)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (28)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
Microsoft.AspNetCore.Mvc.RazorPages (190)
Microsoft.AspNetCore.Mvc.TagHelpers (75)
Microsoft.AspNetCore.Mvc.Testing (1)
Microsoft.AspNetCore.Mvc.ViewFeatures (566)
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
Microsoft.AspNetCore.OpenApi (13)
Microsoft.AspNetCore.OutputCaching (52)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (3)
Microsoft.AspNetCore.OutputCaching.Tests (5)
MemoryOutputCacheStoreTests.cs (2)
48_ = await Assert.ThrowsAsync<ArgumentNullException>("key", () => store.SetAsync(key, value, null, TimeSpan.FromMilliseconds(5), default).AsTask());
58_ = await Assert.ThrowsAsync<ArgumentNullException>("value", () => store.SetAsync(key, value, null, TimeSpan.FromMilliseconds(5), default).AsTask());
Microsoft.AspNetCore.Owin (7)
Microsoft.AspNetCore.Owin.Tests (1)
Microsoft.AspNetCore.RateLimiting (25)
Microsoft.AspNetCore.RateLimiting.Tests (9)
Microsoft.AspNetCore.Razor (39)
Microsoft.AspNetCore.Razor.Runtime (36)
Microsoft.AspNetCore.RequestDecompression (10)
Microsoft.AspNetCore.RequestDecompression.Tests (9)
Microsoft.AspNetCore.ResponseCaching (16)
Microsoft.AspNetCore.ResponseCaching.Tests (2)
Microsoft.AspNetCore.ResponseCompression (13)
Microsoft.AspNetCore.Rewrite (18)
Microsoft.AspNetCore.Rewrite.Tests (1)
Microsoft.AspNetCore.Routing (274)
Microsoft.AspNetCore.Routing.Abstractions (8)
Microsoft.AspNetCore.Routing.FunctionalTests (1)
Microsoft.AspNetCore.Routing.Microbenchmarks (4)
Microsoft.AspNetCore.Routing.Tests (23)
Microsoft.AspNetCore.Server.HttpSys (10)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.IIS (7)
Microsoft.AspNetCore.Server.IISIntegration (5)
Microsoft.AspNetCore.Server.IntegrationTesting (2)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
Microsoft.AspNetCore.Server.Kestrel (1)
Microsoft.AspNetCore.Server.Kestrel.Core (35)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (5)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (4)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (4)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (6)
Microsoft.AspNetCore.Session (19)
Microsoft.AspNetCore.Shared.Tests (23)
Microsoft.AspNetCore.SignalR (5)
Microsoft.AspNetCore.SignalR.Client (2)
Microsoft.AspNetCore.SignalR.Client.Core (2)
Microsoft.AspNetCore.SignalR.Client.Tests (3)
Microsoft.AspNetCore.SignalR.Common (5)
Microsoft.AspNetCore.SignalR.Core (19)
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (2)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (12)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Microsoft.AspNetCore.SignalR.Tests (3)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.AspNetCore.SpaServices.Extensions (11)
Microsoft.AspNetCore.StaticAssets (5)
Microsoft.AspNetCore.StaticFiles (45)
Microsoft.AspNetCore.TestHost (14)
Microsoft.AspNetCore.TestHost.Tests (1)
Microsoft.AspNetCore.Testing (7)
Microsoft.AspNetCore.Testing.Tests (2)
Microsoft.AspNetCore.WebSockets (6)
Microsoft.AspNetCore.WebUtilities (38)
Microsoft.AspNetCore.WebUtilities.Tests (3)
Microsoft.Bcl.TimeProvider (3)
Microsoft.Build (40)
Microsoft.Build.Engine.OM.UnitTests (24)
Microsoft.Build.Engine.UnitTests (36)
Microsoft.Build.Framework (1)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.Build.Tasks.Core (5)
Microsoft.Build.Tasks.UnitTests (5)
Microsoft.Build.Utilities.Core (43)
Microsoft.Build.Utilities.UnitTests (14)
Microsoft.CodeAnalysis (68)
Microsoft.CodeAnalysis.CodeStyle (34)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.Collections.Package (2)
Microsoft.CodeAnalysis.CSharp (12)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (11)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (11)
Microsoft.CodeAnalysis.CSharp.Scripting (4)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (43)
Symbols\FunctionPointerTypeSymbolTests.cs (5)
1532Assert.Throws<ArgumentNullException>("returnType", () => comp.CreateFunctionPointerTypeSymbol(returnType: null!, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty));
1533Assert.Throws<ArgumentNullException>("parameterTypes", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: default, parameterRefKinds: ImmutableArray<RefKind>.Empty));
1534Assert.Throws<ArgumentNullException>("parameterTypes[0]", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray.Create((ITypeSymbol?)null)!, parameterRefKinds: ImmutableArray.Create(RefKind.None)));
1535Assert.Throws<ArgumentNullException>("parameterRefKinds", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: default));
1536Assert.Throws<ArgumentNullException>("callingConventionTypes[0]", () => comp.CreateFunctionPointerTypeSymbol(returnType: @string, returnRefKind: RefKind.None, parameterTypes: ImmutableArray<ITypeSymbol>.Empty, parameterRefKinds: ImmutableArray<RefKind>.Empty, callingConvention: SignatureCallingConvention.Unmanaged, ImmutableArray.Create((INamedTypeSymbol)null!)));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (33)
Microsoft.CodeAnalysis.Debugging.Package (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (5)
Microsoft.CodeAnalysis.Features (11)
Microsoft.CodeAnalysis.Features.UnitTests (3)
Microsoft.CodeAnalysis.InteractiveHost (2)
Microsoft.CodeAnalysis.Scripting (29)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (4)
Microsoft.CodeAnalysis.Scripting.UnitTests (39)
ScriptOptionsTests.cs (39)
41Assert.Throws<ArgumentNullException>("references", () => options.AddReferences((MetadataReference[])null));
42Assert.Throws<ArgumentNullException>("references[0]", () => options.AddReferences(new MetadataReference[] { null }));
44Assert.Throws<ArgumentNullException>("references", () => options.AddReferences((IEnumerable<MetadataReference>)null));
45Assert.Throws<ArgumentNullException>("references[0]", () => options.AddReferences((IEnumerable<MetadataReference>)new MetadataReference[] { null }));
47Assert.Throws<ArgumentNullException>("references", () => options.AddReferences((Assembly[])null));
48Assert.Throws<ArgumentNullException>("references[0]", () => options.AddReferences(new Assembly[] { null }));
50Assert.Throws<ArgumentNullException>("references", () => options.AddReferences((IEnumerable<Assembly>)null));
51Assert.Throws<ArgumentNullException>("references[0]", () => options.AddReferences((IEnumerable<Assembly>)new Assembly[] { null }));
53Assert.Throws<ArgumentNullException>("references", () => options.AddReferences((string[])null));
54Assert.Throws<ArgumentNullException>("references[0]", () => options.AddReferences(new string[] { null }));
56Assert.Throws<ArgumentNullException>("references", () => options.AddReferences((IEnumerable<string>)null));
57Assert.Throws<ArgumentNullException>("references[0]", () => options.AddReferences((IEnumerable<string>)new string[] { null }));
83Assert.Throws<ArgumentNullException>("references", () => options.WithReferences((MetadataReference[])null));
84Assert.Throws<ArgumentNullException>("references", () => options.WithReferences((IEnumerable<MetadataReference>)null));
85Assert.Throws<ArgumentNullException>("references", () => options.WithReferences(default(ImmutableArray<MetadataReference>)));
86Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(new MetadataReference[] { null }));
87Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((MetadataReference)null)));
89Assert.Throws<ArgumentNullException>("references", () => options.WithReferences((Assembly[])null));
90Assert.Throws<ArgumentNullException>("references", () => options.WithReferences((IEnumerable<Assembly>)null));
91Assert.Throws<ArgumentNullException>("references", () => options.WithReferences(default(ImmutableArray<Assembly>)));
92Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(new Assembly[] { null }));
93Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((Assembly)null)));
95Assert.Throws<ArgumentNullException>("references", () => options.WithReferences((string[])null));
96Assert.Throws<ArgumentNullException>("references", () => options.WithReferences((IEnumerable<string>)null));
97Assert.Throws<ArgumentNullException>("references", () => options.WithReferences(default(ImmutableArray<string>)));
98Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(new string[] { null }));
99Assert.Throws<ArgumentNullException>("references[0]", () => options.WithReferences(ImmutableArray.Create((string)null)));
122Assert.Throws<ArgumentNullException>("imports", () => options.AddImports((string[])null));
123Assert.Throws<ArgumentNullException>("imports[0]", () => options.AddImports([null]));
125Assert.Throws<ArgumentNullException>("imports", () => options.AddImports((IEnumerable<string>)null));
126Assert.Throws<ArgumentNullException>("imports[0]", () => options.AddImports((IEnumerable<string>)new string[] { null }));
128Assert.Throws<ArgumentNullException>("imports", () => options.AddImports(default(ImmutableArray<string>)));
129Assert.Throws<ArgumentNullException>("imports[0]", () => options.AddImports(ImmutableArray.Create((string)null)));
143Assert.Throws<ArgumentNullException>("imports", () => options.WithImports((string[])null));
144Assert.Throws<ArgumentNullException>("imports[0]", () => options.WithImports([null]));
146Assert.Throws<ArgumentNullException>("imports", () => options.WithImports((IEnumerable<string>)null));
147Assert.Throws<ArgumentNullException>("imports[0]", () => options.WithImports((IEnumerable<string>)new string[] { null }));
149Assert.Throws<ArgumentNullException>("imports", () => options.WithImports(default(ImmutableArray<string>)));
150Assert.Throws<ArgumentNullException>("imports[0]", () => options.WithImports(ImmutableArray.Create((string)null)));
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (135)
Collections\ImmutableSegmentedDictionaryTest.cs (4)
150Assert.Throws<ArgumentNullException>("keySelector", () => list.ToImmutableSegmentedDictionary<int, int>(null!));
151Assert.Throws<ArgumentNullException>("keySelector", () => list.ToImmutableSegmentedDictionary<int, int, int>(null!, v => v));
152Assert.Throws<ArgumentNullException>("elementSelector", () => list.ToImmutableSegmentedDictionary<int, int, int>(k => k, null!));
263Assert.IsType<ArgumentNullException>(tie.InnerException);
Collections\ImmutableSegmentedHashSetBuilderTest.cs (11)
176Assert.Throws<ArgumentNullException>("other", () => builder.UnionWith(null!));
185Assert.Throws<ArgumentNullException>("other", () => builder.ExceptWith(null!));
194Assert.Throws<ArgumentNullException>("other", () => builder.SymmetricExceptWith(null!));
203Assert.Throws<ArgumentNullException>("other", () => builder.IntersectWith(null!));
212Assert.Throws<ArgumentNullException>("other", () => builder.IsProperSubsetOf(null!));
221Assert.Throws<ArgumentNullException>("other", () => builder.IsProperSupersetOf(null!));
230Assert.Throws<ArgumentNullException>("other", () => builder.IsSubsetOf(null!));
240Assert.Throws<ArgumentNullException>("other", () => builder.IsSupersetOf(null!));
250Assert.Throws<ArgumentNullException>("other", () => builder.Overlaps(null!));
267Assert.Throws<ArgumentNullException>("other", () => builder.SetEquals(null!));
340Assert.Throws<ArgumentNullException>("builder", () => nullBuilder!.ToImmutableSegmentedHashSet());
EmbeddedTextTests.cs (6)
25Assert.Throws<ArgumentNullException>("filePath", () => EmbeddedText.FromBytes(null, default(ArraySegment<byte>)));
27Assert.Throws<ArgumentNullException>("bytes", () => EmbeddedText.FromBytes("path", default(ArraySegment<byte>)));
34Assert.Throws<ArgumentNullException>("filePath", () => EmbeddedText.FromSource(null, null));
36Assert.Throws<ArgumentNullException>("text", () => EmbeddedText.FromSource("path", null));
49Assert.Throws<ArgumentNullException>("filePath", () => EmbeddedText.FromStream(null, null));
51Assert.Throws<ArgumentNullException>("stream", () => EmbeddedText.FromStream("path", null));
Emit\EmitBaselineTests.cs (4)
33Assert.Throws<ArgumentNullException>(() => EmitBaseline.CreateInitialBaseline(null, peModule, debugInfoProvider, localSigProvider, true));
34Assert.Throws<ArgumentNullException>(() => EmitBaseline.CreateInitialBaseline(compilation, null, debugInfoProvider, localSigProvider, true));
35Assert.Throws<ArgumentNullException>(() => EmitBaseline.CreateInitialBaseline(compilation, peModule, null, localSigProvider, true));
36Assert.Throws<ArgumentNullException>(() => EmitBaseline.CreateInitialBaseline(compilation, mdModule, debugInfoProvider, null, true));
Emit\SemanticEditTests.cs (5)
31Assert.Throws<ArgumentNullException>("oldSymbol", () => new SemanticEdit(SemanticEditKind.Update, oldSymbol: null, newSymbol: type));
32Assert.Throws<ArgumentNullException>("oldSymbol", () => new SemanticEdit(SemanticEditKind.Delete, oldSymbol: null, newSymbol: type));
34Assert.Throws<ArgumentNullException>("newSymbol", () => new SemanticEdit(SemanticEditKind.Update, oldSymbol: type, newSymbol: null));
35Assert.Throws<ArgumentNullException>("newSymbol", () => new SemanticEdit(SemanticEditKind.Insert, oldSymbol: type, newSymbol: null));
36Assert.Throws<ArgumentNullException>("newSymbol", () => new SemanticEdit(SemanticEditKind.Replace, oldSymbol: type, newSymbol: null));
ResourceDescriptionTests.cs (5)
28Assert.Throws<ArgumentNullException>(() => new ResourceDescription(null, "file", data, isPublic: true));
29Assert.Throws<ArgumentNullException>(() => new ResourceDescription("res", null, data, isPublic: true));
30Assert.Throws<ArgumentNullException>(() => new ResourceDescription("res", "file", null, isPublic: true));
31Assert.Throws<ArgumentNullException>(() => new ResourceDescription(null, data, isPublic: true));
32Assert.Throws<ArgumentNullException>(() => new ResourceDescription("res", null, isPublic: true));
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (9)
Syntax\SeparatedSyntaxListTests.vb (9)
146Assert.Throws(Of ArgumentNullException)(Function() list.Add(Nothing))
147Assert.Throws(Of ArgumentNullException)(Function() list.AddRange(DirectCast(Nothing, IEnumerable(Of SyntaxNode))))
148Assert.Throws(Of ArgumentNullException)(Function() list.Insert(0, Nothing))
149Assert.Throws(Of ArgumentNullException)(Function() list.InsertRange(0, DirectCast(Nothing, IEnumerable(Of SyntaxNode))))
150Assert.Throws(Of ArgumentNullException)(Function() list.ReplaceRange(elementA, DirectCast(Nothing, IEnumerable(Of SyntaxNode))))
192Assert.Throws(Of ArgumentNullException)(Function() list.Add(Nothing))
193Assert.Throws(Of ArgumentNullException)(Function() list.AddRange(DirectCast(Nothing, IEnumerable(Of SyntaxNode))))
194Assert.Throws(Of ArgumentNullException)(Function() list.Insert(0, Nothing))
195Assert.Throws(Of ArgumentNullException)(Function() list.InsertRange(0, DirectCast(Nothing, IEnumerable(Of SyntaxNode))))
Microsoft.CodeAnalysis.Workspaces (71)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (5)
Microsoft.CodeAnalysis.Workspaces.UnitTests (149)
Options\OptionKeyTests.cs (12)
23Assert.Throws<ArgumentNullException>(() => new Option<bool>("Test Feature", null!, false));
24Assert.Throws<ArgumentNullException>(() => new Option<bool>(null!, "Test Name", false));
25Assert.Throws<ArgumentNullException>(() => new Option<bool>("X", "Test Name", false, storageLocations: null!));
26Assert.Throws<ArgumentNullException>(() => new Option<bool>("X", "Test Name", false, storageLocations: [null!]));
32Assert.Throws<ArgumentNullException>(() => new PerLanguageOption<bool>("Test Feature", null!, false));
33Assert.Throws<ArgumentNullException>(() => new PerLanguageOption<bool>(null!, "Test Name", false));
34Assert.Throws<ArgumentNullException>(() => new PerLanguageOption<bool>("X", "Test Name", false, storageLocations: null!));
35Assert.Throws<ArgumentNullException>(() => new PerLanguageOption<bool>("X", "Test Name", false, storageLocations: [null!]));
70Assert.Throws<ArgumentNullException>(() => new OptionKey(null!));
71Assert.Throws<ArgumentNullException>(() => new OptionKey(null!, null!));
72Assert.Throws<ArgumentNullException>(() => new OptionKey(null!, "lang"));
73Assert.Throws<ArgumentNullException>(() => new OptionKey(new TestOption() { IsPerLanguage = true }));
Simplifier\SimplifierTests.cs (15)
38await Assert.ThrowsAsync<ArgumentNullException>("node", () => Simplifier.ExpandAsync<SyntaxNode>(node: null!, document: null!));
39await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ExpandAsync(node: node, document: null!));
40await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ExpandAsync(token: default, document: null!));
49Assert.Throws<ArgumentNullException>("node", () => Simplifier.Expand<SyntaxNode>(node: null!, semanticModel: null!, services: null!));
50Assert.Throws<ArgumentNullException>("semanticModel", () => Simplifier.Expand(node, semanticModel: null!, services: null!));
51Assert.Throws<ArgumentNullException>("services", () => Simplifier.Expand(node, semanticModel, services: null!));
52Assert.Throws<ArgumentNullException>("workspace", () => Simplifier.Expand(node, semanticModel, workspace: null!));
53Assert.Throws<ArgumentNullException>("workspace", () => Simplifier.Expand(token: default, semanticModel: null!, workspace: null!));
54Assert.Throws<ArgumentNullException>("workspace", () => Simplifier.Expand(token: default, semanticModel, workspace: null!));
63await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ReduceAsync(document: null!));
64await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ReduceAsync(document: null!, annotation: null!));
65await Assert.ThrowsAsync<ArgumentNullException>("annotation", () => Simplifier.ReduceAsync(document, annotation: null!));
66await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ReduceAsync(document: null!, span: default));
67await Assert.ThrowsAsync<ArgumentNullException>("document", () => Simplifier.ReduceAsync(document: null!, spans: null!));
68await Assert.ThrowsAsync<ArgumentNullException>("spans", () => Simplifier.ReduceAsync(document, spans: null!));
SolutionTests\ProjectInfoTests.cs (9)
25Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(id: null, version: VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#"));
26Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: null, assemblyName: "Bar", language: "C#"));
27Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: null, language: "C#"));
28Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: null));
30Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
43Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
49Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
56Assert.Throws<ArgumentNullException>("analyzerReferences[0]", () => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
63Assert.Throws<ArgumentNullException>(() => ProjectInfo.Create(pid, VersionStamp.Default, name: "Goo", assemblyName: "Bar", language: "C#",
SolutionTests\SolutionTests.cs (83)
118Assert.Throws<ArgumentNullException>(() => solution.RemoveDocument(null!));
127Assert.Throws<ArgumentNullException>(() => solution.RemoveDocuments(default));
129Assert.Throws<ArgumentNullException>(() => solution.RemoveDocuments(ImmutableArray.Create((DocumentId)null!)));
137Assert.Throws<ArgumentNullException>(() => solution.RemoveAdditionalDocument(null!));
146Assert.Throws<ArgumentNullException>(() => solution.RemoveAdditionalDocuments(default));
148Assert.Throws<ArgumentNullException>(() => solution.RemoveAdditionalDocuments(ImmutableArray.Create((DocumentId)null!)));
156Assert.Throws<ArgumentNullException>(() => solution.RemoveAnalyzerConfigDocument(null!));
165Assert.Throws<ArgumentNullException>(() => solution.RemoveAnalyzerConfigDocuments(default));
167Assert.Throws<ArgumentNullException>(() => solution.RemoveAnalyzerConfigDocuments(ImmutableArray.Create((DocumentId)null!)));
184Assert.Throws<ArgumentNullException>(() => solution.WithDocumentName(documentId, name: null!));
186Assert.Throws<ArgumentNullException>(() => solution.WithDocumentName(null!, name));
214Assert.Throws<ArgumentNullException>(() => solution.WithDocumentFolders(documentId, folders: [null!]));
216Assert.Throws<ArgumentNullException>(() => solution.WithDocumentFolders(null!, folders));
244Assert.Throws<ArgumentNullException>(() => solution.WithDocumentFilePath(null!, path));
262Assert.Throws<ArgumentNullException>(() => solution.WithDocumentSourceCodeKind(null!, SourceCodeKind.Script));
321Assert.Throws<ArgumentNullException>(() => solution.WithDocumentSyntaxRoot(null!, root));
361Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity));
364Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText((DocumentId)null!, text, PreservationMode.PreserveIdentity));
385Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity));
388Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText((DocumentId)null!, textAndVersion, PreservationMode.PreserveIdentity));
411Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText((DocumentId[])null!, text, PreservationMode.PreserveIdentity));
412Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText([documentId], null!, PreservationMode.PreserveIdentity));
929Assert.Throws<ArgumentNullException>(() => solution.WithAdditionalDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity));
932Assert.Throws<ArgumentNullException>(() => solution.WithAdditionalDocumentText((DocumentId)null!, text, PreservationMode.PreserveIdentity));
953Assert.Throws<ArgumentNullException>(() => solution.WithAdditionalDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity));
956Assert.Throws<ArgumentNullException>(() => solution.WithAdditionalDocumentText((DocumentId)null!, textAndVersion, PreservationMode.PreserveIdentity));
975Assert.Throws<ArgumentNullException>(() => solution.WithAnalyzerConfigDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity));
978Assert.Throws<ArgumentNullException>(() => solution.WithAnalyzerConfigDocumentText((DocumentId)null!, text, PreservationMode.PreserveIdentity));
999Assert.Throws<ArgumentNullException>(() => solution.WithAnalyzerConfigDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity));
1002Assert.Throws<ArgumentNullException>(() => solution.WithAnalyzerConfigDocumentText((DocumentId)null!, textAndVersion, PreservationMode.PreserveIdentity));
1021Assert.Throws<ArgumentNullException>(() => solution.WithDocumentTextLoader(documentId, null!, PreservationMode.PreserveIdentity));
1024Assert.Throws<ArgumentNullException>(() => solution.WithDocumentTextLoader(null!, loader, PreservationMode.PreserveIdentity));
1043Assert.Throws<ArgumentNullException>(() => solution.WithAdditionalDocumentTextLoader(documentId, null!, PreservationMode.PreserveIdentity));
1046Assert.Throws<ArgumentNullException>(() => solution.WithAdditionalDocumentTextLoader(null!, loader, PreservationMode.PreserveIdentity));
1065Assert.Throws<ArgumentNullException>(() => solution.WithAnalyzerConfigDocumentTextLoader(documentId, null!, PreservationMode.PreserveIdentity));
1068Assert.Throws<ArgumentNullException>(() => solution.WithAnalyzerConfigDocumentTextLoader(null!, loader, PreservationMode.PreserveIdentity));
1449Assert.Throws<ArgumentNullException>("assemblyName", () => solution.WithProjectAssemblyName(projectId, null!));
1450Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectAssemblyName(null!, "x.dll"));
1473Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectOutputFilePath(null!, "x.dll"));
1474Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectOutputFilePath(null!, "x.dll"));
1528Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectOutputRefFilePath(null!, "x.dll"));
1551Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectCompilationOutputInfo(null!, info));
1574Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectDefaultNamespace(null!, "x"));
1688Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectName(null!, "x"));
1711Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectFilePath(null!, "x"));
1726Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectCompilationOptions(null!, options));
1727Assert.Throws<ArgumentNullException>("options", () => solution.WithProjectCompilationOptions(projectId, options: null!));
1775Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectParseOptions(null!, options));
1776Assert.Throws<ArgumentNullException>("options", () => solution.WithProjectParseOptions(projectId, options: null!));
1934Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectReferences(null!, [projectRef]));
1986Assert.Throws<ArgumentNullException>("projectId", () => solution.AddProjectReferences(null!, [projectRef2]));
1987Assert.Throws<ArgumentNullException>("projectReferences", () => solution.AddProjectReferences(projectId, null!));
1988Assert.Throws<ArgumentNullException>("projectReferences[0]", () => solution.AddProjectReferences(projectId, [null!]));
2025Assert.Throws<ArgumentNullException>("projectId", () => solution.RemoveProjectReference(null!, projectRef2));
2026Assert.Throws<ArgumentNullException>("projectReference", () => solution.RemoveProjectReference(projectId, null!));
2085Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectMetadataReferences(null!, [metadataRef]));
2105Assert.Throws<ArgumentNullException>("projectId", () => solution.AddMetadataReferences(null!, [metadataRef1]));
2106Assert.Throws<ArgumentNullException>("metadataReferences", () => solution.AddMetadataReferences(projectId, null!));
2107Assert.Throws<ArgumentNullException>("metadataReferences[0]", () => solution.AddMetadataReferences(projectId, [null!]));
2131Assert.Throws<ArgumentNullException>("projectId", () => solution.RemoveMetadataReference(null!, metadataRef1));
2132Assert.Throws<ArgumentNullException>("metadataReference", () => solution.RemoveMetadataReference(projectId, null!));
2155Assert.Throws<ArgumentNullException>("projectId", () => solution.WithProjectAnalyzerReferences(null!, [analyzerRef]));
2178Assert.Throws<ArgumentNullException>("projectId", () => solution.AddAnalyzerReferences(null!, [analyzerRef1]));
2179Assert.Throws<ArgumentNullException>("analyzerReferences", () => solution.AddAnalyzerReferences(projectId, null!));
2180Assert.Throws<ArgumentNullException>("analyzerReferences[0]", () => solution.AddAnalyzerReferences(projectId, [null!]));
2204Assert.Throws<ArgumentNullException>("projectId", () => solution.RemoveAnalyzerReference(null!, analyzerRef1));
2205Assert.Throws<ArgumentNullException>("analyzerReference", () => solution.RemoveAnalyzerReference(projectId, null!));
2246Assert.Throws<ArgumentNullException>("analyzerReferences", () => solution.AddAnalyzerReferences(null!));
2247Assert.Throws<ArgumentNullException>("analyzerReferences[0]", () => solution.AddAnalyzerReferences([null!]));
2270Assert.Throws<ArgumentNullException>("analyzerReference", () => solution.RemoveAnalyzerReference(null!));
2375Assert.Throws<ArgumentNullException>("documentId", () => solution.AddDocument(documentId: null!, "name", loader));
2376Assert.Throws<ArgumentNullException>("name", () => solution.AddDocument(documentId, name: null!, loader));
2377Assert.Throws<ArgumentNullException>("loader", () => solution.AddDocument(documentId, "name", loader: null!));
2406Assert.Throws<ArgumentNullException>("documentId", () => solution.AddDocument(documentId: null!, "name", "text"));
2407Assert.Throws<ArgumentNullException>("name", () => solution.AddDocument(documentId, name: null!, "text"));
2408Assert.Throws<ArgumentNullException>("text", () => solution.AddDocument(documentId, "name", text: (string)null!));
2434Assert.Throws<ArgumentNullException>("documentId", () => solution.AddDocument(documentId: null!, "name", sourceText));
2435Assert.Throws<ArgumentNullException>("name", () => solution.AddDocument(documentId, name: null!, sourceText));
2436Assert.Throws<ArgumentNullException>("text", () => solution.AddDocument(documentId, "name", text: (SourceText)null!));
2463Assert.Throws<ArgumentNullException>("documentId", () => solution.AddDocument(documentId: null!, "name", root));
2464Assert.Throws<ArgumentNullException>("name", () => solution.AddDocument(documentId, name: null!, root));
2465Assert.Throws<ArgumentNullException>("syntaxRoot", () => solution.AddDocument(documentId, "name", syntaxRoot: null!));
4680Assert.Throws<ArgumentNullException>(() => solution = solution.WithProjectDocumentsOrder(pid, null));
UtilityTest\SpecializedTasksTests.cs (3)
29Assert.Throws<ArgumentNullException>(() => SpecializedTasks.WhenAll<int>((IEnumerable<ValueTask<int>>)null!));
81Assert.Throws<ArgumentNullException>("func", () => SpecializedTasks.TransformWithoutIntermediateCancellationExceptionAsync(null!, transform, arg, cancellationToken));
82Assert.Throws<ArgumentNullException>("transform", () => SpecializedTasks.TransformWithoutIntermediateCancellationExceptionAsync<StateType, IntermediateType, ResultType>(func, null!, arg, cancellationToken));
Microsoft.CSharp (1)
Microsoft.DotNet.Build.Tasks.Feed (1)
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
Microsoft.DotNet.Build.Tasks.Workloads (1)
Microsoft.DotNet.Internal.SymbolHelper (9)
Microsoft.DotNet.NuGetRepack.Tests (1)
Microsoft.DotNet.XUnitAssert.Tests (84)
AsyncCollectionAssertsTests.cs (22)
21 Assert.Throws<ArgumentNullException>("collection", () => Assert.All(default(IAsyncEnumerable<object>)!, _ => { }));
22 Assert.Throws<ArgumentNullException>("action", () => Assert.All(new object[0].ToAsyncEnumerable(), (Action<object>)null!));
23 Assert.Throws<ArgumentNullException>("action", () => Assert.All(new object[0].ToAsyncEnumerable(), (Action<object, int>)null!));
73 await Assert.ThrowsAsync<ArgumentNullException>("collection", () => Assert.AllAsync(default(IAsyncEnumerable<object>)!, async _ => await Task.Yield()));
74 await Assert.ThrowsAsync<ArgumentNullException>("action", () => Assert.AllAsync(new object[0].ToAsyncEnumerable(), (Func<object, Task>)null!));
75 await Assert.ThrowsAsync<ArgumentNullException>("action", () => Assert.AllAsync(new object[0].ToAsyncEnumerable(), (Func<object, int, Task>)null!));
283 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(14, default(IAsyncEnumerable<int>)!));
334 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(14, default(IAsyncEnumerable<int>)!, comparer));
335 Assert.Throws<ArgumentNullException>("comparer", () => Assert.Contains(14, new int[0].ToAsyncEnumerable(), null!));
359 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(default(IAsyncEnumerable<int>)!, item => true));
360 Assert.Throws<ArgumentNullException>("filter", () => Assert.Contains(new int[0].ToAsyncEnumerable(), (Predicate<int>)null!));
392 Assert.Throws<ArgumentNullException>("collection", () => Assert.Distinct(default(IAsyncEnumerable<int>)!));
393 Assert.Throws<ArgumentNullException>("comparer", () => Assert.Distinct(new object[0].ToAsyncEnumerable(), null!));
467 Assert.Throws<ArgumentNullException>("collection", () => Assert.DoesNotContain(14, default(IAsyncEnumerable<int>)!));
519 Assert.Throws<ArgumentNullException>("collection", () => Assert.DoesNotContain(14, default(IAsyncEnumerable<int>)!, comparer));
520 Assert.Throws<ArgumentNullException>("comparer", () => Assert.DoesNotContain(14, new int[0].ToAsyncEnumerable(), null!));
544 Assert.Throws<ArgumentNullException>("collection", () => Assert.DoesNotContain(default(IAsyncEnumerable<int>)!, item => true));
545 Assert.Throws<ArgumentNullException>("filter", () => Assert.DoesNotContain(new int[0].ToAsyncEnumerable(), (Predicate<int>)null!));
578 Assert.Throws<ArgumentNullException>("collection", () => Assert.Empty(default(IAsyncEnumerable<int>)!));
1384 Assert.Throws<ArgumentNullException>("collection", () => Assert.Single(default(IAsyncEnumerable<object>)!));
1469 Assert.Throws<ArgumentNullException>("collection", () => Assert.Single(default(IAsyncEnumerable<object>)!, _ => true));
1470 Assert.Throws<ArgumentNullException>("predicate", () => Assert.Single(new object[0].ToAsyncEnumerable(), null!));
CollectionAssertsTests.cs (24)
19 Assert.Throws<ArgumentNullException>("collection", () => Assert.All(default(IEnumerable<object>)!, _ => { }));
20 Assert.Throws<ArgumentNullException>("action", () => Assert.All(new object[0], (Action<object>)null!));
21 Assert.Throws<ArgumentNullException>("action", () => Assert.All(new object[0], (Action<object, int>)null!));
71 await Assert.ThrowsAsync<ArgumentNullException>("collection", () => Assert.AllAsync(default(IEnumerable<object>)!, async _ => await Task.Yield()));
72 await Assert.ThrowsAsync<ArgumentNullException>("action", () => Assert.AllAsync(new object[0], (Func<object, Task>)null!));
73 await Assert.ThrowsAsync<ArgumentNullException>("action", () => Assert.AllAsync(new object[0], (Func<object, int, Task>)null!));
283 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(14, default(IEnumerable<int>)!));
352 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(14, default(IEnumerable<int>)!, comparer));
353 Assert.Throws<ArgumentNullException>("comparer", () => Assert.Contains(14, new int[0], null!));
393 Assert.Throws<ArgumentNullException>("collection", () => Assert.Contains(default(IEnumerable<int>)!, item => true));
394 Assert.Throws<ArgumentNullException>("filter", () => Assert.Contains(new int[0], (Predicate<int>)null!));
426 Assert.Throws<ArgumentNullException>("collection", () => Assert.Distinct(default(IEnumerable<int>)!));
427 Assert.Throws<ArgumentNullException>("comparer", () => Assert.Distinct(new object[0], null!));
501 Assert.Throws<ArgumentNullException>("collection", () => Assert.DoesNotContain(14, default(IEnumerable<int>)!));
589 Assert.Throws<ArgumentNullException>("collection", () => Assert.DoesNotContain(14, default(IEnumerable<int>)!, comparer));
590 Assert.Throws<ArgumentNullException>("comparer", () => Assert.DoesNotContain(14, new int[0], null!));
622 Assert.Throws<ArgumentNullException>("collection", () => Assert.DoesNotContain(default(IEnumerable<int>)!, item => true));
623 Assert.Throws<ArgumentNullException>("filter", () => Assert.DoesNotContain(new int[0], (Predicate<int>)null!));
656 Assert.Throws<ArgumentNullException>("collection", () => Assert.Empty(default(IEnumerable)!));
2281 Assert.Throws<ArgumentNullException>("collection", () => Assert.Single(null!));
2341 Assert.Throws<ArgumentNullException>("collection", () => Assert.Single(null!, null));
2416 Assert.Throws<ArgumentNullException>("collection", () => Assert.Single(default(IEnumerable<object>)!));
2501 Assert.Throws<ArgumentNullException>("collection", () => Assert.Single(default(IEnumerable<object>)!, _ => true));
2502 Assert.Throws<ArgumentNullException>("predicate", () => Assert.Single(new object[0], null!));
EqualityAssertsTests.cs (4)
66 Assert.Throws<ArgumentNullException>("comparer", () => Assert.Equal(1, 2, default(IEqualityComparer<int>)!));
155 Assert.Throws<ArgumentNullException>("comparer", () => Assert.Equal(1, 2, default(Func<int, int, bool>)!));
2350 Assert.Throws<ArgumentNullException>("comparer", () => Assert.NotEqual(1, 2, default(IEqualityComparer<int>)!));
2462 Assert.Throws<ArgumentNullException>("comparer", () => Assert.NotEqual(1, 2, default(Func<int, int, bool>)!));
ExceptionAssertsTests.cs (21)
18 Assert.Throws<ArgumentNullException>("exceptionType", () => Assert.Throws(null!, testCode));
19 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws(typeof(Exception), default(Action)!));
67 var thrown = new ArgumentNullException();
90 Assert.Throws<ArgumentNullException>("exceptionType", () => Assert.Throws(null!, testCode));
91 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws(typeof(Exception), default(Func<object>)!));
150 var thrown = new ArgumentNullException();
175 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Action)!));
223 var thrown = new ArgumentNullException();
244 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Func<object>)!));
303 var thrown = new ArgumentNullException();
327 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Action)!));
392 var thrown = new ArgumentNullException();
413 Assert.Throws<ArgumentNullException>("testCode", () => Assert.Throws<ArgumentException>(default(Func<object>)!));
478 var thrown = new ArgumentNullException();
502 Assert.Throws<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Action)!));
561 Assert.Throws<ArgumentNullException>("testCode", () => Assert.ThrowsAny<ArgumentException>(default(Func<object>)!));
632 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.ThrowsAnyAsync<ArgumentException>(default(Func<Task>)!));
691 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.ThrowsAsync<ArgumentException>(default(Func<Task>)!));
739 var thrown = new ArgumentNullException();
760 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.ThrowsAsync<ArgumentException>("paramName", default(Func<Task>)!));
825 var thrown = new ArgumentNullException();
PropertyAssertsTests.cs (4)
15 Assert.Throws<ArgumentNullException>("object", () => Assert.PropertyChanged(null!, "propertyName", delegate { }));
16 Assert.Throws<ArgumentNullException>("testCode", () => Assert.PropertyChanged(Substitute.For<INotifyPropertyChanged>(), "propertyName", (Action)null!));
68 await Assert.ThrowsAsync<ArgumentNullException>("object", () => Assert.PropertyChangedAsync(null!, "propertyName", () => Task.FromResult(0)));
69 await Assert.ThrowsAsync<ArgumentNullException>("testCode", () => Assert.PropertyChangedAsync(Substitute.For<INotifyPropertyChanged>(), "propertyName", default(Func<Task>)!));
StringAssertsTests.cs (5)
343 Assert.Throws<ArgumentNullException>("expectedRegexPattern", () => Assert.DoesNotMatch((string?)null!, "Hello, world!"));
373 Assert.Throws<ArgumentNullException>("expectedRegex", () => Assert.DoesNotMatch((Regex?)null!, "Hello, world!"));
403 Assert.Throws<ArgumentNullException>("value", () => Assert.Empty(default(string)!));
741 Assert.Throws<ArgumentNullException>("expectedRegexPattern", () => Assert.Matches((string?)null!, "Hello, world!"));
784 Assert.Throws<ArgumentNullException>("expectedRegex", () => Assert.Matches((Regex?)null!, "Hello, world!"));
Microsoft.Extensions.AI (17)
Microsoft.Extensions.AI.Abstractions (20)
Microsoft.Extensions.AI.Abstractions.Tests (43)
Contents\FunctionCallContentTests..cs (4)
334Assert.Throws<ArgumentNullException>("encodedArguments", () => FunctionCallContent.CreateFromParsedArguments((string)null!, "callId", "functionName", _ => null));
335Assert.Throws<ArgumentNullException>("callId", () => FunctionCallContent.CreateFromParsedArguments("{}", null!, "functionName", _ => null));
336Assert.Throws<ArgumentNullException>("name", () => FunctionCallContent.CreateFromParsedArguments("{}", "callId", null!, _ => null));
337Assert.Throws<ArgumentNullException>("argumentParser", () => FunctionCallContent.CreateFromParsedArguments("{}", "callId", "functionName", null!));
Microsoft.Extensions.AI.AzureAIInference (7)
Microsoft.Extensions.AI.AzureAIInference.Tests (5)
Microsoft.Extensions.AI.Integration.Tests (7)
Microsoft.Extensions.AI.Ollama (7)
Microsoft.Extensions.AI.Ollama.Tests (3)
Microsoft.Extensions.AI.OpenAI (9)
Microsoft.Extensions.AI.OpenAI.Tests (21)
Microsoft.Extensions.AI.Tests (31)
ChatCompletion\UseDelegateChatClientTests.cs (6)
21Assert.Throws<ArgumentNullException>("sharedFunc", () =>
24Assert.Throws<ArgumentNullException>("completeFunc", () => builder.Use(null!, null!));
26Assert.Throws<ArgumentNullException>("innerClient", () => new AnonymousDelegatingChatClient(null!, delegate { return Task.CompletedTask; }));
27Assert.Throws<ArgumentNullException>("sharedFunc", () => new AnonymousDelegatingChatClient(client, null!));
29Assert.Throws<ArgumentNullException>("innerClient", () => new AnonymousDelegatingChatClient(null!, null!, null!));
30Assert.Throws<ArgumentNullException>("completeFunc", () => new AnonymousDelegatingChatClient(client, null!, null!));
Microsoft.Extensions.AmbientMetadata.Application (12)
Microsoft.Extensions.AmbientMetadata.Application.Tests (8)
Microsoft.Extensions.AsyncState (8)
Microsoft.Extensions.AsyncState.Tests (1)
Microsoft.Extensions.Caching.Abstractions (7)
Microsoft.Extensions.Caching.Hybrid (7)
Microsoft.Extensions.Caching.Memory (1)
Microsoft.Extensions.Caching.SqlServer (3)
Microsoft.Extensions.Caching.StackExchangeRedis (2)
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
Microsoft.Extensions.Compliance.Abstractions (13)
Microsoft.Extensions.Compliance.Abstractions.Tests (2)
Microsoft.Extensions.Compliance.Redaction (12)
Microsoft.Extensions.Compliance.Redaction.Tests (2)
Microsoft.Extensions.Compliance.Testing (13)
Microsoft.Extensions.Compliance.Testing.Tests (8)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Configuration.Abstractions (1)
Microsoft.Extensions.Configuration.Binder (1)
Microsoft.Extensions.Configuration.CommandLine (1)
Microsoft.Extensions.Configuration.FileExtensions (1)
Microsoft.Extensions.Configuration.Ini (1)
Microsoft.Extensions.Configuration.Json (1)
Microsoft.Extensions.Configuration.UserSecrets (1)
Microsoft.Extensions.Configuration.Xml (1)
Microsoft.Extensions.DependencyInjection.Abstractions (1)
Microsoft.Extensions.DependencyInjection.AutoActivation (7)
Microsoft.Extensions.DependencyModel (2)
Microsoft.Extensions.Diagnostics (1)
Microsoft.Extensions.Diagnostics.Abstractions (1)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (10)
Microsoft.Extensions.Diagnostics.HealthChecks (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
Microsoft.Extensions.Diagnostics.HealthChecks.Common (15)
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (4)
Microsoft.Extensions.Diagnostics.Probes (7)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (11)
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (5)
Microsoft.Extensions.Diagnostics.Testing (7)
Microsoft.Extensions.Diagnostics.Testing.Tests (6)
Microsoft.Extensions.Features (2)
Microsoft.Extensions.FileProviders.Composite (1)
Microsoft.Extensions.FileProviders.Embedded (4)
Microsoft.Extensions.FileProviders.Embedded.Tests (1)
Microsoft.Extensions.FileProviders.Physical (2)
Microsoft.Extensions.FileSystemGlobbing (1)
Microsoft.Extensions.Hosting (3)
Microsoft.Extensions.Hosting.Abstractions (1)
Microsoft.Extensions.Hosting.Systemd (1)
Microsoft.Extensions.Hosting.Testing (7)
Microsoft.Extensions.Hosting.Testing.Tests (6)
Microsoft.Extensions.Hosting.WindowsServices (1)
Microsoft.Extensions.Http (6)
Microsoft.Extensions.Http.Diagnostics (6)
Microsoft.Extensions.Http.Diagnostics.Tests (18)
Microsoft.Extensions.Http.Resilience (13)
Microsoft.Extensions.Http.Resilience.Tests (16)
Microsoft.Extensions.Identity.Core (1)
Microsoft.Extensions.Identity.Stores (1)
Microsoft.Extensions.Localization (4)
Microsoft.Extensions.Localization.Abstractions (2)
Microsoft.Extensions.Localization.Tests (7)
Microsoft.Extensions.Logging (1)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.AzureAppServices (3)
Microsoft.Extensions.Logging.Configuration (1)
Microsoft.Extensions.Logging.Console (1)
Microsoft.Extensions.Logging.Debug (1)
Microsoft.Extensions.Logging.EventLog (1)
Microsoft.Extensions.Logging.EventSource (1)
Microsoft.Extensions.Logging.TraceSource (1)
Microsoft.Extensions.ObjectPool (2)
Microsoft.Extensions.ObjectPool.DependencyInjection (9)
Microsoft.Extensions.ObjectPool.DependencyInjection.Tests (3)
Microsoft.Extensions.Options (1)
Microsoft.Extensions.Options.ConfigurationExtensions (2)
Microsoft.Extensions.Options.Contextual (7)
Microsoft.Extensions.Options.Contextual.Tests (1)
Microsoft.Extensions.Options.DataAnnotations (1)
Microsoft.Extensions.Primitives (6)
Microsoft.Extensions.Resilience (10)
Microsoft.Extensions.ServiceDiscovery (3)
Microsoft.Extensions.ServiceDiscovery.Abstractions (1)
Microsoft.Extensions.ServiceDiscovery.Dns (6)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (12)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
Microsoft.Extensions.ServiceDiscovery.Yarp (3)
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (6)
Microsoft.Extensions.Telemetry (16)
Microsoft.Extensions.Telemetry.Abstractions (27)
Microsoft.Extensions.Telemetry.Abstractions.Tests (13)
Microsoft.Extensions.Telemetry.Tests (18)
Microsoft.Extensions.TimeProvider.Testing (7)
Microsoft.Extensions.WebEncoders (2)
Microsoft.Gen.Metrics.Generated.Tests (8)
Microsoft.JSInterop (16)
Microsoft.Maui (15)
Microsoft.Maui.Controls (35)
Microsoft.Maui.Controls.Maps (1)
Microsoft.Maui.Essentials (18)
Microsoft.ML.AutoML.Tests (4)
Microsoft.ML.Core (5)
Microsoft.ML.Data (2)
Microsoft.ML.Parquet (1)
Microsoft.ML.Predictor.Tests (3)
Microsoft.ML.Tests (2)
Microsoft.ML.Tokenizers (11)
Microsoft.ML.Tokenizers.Tests (2)
Microsoft.Net.Http.Headers (6)
Microsoft.Net.Http.Headers.Tests (6)
Microsoft.VisualBasic.Core (5)
Microsoft.VisualBasic.IntegrationTests (1)
Microsoft.VisualBasic.Tests (16)
Microsoft.VisualStudio.LanguageServices (1)
Microsoft.Web.Xdt.Extensions (3)
MSBuild (4)
MSBuildTaskHost (2)
mscorlib (1)
Mvc.RoutingWebSite (1)
netstandard (1)
PresentationBuildTasks (4)
PresentationCore (1011)
PresentationCore.Tests (6)
PresentationFramework (1328)
PresentationFramework.Aero (2)
PresentationFramework.Aero2 (2)
PresentationFramework.AeroLite (2)
PresentationFramework.Luna (2)
PresentationFramework.Royale (2)
PresentationUI (62)
ReachFramework (196)
RoutingSandbox (4)
RoutingWebSite (2)
Shared (15)
Shared.Tests (24)
Throw\ThrowTest.cs (17)
64var exception = Assert.Throws<ArgumentNullException>(() => Throw.ArgumentNullException(paramName));
73var exception = Assert.Throws<ArgumentNullException>(() => Throw.ArgumentNullException(paramName, message));
116var exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNull<string>(null!, "paramName"));
123var exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNull<int?>(null!, "paramName"));
224var exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrWhitespace(null!, "paramName"));
246var exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty(null, "paramName"));
322ArgumentException exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((ICollection<int>?)null, "foo"));
325exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((IReadOnlyCollection<int>?)null, "foo"));
328exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((List<int>?)null, "foo"));
331exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((Queue<int>?)null, "foo"));
334exception = Assert.Throws<ArgumentNullException>(() => Throw.IfNullOrEmpty((IEnumerable<int>?)null, "foo"));
System.CodeDom (3)
System.Collections (83)
System.Collections.Concurrent (93)
System.Collections.Immutable (17)
System.Collections.NonGeneric (18)
System.Collections.Specialized (26)
System.ComponentModel.Annotations (39)
System.ComponentModel.Composition (212)
System.ComponentModel.EventBasedAsync (1)
System.ComponentModel.Primitives (17)
System.ComponentModel.TypeConverter (165)
System.Console (10)
System.Data.Common (53)
System.Data.Odbc (5)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.Process (5)
System.Diagnostics.TextWriterTraceListener (2)
System.Diagnostics.TraceSource (11)
System.Drawing.Common.Tests (286)
mono\System.Drawing\GraphicsTests.cs (36)
1087Assert.Throws<ArgumentNullException>(() => g.EndContainer(null));
1143Assert.Throws<ArgumentNullException>(() => g.FillRectangles(null, new Rectangle[1]));
1151Assert.Throws<ArgumentNullException>(() => g.FillRectangles(Brushes.Red, (Rectangle[])null));
1167Assert.Throws<ArgumentNullException>(() => g.FillRectangles(null, new RectangleF[1]));
1175Assert.Throws<ArgumentNullException>(() => g.FillRectangles(Brushes.Red, (RectangleF[])null));
1596Assert.Throws<ArgumentNullException>(() => g.MeasureString("a", null));
1597Assert.Throws<ArgumentNullException>(() => g.MeasureString("a".AsSpan(), null));
1884Assert.Throws<ArgumentNullException>(() => g.MeasureCharacterRanges("a", null, default, null));
1885Assert.Throws<ArgumentNullException>(() => g.MeasureCharacterRanges("a".AsSpan(), null, default, null));
2337Assert.Throws<ArgumentNullException>(() => g.DrawIcon(null, new Rectangle(0, 0, 32, 32)));
2361Assert.Throws<ArgumentNullException>(() => g.DrawIcon(null, 4, 2));
2378Assert.Throws<ArgumentNullException>(() => g.DrawIconUnstretched(null, new Rectangle(0, 0, 40, 20)));
2402Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, new RectangleF(0, 0, 0, 0)));
2421Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, new PointF(0, 0)));
2437Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, Array.Empty<PointF>()));
2445Assert.Throws<ArgumentNullException>(() => g.DrawImage(bmp, (PointF[])null));
2472Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, new Rectangle(0, 0, 0, 0)));
2495Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, new Point(0, 0)));
2511Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, Array.Empty<Point>()));
2519Assert.Throws<ArgumentNullException>(() => g.DrawImage(bmp, (Point[])null));
2543Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, int.MaxValue, int.MinValue));
2567Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, float.MaxValue, float.MinValue));
2591Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, default(Rectangle), default, GraphicsUnit.Display));
2628Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, pts, r, GraphicsUnit.Pixel));
2642Assert.Throws<ArgumentNullException>(() => DrawImage_ImagePointRectangleGraphicsUnit(null));
2686Assert.Throws<ArgumentNullException>(() => g.DrawImage(null, pts, r, GraphicsUnit.Pixel));
2700Assert.Throws<ArgumentNullException>(() => DrawImage_ImagePointFRectangleGraphicsUnit(null));
2765Assert.Throws<ArgumentNullException>(() => g.DrawImageUnscaled(null, new Point(0, 0)));
2781Assert.Throws<ArgumentNullException>(() => g.DrawImageUnscaled(null, new Rectangle(0, 0, -1, -1)));
2797Assert.Throws<ArgumentNullException>(() => g.DrawImageUnscaled(null, 0, 0));
2813Assert.Throws<ArgumentNullException>(() => g.DrawImageUnscaled(null, 0, 0, -1, -1));
2829Assert.Throws<ArgumentNullException>(() => g.DrawImageUnscaledAndClipped(null, new Rectangle(0, 0, 0, 0)));
2857Assert.Throws<ArgumentNullException>(() => g.DrawPath(null, path));
2865Assert.Throws<ArgumentNullException>(() => g.DrawPath(Pens.Black, null));
2899Assert.Throws<ArgumentNullException>(() => g.FillPath(null, path));
2907Assert.Throws<ArgumentNullException>(() => g.FillPath(Brushes.Black, null));
System\Drawing\BitmapTests.cs (11)
69AssertExtensions.Throws<ArgumentNullException>("path", () => new Bitmap((string)null));
70AssertExtensions.Throws<ArgumentNullException>("path", () => new Bitmap((string)null, false));
97AssertExtensions.Throws<ArgumentNullException, NullReferenceException>("type", () => new Bitmap(null, "name"));
113AssertExtensions.Throws<ArgumentNullException, ArgumentException>("resource", null, () => new Bitmap(typeof(Bitmap), null));
146AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Bitmap((Stream)null));
147AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Bitmap((Stream)null, false));
297AssertExtensions.Throws<ArgumentNullException>("g", null, () => new Bitmap(1, 1, null));
342AssertExtensions.Throws<ArgumentNullException>("original", "image", () => new Bitmap(null, new Size(1, 2)));
343AssertExtensions.Throws<ArgumentNullException>("original", "image", () => new Bitmap(null, 1, 2));
1095AssertExtensions.Throws<ArgumentNullException>("bitmapData", () => bitmap.LockBits(Rectangle.Empty, ImageLockMode.ReadOnly, PixelFormat.Format24bppRgb, null));
1235AssertExtensions.Throws<ArgumentNullException>("bitmapdata", () => bitmap.UnlockBits(null));
System\Drawing\Drawing2D\GraphicsPathTests.cs (26)
82AssertExtensions.Throws<ArgumentNullException>("pts", () => new GraphicsPath((Point[])null, new byte[1]));
316AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddLines((Point[])null));
317AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddLines((PointF[])null));
427AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddBeziers((PointF[])null));
428AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddBeziers((Point[])null));
666AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddClosedCurve((PointF[])null));
667AssertExtensions.Throws<ArgumentNullException>("points", () => gp.AddClosedCurve((Point[])null));
806AssertExtensions.Throws<ArgumentNullException>("rects", () => gp.AddRectangles((RectangleF[])null));
807AssertExtensions.Throws<ArgumentNullException>("rects", () => gp.AddRectangles((Rectangle[])null));
939AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddPolygon((Point[])null));
940AssertExtensions.Throws<ArgumentNullException>("points", () => new GraphicsPath().AddPolygon((PointF[])null));
987AssertExtensions.Throws<ArgumentNullException>("addingPath", () => new GraphicsPath().AddPath(null, false));
1066Assert.Throws<ArgumentNullException>(() =>
1068Assert.Throws<ArgumentNullException>(() =>
1070Assert.Throws<ArgumentNullException>(() =>
1072Assert.Throws<ArgumentNullException>(() =>
1080AssertExtensions.Throws<ArgumentNullException, ArgumentException>("family", null, () =>
1112AssertExtensions.Throws<ArgumentNullException>("matrix", () => gp.Transform(null));
1281AssertExtensions.Throws<ArgumentNullException>("destPoints", () => gp.Warp(null, default));
1684AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.Widen(null));
1685AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.Widen(null, new Matrix()));
1686AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.Widen(null, new Matrix(), 0.67f));
1739AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.IsOutlineVisible(1, 1, null));
1740AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.IsOutlineVisible(1.0f, 1.0f, null));
1741AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.IsOutlineVisible(default, null));
1742AssertExtensions.Throws<ArgumentNullException>("pen", () => gp.IsOutlineVisible(default(PointF), null));
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (7)
312Assert.Throws<ArgumentNullException>(() => brush.Blend = null);
319Assert.Throws<ArgumentNullException>(() => brush.Blend = new Blend { Factors = null });
326AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () => brush.Blend = new Blend { Factors = new float[2], Positions = null });
412AssertExtensions.Throws<ArgumentNullException>("value", () => brush.InterpolationColors = null);
586AssertExtensions.Throws<ArgumentNullException>("value", "matrix", () => brush.Transform = null);
696AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null));
697AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null, MatrixOrder.Append));
System\Drawing\Drawing2D\MatrixTests.cs (9)
130AssertExtensions.Throws<ArgumentNullException>("plgpts", () => new Matrix(default(RectangleF), null));
131AssertExtensions.Throws<ArgumentNullException>("plgpts", () => new Matrix(default, null));
337AssertExtensions.Throws<ArgumentNullException>("matrix", () => matrix.Multiply(null));
338AssertExtensions.Throws<ArgumentNullException>("matrix", () => matrix.Multiply(null, MatrixOrder.Prepend));
730AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformPoints((Point[])null));
731AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformPoints((PointF[])null));
796AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.VectorTransformPoints(null));
797AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformVectors((Point[])null));
798AssertExtensions.Throws<ArgumentNullException>("pts", () => matrix.TransformVectors((PointF[])null));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (13)
69AssertExtensions.Throws<ArgumentNullException>("points", () => new PathGradientBrush((Point[])null));
70AssertExtensions.Throws<ArgumentNullException>("points", () => new PathGradientBrush((PointF[])null));
106AssertExtensions.Throws<ArgumentNullException>("path", () => new PathGradientBrush((GraphicsPath)null));
213AssertExtensions.Throws<ArgumentNullException>(() => brush.SurroundColors = null);
325Assert.Throws<ArgumentNullException>(() => brush.Blend = null);
326Assert.Throws<ArgumentNullException>(() => brush.Blend = new Blend() { Factors = null, Positions = null });
327Assert.Throws<ArgumentNullException>(() => brush.Blend = new Blend() { Factors = null, Positions = [] });
334AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () =>
575Assert.Throws<ArgumentNullException>(() => brush.InterpolationColors = null);
593AssertExtensions.Throws<ArgumentException, ArgumentNullException>("value", "source", () =>
661AssertExtensions.Throws<ArgumentNullException>("value", "matrix", () => brush.Transform = null);
732AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null));
733AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null, MatrixOrder.Append));
System\Drawing\FontTests.cs (12)
326AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10));
327AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic));
328AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, GraphicsUnit.Display));
329AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic, GraphicsUnit.Display));
330AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic, GraphicsUnit.Display, 10));
331AssertExtensions.Throws<ArgumentNullException>("family", () => new Font((FontFamily)null, 10, FontStyle.Italic, GraphicsUnit.Display, 10, gdiVerticalFont: true));
526AssertExtensions.Throws<ArgumentNullException>("graphics", () => font.GetHeight(null));
603AssertExtensions.Throws<ArgumentNullException>("lf", () => Font.FromLogFont(null));
604AssertExtensions.Throws<ArgumentNullException>("lf", () => Font.FromLogFont(null, hdc));
766Assert.Throws<ArgumentNullException>(() => font.ToLogFont(null));
767Assert.Throws<ArgumentNullException>(() => font.ToLogFont(null, graphics));
775AssertExtensions.Throws<ArgumentNullException>("graphics", () => font.ToLogFont(new LOGFONT(), null));
System\Drawing\Graphics_DrawBezierTests.cs (7)
65AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBezier(null, 1, 2, 3, 4, 5, 6, 7, 8));
66AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBezier(null, Point.Empty, Point.Empty, Point.Empty, Point.Empty));
67AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBezier(null, PointF.Empty, PointF.Empty, PointF.Empty, PointF.Empty));
121AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBeziers(null, new Point[2]));
122AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawBeziers(null, new PointF[2]));
143AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawBeziers(pen, (Point[])null));
144AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawBeziers(pen, (PointF[])null));
System\Drawing\Graphics_DrawLineTests.cs (8)
43AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, Point.Empty, Point.Empty));
44AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, 0, 0, 0, 0));
45AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, PointF.Empty, PointF.Empty));
46AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLine(null, 0f, 0f, 0f, 0f));
102AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLines(null, new Point[2]));
103AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawLines(null, new PointF[2]));
124AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawLines(pen, (Point[])null));
125AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawLines(pen, (PointF[])null));
System\Drawing\GraphicsTests.Core.cs (2)
75AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, new RectangleF(0f, 0f, 1f, 1f)));
129AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, new RectangleF(0, 0, 1, 1), 0, 90));
System\Drawing\GraphicsTests.cs (57)
110AssertExtensions.Throws<ArgumentNullException>("hdc", () => Graphics.FromHdc(IntPtr.Zero));
258AssertExtensions.Throws<ArgumentNullException>("image", () => Graphics.FromImage(null));
1221AssertExtensions.Throws<ArgumentNullException>("matrix", () => graphics.MultiplyTransform(null));
1222AssertExtensions.Throws<ArgumentNullException>("matrix", () => graphics.MultiplyTransform(null, MatrixOrder.Append));
1873AssertExtensions.Throws<ArgumentNullException>("pts", () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, (Point[])null));
1874AssertExtensions.Throws<ArgumentNullException>("pts", () => graphics.TransformPoints(CoordinateSpace.Page, CoordinateSpace.Page, (PointF[])null));
1960AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, new Rectangle(0, 0, 1, 1), 0, 90));
1961AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, 0, 0, 1, 1, 0, 90));
1962AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, new RectangleF(0, 0, 1, 1), 0, 90));
1963AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawArc(null, 0f, 0f, 1f, 1f, 0, 90));
2043AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, new Rectangle(0, 0, 1, 1)));
2044AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, 0, 0, 1, 1));
2045AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangle(null, 0f, 0f, 1f, 1f));
2098AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangles(null, new Rectangle[2]));
2099AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawRectangles(null, new RectangleF[2]));
2120AssertExtensions.Throws<ArgumentNullException>("rects", () => graphics.DrawRectangles(pen, (Rectangle[])null));
2121AssertExtensions.Throws<ArgumentNullException>("rects", () => graphics.DrawRectangles(pen, (RectangleF[])null));
2169AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, new Rectangle(0, 0, 1, 1)));
2170AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, 0, 0, 1, 1));
2171AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, new RectangleF(0, 0, 1, 1)));
2172AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawEllipse(null, 0f, 0f, 1f, 1f));
2228AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, new Rectangle(0, 0, 1, 1), 0, 90));
2229AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, 0, 0, 1, 1, 0, 90));
2230AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, new RectangleF(0, 0, 1, 1), 0, 90));
2231AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPie(null, 0f, 0f, 1f, 1f, 0, 90));
2311AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPolygon(null, new Point[2]));
2312AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPolygon(null, new PointF[2]));
2333AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawPolygon(pen, (Point[])null));
2334AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawPolygon(pen, (PointF[])null));
2385AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawPath(null, graphicsPath));
2406AssertExtensions.Throws<ArgumentNullException>("path", () => graphics.DrawPath(pen, null));
2456AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new Point[2]));
2457AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new PointF[2]));
2458AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new Point[2], 1));
2459AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new PointF[2], 1));
2460AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new PointF[2], 0, 2));
2461AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new Point[2], 0, 2, 1));
2462AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawCurve(null, new PointF[2], 0, 2, 1));
2488AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (Point[])null));
2489AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (PointF[])null));
2490AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (Point[])null, 1));
2491AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (PointF[])null, 1));
2492AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, null, 0, 2));
2493AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (Point[])null, 0, 2, 1));
2494AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawCurve(pen, (PointF[])null, 0, 2, 1));
2575AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new Point[3]));
2576AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new Point[3], 1, FillMode.Winding));
2577AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new PointF[3]));
2578AssertExtensions.Throws<ArgumentNullException>("pen", () => graphics.DrawClosedCurve(null, new PointF[3], 1, FillMode.Winding));
2601AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (Point[])null));
2602AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (Point[])null, 1, FillMode.Winding));
2603AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (PointF[])null));
2604AssertExtensions.Throws<ArgumentNullException>("points", () => graphics.DrawClosedCurve(pen, (PointF[])null, 1, FillMode.Winding));
2661AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, new Rectangle(0, 0, 1, 1), 0, 90));
2662AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, 0, 0, 1, 1, 0, 90));
2663AssertExtensions.Throws<ArgumentNullException>("brush", () => graphics.FillPie(null, 0f, 0f, 1f, 1f, 0, 90));
2867Assert.Throws<ArgumentNullException>(() => graphics.DrawCachedBitmap(null!, 0, 0));
System\Drawing\IconTests.cs (14)
89AssertExtensions.Throws<ArgumentNullException>("path", () => new Icon((string)null));
90AssertExtensions.Throws<ArgumentNullException>("path", () => new Icon((string)null, new Size(32, 32)));
91AssertExtensions.Throws<ArgumentNullException>("path", () => new Icon((string)null, 32, 32));
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)));
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)));
275AssertExtensions.Throws<ArgumentNullException, ArgumentException>("resource", null, () => new Icon(typeof(Icon), null));
401AssertExtensions.Throws<ArgumentNullException, ArgumentException>("filePath", null, () => Icon.ExtractAssociatedIcon(null));
453Assert.Throws<ArgumentNullException>(() => icon.Save(null));
463AssertExtensions.Throws<ArgumentNullException>("outputStream", "dataStream", () => icon.Save(null));
786Assert.Throws<ArgumentNullException>(() => { Icon.ExtractIcon(null!, 0, 16); });
787Assert.Throws<ArgumentNullException>(() => { Icon.ExtractIcon(null!, 0); });
System\Drawing\ImageTests.cs (5)
503AssertExtensions.Throws<ArgumentNullException>("path", () => Image.FromFile(null));
504AssertExtensions.Throws<ArgumentNullException>("path", () => Image.FromFile(null, useEmbeddedColorManagement: true));
562AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null));
563AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true));
564AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true, validateImageData: true));
System\Drawing\Imaging\ImageAttributesTests.cs (10)
230AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => imageAttr.SetColorMatrix(null));
231AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => imageAttr.SetColorMatrix(null, ColorMatrixFlag.Default));
232AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () =>
448AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => imageAttr.SetColorMatrices(null, _grayMatrix));
449AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () => imageAttr.SetColorMatrices(null, _grayMatrix, ColorMatrixFlag.Default));
451AssertExtensions.Throws<ArgumentNullException>("newColorMatrix", () =>
1082Assert.Throws<ArgumentNullException>(() => imageAttr.SetOutputChannelColorProfile(null));
1083Assert.Throws<ArgumentNullException>(() => imageAttr.SetOutputChannelColorProfile(null, ColorAdjustType.Default));
1221AssertExtensions.ThrowsAny<ArgumentNullException, ArgumentException>(() => imageAttr.SetRemapTable(_yellowToRedColorMap, type));
1228Assert.Throws<ArgumentNullException>(() => imageAttr.SetRemapTable(null, ColorAdjustType.Default));
System\Drawing\Imaging\MetafileTests.cs (15)
66AssertExtensions.Throws<ArgumentNullException>("path", () => new Metafile((string)null));
101AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => new Metafile((Stream)null));
411AssertExtensions.Throws<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc));
412AssertExtensions.Throws<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, EmfType.EmfOnly));
413AssertExtensions.Throws<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, EmfType.EmfOnly, "description"));
678AssertExtensions.Throws<ArgumentNullException>("path", () => new Metafile((string)null, referenceHdc, _rectangleF));
679AssertExtensions.Throws<ArgumentNullException>("path", () =>
681AssertExtensions.Throws<ArgumentNullException>("path", () =>
683AssertExtensions.Throws<ArgumentNullException>("path", () =>
827Assert.Throws<ArgumentNullException>(() => new Metafile((Stream)null, referenceHdc, _rectangleF));
828Assert.Throws<ArgumentNullException>(() => new Metafile((Stream)null, referenceHdc, _rectangleF, MetafileFrameUnit.GdiCompatible));
829Assert.Throws<ArgumentNullException>(() =>
831Assert.Throws<ArgumentNullException>(() =>
861AssertExtensions.Throws<ArgumentNullException>("path", () => Metafile.GetMetafileHeader((string)null));
875Assert.Throws<ArgumentNullException>(() => Metafile.GetMetafileHeader((Stream)null));
System\Drawing\RegionTests.cs (21)
121AssertExtensions.Throws<ArgumentNullException>("rgnData", () => new Region((RegionData)null));
245AssertExtensions.Throws<ArgumentNullException>("path", () => new Region((GraphicsPath)null));
406AssertExtensions.Throws<ArgumentNullException>("region", () => region.Complement((Region)null));
509AssertExtensions.Throws<ArgumentNullException>("path", () => region.Complement((GraphicsPath)null));
592AssertExtensions.Throws<ArgumentNullException>("region", () => region.Equals(null, s_graphic));
599AssertExtensions.Throws<ArgumentNullException>("g", () => region.Equals(region, null));
813AssertExtensions.Throws<ArgumentNullException>("region", () => region.Exclude((Region)null));
892AssertExtensions.Throws<ArgumentNullException>("path", () => region.Exclude((GraphicsPath)null));
961AssertExtensions.Throws<ArgumentNullException>("g", () => region.GetHrgn(null));
974AssertExtensions.Throws<ArgumentNullException>("regionHandle", () => region.ReleaseHrgn(IntPtr.Zero));
981AssertExtensions.Throws<ArgumentNullException>("g", () => region.GetBounds(null));
1023AssertExtensions.Throws<ArgumentNullException>("matrix", () => region.GetRegionScans(null));
1146AssertExtensions.Throws<ArgumentNullException>("region", () => region.Intersect((Region)null));
1249AssertExtensions.Throws<ArgumentNullException>("path", () => region.Intersect((GraphicsPath)null));
1269AssertExtensions.Throws<ArgumentNullException>("g", () => region.IsEmpty(null));
1282AssertExtensions.Throws<ArgumentNullException>("g", () => region.IsInfinite(null));
1708AssertExtensions.Throws<ArgumentNullException>("region", () => region.Union((Region)null));
1788AssertExtensions.Throws<ArgumentNullException>("path", () => region.Union((GraphicsPath)null));
1876AssertExtensions.Throws<ArgumentNullException>("matrix", () => region.Transform(null));
2066AssertExtensions.Throws<ArgumentNullException>("region", () => region.Xor((Region)null));
2146AssertExtensions.Throws<ArgumentNullException>("path", () => region.Xor((GraphicsPath)null));
System\Drawing\TextureBrushTests.cs (11)
241AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush((Image)null));
242AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile));
243AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, RectangleF.Empty));
244AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, Rectangle.Empty));
245AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, RectangleF.Empty, null));
246AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, Rectangle.Empty, null));
247AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile, RectangleF.Empty));
248AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush(null, WrapMode.Tile, Rectangle.Empty));
373AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null));
374AssertExtensions.Throws<ArgumentNullException>("matrix", () => brush.MultiplyTransform(null, MatrixOrder.Prepend));
597AssertExtensions.Throws<ArgumentNullException>("value", () => brush.Transform = null);
System.Formats.Asn1 (12)
System.Formats.Cbor (2)
System.Formats.Nrbf (7)
System.Formats.Tar (37)
System.IO.Compression (18)
System.IO.Compression.Brotli (7)
System.IO.Compression.ZipFile (35)
System.IO.FileSystem.DriveInfo (1)
System.IO.FileSystem.Watcher (3)
System.IO.Hashing (15)
System.IO.IsolatedStorage (8)
System.IO.MemoryMappedFiles (4)
System.IO.Packaging (60)
System.IO.Pipelines (1)
System.IO.Pipes (7)
System.IO.Ports (2)
System.Linq (34)
System.Linq.AsyncEnumerable (351)
System.Linq.Expressions (288)
System.Linq.Parallel (384)
System.Linq.Queryable (344)
System.Memory (17)
System.Net.Http (45)
System.Net.Http.Json (28)
System.Net.HttpListener (17)
System.Net.Mail (40)
System.Net.NameResolution (12)
System.Net.NetworkInformation (1)
System.Net.Ping (18)
System.Net.Primitives (30)
System.Net.Requests (19)
System.Net.Security (11)
System.Net.ServerSentEvents (2)
System.Net.Sockets (87)
System.Net.WebClient (31)
System.Net.WebProxy (2)
System.Net.WebSockets (5)
System.Net.WebSockets.Client (4)
System.ObjectModel (15)
System.Private.CoreLib (1642)
System.Private.DataContractSerialization (177)
System.Private.Uri (16)
System.Private.Windows.Core (14)
System.Private.Windows.Core.TestUtilities (4)
System.Private.Windows.GdiPlus (1)
System.Private.Xml (395)
System.Private.Xml.Linq (139)
System.Reflection.DispatchProxy (3)
System.Reflection.Emit (44)
System.Reflection.Metadata (90)
System.Reflection.MetadataLoadContext (1)
System.Reflection.TypeExtensions (53)
System.Resources.Writer (4)
System.Runtime (1)
System.Runtime.Numerics (2)
System.Runtime.Serialization.Formatters (38)
System.Security.Claims (82)
System.Security.Cryptography (824)
System.Security.Cryptography.Cose (43)
System.Security.Cryptography.Pkcs (2)
System.Security.Cryptography.Xml (2)
System.ServiceModel.Federation (2)
System.ServiceModel.Federation.Tests (2)
System.ServiceModel.Http.Tests (6)
System.ServiceModel.NetTcp.Tests (2)
System.ServiceModel.Primitives.Tests (23)
System.ServiceModel.UnixDomainSocket.Tests (1)
System.Text.Json (136)
System.Text.RegularExpressions (19)
System.Threading.Channels (1)
System.Threading.RateLimiting (1)
System.Threading.Tasks.Dataflow (76)
System.Threading.Tasks.Parallel (225)
System.Transactions.Local (22)
System.Web.HttpUtility (6)
System.Windows.Controls.Ribbon (81)
System.Windows.Forms (415)
System.Windows.Forms.Design (212)
System.Windows.Forms.Design.Tests (127)
System.Windows.Forms.IntegrationTests.Common (1)
System.Windows.Forms.Primitives (4)
System.Windows.Forms.Primitives.Tests (52)
System.Windows.Forms.Primitives.TestUtilities (4)
System.Windows.Forms.Tests (586)
System\Windows\Forms\BindingContextTests.cs (15)
61Assert.Throws<ArgumentNullException>("dataSource", () => context.Add(null, source.CurrencyManager));
106Assert.Throws<ArgumentNullException>("listManager", () => context.Add(1, null));
152Assert.Throws<ArgumentNullException>("dataSource", () => context.AddCore(null, source.CurrencyManager));
159Assert.Throws<ArgumentNullException>("listManager", () => context.AddCore(1, null));
266Assert.Throws<ArgumentNullException>("dataSource", () => context.Remove(null));
299Assert.Throws<ArgumentNullException>("dataSource", () => context.RemoveCore(null));
396Assert.Throws<ArgumentNullException>("dataSource", () => context.Contains(null));
397Assert.Throws<ArgumentNullException>("dataSource", () => context.Contains(null, null));
398Assert.Throws<ArgumentNullException>("dataSource", () => context.Contains(null, string.Empty));
470Assert.Throws<ArgumentNullException>("dataSource", () => context[mockIListSource.Object]);
682Assert.Throws<ArgumentNullException>("dataSource", () => context[dataSource, "Property"]);
734Assert.Throws<ArgumentNullException>("dataSource", () => context[null]);
735Assert.Throws<ArgumentNullException>("dataSource", () => context[null, null]);
736Assert.Throws<ArgumentNullException>("dataSource", () => context[null, string.Empty]);
1015Assert.Throws<ArgumentNullException>("binding", () => BindingContext.UpdateBinding([], null));
System\Windows\Forms\ControlBindingsCollectionTests.cs (8)
228Assert.Throws<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember"));
229Assert.Throws<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true));
230Assert.Throws<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged));
231Assert.Throws<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null"));
232Assert.Throws<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString"));
233Assert.Throws<ArgumentNullException>("dataSource", () => collection.Add("propertyName", null, "dataMember", true, DataSourceUpdateMode.OnPropertyChanged, "null", "formatString", CultureInfo.CurrentCulture));
272Assert.Throws<ArgumentNullException>("dataBinding", () => collection.Add(null));
343Assert.Throws<ArgumentNullException>("dataBinding", () => collection.Remove(null));
System\Windows\Forms\ControlPaintTests.cs (40)
82Assert.Throws<ArgumentNullException>(() => ControlPaint.CreateHBitmap16Bit(null, Color.Red));
193Assert.Throws<ArgumentNullException>(() => ControlPaint.CreateHBitmapColorMask(null, IntPtr.Zero));
261Assert.Throws<ArgumentNullException>("bitmap", () => ControlPaint.CreateHBitmapTransparencyMask(null));
675Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder(null, new Rectangle(1, 2, 3, 4), Color.Red, style));
683Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder(null, new Rectangle(1, 2, 3, 4), Color.Red, 1, style, Color.Red, 1, style, Color.Red, 1, style, Color.Red, 1, style));
802Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder3D(null, new Rectangle(1, 2, 3, 4)));
803Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder3D(null, new Rectangle(1, 2, 3, 4), style));
804Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder3D(null, new Rectangle(1, 2, 3, 4), style, Border3DSide.All));
805Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder3D(null, 1, 2, 3, 4));
806Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder3D(null, 1, 2, 3, 4, style));
807Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawBorder3D(null, 1, 2, 3, 4, style, Border3DSide.All));
850Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawButton(null, new Rectangle(1, 2, 3, 4), state));
851Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawButton(null, 1, 2, 3, 4, state));
934Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawCaptionButton(null, new Rectangle(1, 2, 3, 4), CaptionButton.Close, state));
935Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawCaptionButton(null, 1, 2, 3, 4, CaptionButton.Close, state));
1014Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawCheckBox(null, new Rectangle(1, 2, 3, 4), state));
1015Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawCheckBox(null, 1, 2, 3, 4, state));
1095Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawComboButton(null, new Rectangle(1, 2, 3, 4), state));
1096Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawComboButton(null, 1, 2, 3, 4, state));
1160Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawContainerGrabHandle(null, new Rectangle(1, 2, 3, 4)));
1219Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawFocusRectangle(null, new Rectangle(1, 2, 3, 4)));
1220Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawFocusRectangle(null, new Rectangle(1, 2, 3, 4), Color.Red, Color.Blue));
1258Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawGrabHandle(null, new Rectangle(1, 2, 3, 4), primary, enabled));
1291Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawGrid(null, new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.Red));
1341Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawImageDisabled(null, image, 0, 0, Color.Red));
1382Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawLockedFrame(null, new Rectangle(1, 2, 3, 4), primary));
1470Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawMenuGlyph(null, new Rectangle(1, 2, 3, 4), glyph));
1471Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawMenuGlyph(null, 1, 2, 3, 4, glyph));
1556Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawMixedCheckBox(null, new Rectangle(1, 2, 3, 4), state));
1557Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawMixedCheckBox(null, 1, 2, 3, 4, state));
1636Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawRadioButton(null, new Rectangle(1, 2, 3, 4), state));
1637Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawRadioButton(null, 1, 2, 3, 4, state));
1774Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawScrollButton(null, new Rectangle(1, 2, 3, 4), ScrollButton.Up, state));
1775Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawScrollButton(null, 1, 2, 3, 4, ScrollButton.Up, state));
1847Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSelectionFrame(null, active, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), Color.Red));
1892Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSizeGrip(null, Color.Red, new Rectangle(1, 2, 3, 4)));
1893Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawSizeGrip(null, Color.Red, 1, 2, 3, 4));
1941Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new StringFormat()));
1977Assert.Throws<ArgumentNullException>("dc", () => ControlPaint.DrawStringDisabled(null, s, SystemFonts.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default));
2005Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawVisualStyleBorder(null, new Rectangle(1, 2, 3, 4)));
System\Windows\Forms\CursorTests.cs (6)
92Assert.Throws<ArgumentNullException>("stream", () => new Cursor((Stream)null));
128Assert.Throws<ArgumentNullException>("path", () => new Cursor((string)null));
165Assert.Throws<ArgumentNullException>("type", () => new Cursor((Type)null, "resource"));
174Assert.Throws<ArgumentNullException>("stream", () => new Cursor(type, resource));
398Assert.Throws<ArgumentNullException>("graphics", () => cursor.Draw(null, new Rectangle(Point.Empty, cursor.Size)));
435Assert.Throws<ArgumentNullException>("graphics", () => cursor.DrawStretched(null, new Rectangle(Point.Empty, cursor.Size)));
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (6)
46Assert.Throws<ArgumentNullException>("dataGridView", () => new DataGridViewCellPaintingEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All));
53Assert.Throws<ArgumentNullException>("graphics", () => new DataGridViewCellPaintingEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new DataGridViewCellStyle(), null, DataGridViewPaintParts.All));
62Assert.Throws<ArgumentNullException>("cellStyle", () => new DataGridViewCellPaintingEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, null, null, DataGridViewPaintParts.All));
96Assert.Throws<ArgumentNullException>("advancedBorderStyle", () => e.Paint(new Rectangle(1, 2, 3, 4), DataGridViewPaintParts.None));
146Assert.Throws<ArgumentNullException>("advancedBorderStyle", () => e.PaintBackground(new Rectangle(1, 2, 3, 4), true));
196Assert.Throws<ArgumentNullException>("advancedBorderStyle", () => e.PaintContent(new Rectangle(1, 2, 3, 4)));
System\Windows\Forms\DataGridViewCellTests.cs (17)
3109Assert.Throws<ArgumentNullException>("dataGridViewAdvancedBorderStyleInput", () => cell.AdjustCellBorderStyle(null, controlAdvancedBorderStylePlaceholder, true, true, true, true));
3141Assert.Throws<ArgumentNullException>("dataGridViewAdvancedBorderStylePlaceholder", () => cell.AdjustCellBorderStyle(controlAdvancedBorderStyleInput, null, true, true, true, true));
3303Assert.Throws<ArgumentNullException>("advancedBorderStyle", () => cell.BorderWidths(null));
5281Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default));
5282Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default, out widthTruncated));
5292Assert.Throws<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextHeight(graphics, "text", null, 10, TextFormatFlags.Default));
5293Assert.Throws<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextHeight(graphics, "text", null, 10, TextFormatFlags.Default, out widthTruncated));
5348Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextPreferredSize(null, "text", SystemFonts.DefaultFont, 0.2f, TextFormatFlags.Default));
5356Assert.Throws<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text", null, 0.2f, TextFormatFlags.Default));
5404Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextSize(null, "text", SystemFonts.DefaultFont, TextFormatFlags.Default));
5412Assert.Throws<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextSize(graphics, "text", null, TextFormatFlags.Default));
5450Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextWidth(null, "text", SystemFonts.DefaultFont, 10, TextFormatFlags.Default));
5458Assert.Throws<ArgumentNullException>("font", () => DataGridViewCell.MeasureTextWidth(graphics, "text", null, 10, TextFormatFlags.Default));
6036Assert.Throws<ArgumentNullException>("graphics", () => cell.PaintBorder(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new DataGridViewCellStyle(), new DataGridViewAdvancedBorderStyle()));
6045Assert.Throws<ArgumentNullException>("cellStyle", () => cell.PaintBorder(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), null, new DataGridViewAdvancedBorderStyle()));
6081Assert.Throws<ArgumentNullException>("graphics", () => cell.PaintErrorIcon(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, cellValueBoundsWidth, cellValueBoundsHeight), errorText));
6162Assert.Throws<ArgumentNullException>("cellStyle", () => cell.ParseFormattedValue(1, null, new Int32Converter(), new Int32Converter()));
System\Windows\Forms\DataGridViewHeaderCellTests.cs (1)
4620Assert.Throws<ArgumentNullException>("cellStyle", () => cell.Paint(graphics, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, null, null, null, null, null, DataGridViewPaintParts.All));
System\Windows\Forms\DataGridViewRowPostPaintEventArgsTests.cs (3)
42Assert.Throws<ArgumentNullException>("dataGridView", () => new DataGridViewRowPostPaintEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false));
49Assert.Throws<ArgumentNullException>("graphics", () => new DataGridViewRowPostPaintEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false));
58Assert.Throws<ArgumentNullException>("inheritedRowStyle", () => new DataGridViewRowPostPaintEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, null, false, false));
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (3)
43Assert.Throws<ArgumentNullException>("dataGridView", () => new DataGridViewRowPrePaintEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false));
50Assert.Throws<ArgumentNullException>("graphics", () => new DataGridViewRowPrePaintEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new DataGridViewCellStyle(), false, false));
59Assert.Throws<ArgumentNullException>("inheritedRowStyle", () => new DataGridViewRowPrePaintEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, null, false, false));
System\Windows\Forms\DataGridViewRowTests.cs (24)
4111Assert.Throws<ArgumentNullException>("dataGridView", () => row.CreateCells(null));
4112Assert.Throws<ArgumentNullException>("dataGridView", () => row.CreateCells(null, Array.Empty<object>()));
4145Assert.Throws<ArgumentNullException>("values", () => row.CreateCells(control, null));
4229Assert.Throws<ArgumentNullException>("graphics", () => row.DrawFocus(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), -1, DataGridViewElementStates.None, new DataGridViewCellStyle(), true));
4245Assert.Throws<ArgumentNullException>("cellStyle", () => row.DrawFocus(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), -1, DataGridViewElementStates.None, null, true));
4857Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false));
4861Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false));
4866Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false));
4927Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false));
4931Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false));
4935Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, Rectangle.Empty, new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false));
4940Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, Rectangle.Empty, new Rectangle(2, 3, 4, 5), 1, DataGridViewElementStates.Frozen, true, false));
4955Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, Rectangle.Empty, Rectangle.Empty, 1, DataGridViewElementStates.None, true, true));
4969Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, Rectangle.Empty, new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true));
4983Assert.Throws<ArgumentNullException>("graphics", () => row.Paint(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true));
5250Assert.Throws<ArgumentNullException>("graphics", () => row.PaintCells(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All));
5264Assert.Throws<ArgumentNullException>("graphics", () => row.PaintCells(null, Rectangle.Empty, new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All));
5278Assert.Throws<ArgumentNullException>("graphics", () => row.PaintCells(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 100, 100), -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All));
5292Assert.Throws<ArgumentNullException>("graphics", () => row.PaintCells(null, new Rectangle(1, 2, 1000, 10000), new Rectangle(1, 2, 1000, 1000), 1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All));
5571Assert.Throws<ArgumentNullException>("graphics", () => row.PaintHeader(null, Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All));
5586Assert.Throws<ArgumentNullException>("graphics", () => row.PaintHeader(null, Rectangle.Empty, new Rectangle(1, 2, 100, 100), -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All));
5601Assert.Throws<ArgumentNullException>("graphics", () => row.PaintHeader(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 100, 100), 1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All));
5616Assert.Throws<ArgumentNullException>("graphics", () => row.PaintHeader(null, new Rectangle(1, 2, 100, 100), new Rectangle(1, 2, 100, 100), -1, DataGridViewElementStates.None, true, true, DataGridViewPaintParts.All));
5725Assert.Throws<ArgumentNullException>("values", () => row.SetValues(null));
System\Windows\Forms\DrawItemEventArgsTests.cs (2)
65Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None));
66Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null, SystemFonts.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None, Color.Red, Color.Blue));
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (1)
40Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont));
System\Windows\Forms\DrawListViewItemEventArgsTests.cs (2)
38Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewItemEventArgs(null, new ListViewItem(), new Rectangle(1, 2, 3, 4), 0, ListViewItemStates.Default));
46Assert.Throws<ArgumentNullException>("item", () => new DrawListViewItemEventArgs(graphics, null, new Rectangle(1, 2, 3, 4), 0, ListViewItemStates.Default));
System\Windows\Forms\DrawListViewSubItemEventArgsTests.cs (3)
41Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewSubItemEventArgs(null, new Rectangle(1, 2, 3, 4), new ListViewItem(), new ListViewItem.ListViewSubItem(), -1, 0, new ColumnHeader(), ListViewItemStates.Default));
49Assert.Throws<ArgumentNullException>("item", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), -1, 0, new ColumnHeader(), ListViewItemStates.Default));
59Assert.Throws<ArgumentNullException>("subItem", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), new ListViewItem(), null, itemIndex, 0, new ColumnHeader(), ListViewItemStates.Default));
System\Windows\Forms\ErrorProviderTests.cs (9)
59Assert.Throws<ArgumentNullException>("parentControl", () => new ErrorProvider((ContainerControl)null));
86Assert.Throws<ArgumentNullException>("container", () => new ErrorProvider((IContainer)null));
585Assert.Throws<ArgumentNullException>("value", () => provider.Icon = null);
964Assert.Throws<ArgumentNullException>("control", () => provider.GetError(null));
982Assert.Throws<ArgumentNullException>("control", () => provider.GetIconAlignment(null));
1000Assert.Throws<ArgumentNullException>("control", () => provider.GetIconPadding(null));
1064Assert.Throws<ArgumentNullException>("control", () => provider.SetError(null, value));
1088Assert.Throws<ArgumentNullException>("control", () => provider.SetIconAlignment(null, value));
1119Assert.Throws<ArgumentNullException>("control", () => provider.SetIconPadding(null, 0));
System\Windows\Forms\HelpProviderTests.cs (10)
97Assert.Throws<ArgumentNullException>("ctl", () => provider.GetHelpKeyword(null));
111Assert.Throws<ArgumentNullException>("ctl", () => provider.GetHelpNavigator(null));
125Assert.Throws<ArgumentNullException>("ctl", () => provider.GetHelpString(null));
139Assert.Throws<ArgumentNullException>("ctl", () => provider.GetShowHelp(null));
168Assert.Throws<ArgumentNullException>("ctl", () => provider.ResetShowHelp(null));
280Assert.Throws<ArgumentNullException>("ctl", () => provider.SetHelpKeyword(null, "keyword"));
342Assert.Throws<ArgumentNullException>("ctl", () => provider.SetHelpNavigator(null, navigator));
416Assert.Throws<ArgumentNullException>("ctl", () => provider.SetHelpString(null, "keyword"));
483Assert.Throws<ArgumentNullException>("ctl", () => provider.SetShowHelp(null, true));
497Assert.Throws<ArgumentNullException>("ctl", () => provider.ShouldSerializeShowHelp(null));
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (21)
179Assert.Throws<ArgumentNullException>("control", () => settings.GetCellPosition(null));
187Assert.Throws<ArgumentNullException>("control", () => settings.GetCellPosition(null));
269Assert.Throws<ArgumentNullException>("control", () => settings.GetColumn(null));
277Assert.Throws<ArgumentNullException>("control", () => settings.GetColumn(null));
320Assert.Throws<ArgumentNullException>("control", () => settings.GetColumnSpan(null));
328Assert.Throws<ArgumentNullException>("control", () => settings.GetColumnSpan(null));
370Assert.Throws<ArgumentNullException>("control", () => settings.GetRow(null));
378Assert.Throws<ArgumentNullException>("control", () => settings.GetRow(null));
420Assert.Throws<ArgumentNullException>("control", () => settings.GetRowSpan(null));
428Assert.Throws<ArgumentNullException>("control", () => settings.GetRowSpan(null));
648Assert.Throws<ArgumentNullException>("control", () => settings.SetCellPosition(null, default));
656Assert.Throws<ArgumentNullException>("control", () => settings.SetCellPosition(null, default));
870Assert.Throws<ArgumentNullException>("control", () => settings.SetColumn(null, value));
880Assert.Throws<ArgumentNullException>("control", () => settings.SetColumn(null, value));
1101Assert.Throws<ArgumentNullException>("control", () => settings.SetColumnSpan(null, value));
1111Assert.Throws<ArgumentNullException>("control", () => settings.SetColumnSpan(null, value));
1112Assert.Throws<ArgumentNullException>("control", () => settings.GetColumnSpan(null));
1346Assert.Throws<ArgumentNullException>("control", () => settings.SetRow(null, value));
1356Assert.Throws<ArgumentNullException>("control", () => settings.SetRow(null, value));
1577Assert.Throws<ArgumentNullException>("control", () => settings.SetRowSpan(null, value));
1587Assert.Throws<ArgumentNullException>("control", () => settings.SetRowSpan(null, value));
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (24)
49Assert.Throws<ArgumentNullException>("owner", () => new ListBox.ObjectCollection(null));
50Assert.Throws<ArgumentNullException>("owner", () => new ListBox.ObjectCollection(null, new ListBox.ObjectCollection(owner)));
51Assert.Throws<ArgumentNullException>("owner", () => new ListBox.ObjectCollection(null, Array.Empty<object>()));
78Assert.Throws<ArgumentNullException>("value", () => new ListBox.ObjectCollection(owner, (object[])null));
79Assert.Throws<ArgumentNullException>("value", () => new ListBox.ObjectCollection(owner, (ListBox.ObjectCollection)null));
1253Assert.Throws<ArgumentNullException>("value", () => collection[index] = null);
1268Assert.Throws<ArgumentNullException>("value", () => collection[index] = null);
2184Assert.Throws<ArgumentNullException>("item", () => collection.Add(null));
3648Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((object[])null));
3649Assert.Throws<ArgumentNullException>("value", () => collection.AddRange((ListBox.ObjectCollection)null));
3657Assert.Throws<ArgumentNullException>("item", () => collection.AddRange((object[])[null]));
3978Assert.Throws<ArgumentNullException>("value", () => collection.Contains(null));
4010Assert.Throws<ArgumentNullException>("destination", () => collection.CopyTo(null, 0));
4021Assert.Throws<ArgumentNullException>("destination", () => collection.CopyTo(null, 0));
4116Assert.Throws<ArgumentNullException>("value", () => collection.IndexOf(null));
5022Assert.Throws<ArgumentNullException>("item", () => collection.Insert(0, null));
8058Assert.Throws<ArgumentNullException>("value", () => collection[index] = null);
8073Assert.Throws<ArgumentNullException>("value", () => collection[index] = null);
8989Assert.Throws<ArgumentNullException>("item", () => collection.Add(null));
9300Assert.Throws<ArgumentNullException>("value", () => collection.Contains(null));
9332Assert.Throws<ArgumentNullException>("destination", () => collection.CopyTo(null, 0));
9343Assert.Throws<ArgumentNullException>("destination", () => collection.CopyTo(null, 0));
9438Assert.Throws<ArgumentNullException>("value", () => collection.IndexOf(null));
10344Assert.Throws<ArgumentNullException>("item", () => collection.Insert(0, null));
System\Windows\Forms\ListViewItemTests.cs (8)
831Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, "imageKey"));
832Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, 1));
833Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, "imageKey", new ListViewGroup()));
834Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem((ListViewItem.ListViewSubItem[])null, 0, new ListViewGroup()));
841Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem(subItems, "imageKey"));
842Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem(subItems, 1));
843Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem(subItems, "imageKey", new ListViewGroup()));
844Assert.Throws<ArgumentNullException>("subItems", () => new ListViewItem(subItems, 1, new ListViewGroup()));
System\Windows\Forms\ListViewSubItemCollectionTests.cs (7)
23Assert.Throws<ArgumentNullException>("owner", () => new ListViewItem.ListViewSubItemCollection(null));
97Assert.Throws<ArgumentNullException>("value", () => collection[0] = null);
284Assert.Throws<ArgumentNullException>("item", () => collection.Add((ListViewItem.ListViewSubItem)null));
417Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((ListViewItem.ListViewSubItem[])null));
418Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((string[])null));
419Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((string[])null, Color.Red, Color.Blue, SystemFonts.MenuFont));
652Assert.Throws<ArgumentNullException>("item", () => collection.Insert(1, null));
System\Windows\Forms\RichTextBoxTests.cs (35)
8431Assert.Throws<ArgumentNullException>("str", () => control.Find((string)null));
8432Assert.Throws<ArgumentNullException>("str", () => control.Find(null, RichTextBoxFinds.None));
8433Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 0, RichTextBoxFinds.None));
8434Assert.Throws<ArgumentNullException>("str", () => control.Find(null, -1, RichTextBoxFinds.None));
8435Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 1, RichTextBoxFinds.None));
8436Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 0, 0, RichTextBoxFinds.None));
8437Assert.Throws<ArgumentNullException>("str", () => control.Find(null, -1, 0, RichTextBoxFinds.None));
8438Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 1, 0, RichTextBoxFinds.None));
8439Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 0, -2, RichTextBoxFinds.None));
8449Assert.Throws<ArgumentNullException>("str", () => control.Find((string)null));
8450Assert.Throws<ArgumentNullException>("str", () => control.Find(null, RichTextBoxFinds.None));
8451Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 0, RichTextBoxFinds.None));
8452Assert.Throws<ArgumentNullException>("str", () => control.Find(null, -1, RichTextBoxFinds.None));
8453Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 2, RichTextBoxFinds.None));
8454Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 0, 0, RichTextBoxFinds.None));
8455Assert.Throws<ArgumentNullException>("str", () => control.Find(null, -1, 0, RichTextBoxFinds.None));
8456Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 2, 0, RichTextBoxFinds.None));
8457Assert.Throws<ArgumentNullException>("str", () => control.Find(null, 0, -2, RichTextBoxFinds.None));
8464Assert.Throws<ArgumentNullException>("characterSet", () => control.Find((char[])null));
8465Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 0));
8466Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, -1));
8467Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 1));
8468Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 0, 0));
8469Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, -1, 0));
8470Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 1, 0));
8471Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 0, -2));
8481Assert.Throws<ArgumentNullException>("characterSet", () => control.Find((char[])null));
8482Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 0));
8483Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, -1));
8484Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 2));
8485Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 0, 0));
8486Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, -1, 0));
8487Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 2, 0));
8488Assert.Throws<ArgumentNullException>("characterSet", () => control.Find(null, 0, -2));
8760Assert.Throws<ArgumentNullException>("data", () => control.LoadFile((Stream)null, RichTextBoxStreamType.RichText));
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (11)
883Assert.Throws<ArgumentNullException>("value", () => collection.Add((TabPage)null));
1161Assert.Throws<ArgumentNullException>("pages", () => collection.AddRange(null));
1181Assert.Throws<ArgumentNullException>("owner", () => new TabControl.TabPageCollection(null));
1222Assert.Throws<ArgumentNullException>("destinationArray", () => iList.CopyTo(null, 0));
1276Assert.Throws<ArgumentNullException>("sourceArray", () => iList.CopyTo(array, 1));
1571Assert.Throws<ArgumentNullException>("page", () => collection.Contains(null));
1876Assert.Throws<ArgumentNullException>("page", () => collection.IndexOf(null));
2907Assert.Throws<ArgumentNullException>("tabPage", () => collection.Insert(0, (TabPage)null));
3671Assert.Throws<ArgumentNullException>("value", () => collection[0] = null);
3683Assert.Throws<ArgumentNullException>("value", () => collection[0] = null);
4691Assert.Throws<ArgumentNullException>("value", () => collection.Remove(null));
System\Windows\Forms\TableLayoutPanelTests.cs (11)
655Assert.Throws<ArgumentNullException>("control", () => control.GetCellPosition(null));
688Assert.Throws<ArgumentNullException>("control", () => control.GetColumn(null));
703Assert.Throws<ArgumentNullException>("control", () => control.GetColumnSpan(null));
941Assert.Throws<ArgumentNullException>("control", () => control.GetRow(null));
1149Assert.Throws<ArgumentNullException>("control", () => control.GetRowSpan(null));
1539Assert.Throws<ArgumentNullException>(() => control.OnPaintBackground(null));
1655Assert.Throws<ArgumentNullException>("control", () => control.SetCellPosition(null, default));
1761Assert.Throws<ArgumentNullException>("control", () => control.SetColumn(null, 1));
1873Assert.Throws<ArgumentNullException>("control", () => control.SetColumnSpan(null, value));
1988Assert.Throws<ArgumentNullException>("control", () => control.SetRow(null, 1));
2099Assert.Throws<ArgumentNullException>("control", () => control.SetRowSpan(null, value));
System\Windows\Forms\TextRendererTests.cs (4)
391Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.DrawText(null, "text", SystemFonts.MenuFont, Point.Empty, Color.Red));
564Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty, SystemFonts.MenuFont));
565Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty, SystemFonts.MenuFont, new Size(300, 400)));
566Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty, SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default));
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (2)
66Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, TextFormatFlags.Top));
67Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red, SystemFonts.DefaultFont, ContentAlignment.TopLeft));
System\Windows\Forms\ToolStripRendererTests.cs (11)
23Assert.Throws<ArgumentNullException>("normalImage", () => ToolStripRenderer.CreateDisabledImage(null));
72Assert.Throws<ArgumentNullException>("e", () => renderer.DrawArrow(null));
232Assert.Throws<ArgumentNullException>("e", () => renderer.DrawItemCheck(null));
265Assert.Throws<ArgumentNullException>("e", () => renderer.DrawItemImage(null));
340Assert.Throws<ArgumentNullException>("e", () => renderer.DrawItemText(null));
513Assert.Throws<ArgumentNullException>("e", () => renderer.DrawStatusStripSizingGrip(null));
739Assert.Throws<ArgumentNullException>("e", () => renderer.OnRenderArrow(null));
814Assert.Throws<ArgumentNullException>("e", () => renderer.OnRenderItemCheck(null));
834Assert.Throws<ArgumentNullException>("e", () => renderer.OnRenderItemImage(null));
856Assert.Throws<ArgumentNullException>("e", () => renderer.OnRenderItemText(null));
933Assert.Throws<ArgumentNullException>("e", () => renderer.OnRenderStatusStripSizingGrip(null));
System\Windows\Forms\TreeNodeTests.cs (4)
234Assert.Throws<ArgumentNullException>("nodes", () => new TreeNode("text", null));
235Assert.Throws<ArgumentNullException>("nodes", () => new TreeNode("text", 0, 0, null));
241Assert.Throws<ArgumentNullException>("node", () => new TreeNode("text", [null]));
242Assert.Throws<ArgumentNullException>("node", () => new TreeNode("text", 0, 0, [null]));
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (16)
39Assert.Throws<ArgumentNullException>("className", () => new VisualStyleRenderer(null, 0, 0));
114Assert.Throws<ArgumentNullException>("element", () => VisualStyleRenderer.IsElementDefined(null));
180Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawBackground(null, new Rectangle(1, 2, 3, 4)));
181Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawBackground(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4)));
215Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawEdge(null, new Rectangle(1, 2, 3, 4), Edges.Top, EdgeStyle.Bump, EdgeEffects.FillInterior));
295Assert.Throws<ArgumentNullException>("g", () => renderer.DrawImage(null, new Rectangle(1, 2, 3, 4), image));
296Assert.Throws<ArgumentNullException>("g", () => renderer.DrawImage(null, new Rectangle(1, 2, 3, 4), imageList, 0));
306Assert.Throws<ArgumentNullException>("image", () => renderer.DrawImage(graphics, new Rectangle(1, 2, 3, 4), null));
316Assert.Throws<ArgumentNullException>("imageList", () => renderer.DrawImage(graphics, new Rectangle(1, 2, 3, 4), null, 0));
393Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawParentBackground(null, new Rectangle(1, 2, 3, 4), childControl));
491Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text"));
492Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text", true));
493Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text", false));
494Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text", true, TextFormatFlags.Default));
495Assert.Throws<ArgumentNullException>("dc", () => renderer.DrawText(null, new Rectangle(1, 2, 3, 4), "text", false, TextFormatFlags.Default));
549Assert.Throws<ArgumentNullException>("element", () => renderer.SetParameters(null));
System.Windows.Forms.UI.IntegrationTests (2)
System.Windows.Input.Manipulations (2)
System.Xaml (135)
System.Xaml.Tests (162)
System\Xaml\Schema\XamlTypeNameTests.cs (11)
78Assert.Throws<ArgumentNullException>("xamlType", () => new XamlTypeName(null));
225Assert.Throws<ArgumentNullException>("typeNameList", () => XamlTypeName.ToString(null, new CustomNamespacePrefixLookup()));
231Assert.Throws<ArgumentNullException>("prefixLookup", () => XamlTypeName.ToString(Array.Empty<XamlTypeName>(), null));
317Assert.Throws<ArgumentNullException>("typeName", () => XamlTypeName.Parse(null, new CustomXamlNamespaceResolver()));
320Assert.Throws<ArgumentNullException>("typeName", () => XamlTypeName.TryParse(null, new CustomXamlNamespaceResolver(), out result));
327Assert.Throws<ArgumentNullException>("namespaceResolver", () => XamlTypeName.Parse("typeName", null));
330Assert.Throws<ArgumentNullException>("namespaceResolver", () => XamlTypeName.TryParse("typeName", null, out result));
440Assert.Throws<ArgumentNullException>("typeNameList", () => XamlTypeName.ParseList(null, new CustomXamlNamespaceResolver()));
443Assert.Throws<ArgumentNullException>("typeNameList", () => XamlTypeName.TryParseList(null, new CustomXamlNamespaceResolver(), out result));
450Assert.Throws<ArgumentNullException>("namespaceResolver", () => XamlTypeName.ParseList("typeNameList", null));
453Assert.Throws<ArgumentNullException>("namespaceResolver", () => XamlTypeName.TryParseList("typeNameList", null, out result));
System\Xaml\XamlDirectiveTests.cs (3)
42Assert.Throws<ArgumentNullException>("xamlType", () => new XamlDirective(new string[] { "namespace"}, "name", null, null, AllowedMemberLocations.Any));
49Assert.Throws<ArgumentNullException>("xamlNamespaces", () => new XamlDirective(null, "name", type, null, AllowedMemberLocations.Any));
76Assert.Throws<ArgumentNullException>("xamlNamespace", () => new XamlDirective(null, "name"));
System\Xaml\XamlMemberTests.cs (30)
37Assert.Throws<ArgumentNullException>("name", () => new XamlMember(null, type, false));
43Assert.Throws<ArgumentNullException>("declaringType", () => new XamlMember("name", null, false));
98Assert.Throws<ArgumentNullException>("propertyInfo", () => new XamlMember((PropertyInfo)null!, new XamlSchemaContext()));
99Assert.Throws<ArgumentNullException>("propertyInfo", () => new XamlMember((PropertyInfo)null!, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker));
154Assert.Throws<ArgumentNullException>("eventInfo", () => new XamlMember((EventInfo)null!, new XamlSchemaContext()));
155Assert.Throws<ArgumentNullException>("eventInfo", () => new XamlMember((EventInfo)null!, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker));
215Assert.Throws<ArgumentNullException>("attachablePropertyName", () => new XamlMember(null, getter, null, new XamlSchemaContext()));
216Assert.Throws<ArgumentNullException>("attachablePropertyName", () => new XamlMember(null, getter, null, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker));
222Assert.Throws<ArgumentNullException>(() => new XamlMember("name", null, null, new XamlSchemaContext()));
223Assert.Throws<ArgumentNullException>(() => new XamlMember("name", null, null, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker));
300Assert.Throws<ArgumentNullException>("attachableEventName", () => new XamlMember(null, adder, new XamlSchemaContext()));
301Assert.Throws<ArgumentNullException>("attachableEventName", () => new XamlMember(null, adder, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker));
307Assert.Throws<ArgumentNullException>("adder", () => new XamlMember("name", null, new XamlSchemaContext()));
308Assert.Throws<ArgumentNullException>("adder", () => new XamlMember("name", null, new XamlSchemaContext(), XamlMemberInvoker.UnknownInvoker));
326Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlMember(propertyInfo, null));
327Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlMember(eventInfo, null));
328Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlMember(propertyInfo, null, XamlMemberInvoker.UnknownInvoker));
329Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlMember(eventInfo, null, XamlMemberInvoker.UnknownInvoker));
330Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlMember(propertyInfo.Name, propertyInfo.GetGetMethod(), propertyInfo.GetSetMethod(), null));
331Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlMember(propertyInfo.Name, propertyInfo.GetGetMethod(), propertyInfo.GetSetMethod(), null, XamlMemberInvoker.UnknownInvoker));
332Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlMember(eventInfo.Name, eventInfo.GetAddMethod(), null));
333Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlMember(eventInfo.Name, eventInfo.GetAddMethod(), null, XamlMemberInvoker.UnknownInvoker));
535Assert.Throws<ArgumentNullException>("typeName", () => member.LookupDeferringLoaderEntry());
536Assert.Throws<ArgumentNullException>("typeName", () => member.DeferringLoader);
687Assert.Throws<ArgumentNullException>("key", () => member.LookupDependsOnEntry());
688Assert.Throws<ArgumentNullException>("key", () => member.DependsOn);
1823Assert.Throws<ArgumentNullException>("typeName", () => member.LookupTypeConverterEntry());
1824Assert.Throws<ArgumentNullException>("typeName", () => member.TypeConverter);
2172Assert.Throws<ArgumentNullException>("typeName", () => member.LookupValueSerializerEntry());
2173Assert.Throws<ArgumentNullException>("typeName", () => member.ValueSerializer);
System\Xaml\XamlServicesTests.cs (15)
16Assert.Throws<ArgumentNullException>("xaml", () => XamlServices.Parse(null));
22Assert.Throws<ArgumentNullException>("fileName", () => XamlServices.Load((string)null!));
28Assert.Throws<ArgumentNullException>("stream", () => XamlServices.Load((Stream)null!));
34Assert.Throws<ArgumentNullException>("textReader", () => XamlServices.Load((TextReader)null!));
40Assert.Throws<ArgumentNullException>("xmlReader", () => XamlServices.Load((XmlReader)null!));
46Assert.Throws<ArgumentNullException>("xamlReader", () => XamlServices.Load((XamlReader)null!));
52Assert.Throws<ArgumentNullException>("xamlReader", () => XamlServices.Transform((XamlReader)null!, new XamlObjectWriter(new XamlSchemaContext())));
53Assert.Throws<ArgumentNullException>("xamlReader", () => XamlServices.Transform((XamlReader)null!, new XamlObjectWriter(new XamlSchemaContext()), false));
59Assert.Throws<ArgumentNullException>("xamlWriter", () => XamlServices.Transform(new XamlObjectReader(1), null));
60Assert.Throws<ArgumentNullException>("xamlWriter", () => XamlServices.Transform(new XamlObjectReader(1), null, false));
66Assert.Throws<ArgumentNullException>("fileName", () => XamlServices.Save((string)null!, 1));
78Assert.Throws<ArgumentNullException>("stream", () => XamlServices.Save((Stream)null!, 1));
84Assert.Throws<ArgumentNullException>("writer", () => XamlServices.Save((TextWriter)null!, 1));
90Assert.Throws<ArgumentNullException>("writer", () => XamlServices.Save((XmlWriter)null!, 1));
96Assert.Throws<ArgumentNullException>("writer", () => XamlServices.Save((XamlWriter)null!, 1));
System\Xaml\XamlTypeTests.cs (26)
46Assert.Throws<ArgumentNullException>("unknownTypeNamespace", () => new XamlType(null, "unknownTypeName", Array.Empty<XamlType>(), new XamlSchemaContext()));
52Assert.Throws<ArgumentNullException>("unknownTypeName", () => new XamlType("unknownTypeNamespace", null, Array.Empty<XamlType>(), new XamlSchemaContext()));
76Assert.Throws<ArgumentNullException>("typeName", () => new SubXamlType(null!, Array.Empty<XamlType>(), new XamlSchemaContext()));
130Assert.Throws<ArgumentNullException>("underlyingType", () => new XamlType(null, new XamlSchemaContext()));
131Assert.Throws<ArgumentNullException>("underlyingType", () => new XamlType(null, new XamlSchemaContext(), XamlTypeInvoker.UnknownInvoker));
145Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType("unknownTypeNamespace", "unknownTypeName", Array.Empty<XamlType>(), null));
146Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType(typeof(int), null));
147Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType(typeof(int), null, XamlTypeInvoker.UnknownInvoker));
148Assert.Throws<ArgumentNullException>("schemaContext", () => new SubXamlType("typeName", Array.Empty<XamlType>(), null));
622Assert.Throws<ArgumentNullException>("key", () => type.LookupAliasedPropertyEntry(null!));
623Assert.Throws<ArgumentNullException>("key", () => type.GetAliasedProperty(null));
1437Assert.Throws<ArgumentNullException>("type", () => type.LookupAllowedContentTypesEntry());
1438Assert.Throws<ArgumentNullException>("type", () => type.AllowedContentTypes);
1688Assert.Throws<ArgumentNullException>("key", () => type.GetAttachableMember(null));
1696Assert.Throws<ArgumentNullException>("key", () => type.GetAttachableMember(null));
2225Assert.Throws<ArgumentNullException>("type", () => type.LookupContentWrappersEntry());
2226Assert.Throws<ArgumentNullException>("type", () => type.ContentWrappers);
2494Assert.Throws<ArgumentNullException>("typeName", () => type.LookupDeferringLoaderEntry());
2495Assert.Throws<ArgumentNullException>("typeName", () => type.DeferringLoader);
3659Assert.Throws<ArgumentNullException>("name", () => type.LookupMemberEntry(null!, false));
3660Assert.Throws<ArgumentNullException>("key", () => type.GetMember(null));
3668Assert.Throws<ArgumentNullException>("key", () => type.GetMember(null));
4388Assert.Throws<ArgumentNullException>("typeName", () => type.LookupTypeConverterEntry());
4389Assert.Throws<ArgumentNullException>("typeName", () => type.TypeConverter);
4794Assert.Throws<ArgumentNullException>("typeName", () => type.LookupValueSerializerEntry());
4795Assert.Throws<ArgumentNullException>("typeName", () => type.ValueSerializer);
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)
UIAutomationClient (67)
UIAutomationClientSideProviders (1)
UIAutomationProvider (8)
UIAutomationTypes (4)
WindowsBase.Tests (174)
System\Collections\Specialized\CollectionChangedEventManagerTests.cs (7)
177Assert.Throws<ArgumentNullException>("handler", () => CollectionChangedEventManager.AddHandler(null, null));
178Assert.Throws<ArgumentNullException>("handler", () => CollectionChangedEventManager.AddHandler(source, null));
341Assert.Throws<ArgumentNullException>("source", () => CollectionChangedEventManager.AddListener(null, listener));
348Assert.Throws<ArgumentNullException>("listener", () => CollectionChangedEventManager.AddListener(source, null));
443Assert.Throws<ArgumentNullException>("handler", () => CollectionChangedEventManager.RemoveHandler(null, null));
444Assert.Throws<ArgumentNullException>("handler", () => CollectionChangedEventManager.RemoveHandler(source, null));
537Assert.Throws<ArgumentNullException>("listener", () => CollectionChangedEventManager.RemoveListener(source, null));
System\ComponentModel\CurrentChangedEventManagerTests.cs (7)
190Assert.Throws<ArgumentNullException>("handler", () => CurrentChangedEventManager.AddHandler(null, null));
191Assert.Throws<ArgumentNullException>("handler", () => CurrentChangedEventManager.AddHandler(source, null));
354Assert.Throws<ArgumentNullException>("source", () => CurrentChangedEventManager.AddListener(null, listener));
361Assert.Throws<ArgumentNullException>("listener", () => CurrentChangedEventManager.AddListener(source, null));
464Assert.Throws<ArgumentNullException>("handler", () => CurrentChangedEventManager.RemoveHandler(null, null));
465Assert.Throws<ArgumentNullException>("handler", () => CurrentChangedEventManager.RemoveHandler(source, null));
557Assert.Throws<ArgumentNullException>("listener", () => CurrentChangedEventManager.RemoveListener(source, null));
System\ComponentModel\CurrentChangingEventManagerTests.cs (7)
181Assert.Throws<ArgumentNullException>("handler", () => CurrentChangingEventManager.AddHandler(null, null));
182Assert.Throws<ArgumentNullException>("handler", () => CurrentChangingEventManager.AddHandler(source, null));
345Assert.Throws<ArgumentNullException>("source", () => CurrentChangingEventManager.AddListener(null, listener));
352Assert.Throws<ArgumentNullException>("listener", () => CurrentChangingEventManager.AddListener(source, null));
447Assert.Throws<ArgumentNullException>("handler", () => CurrentChangingEventManager.RemoveHandler(null, null));
448Assert.Throws<ArgumentNullException>("handler", () => CurrentChangingEventManager.RemoveHandler(source, null));
539Assert.Throws<ArgumentNullException>("listener", () => CurrentChangingEventManager.RemoveListener(source, null));
System\ComponentModel\PropertyChangedEventManagerTests.cs (9)
408Assert.Throws<ArgumentNullException>("handler", () => PropertyChangedEventManager.AddHandler(source, null, "propertyName"));
418Assert.Throws<ArgumentNullException>("key", () => PropertyChangedEventManager.AddHandler(source, handler, null));
823Assert.Throws<ArgumentNullException>("source", () => PropertyChangedEventManager.AddListener(null, listener, "propertyName"));
826Assert.Throws<ArgumentNullException>("source", () => PropertyChangedEventManager.AddListener(null, listener, "propertyName"));
833Assert.Throws<ArgumentNullException>("listener", () => PropertyChangedEventManager.AddListener(source, null, "propertyName"));
1016Assert.Throws<ArgumentNullException>("key", () => PropertyChangedEventManager.RemoveHandler(source, handler, null));
1022Assert.Throws<ArgumentNullException>("key", () => PropertyChangedEventManager.RemoveHandler(source, handler, null));
1031Assert.Throws<ArgumentNullException>("handler", () => PropertyChangedEventManager.RemoveHandler(source, null, "propertyName"));
1248Assert.Throws<ArgumentNullException>("listener", () => PropertyChangedEventManager.RemoveListener(source, null, "propertyName"));
System\IO\Packaging\PackageDigitalSignatureManagerTests.cs (9)
43Assert.Throws<ArgumentNullException>("package", () => new PackageDigitalSignatureManager(null));
63Assert.Throws<ArgumentNullException>("certificate", () => PackageDigitalSignatureManager.VerifyCertificate(null));
128Assert.Throws<ArgumentNullException>("value", () => manager.HashAlgorithm = null);
190Assert.Throws<ArgumentNullException>("value", () => manager.TimeFormat = null);
233Assert.Throws<ArgumentNullException>("certificate", () => manager.Countersign(null));
234Assert.Throws<ArgumentNullException>("certificate", () => manager.Countersign(null, Array.Empty<Uri>()));
246Assert.Throws<ArgumentNullException>("signatures", () => manager.Countersign(c, null));
262Assert.Throws<ArgumentNullException>("signatureUri", () => manager.GetSignature(null));
319Assert.Throws<ArgumentNullException>("signatureUri", () => manager.RemoveSignature(null));
System\Security\RightsManagement\SecureEnvironmentTests.cs (5)
32Assert.Throws<ArgumentNullException>("applicationManifest", () => SecureEnvironment.Create(null!, AuthenticationType.Windows, UserActivationMode.Permanent));
33Assert.Throws<ArgumentNullException>("applicationManifest", () => SecureEnvironment.Create(null!, new ContentUser("name", AuthenticationType.Windows)));
74Assert.Throws<ArgumentNullException>("user", () => SecureEnvironment.Create("manifest", null!));
145Assert.Throws<ArgumentNullException>("user", () => SecureEnvironment.IsUserActivated(null!));
183Assert.Throws<ArgumentNullException>("user", () => SecureEnvironment.RemoveActivatedUser(null!));
System\Windows\DependencyPropertyTests.cs (28)
216Assert.Throws<ArgumentNullException>("name", () => DependencyProperty.Register(null, typeof(int), typeof(DependencyPropertyTests)));
228Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyPropertyTests)));
229Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyPropertyTests), new PropertyMetadata()));
230Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
256Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!));
257Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!, new PropertyMetadata()));
258Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.Register(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!, new PropertyMetadata(), value => true));
529Assert.Throws<ArgumentNullException>("name", () => DependencyProperty.RegisterAttached(null, typeof(int), typeof(DependencyPropertyTests)));
530Assert.Throws<ArgumentNullException>("name", () => DependencyProperty.RegisterAttached(null, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata()));
531Assert.Throws<ArgumentNullException>("name", () => DependencyProperty.RegisterAttached(null, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
545Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyPropertyTests)));
546Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyPropertyTests), new PropertyMetadata()));
547Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
573Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!));
574Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!, new PropertyMetadata()));
575Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.RegisterAttached(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!, new PropertyMetadata(), value => true));
815Assert.Throws<ArgumentNullException>("name", () => DependencyProperty.RegisterReadOnly(null, typeof(int), typeof(DependencyObject), new PropertyMetadata()));
816Assert.Throws<ArgumentNullException>("name", () => DependencyProperty.RegisterReadOnly(null, typeof(int), typeof(DependencyObject), new PropertyMetadata(), value => true));
829Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyProperty), new PropertyMetadata()));
830Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyProperty), new PropertyMetadata(), value => true));
855Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!, new PropertyMetadata()));
856Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.RegisterReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!, new PropertyMetadata(), value => true));
1109Assert.Throws<ArgumentNullException>("name", () => DependencyProperty.RegisterAttachedReadOnly(null, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata()));
1110Assert.Throws<ArgumentNullException>("name", () => DependencyProperty.RegisterAttachedReadOnly(null, typeof(int), typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
1123Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyPropertyTests), new PropertyMetadata()));
1124Assert.Throws<ArgumentNullException>("propertyType", () => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, null!, typeof(DependencyPropertyTests), new PropertyMetadata(), value => true));
1149Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!, new PropertyMetadata()));
1150Assert.Throws<ArgumentNullException>("ownerType", () => DependencyProperty.RegisterAttachedReadOnly(MethodBase.GetCurrentMethod()!.Name, typeof(int), null!, new PropertyMetadata(), value => true));
System\Windows\Input\KeyConverterTests.cs (3)
223Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(value, null!));
224Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(null, null, Key.None, null!));
225Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, Key.None, null!));
System\Windows\Input\ModifierKeysConverterTests.cs (3)
189Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(value, null!));
190Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(null, null, Key.None, null!));
191Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, Key.None, null!));
System\Windows\Int32RectConverterTests.cs (3)
99Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(value, null!));
100Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(null, null, new Int32Rect(), null!));
101Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, new Int32Rect(), null!));
System\Windows\Media\MatrixConverterTests.cs (3)
99Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(value, null!));
100Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(null, null, new Matrix(), null!));
101Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, new Matrix(), null!));
System\Windows\NameScopeTests.cs (13)
35Assert.Throws<ArgumentNullException>("dependencyObject", () => NameScope.GetNameScope(null));
62Assert.Throws<ArgumentNullException>("dependencyObject", () => NameScope.SetNameScope(null, nameScope));
114Assert.Throws<ArgumentNullException>("key", () => nameScope[null]);
182Assert.Throws<ArgumentNullException>("key", () => nameScope.Add(null, scopedElement));
208Assert.Throws<ArgumentNullException>("value", () => nameScope["name"] = null);
303Assert.Throws<ArgumentNullException>(() => nameScope.Add(null, scopedElement));
329Assert.Throws<ArgumentNullException>("scopedElement", () => nameScope.Add("name", null!));
673Assert.Throws<ArgumentNullException>("key", () => nameScope.ContainsKey(null!));
900Assert.Throws<ArgumentNullException>("name", () => nameScope.RegisterName(null, scopedElement));
926Assert.Throws<ArgumentNullException>("scopedElement", () => nameScope.RegisterName("name", null!));
958Assert.Throws<ArgumentNullException>("key", () => nameScope.Remove(null));
1122Assert.Throws<ArgumentNullException>("key", () => nameScope.TryGetValue(null, out object value));
1145Assert.Throws<ArgumentNullException>("name", () => nameScope.UnregisterName(null));
System\Windows\PointConverterTests.cs (3)
99Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(value, null!));
100Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(null, null, new Point(), null!));
101Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, new Point(), null!));
System\Windows\RectConverterTests.cs (3)
99Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(value, null!));
100Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(null, null, new Rect(), null!));
101Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, new Rect(), null!));
System\Windows\SizeConverterTests.cs (3)
99Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(value, null!));
100Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(null, null, new Size(), null!));
101Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, new Size(), null!));
System\Windows\Threading\DispatcherTimerTests.cs (3)
108Assert.Throws<ArgumentNullException>("dispatcher", () => new DispatcherTimer(DispatcherPriority.Normal, null));
109Assert.Throws<ArgumentNullException>("dispatcher", () => new DispatcherTimer(TimeSpan.Zero, DispatcherPriority.Normal, (s, e) => {}, null));
130Assert.Throws<ArgumentNullException>("callback", () => new DispatcherTimer(TimeSpan.Zero, DispatcherPriority.Normal, null, Dispatcher.CurrentDispatcher));
System\Windows\VectorConverterTests.cs (3)
99Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(value, null!));
100Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(null, null, new Vector(), null!));
101Assert.Throws<ArgumentNullException>("destinationType", () => converter.ConvertTo(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, new Vector(), null!));
System\Windows\WeakEventManagerTests.cs (6)
750Assert.Throws<ArgumentNullException>("key", () => SubWeakEventManager.GetCurrentManager(null!));
1225Assert.Throws<ArgumentNullException>("handler", () => manager.ProtectedAddHandler(source, null!));
1591Assert.Throws<ArgumentNullException>("listener", () => manager.ProtectedAddListener(source, null!));
2129Assert.Throws<ArgumentNullException>("handler", () => manager.ProtectedRemoveHandler(source, null!));
2554Assert.Throws<ArgumentNullException>("listener", () => manager.ProtectedRemoveListener(source, null!));
2921Assert.Throws<ArgumentNullException>("key", () => SubWeakEventManager.SetCurrentManager(null!, new SubWeakEventManager()));
xunit.assert (11)