543 instantiations of NotNull
Aspire.Confluent.Kafka (4)
Aspire.Dashboard (1)
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.Microsoft.Data.SqlClient (4)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (4)
Aspire.StackExchange.Redis (4)
BuildActionTelemetryTable (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Contract.cs (4)
26public static void ThrowIfNull<T>([NotNull] T value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : class?
39public static void ThrowIfNull<T>([NotNull] T? value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : struct
52public static void ThrowIfNull<T>([NotNull] T value, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
65public static void ThrowIfNull<T>([NotNull] T value, [InterpolatedStringHandlerArgument("value")] ThrowIfNullInterpolatedStringHandler<T> message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
Microsoft.Analyzers.Local.Tests (13)
Microsoft.AspNetCore.AsyncState (13)
Microsoft.AspNetCore.Authorization (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.Components.Server (1)
Microsoft.AspNetCore.HeaderParsing (13)
Microsoft.AspNetCore.Http.Connections (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.Http.Connections.Client (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.Identity.FunctionalTests (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.InternalTesting (3)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.JsonPatch (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.Mvc.Abstractions (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Microsoft.AspNetCore.Shared.Tests (4)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.SignalR.Client.Core (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.SignalR.Common (3)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.SignalR.Core (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.Testing (13)
Microsoft.AspNetCore.WebUtilities (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Build.Engine.OM.UnitTests (9)
ErrorUtilities.cs (9)
119internal static void VerifyThrowInternalNull([NotNull] object? parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null)
150internal static void VerifyThrowInternalLength([NotNull] string? parameterValue, [CallerArgumentExpression(nameof(parameterValue))] string? parameterName = null)
160public static void VerifyThrowInternalLength<T>([NotNull] T[]? parameterValue, [CallerArgumentExpression(nameof(parameterValue))] string? parameterName = null)
492internal static void VerifyThrowArgumentLength([NotNull] string? parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null)
507internal static void VerifyThrowArgumentLength<T>([NotNull] IReadOnlyCollection<T> parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null)
539internal static void VerifyThrowArgumentInvalidPath([NotNull] string parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null)
564internal static void VerifyThrowArgumentNull([NotNull] object? parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null)
572internal static void VerifyThrowArgumentNull([NotNull] object? parameter, string? parameterName, string resourceName)
610[NotNull] T[]? array,
Microsoft.CodeAnalysis (22)
InternalUtilities\InterlockedOperations.cs (6)
16private static T GetOrStore<T>([NotNull] ref T? target, T value) where T : class
33public static T Initialize<T>([NotNull] ref T? target, Func<T> valueFactory) where T : class
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg)
85public static T? Initialize<T>([NotNull] ref StrongBox<T?>? target, Func<T?> valueFactory)
103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg)
119public static T Initialize<T>([NotNull] ref T? target, T value) where T : class
Microsoft.CodeAnalysis.CSharp (7)
Microsoft.CodeAnalysis.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (17)
src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (6)
16private static T GetOrStore<T>([NotNull] ref T? target, T value) where T : class
33public static T Initialize<T>([NotNull] ref T? target, Func<T> valueFactory) where T : class
46public static T Initialize<T, TArg>([NotNull] ref T? target, Func<TArg, T> valueFactory, TArg arg)
85public static T? Initialize<T>([NotNull] ref StrongBox<T?>? target, Func<T?> valueFactory)
103public static T? Initialize<T, TArg>([NotNull] ref StrongBox<T?>? target, Func<TArg, T?> valueFactory, TArg arg)
119public static T Initialize<T>([NotNull] ref T? target, T value) where T : class
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\Contract.cs (4)
26public static void ThrowIfNull<T>([NotNull] T value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : class?
39public static void ThrowIfNull<T>([NotNull] T? value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : struct
52public static void ThrowIfNull<T>([NotNull] T value, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
65public static void ThrowIfNull<T>([NotNull] T value, [InterpolatedStringHandlerArgument("value")] ThrowIfNullInterpolatedStringHandler<T> message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
Microsoft.DotNet.XUnitAssert.Tests (2)
Microsoft.Extensions.AI.Integration.Tests (13)
Microsoft.Extensions.AmbientMetadata.Application (13)
Microsoft.Extensions.AsyncState (13)
Microsoft.Extensions.Caching.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Caching.Memory (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Caching.SqlServer (3)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Caching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Compliance.Abstractions (13)
Microsoft.Extensions.Compliance.Redaction (13)
Microsoft.Extensions.Compliance.Testing (13)
Microsoft.Extensions.Configuration (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Configuration.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Configuration.Binder (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Configuration.CommandLine (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Configuration.FileExtensions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Configuration.Ini (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Configuration.Json (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Configuration.UserSecrets (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Configuration.Xml (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.DependencyInjection.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.DependencyInjection.AutoActivation (13)
Microsoft.Extensions.DependencyModel (2)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Diagnostics (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Diagnostics.ExceptionSummarization (13)
Microsoft.Extensions.Diagnostics.HealthChecks (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Diagnostics.HealthChecks.Common (13)
Microsoft.Extensions.Diagnostics.Probes (13)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (13)
Microsoft.Extensions.Diagnostics.Testing (13)
Microsoft.Extensions.Features (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.FileProviders.Composite (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.FileProviders.Embedded (3)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.FileProviders.Physical (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.FileSystemGlobbing (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Hosting (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Hosting.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Hosting.Systemd (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Hosting.Testing (13)
Microsoft.Extensions.Hosting.WindowsServices (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Http (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Http.Resilience (13)
Microsoft.Extensions.Identity.Stores (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Localization.Abstractions (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Logging (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Logging.Abstractions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Logging.AzureAppServices (3)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Logging.Configuration (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Logging.Console (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Logging.Debug (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Logging.EventLog (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Logging.EventSource (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Logging.TraceSource (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.ObjectPool (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.ObjectPool.DependencyInjection (13)
Microsoft.Extensions.Options (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Options.ConfigurationExtensions (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Options.DataAnnotations (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Resilience (13)
Microsoft.Extensions.Telemetry (13)
Microsoft.Extensions.Telemetry.Abstractions (13)
Microsoft.Extensions.WebEncoders (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Replay (1)
Shared (14)
System.Collections.Immutable (3)
System.Data.Common (8)
System.Data.Odbc (1)
System.Linq.AsyncEnumerable (1)
System.Net.Http (4)
System.Net.Http.Json (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
System.Net.Primitives (1)
System.Net.ServerSentEvents (1)
System.Net.Sockets (1)
System.Private.CoreLib (27)
src\libraries\System.Private.CoreLib\src\System\Threading\LazyInitializer.cs (10)
50public static T EnsureInitialized<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] T>([NotNull] ref T? target) where T : class =>
59private static T EnsureInitializedCore<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] T>([NotNull] ref T? target) where T : class
102public static T EnsureInitialized<T>([NotNull] ref T? target, Func<T> valueFactory) where T : class =>
112private static T EnsureInitializedCore<T>([NotNull] ref T? target, Func<T> valueFactory) where T : class
155private static T EnsureInitializedCore<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] T>([AllowNull] ref T target, ref bool initialized, [NotNull] ref object? syncLock)
217private static T EnsureInitializedCore<T>([AllowNull] ref T target, ref bool initialized, [NotNull] ref object? syncLock, Func<T> valueFactory)
242public static T EnsureInitialized<T>([NotNull] ref T? target, [NotNullIfNotNull(nameof(syncLock))] ref object? syncLock, Func<T> valueFactory) where T : class =>
257private static T EnsureInitializedCore<T>([NotNull] ref T? target, [NotNull] ref object? syncLock, Func<T> valueFactory) where T : class
282private static object EnsureLockInitialized([NotNull] ref object? syncLock) =>
System.Private.Windows.Core (5)
System.Private.Xml (2)
System.Security.Cryptography (3)
System.Text.Encodings.Web (2)
System.Text.RegularExpressions (1)
System.Threading.Tasks.Dataflow (3)
System.Windows.Forms (2)
xunit.assert (9)
5 references to NotNull
mscorlib (1)
netstandard (1)
System.Runtime (1)
System.Text.Json (2)