543 instantiations of NotNull
Aspire.Confluent.Kafka (4)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\Guard.cs (4)
62public static void ThrowIfNull([NotNull] object? value, [CallerArgumentExpression("value")] string? paramName = null) 77public static void ThrowIfNullOrEmpty([NotNull] string? value, [CallerArgumentExpression("value")] string? paramName = null) 94public static void ThrowIfNullOrWhitespace([NotNull] string? value, [CallerArgumentExpression("value")] string? paramName = null) 175public static T ThrowIfNotOfType<T>([NotNull] object? value, [CallerArgumentExpression("value")] string? paramName = null)
Aspire.Dashboard (1)
Otlp\Model\OtlpHelpers.cs (1)
257public static void CopyKeyValuePairs(RepeatedField<KeyValue> attributes, KeyValuePair<string, string>[] parentAttributes, OtlpContext context, out int copyCount, [NotNull] ref KeyValuePair<string, string>[]? copiedAttributes)
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresFlexibleServerDatabaseResource.cs (1)
44private static T ThrowIfNull<T>([NotNull] T? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Azure.Sql (1)
AzureSqlDatabaseResource.cs (1)
45private static T ThrowIfNull<T>([NotNull] T? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Garnet (1)
GarnetResource.cs (1)
31private static string ThrowIfNull([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Keycloak (1)
KeycloakResource.cs (1)
36private static T ThrowIfNull<T>([NotNull] T? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Nats (1)
NatsServerResource.cs (1)
73private static string ThrowIfNull([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.NodeJs (1)
NodeAppResource.cs (1)
18private static string ThrowIfNull([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.PostgreSQL (3)
PgAdminContainerResource.cs (1)
16private static string ThrowIfNull([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
PostgresDatabaseResource.cs (1)
33private static T ThrowIfNull<T>([NotNull] T? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
PostgresServerResource.cs (1)
99private static string ThrowIfNull([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Python (2)
PythonAppResource.cs (1)
19private static string ThrowIfNull([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
PythonProjectResource.cs (1)
20private static string ThrowIfNull([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Microsoft.Data.SqlClient (4)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (4)
60public static void ThrowIfNull([NotNull] object? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 75public static void ThrowIfNullOrEmpty([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 92public static void ThrowIfNullOrWhitespace([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 173public static T ThrowIfNotOfType<T>([NotNull] object? value, [CallerArgumentExpression(nameof(value))] string? paramName = null)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (4)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (4)
60public static void ThrowIfNull([NotNull] object? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 75public static void ThrowIfNullOrEmpty([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 92public static void ThrowIfNullOrWhitespace([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 173public static T ThrowIfNotOfType<T>([NotNull] object? value, [CallerArgumentExpression(nameof(value))] string? paramName = null)
Aspire.StackExchange.Redis (4)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\Guard.cs (4)
68public static void ThrowIfNull([NotNull] object? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 83public static void ThrowIfNullOrEmpty([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 100public static void ThrowIfNullOrWhitespace([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 181public static T ThrowIfNotOfType<T>([NotNull] object? value, [CallerArgumentExpression(nameof(value))] string? paramName = null)
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)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.AspNetCore.AsyncState (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.AspNetCore.Authorization (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.AspNetCore.Components.Server (1)
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (1)
707private static void ThrowIfNullOrEmpty([NotNull] string? target, string message)
Microsoft.AspNetCore.HeaderParsing (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
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]
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[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)
src\Shared\runtime\Http3\QPack\QPackDecoder.cs (1)
668private static void EnsureStringCapacity([NotNull] ref byte[]? buffer, int requiredLength, int existingLength)
Microsoft.AspNetCore.Shared.Tests (4)
src\Shared\runtime\Http3\QPack\QPackDecoder.cs (1)
668private static void EnsureStringCapacity([NotNull] ref byte[]? buffer, int requiredLength, int existingLength)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[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]
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[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)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
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)
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
128[NotNull] ref Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? lazyDiagnosticsMap,
InternalUtilities\Debug.cs (1)
35public static void AssertNotNull<T>([NotNull] T value)
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
InternalUtilities\ReflectionUtilities.cs (2)
31public static Type? TryGetType([NotNull] ref Type? lazyType, string assemblyQualifiedName) 57public static Type? GetTypeFromEither([NotNull] ref Type? lazyType, string contractName, string desktopName)
InternalUtilities\RoslynLazyInitializer.cs (4)
14public static T EnsureInitialized<T>([NotNull] ref T? target) where T : class 18public static T EnsureInitialized<T>([NotNull] ref T? target, Func<T> valueFactory) where T : class 22public static T EnsureInitialized<T>([NotNull] ref T? target, ref bool initialized, [NotNullIfNotNull(nameof(syncLock))] ref object? syncLock) 26public static T EnsureInitialized<T>([NotNull] ref T? target, ref bool initialized, [NotNullIfNotNull(nameof(syncLock))] ref object? syncLock, Func<T> valueFactory)
Operations\ControlFlowGraphBuilder.cs (4)
1148void collectAncestorsAndSelf([DisallowNull] RegionBuilder? from, [NotNull] ref ArrayBuilder<RegionBuilder>? builder) 2758private void VisitConditionalBranch(IOperation condition, [NotNull] ref BasicBlockBuilder? dest, bool jumpIfTrue) 2773private void VisitConditionalBranchCore(IOperation condition, [NotNull] ref BasicBlockBuilder? dest, bool jumpIfTrue) 2780void visitConditionalBranchCore(IOperation condition, [NotNull] ref BasicBlockBuilder? dest, bool jumpIfTrue)
PEWriter\Members.cs (2)
871[NotNull] 916[NotNull]
PEWriter\Types.cs (1)
340[return: NotNull]
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
646private static void AddModule(PEModule module, int referenceIndex, ResolvedReference[] referenceMap, [NotNull] ref ArrayBuilder<PEModule>? modules)
Microsoft.CodeAnalysis.CSharp (7)
Compilation\CSharpCompilation.cs (1)
2583private BinderFactory AddNewFactory(SyntaxTree syntaxTree, bool ignoreAccessibility, [NotNull] ref WeakReference<BinderFactory>? slot)
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
815void ensureTempTrackingSetup([NotNull] ref ArrayBuilder<LocalSymbol>? tempsOpt, ref BitVector positionsAssignedToTemp) 1003[NotNull] ref ArrayBuilder<LocalSymbol>? temps, 1190static void fillRefKindsBuilder(ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<ParameterSymbol> parameters, [NotNull] ref ArrayBuilder<RefKind>? refKindsBuilder)
Parser\Lexer.cs (1)
2217private void AddTrivia(CSharpSyntaxNode trivia, [NotNull] ref SyntaxListBuilder? list)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (2)
126static void ensureEqualityComparerHelpers(SyntheticBoundNodeFactory F, [NotNull] ref MethodSymbol? equalityComparer_GetHashCode, [NotNull] ref MethodSymbol? equalityComparer_get_Default)
Microsoft.CodeAnalysis.Test.Utilities (2)
Assert\AssertEx.cs (2)
559public static void NotNull<T>([NotNull] T @object, string message = null) 1010public static void NotNull<T>([NotNull] T value)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (17)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
35public static void AssertNotNull<T>([NotNull] T value)
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\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
31public static Type? TryGetType([NotNull] ref Type? lazyType, string assemblyQualifiedName) 57public static Type? GetTypeFromEither([NotNull] ref Type? lazyType, string contractName, string desktopName)
src\Compilers\Core\Portable\InternalUtilities\RoslynLazyInitializer.cs (4)
14public static T EnsureInitialized<T>([NotNull] ref T? target) where T : class 18public static T EnsureInitialized<T>([NotNull] ref T? target, Func<T> valueFactory) where T : class 22public static T EnsureInitialized<T>([NotNull] ref T? target, ref bool initialized, [NotNullIfNotNull(nameof(syncLock))] ref object? syncLock) 26public static T EnsureInitialized<T>([NotNull] ref T? target, ref bool initialized, [NotNullIfNotNull(nameof(syncLock))] ref object? syncLock, Func<T> valueFactory)
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)
AsyncCollectionAssertsTests.cs (1)
1590 [NotNull] T2? value)
CollectionAssertsTests.cs (1)
2627 [NotNull] T2? value)
Microsoft.Extensions.AI.Integration.Tests (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AmbientMetadata.Application (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AsyncState (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
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]
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[NotNull]
Microsoft.Extensions.Caching.StackExchangeRedis (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Microsoft.Extensions.Compliance.Abstractions (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Compliance.Redaction (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Compliance.Testing (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
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)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.DependencyModel (2)
DependencyContextJsonReader.cs (1)
214private static Target? SelectRuntimeTarget([NotNull] List<Target>? targets, string? runtimeTargetName)
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)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
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)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Diagnostics.Probes (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Diagnostics.ResourceMonitoring (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Diagnostics.Testing (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
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]
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[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)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
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)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
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]
src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[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)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
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)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Telemetry (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Telemetry.Abstractions (13)
src\Shared\Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.WebEncoders (1)
src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (1)
19[NotNull]
Replay (1)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
35public static void AssertNotNull<T>([NotNull] T value)
Shared (14)
ServerSentEvents\SseParser_1.cs (1)
558private static void GrowBuffer([NotNull] ref byte[]? buffer, int minimumLength)
Throw\Throw.cs (13)
39[return: NotNull] 40public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 67[return: NotNull] 69[NotNull] TParameter argument, 70[NotNull] TMember member, 103[return: NotNull] 107[NotNull] TMember member, 132[return: NotNull] 133public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 165[return: NotNull] 166public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 249[return: NotNull] 256public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
System.Collections.Immutable (3)
Validation\Requires.cs (3)
23public static void NotNull<T>([NotNull] T value, string? parameterName) 41public static T NotNullPassthrough<T>([NotNull] T value, string? parameterName) 60public static void NotNullAllowStructs<T>([NotNull] T value, string? parameterName)
System.Data.Common (8)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
224internal static void CheckArgumentNull([NotNull] object? value, string parameterName)
System\Data\Common\DataColumnMappingCollection.cs (3)
180private void AddWithoutEvents([NotNull] DataColumnMapping? value) 388private static void ValidateType([NotNull] object? value) 400private void Validate(int index, [NotNull] DataColumnMapping? value)
System\Data\Common\DataTableMappingCollection.cs (2)
324private static void ValidateType([NotNull] object? value) 336private void Validate(int index, [NotNull] DataTableMapping? value)
System\Data\DataColumnCollection.cs (1)
319private void BaseAdd([NotNull] DataColumn? column)
System\Data\DataTableCollection.cs (1)
277private void BaseAdd([NotNull] DataTable table)
System.Data.Odbc (1)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
224internal static void CheckArgumentNull([NotNull] object? value, string parameterName)
System.Linq.AsyncEnumerable (1)
System\Linq\ThrowHelper.cs (1)
11internal static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
System.Net.Http (4)
src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackDecoder.cs (1)
668private static void EnsureStringCapacity([NotNull] ref byte[]? buffer, int requiredLength, int existingLength)
System\Net\Http\Headers\HttpHeaders.cs (1)
1178internal static int GetStoreValuesIntoStringArray(HeaderDescriptor descriptor, object sourceValues, [NotNull] ref string[]? values)
System\Net\Http\HttpClient.cs (1)
565private static void ThrowForNullResponse([NotNull] HttpResponseMessage? response)
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
133static string GetOrAddCachedValue([NotNull] ref string? cache, HeaderDescriptor descriptor, ReadOnlySpan<byte> value, Encoding? encoding)
System.Net.Http.Json (1)
src\libraries\Common\src\System\ThrowHelper.cs (1)
19[NotNull]
System.Net.Primitives (1)
System\Net\IPNetwork.cs (1)
364static IPNetwork IParsable<IPNetwork>.Parse([NotNull] string s, IFormatProvider? provider) => Parse(s);
System.Net.ServerSentEvents (1)
System\Net\ServerSentEvents\SseParser_1.cs (1)
534private static void GrowBuffer([NotNull] ref byte[]? buffer, int minimumLength)
System.Net.Sockets (1)
System\Net\Sockets\UDPClient.cs (1)
831public byte[] Receive([NotNull] ref IPEndPoint? remoteEP)
System.Private.CoreLib (27)
src\libraries\System.Private.CoreLib\src\System\ArgumentException.cs (2)
104public static void ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 117public static void ThrowIfNullOrWhiteSpace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (3)
55public static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 64internal static void ThrowIfNull([NotNull] object? argument, ExceptionArgument paramName) 76public static unsafe void ThrowIfNull([NotNull] void* argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
src\libraries\System.Private.CoreLib\src\System\Array.cs (1)
41public static void Resize<T>([NotNull] ref T[]? array, int newSize)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
3497[NotNull] ref EventMetadata[] eventData, 6090private static void UpdateStringBuilder([NotNull] ref StringBuilder? stringBuilder, string eventMessage, int startIndex, int count)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (3)
88ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref Task<TResult>? taskField) 155[NotNull] ref Task<TResult>? taskField) 550internal static void SetNotificationForWaitCompletion(bool enabled, [NotNull] ref Task<TResult>? taskField)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\PoolingAsyncValueTaskMethodBuilderT.cs (3)
68internal static void SetException(Exception exception, [NotNull] ref StateMachineBox? boxFieldRef) 139ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref StateMachineBox? boxRef) 154[NotNull] ref StateMachineBox? boxFieldRef)
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) =>
src\libraries\System.Private.CoreLib\src\System\Threading\ReaderWriterLockSlim.cs (1)
904private void LazyCreateEvent([NotNull] ref EventWaitHandle? waitEvent, EnterLockType enterLockType)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (1)
1245private static void NormalizeAdjustmentRuleOffset(TimeSpan baseUtcOffset, [NotNull] ref AdjustmentRule adjustmentRule)
src\System\RuntimeType.CoreCLR.cs (1)
1441private string ConstructName([NotNull] ref string? name, TypeNameFormatFlags formatFlags) =>
System.Private.Windows.Core (5)
System\ArgumentValidation.cs (5)
10internal static T OrThrowIfNull<T>([NotNull] this T? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 17[NotNull] this T? argument, 25internal static string OrThrowIfNullOrEmpty([NotNull] this string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 31internal static void ThrowIfNullOrEmpty([NotNull] this string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 39internal static void ThrowIfNullOrEmptyWithMessage([NotNull] this string? argument, string message, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
System.Private.Xml (2)
System\Xml\Serialization\CodeIdentifier.cs (1)
170internal static void CheckValidIdentifier([NotNull] string? ident)
System\Xml\Serialization\ReflectionXmlSerializationReader.cs (1)
540private static void SetCollectionObjectWithCollectionMember([NotNull] ref object? collection, CollectionMember collectionMember,
System.Security.Cryptography (3)
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (2)
712[NotNull] object? argument, 722[NotNull] string? argument,
System\Security\Cryptography\CryptographicOperations.cs (1)
759private static void CheckStream([NotNull] Stream source)
System.Text.Encodings.Web (2)
System\Text\Unicode\UnicodeRanges.cs (2)
30private static UnicodeRange CreateEmptyRange([NotNull] ref UnicodeRange? range) 38private static UnicodeRange CreateRange([NotNull] ref UnicodeRange? range, char first, char last)
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\Regex.cs (1)
120private RegexTree Init(string pattern, RegexOptions options, TimeSpan matchTimeout, [NotNull] ref CultureInfo? culture)
System.Threading.Tasks.Dataflow (3)
Blocks\TransformManyBlock.cs (2)
101[NotNull] ref SourceCore<TOutput>? source, 102[NotNull] ref TargetCore<TInput>? target,
Internal\Common.cs (1)
311internal static void AddException([NotNull] ref List<Exception>? list, Exception exception, bool unwrapInnerExceptions = false)
System.Windows.Forms (2)
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
682public void GetTypeConverterAndTypeEditor([NotNull] ref TypeConverter? typeConverter, Type editorBaseType, ref object? typeEditor)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
30122private static void ThrowInvalidOperationExceptionIfNull<T>([NotNull] T? instance)
xunit.assert (9)
Guards.cs (2)
26 [return: NotNull] 31 [NotNull] T? argValue)
NullAsserts.cs (2)
31 public static void NotNull([NotNull] object? @object) 48 public static T NotNull<T>([NotNull] T? value)
Sdk\AssertEqualityComparer.cs (2)
514 [return: NotNull] 519 [NotNull] TArg? argValue)
TypeAsserts.cs (3)
60 [NotNull] object? @object) 148 public static T IsType<T>([NotNull] object? @object) 168 [NotNull] object? @object)
5 references to NotNull
mscorlib (1)
mscorlib.cs (1)
65[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullAttribute))]
netstandard (1)
netstandard.cs (1)
626[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullAttribute))]
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
146[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullAttribute))]
System.Text.Json (2)
System\Text\Json\Serialization\JsonSerializerOptions.cs (1)
796/// <see cref="NotNullAttribute"/>, <see cref="MaybeNullAttribute"/>,
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
241/// from attributes such as <see cref="NotNullAttribute"/> or <see cref="MaybeNullAttribute"/>.