786 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)
299public static void CopyKeyValuePairs(RepeatedField<KeyValue> attributes, KeyValuePair<string, string>[] parentAttributes, OtlpContext context, out int copyCount, [NotNull] ref KeyValuePair<string, string>[]? copiedAttributes)
Aspire.Hosting (2)
ApplicationModel\ContainerExecutableResource.cs (1)
35private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
ApplicationModel\ExecutableResource.cs (1)
51private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Azure.CognitiveServices (2)
AzureOpenAIDeployment.cs (1)
57private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
AzureOpenAIDeploymentResource.cs (1)
117private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Azure.CosmosDB (2)
AzureCosmosDBContainerResource.cs (1)
133private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
AzureCosmosDBDatabaseResource.cs (1)
57private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Azure.EventHubs (2)
AzureEventHubConsumerGroupResource.cs (1)
66private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
AzureEventHubResource.cs (1)
118private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Azure.Network (1)
AzureSubnetResource.cs (1)
92private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Azure.PostgreSQL (1)
AzurePostgresFlexibleServerDatabaseResource.cs (1)
74private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Azure.ServiceBus (4)
AzureServiceBusQueueResource.cs (1)
207private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
AzureServiceBusRule.cs (1)
186private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
AzureServiceBusSubscriptionResource.cs (1)
192private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
AzureServiceBusTopicResource.cs (1)
135private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Azure.Sql (1)
AzureSqlDatabaseResource.cs (1)
90private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Azure.Storage (3)
AzureBlobStorageContainerResource.cs (1)
52private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
AzureDataLakeStorageFileSystemResource.cs (1)
51private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
AzureQueueStorageQueueResource.cs (1)
52private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Milvus (1)
MilvusDatabaseResource.cs (1)
41private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.MongoDB (1)
MongoDBDatabaseResource.cs (1)
45private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.MySql (1)
MySqlDatabaseResource.cs (1)
66private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Oracle (1)
OracleDatabaseResource.cs (1)
55private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.PostgreSQL (1)
PostgresDatabaseResource.cs (1)
48private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.Hosting.Radius (1)
Secrets\RadiusSecretStoreExtensions.cs (1)
382private static void ValidateStoreName([NotNull] string? name)
Aspire.Hosting.SqlServer (1)
SqlServerDatabaseResource.cs (1)
66private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.OpenAI (1)
AspireOpenAIClientBuilder.cs (1)
97private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Aspire.StackExchange.Redis (4)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\Guard.cs (4)
61public static void ThrowIfNull([NotNull] object? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 80public static void ThrowIfNullOrEmpty([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 101public static void ThrowIfNullOrWhitespace([NotNull] string? value, [CallerArgumentExpression(nameof(value))] string? paramName = null) 206public static T ThrowIfNotOfType<T>([NotNull] object? value, [CallerArgumentExpression(nameof(value))] string? paramName = null)
CodeStyleConfigFileGenerator (4)
src\roslyn\src\Dependencies\Contracts\Contract.cs (4)
30public static void ThrowIfNull<T>([NotNull] T value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : class? 43public static void ThrowIfNull<T>([NotNull] T? value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : struct 56public static void ThrowIfNull<T>([NotNull] T value, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 69public static void ThrowIfNull<T>([NotNull] T value, [InterpolatedStringHandlerArgument("value")] ThrowIfNullInterpolatedStringHandler<T> message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
dotnet (1)
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.12.0-1.26426.103\contentFiles\cs\net11.0\Debug.cs (1)
37public static void AssertNotNull<T>([NotNull] T value)
GenerateDocumentationAndConfigFiles (16)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
37public static void AssertNotNull<T>([NotNull] T value)
src\roslyn\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\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
37public static Type? TryGetType([NotNull] ref Type? lazyType, string assemblyQualifiedName) 69public static Type? GetTypeFromEither([NotNull] ref Type? lazyType, string contractName, string desktopName)
src\roslyn\src\Dependencies\Contracts\Contract.cs (4)
30public static void ThrowIfNull<T>([NotNull] T value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : class? 43public static void ThrowIfNull<T>([NotNull] T? value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : struct 56public static void ThrowIfNull<T>([NotNull] T value, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 69public static void ThrowIfNull<T>([NotNull] T value, [InterpolatedStringHandlerArgument("value")] ThrowIfNullInterpolatedStringHandler<T> message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (2)
27internal static IEnumerable<T> RequireNonNullItems<T>([NotNull] IEnumerable<T>? sequence, string argumentName) where T : class 43internal static void RequireUniqueNonNullItems<T>([NotNull] IEnumerable<T>? sequence, string argumentName) where T : class
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
481protected static void CheckLocation(SyntaxNode destinationMember, [NotNull] Location? location)
Microsoft.Analyzers.Local.Tests (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.AspNetCore.Antiforgery (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.AsyncState (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.AspNetCore.Authorization (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.Components.Server (1)
src\aspnetcore\src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (1)
707private static void ThrowIfNullOrEmpty([NotNull] string? target, string message)
Microsoft.AspNetCore.Cryptography.KeyDerivation (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.DataProtection (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.DataProtection.Abstractions (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.DataProtection.Extensions (4)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[NotNull]
Microsoft.AspNetCore.DataProtection.StackExchangeRedis (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.Diagnostics.Middleware.PerformanceTests (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.AspNetCore.HeaderParsing (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.AspNetCore.Http.Connections (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.Http.Connections.Client (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.InternalTesting (4)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[NotNull]
Microsoft.AspNetCore.JsonPatch (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.Mvc.Abstractions (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.Razor.Utilities.Shared (13)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\ArgHelper.cs (4)
16public static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 28public static unsafe void ThrowIfNull([NotNull] void* argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 40public static void ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 53public static void ThrowIfNullOrWhiteSpace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\Assumed.cs (4)
15[NotNull] this T? value, 29[NotNull] this T? value, 42[NotNull] this T? value, 56[NotNull] this T? value,
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\InterlockedOperations.cs (1)
58public static T Initialize<T>([NotNull] ref T? target, T value)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\NullableExtensions.cs (4)
16[NotNull] this T? value, 30[NotNull] this T? value, 43[NotNull] this T? value, 57[NotNull] this T? value,
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\aspnetcore\src\Shared\runtime\Http3\QPack\QPackDecoder.cs (1)
674private static void EnsureStringCapacity([NotNull] ref byte[]? buffer, int requiredLength, int existingLength)
Microsoft.AspNetCore.SignalR.Client (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.SignalR.Client.Core (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.SignalR.Common (4)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[NotNull]
Microsoft.AspNetCore.SignalR.Core (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (3)
Protocol\MessagePackHubProtocolWorker.cs (1)
707private static void ThrowIfNullOrEmpty([NotNull] string? target, string message)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.AspNetCore.Testing (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.AspNetCore.WebUtilities (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.Bcl.AsyncInterfaces (2)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (2)
14public static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 84public static void ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Microsoft.Bcl.Numerics (2)
src\runtime\src\libraries\Common\src\Polyfills\ExceptionPolyfills.cs (2)
14public static void ThrowIfNull([NotNull] object? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 84public static void ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Microsoft.Build (3)
src\msbuild\src\Shared\ErrorUtilities.cs (3)
287internal static void VerifyThrowArgumentInvalidPath([NotNull] string? parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null) 297internal static void VerifyThrowArgumentNull([NotNull] object? parameter, string? parameterName, string resourceName) 315[NotNull] ICollection<T>? collection,
Microsoft.Build.Framework (13)
Assumed.cs (6)
70[NotNull] T? value, 90[NotNull] T? value, 106[NotNull] string? value, 125[NotNull] string? value, 142[NotNull] IReadOnlyCollection<T>? collection, 162[NotNull] IReadOnlyCollection<T>? collection,
ErrorUtilities.cs (2)
48[NotNull] ICollection<T>? collection, 103public static void VerifyThrowArgumentInvalidPath([NotNull] string? parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null)
src\msbuild\artifacts\.packages\microsoft.codeanalysis.contracts\5.0.0-1.25277.114\contentFiles\cs\net9.0\Contract.cs (4)
30public static void ThrowIfNull<T>([NotNull] T value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : class? 43public static void ThrowIfNull<T>([NotNull] T? value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : struct 56public static void ThrowIfNull<T>([NotNull] T value, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 69public static void ThrowIfNull<T>([NotNull] T value, [InterpolatedStringHandlerArgument("value")] ThrowIfNullInterpolatedStringHandler<T> message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
Utilities\ArgumentExceptionExtensions.cs (1)
31public static void ThrowIfNullOrEmpty<T>([NotNull] IReadOnlyCollection<T>? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Microsoft.Build.Tasks.CodeAnalysis (7)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
37public static void AssertNotNull<T>([NotNull] T value)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
37public static Type? TryGetType([NotNull] ref Type? lazyType, string assemblyQualifiedName) 69public static Type? GetTypeFromEither([NotNull] ref Type? lazyType, string contractName, string desktopName)
src\roslyn\src\Dependencies\Contracts\Contract.cs (4)
30public static void ThrowIfNull<T>([NotNull] T value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : class? 43public static void ThrowIfNull<T>([NotNull] T? value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : struct 56public static void ThrowIfNull<T>([NotNull] T value, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 69public static void ThrowIfNull<T>([NotNull] T value, [InterpolatedStringHandlerArgument("value")] ThrowIfNullInterpolatedStringHandler<T> message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
Microsoft.Build.Tasks.Core (3)
src\msbuild\src\Shared\ErrorUtilities.cs (3)
287internal static void VerifyThrowArgumentInvalidPath([NotNull] string? parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null) 297internal static void VerifyThrowArgumentNull([NotNull] object? parameter, string? parameterName, string resourceName) 315[NotNull] ICollection<T>? collection,
Microsoft.Build.Tasks.Git (3)
GetUntrackedFiles.cs (2)
19[Required, NotNull] 22[Required, NotNull]
LocateRepository.cs (1)
16[Required, NotNull]
Microsoft.Build.Utilities.Core (3)
src\msbuild\src\Shared\ErrorUtilities.cs (3)
287internal static void VerifyThrowArgumentInvalidPath([NotNull] string? parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null) 297internal static void VerifyThrowArgumentNull([NotNull] object? parameter, string? parameterName, string resourceName) 315[NotNull] ICollection<T>? collection,
Microsoft.CodeAnalysis (24)
DiagnosticAnalyzer\DiagnosticQueue.cs (1)
128[NotNull] ref Dictionary<DiagnosticAnalyzer, SimpleDiagnosticQueue>? lazyDiagnosticsMap,
InternalUtilities\Debug.cs (1)
37public 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)
37public static Type? TryGetType([NotNull] ref Type? lazyType, string assemblyQualifiedName) 69public 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)
MetadataReader\MetadataHelpers.cs (2)
789[NotNull] out IEnumerable<IGrouping<string, TypeDefinitionHandle>>? types, 790[NotNull] out IEnumerable<KeyValuePair<string, IEnumerable<IGrouping<string, TypeDefinitionHandle>>>>? namespaces)
Operations\ControlFlowGraphBuilder.cs (4)
1156void collectAncestorsAndSelf([DisallowNull] RegionBuilder? from, [NotNull] ref ArrayBuilder<RegionBuilder>? builder) 2768private void VisitConditionalBranch(IOperation condition, [NotNull] ref BasicBlockBuilder? dest, bool jumpIfTrue) 2783private void VisitConditionalBranchCore(IOperation condition, [NotNull] ref BasicBlockBuilder? dest, bool jumpIfTrue) 2790void visitConditionalBranchCore(IOperation condition, [NotNull] ref BasicBlockBuilder? dest, bool jumpIfTrue)
PEWriter\Members.cs (2)
871[NotNull] 916[NotNull]
PEWriter\Types.cs (1)
345[return: NotNull]
ReferenceManager\CommonReferenceManager.Resolution.cs (1)
647private static void AddModule(PEModule module, int referenceIndex, ResolvedReference[] referenceMap, [NotNull] ref ArrayBuilder<PEModule>? modules)
Microsoft.CodeAnalysis.CSharp (10)
Binder\Binder_Expressions.cs (2)
9122[NotNull] ref AnalyzedArguments? actualArguments, 11399[NotNull] ref AnalyzedArguments? analyzedArguments,
Binder\Binder_Patterns.cs (1)
429out BoundExpression indexerAccess, [NotNull] out BoundExpression? lengthAccess, out BoundListPatternReceiverPlaceholder? receiverPlaceholder, out BoundListPatternIndexPlaceholder argumentPlaceholder)
Compilation\CSharpCompilation.cs (1)
2686private BinderFactory AddNewFactory(SyntaxTree syntaxTree, bool ignoreAccessibility, [NotNull] ref WeakReference<BinderFactory>? slot)
Lowering\LocalRewriter\LocalRewriter_Call.cs (3)
838void ensureTempTrackingSetup([NotNull] ref ArrayBuilder<LocalSymbol>? tempsOpt, ref BitVector positionsAssignedToTemp) 1069[NotNull] ref ArrayBuilder<LocalSymbol>? temps, 1246static void fillRefKindsBuilder(ImmutableArray<RefKind> argumentRefKindsOpt, ImmutableArray<ParameterSymbol> parameters, [NotNull] ref ArrayBuilder<RefKind>? refKindsBuilder)
Parser\Lexer.cs (1)
2193private void AddTrivia(CSharpSyntaxNode trivia, [NotNull] ref SyntaxListBuilder? list)
Symbols\Synthesized\Records\SynthesizedRecordGetHashCode.cs (2)
133static void ensureEqualityComparerHelpers(SyntheticBoundNodeFactory F, [NotNull] ref MethodSymbol? equalityComparer_GetHashCode, [NotNull] ref MethodSymbol? equalityComparer_get_Default)
Microsoft.CodeAnalysis.CSharp.Features (1)
EditAndContinue\SyntaxComparer.cs (1)
1377private static void GetLocalNames(SyntaxToken syntaxToken, [NotNull] ref List<SyntaxToken>? result)
Microsoft.CodeAnalysis.Features (2)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (1)
26[NotNull]
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.State.cs (1)
28[NotNull]
Microsoft.CodeAnalysis.Razor.Compiler (2)
Language\RazorEngineFeatureBase.cs (1)
44protected void ThrowForMissingDocumentDependency<T>([NotNull] T? value)
Language\RazorEnginePhaseBase.cs (1)
52protected void ThrowForMissingDocumentDependency<T>([NotNull] T? value)
Microsoft.CodeAnalysis.Workspaces (16)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
37public static void AssertNotNull<T>([NotNull] T value)
src\roslyn\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\roslyn\src\Compilers\Core\Portable\InternalUtilities\ReflectionUtilities.cs (2)
37public static Type? TryGetType([NotNull] ref Type? lazyType, string assemblyQualifiedName) 69public static Type? GetTypeFromEither([NotNull] ref Type? lazyType, string contractName, string desktopName)
src\roslyn\src\Dependencies\Contracts\Contract.cs (4)
30public static void ThrowIfNull<T>([NotNull] T value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : class? 43public static void ThrowIfNull<T>([NotNull] T? value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : struct 56public static void ThrowIfNull<T>([NotNull] T value, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 69public static void ThrowIfNull<T>([NotNull] T value, [InterpolatedStringHandlerArgument("value")] ThrowIfNullInterpolatedStringHandler<T> message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\PublicContract.cs (2)
27internal static IEnumerable<T> RequireNonNullItems<T>([NotNull] IEnumerable<T>? sequence, string argumentName) where T : class 43internal static void RequireUniqueNonNullItems<T>([NotNull] IEnumerable<T>? sequence, string argumentName) where T : class
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
481protected static void CheckLocation(SyntaxNode destinationMember, [NotNull] Location? location)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\Debug.cs (1)
37public static void AssertNotNull<T>([NotNull] T value)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (4)
src\roslyn\src\Dependencies\Contracts\Contract.cs (4)
30public static void ThrowIfNull<T>([NotNull] T value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : class? 43public static void ThrowIfNull<T>([NotNull] T? value, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) where T : struct 56public static void ThrowIfNull<T>([NotNull] T value, string message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null) 69public static void ThrowIfNull<T>([NotNull] T value, [InterpolatedStringHandlerArgument("value")] ThrowIfNullInterpolatedStringHandler<T> message, [CallerLineNumber] int lineNumber = 0, [CallerFilePath] string? filePath = null)
Microsoft.Extensions.AI.Evaluation (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AI.Evaluation.Console (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AI.Evaluation.NLP (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AI.Evaluation.Quality (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AI.Evaluation.Reporting (13)
parent\parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AI.Evaluation.Safety (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AI.Integration.Tests (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AI.OpenAI (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AmbientMetadata.Application (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.AmbientMetadata.Build (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Caching.Hybrid (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Caching.SqlServer (4)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[NotNull]
Microsoft.Extensions.Caching.StackExchangeRedis (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.Extensions.Compliance.Abstractions (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.DataIngestion (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.DataIngestion.Markdig (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.DataIngestion.MarkItDown (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.DependencyModel (1)
DependencyContextJsonReader.cs (1)
214private static Target? SelectRuntimeTarget([NotNull] List<Target>? targets, string? runtimeTargetName)
Microsoft.Extensions.Diagnostics.ExceptionSummarization (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Diagnostics.HealthChecks (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Kubernetes (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Features (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.Extensions.FileProviders.Embedded (4)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[NotNull]
Microsoft.Extensions.Hosting.Testing (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Identity.Core (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.Extensions.Identity.Stores (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.Extensions.Localization (4)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[NotNull]
Microsoft.Extensions.Localization.Abstractions (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.Extensions.Logging.AzureAppServices (4)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentThrowHelper.cs (2)
19[NotNull] 47[NotNull]
Microsoft.Extensions.ObjectPool (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.Extensions.ObjectPool.DependencyInjection (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Options.Contextual (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Resilience (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.ServiceDiscovery.Dns (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.ServiceDiscovery.Yarp (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.Telemetry.Abstractions (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.VectorData.Abstractions (13)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Microsoft.Extensions.WebEncoders (2)
src\aspnetcore\src\Shared\ThrowHelpers\ArgumentNullThrowHelper.cs (2)
19[NotNull] 38[NotNull]
Microsoft.SourceLink.Common (2)
GenerateSourceLinkFile.cs (2)
19[Required, NotNull] 22[Required, NotNull]
Microsoft.TestPlatform.CoreUtilities (8)
ValidateArg.cs (8)
37public static T NotNull<T>([NotNull] T? arg, string parameterName) 58public static string NotNullOrEmpty([NotNull] string? arg, string parameterName) 79public static string NotNullOrWhiteSpace([NotNull] string? arg, string parameterName) 121public static void NotNullOrEmpty<T>([NotNull] IEnumerable<T>? arg, string parameterName) 139public static void TypeOf<T>([NotNull] object? arg, string parameterName) 164public static void NotNull([NotNull] object? arg, string parameterName, string propertyName) 196public static void NotNullOrEmpty([NotNull] string? arg, string parameterName, string propertyName) 215public static void TypeOf<T>([NotNull] object? arg, string parameterName, string propertyName)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (4)
ObjectModel\TestResult.cs (1)
336[NotNull]
Utility\EqtAssert.cs (3)
45public static void ParameterNotNull([NotNull] object? parameter, string parameterName) 60public static void StringNotNullOrEmpty([NotNull] string? parameter, string parameterName) 75private static void AssertParameterNameNotNullOrEmpty([NotNull] string? parameterName)
MSBuild (3)
src\msbuild\src\Shared\ErrorUtilities.cs (3)
287internal static void VerifyThrowArgumentInvalidPath([NotNull] string? parameter, [CallerArgumentExpression(nameof(parameter))] string? parameterName = null) 297internal static void VerifyThrowArgumentNull([NotNull] object? parameter, string? parameterName, string resourceName) 315[NotNull] ICollection<T>? collection,
NuGet.CommandLine.XPlat (4)
Commands\PackageReferenceCommands\AddPackageReferenceCommand.cs (1)
153private static void ValidateArgument([NotNull] string? value, string optionName, string commandName)
Commands\PackageReferenceCommands\RemovePackageReferenceCommand.cs (1)
68private static void ValidateArgument([NotNull] string? value, string optionName, string commandName)
Commands\Signing\SignCommand.cs (1)
188private static void ValidatePackagePaths([NotNull] string[]? packagePaths, string argumentName)
Commands\Signing\VerifyCommand.cs (1)
90private static void ValidatePackagePaths([NotNull] string[]? packagePaths, string argumentName)
rzc (8)
Json\Assumed.cs (4)
13[NotNull] this T? value, 27[NotNull] this T? value, 40[NotNull] this T? value, 54[NotNull] this T? value,
Json\NullableExtensions.cs (4)
16[NotNull] this T? value, 30[NotNull] this T? value, 43[NotNull] this T? value, 57[NotNull] this T? value,
Shared (14)
ServerSentEvents\SseParser_1.cs (1)
558private static void GrowBuffer([NotNull] ref byte[]? buffer, int minimumLength)
Throw\Throw.cs (13)
40[return: NotNull] 41public static T IfNull<T>([NotNull] T argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 68[return: NotNull] 70[NotNull] TParameter argument, 71[NotNull] TMember member, 104[return: NotNull] 108[NotNull] TMember member, 133[return: NotNull] 134public static string IfNullOrWhitespace([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 166[return: NotNull] 167public static string IfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "") 250[return: NotNull] 257public static IEnumerable<T> IfNullOrEmpty<T>([NotNull] IEnumerable<T>? argument, [CallerArgumentExpression(nameof(argument))] string paramName = "")
Shared.Tests (3)
JsonSchemaExporter\TestTypes.cs (3)
1048[NotNull] 1054[NotNull, DisallowNull] 1089[NotNull]
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\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
221internal 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\runtime\src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (1)
221internal static void CheckArgumentNull([NotNull] object? value, string parameterName)
System.Net.Http (4)
src\runtime\src\libraries\Common\src\System\Net\Http\aspnetcore\Http3\QPack\QPackDecoder.cs (1)
674private static void EnsureStringCapacity([NotNull] ref byte[]? buffer, int requiredLength, int existingLength)
System\Net\Http\Headers\HttpHeaders.cs (1)
1259internal static int GetStoreValuesIntoStringArray(HeaderDescriptor descriptor, object sourceValues, [NotNull] ref string[]? values)
System\Net\Http\HttpClient.cs (1)
586private static void ThrowForNullResponse([NotNull] HttpResponseMessage? response)
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
197static string GetOrAddCachedValue([NotNull] ref string? cache, HeaderDescriptor descriptor, ReadOnlySpan<byte> value, Encoding? encoding)
System.Net.Primitives (1)
System\Net\IPNetwork.cs (1)
360static IPNetwork IParsable<IPNetwork>.Parse([NotNull] string s, IFormatProvider? provider) => Parse(s);
System.Net.ServerSentEvents (1)
System\Net\ServerSentEvents\SseParser_1.cs (1)
557private void GrowBuffer([NotNull] ref byte[]? buffer, int minimumLength)
System.Net.Sockets (1)
System\Net\Sockets\UDPClient.cs (1)
836public byte[] Receive([NotNull] ref IPEndPoint? remoteEP)
System.Private.CoreLib (26)
src\runtime\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\runtime\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) 77public static void ThrowIfNull([NotNull] void* argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Array.cs (1)
42public static void Resize<T>([NotNull] ref T[]? array, int newSize)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
3519[NotNull] ref Dictionary<int, EventMetadata> eventData,
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ManifestBuilder.cs (1)
803private static void UpdateStringBuilder([NotNull] ref StringBuilder? stringBuilder, string eventMessage, int startIndex, int count)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (3)
97ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref Task<TResult>? taskField) 172[NotNull] ref Task<TResult>? taskField) 742internal static void SetNotificationForWaitCompletion(bool enabled, [NotNull] ref Task<TResult>? taskField)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\PoolingAsyncValueTaskMethodBuilderT.cs (3)
68internal static void SetException(Exception exception, [NotNull] ref StateMachineBox? boxFieldRef) 148ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref StateMachineBox? boxRef) 163[NotNull] ref StateMachineBox? boxFieldRef)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ReaderWriterLockSlim.cs (1)
904private void LazyCreateEvent([NotNull] ref EventWaitHandle? waitEvent, EnterLockType enterLockType)
src\runtime\src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.cs (1)
1252private static void NormalizeAdjustmentRuleOffset(TimeSpan baseUtcOffset, [NotNull] ref AdjustmentRule adjustmentRule)
System.Private.Windows.Core (5)
System\ArgumentValidation.cs (5)
8internal static T OrThrowIfNull<T>([NotNull] this T? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 15[NotNull] this T? argument, 23internal static string OrThrowIfNullOrEmpty([NotNull] this string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 35internal static void ThrowIfNullOrEmpty([NotNull] this string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 43internal 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)
549private static void SetCollectionObjectWithCollectionMember([NotNull] ref object? collection, CollectionMember collectionMember,
System.Security.Cryptography (7)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (1)
712[NotNull] string? argument,
System\Security\Cryptography\CapiHelper.Windows.cs (3)
871internal static void EncryptKey(SafeCapiKeyHandle safeKeyHandle, byte[] pbKey, int cbKey, bool foep, [NotNull] ref byte[]? pbEncryptedKey) 1233[NotNull] ref byte[]? pbKey) 1302private static void UnloadKey(SafeProvHandle hProv, SafeCapiKeyHandle hKey, [NotNull] ref byte[]? key_out, ref int cb_out)
System\Security\Cryptography\CryptographicOperations.cs (1)
1084private static void CheckStream([NotNull] Stream source)
System\Security\Cryptography\X509Certificates\WindowsInterop.crypt32.cs (2)
57public static unsafe bool CertEnumCertificatesInStore(SafeCertStoreHandle hCertStore, [NotNull] ref SafeCertContextHandle? pCertContext) 149public static unsafe bool CertFindCertificateInStore(SafeCertStoreHandle hCertStore, Interop.Crypt32.CertFindType dwFindType, void* pvFindPara, [NotNull] ref SafeCertContextHandle? pCertContext)
System.Speech (4)
Internal\Helpers.cs (1)
17internal static void ThrowIfEmptyOrNull([NotNull] string? s, string paramName)
Internal\SrgsParser\XmlParser.cs (2)
1812private static void CheckForDuplicates([NotNull] ref string? dest, XmlReader reader) 1828internal static void ValidateRuleId([NotNull] string? id)
Internal\Synthesis\SSmlParser.cs (1)
1473private static void CheckForDuplicates([NotNull] ref string? dest, XmlReader reader)
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)
179private 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)
30109private static void ThrowInvalidOperationExceptionIfNull<T>([NotNull] T? instance)
7 references to NotNull
GenerateDocumentationAndConfigFiles (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!);
Microsoft.CodeAnalysis.Workspaces (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
262=> compilation.GetTypeByMetadataName(typeof(NotNullAttribute).FullName!);
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)
src\runtime\artifacts\obj\System.Runtime\Release\net11.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)
811/// <see cref="NotNullAttribute"/>, <see cref="MaybeNullAttribute"/>,
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
238/// from attributes such as <see cref="NotNullAttribute"/> or <see cref="MaybeNullAttribute"/>.