125 references to ArgumentNullException
Aspire.Confluent.Kafka (1)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\Guard.cs (1)
66throw new ArgumentNullException(paramName, "Must not be null");
Aspire.Hosting (3)
ApplicationModel\ContainerMountAnnotation.cs (1)
28throw new ArgumentNullException(nameof(source), Resources.ContainerMountBindMountsRequireSourceExceptionMessage);
ExternalServiceResource.cs (2)
27_uri = uri ?? throw new ArgumentNullException(nameof(uri), "The URI for the external service cannot be null."); 42_urlParameter = urlParameter ?? throw new ArgumentNullException(nameof(urlParameter), "The URL parameter for the external service cannot be null.");
Aspire.Hosting.Python (2)
PythonAppResourceBuilderExtensions.cs (1)
187throw new ArgumentNullException(nameof(scriptArgs), $"Array params contains null item: [{values}]");
PythonProjectResourceBuilderExtensions.cs (1)
190throw new ArgumentNullException(nameof(scriptArgs), $"Array params contains null item: [{values}]");
Aspire.Hosting.Testing (2)
DistributedApplicationFactory.cs (1)
162throw new ArgumentNullException(nameof(args), $"Array params contains null item: [{values}]");
DistributedApplicationTestingBuilder.cs (1)
148throw new ArgumentNullException(nameof(args), $"Array params contains null item: [{values}]");
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (1)
64throw new ArgumentNullException(paramName, "Must not be null");
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (1)
64throw new ArgumentNullException(paramName, "Must not be null");
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\Guard.cs (1)
72throw new ArgumentNullException(paramName, "Must not be null");
dotnet-svcutil-lib (4)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (2)
362throw new ArgumentNullException("name", ResXml.Xml_EmptyName); 432throw new ArgumentNullException("name", ResXml.Xml_EmptyLocalName);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\ExceptionTrace.cs (1)
183return TraceException<ArgumentNullException>(new ArgumentNullException(paramName, message));
FrameworkFork\System.ServiceModel\SMDiagnostics\System\ServiceModel\Diagnostics\ExceptionUtility.cs (1)
56return (ArgumentNullException)this.ThrowHelperError(new ArgumentNullException(paramName, message));
Microsoft.Analyzers.Local.Tests (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.AspNetCore.Antiforgery (2)
Internal\DefaultAntiforgeryTokenGenerator.cs (2)
112throw new ArgumentNullException( 119throw new ArgumentNullException(
Microsoft.AspNetCore.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.AspNetCore.HeaderParsing (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.AspNetCore.Rewrite (1)
IISUrlRewrite\UrlRewriteRuleBuilder.cs (1)
36throw new ArgumentNullException(nameof(action), "Rules must contain an action");
Microsoft.AspNetCore.Testing (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Cci.Extensions (1)
Mappings\AssemblySetMapping.cs (1)
30throw new ArgumentNullException("element", "Element contained a null entry.");
Microsoft.CodeAnalysis.Workspaces (1)
Editing\SymbolEditor.cs (1)
380throw new ArgumentNullException(WorkspacesResources.The_position_is_not_within_the_symbol_s_declaration, nameof(position));
Microsoft.Data.Analysis (1)
PrimitiveColumnContainer.cs (1)
68throw new ArgumentNullException(Strings.InconsistentNullBitMapAndNullCount, nameof(nullBitMap));
Microsoft.Extensions.AI (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.AzureAIInference (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Evaluation (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Evaluation.Console (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Evaluation.NLP (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Evaluation.Quality (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Evaluation.Reporting (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Evaluation.Safety (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Integration.Tests (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.Ollama (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AI.OpenAI (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AmbientMetadata.Application (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.AsyncState (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Caching.Hybrid (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Compliance.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Compliance.Redaction (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Compliance.Testing (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.DependencyInjection.AutoActivation (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Diagnostics.ExceptionSummarization (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Diagnostics.Probes (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Diagnostics.Testing (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFilesWatcher.cs (1)
80throw new ArgumentNullException(nameof(fileSystemWatcher), SR.Error_FileSystemWatcherRequiredWithoutPolling);
Microsoft.Extensions.Hosting.Testing (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Http.Resilience (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.ObjectPool.DependencyInjection (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Options.Contextual (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Resilience (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Telemetry (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.Telemetry.Abstractions (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Extensions.TimeProvider.Testing (1)
src\Shared\Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
Microsoft.Maui.Controls (4)
FlyoutPage\FlyoutPage.cs (2)
47 throw new ArgumentNullException(nameof(value), "Detail cannot be set to null once a value is set."); 98 throw new ArgumentNullException(nameof(value), "Flyout cannot be set to null once a value is set");
Routing.cs (2)
241 throw new ArgumentNullException(nameof(route), "Route cannot be an empty string"); 243 routeFactory = routeFactory ?? throw new ArgumentNullException(nameof(routeFactory), "Route Factory cannot be null");
Microsoft.Maui.Essentials (1)
TextToSpeech\TextToSpeech.shared.cs (1)
159 throw new ArgumentNullException(nameof(text), "Text cannot be null or empty string");
Microsoft.ML.AutoML (2)
Utils\UserInputValidationUtil.cs (2)
73throw new ArgumentNullException(nameof(trainData), "Training data cannot be null"); 168throw new ArgumentNullException(nameof(path), "Provided path cannot be null");
Microsoft.ML.Core (4)
Utilities\Contracts.cs (4)
326=> Process(new ArgumentNullException(paramName, msg)); 328=> Process(new ArgumentNullException(paramName, msg), ctx); 330=> Process(new ArgumentNullException(paramName, GetMsg(msg, args))); 332=> Process(new ArgumentNullException(paramName, GetMsg(msg, args)), ctx);
Microsoft.ML.CpuMath (4)
src\Microsoft.ML.Core\Utilities\Contracts.cs (4)
326=> Process(new ArgumentNullException(paramName, msg)); 328=> Process(new ArgumentNullException(paramName, msg), ctx); 330=> Process(new ArgumentNullException(paramName, GetMsg(msg, args))); 332=> Process(new ArgumentNullException(paramName, GetMsg(msg, args)), ctx);
Microsoft.ML.DataView (2)
DataViewSchema.cs (2)
204throw new ArgumentNullException(nameof(getter), $"Delegate at index '{i}' of {nameof(getters)} was null."); 215throw new ArgumentNullException(nameof(getter), $"Getter of type '{typeof(TValue)}' expected, but {getter.GetType()} found");
Microsoft.ML.Tokenizers (2)
Model\BPETokenizer.cs (1)
144throw new ArgumentNullException(nameof(options.Vocabulary), "The vocabulary cannot be null.");
Model\EnglishRobertaTokenizer.cs (1)
1171throw new ArgumentNullException(nameof(symbol), $"argument {nameof(symbol)} should not be null.");
PresentationCore (12)
System\Windows\Ink\DrawingAttributes.cs (2)
590throw new ArgumentNullException(nameof(e), SR.EventArgIsNull); 619throw new ArgumentNullException(nameof(e), SR.EventArgIsNull);
System\Windows\Ink\Stroke.cs (5)
586throw new ArgumentNullException(nameof(e), SR.EventArgIsNull); 617throw new ArgumentNullException(nameof(e), SR.EventArgIsNull); 632throw new ArgumentNullException(nameof(e), SR.EventArgIsNull); 649throw new ArgumentNullException(nameof(e), SR.EventArgIsNull); 667throw new ArgumentNullException(nameof(e), SR.EventArgIsNull);
System\Windows\Ink\StrokeCollection.cs (2)
617throw new ArgumentNullException(nameof(e), SR.EventArgIsNull); 674throw new ArgumentNullException(nameof(e), SR.EventArgIsNull);
System\Windows\Input\Stylus\Common\StylusPlugInCollection.cs (2)
38throw new ArgumentNullException(nameof(plugIn), SR.Stylus_PlugInIsNull); 171throw new ArgumentNullException(nameof(plugIn), SR.Stylus_PlugInIsNull);
System\Windows\Media\Fonts.cs (1)
102throw new ArgumentNullException(nameof(baseUri), SR.Format(SR.NullBaseUriParam, "baseUri", "location"));
PresentationFramework (4)
System\Windows\Controls\DataGridColumnCollection.cs (2)
40throw new ArgumentNullException(nameof(item), SR.DataGrid_NullColumn); 61throw new ArgumentNullException(nameof(item), SR.DataGrid_NullColumn);
System\Windows\Standard\Verify.cs (2)
62throw new ArgumentNullException(name, errorMessage); 86throw new ArgumentNullException(name, errorMessage);
Roslyn.Test.PdbUtilities (1)
Reader\Token2SourceLineExporter.cs (1)
533throw new ArgumentNullException(nameof(nvalue), "ArgumentNull_Value");
ScenarioTests.Common.Tests (2)
ScenarioTestTypes.cs (2)
1264throw new ArgumentNullException("allowedIssuerName", "[MyX509CertificateValidator] The string parameter allowedIssuerName was null or empty."); 1277throw new ArgumentNullException("certificate", "[MyX509CertificateValidator] The X509Certificate2 parameter certificate was null.");
Shared (1)
Throw\Throw.cs (1)
322=> throw new ArgumentNullException(paramName, message);
System.Collections.Concurrent (1)
System\ThrowHelper.cs (1)
17internal static void ThrowArgumentNullException(string name, string message) => throw new ArgumentNullException(name, message);
System.Data.Common (2)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
74ArgumentNullException e = new ArgumentNullException(parameter, error);
System\Data\DataException.cs (1)
340private static Exception _ArgumentNull(string paramName, string msg) => TraceExceptionAsReturnValue(new ArgumentNullException(paramName, msg));
System.Data.Odbc (1)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
74ArgumentNullException e = new ArgumentNullException(parameter, error);
System.Diagnostics.Process (1)
System\Diagnostics\Process.cs (1)
1274throw new ArgumentNullException("item", SR.ArgumentListMayNotContainNull);
System.Net.Quic (2)
System\Net\Quic\Internal\ThrowHelper.cs (1)
215throw new ArgumentNullException(argumentName, SR.Format(resourceName, propertyName));
System\Net\Quic\QuicListenerOptions.cs (1)
49throw new ArgumentNullException(argumentName, SR.Format(SR.net_quic_not_null_not_empty_listener, nameof(ApplicationProtocols)));
System.Net.Sockets (1)
System\Net\Sockets\Socket.cs (1)
2396throw new ArgumentNullException(null, SR.net_sockets_empty_select);
System.Private.CoreLib (14)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\FieldMetadata.cs (1)
102throw new ArgumentNullException(
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfo.cs (2)
1054throw new ArgumentNullException("value", SR.ArgumentNull_ArrayValue); 1610throw new ArgumentNullException(nameof(patterns) + "[" + i + "]", SR.ArgumentNull_ArrayValue);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (1)
5202return new ArgumentNullException("formats", SR.ArgumentNull_String);
src\libraries\System.Private.CoreLib\src\System\Globalization\NumberFormatInfo.cs (1)
117throw new ArgumentNullException(propertyName, SR.ArgumentNull_ArrayValue);
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (1)
42throw new ArgumentNullException(nameof(type), SR.ArgumentNull_TypeRequiredByResourceScope);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
251WaitHandle waitHandle = waitHandles[i] ?? throw new ArgumentNullException($"waitHandles[{i}]", SR.ArgumentNull_ArrayElement);
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (2)
125throw new ArgumentNullException("value", SR.ArgumentNull_TypedRefType); 365throw new ArgumentNullException(GetArgumentName(argument), GetResourceString(resource));
src\System\Reflection\RuntimeCustomAttributeData.cs (2)
1875throw new ArgumentNullException(null, SR.Arg_InvalidHandle); 1905throw new ArgumentNullException(null, SR.Arg_InvalidHandle);
src\System\RuntimeHandles.cs (3)
26m_type ?? throw new ArgumentNullException(null, SR.Arg_InvalidHandle); 972throw new ArgumentNullException(null, SR.Arg_InvalidHandle); 1430new RuntimeFieldHandle(m_ptr ?? throw new ArgumentNullException(null, SR.Arg_InvalidHandle));
System.Private.Windows.Core (2)
System\ArgumentValidation.cs (2)
20argument is null ? throw new ArgumentNullException(paramName, message) : argument; 43throw new ArgumentNullException(paramName, message);
System.Private.Xml (1)
System\Xml\Serialization\XmlSerializationReader.cs (1)
967throw new ArgumentNullException(nameof(value), SR.Format(SR.XmlMissingArrayType, CurrentTag()));
System.Runtime.Serialization.Formatters (2)
System\Runtime\Serialization\FormatterServices.cs (2)
232throw new ArgumentNullException(nameof(members), SR.Format(SR.ArgumentNull_NullMember, i)); 269throw new ArgumentNullException(nameof(members), SR.Format(SR.ArgumentNull_NullMember, i));