1867 instantiations of NotNullWhen
Aspire.Azure.Messaging.EventHubs.Tests (3)
Aspire.Azure.Security.KeyVault.Tests (3)
Aspire.Confluent.Kafka (3)
Aspire.Dashboard (25)
Aspire.Hosting (21)
Aspire.Hosting.Azure (1)
Aspire.Hosting.Azure.Functions (3)
Aspire.Hosting.Tests (1)
Aspire.Microsoft.Data.SqlClient (3)
Aspire.Microsoft.EntityFrameworkCore.SqlServer (3)
Aspire.StackExchange.Redis (4)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Implementation\RedisProfilerEntryToActivityConverter.cs (1)
67[NotNullWhen(true)]
BuildValidator (3)
ConfigurationSchemaGenerator (5)
dotnet-dev-certs (3)
illink (37)
IOperationGenerator (1)
Microsoft.AspNetCore.Antiforgery (4)
Microsoft.AspNetCore.AzureAppServices.HostingStartup (1)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Components.Endpoints (4)
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
Microsoft.AspNetCore.Components.Forms (2)
Microsoft.AspNetCore.Components.Server (5)
Microsoft.AspNetCore.Components.Web (12)
Microsoft.AspNetCore.Connections.Abstractions (1)
Microsoft.AspNetCore.DeveloperCertificates.XPlat (3)
Microsoft.AspNetCore.Grpc.JsonTranscoding (8)
Microsoft.AspNetCore.Grpc.Swagger (6)
Microsoft.AspNetCore.HeaderParsing (33)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http (7)
Microsoft.AspNetCore.Http.Abstractions (1)
Microsoft.AspNetCore.Http.Connections (1)
Microsoft.AspNetCore.Http.Extensions (9)
Microsoft.AspNetCore.Http.Features (2)
Microsoft.AspNetCore.Http.Results (3)
Microsoft.AspNetCore.HttpLogging (2)
Microsoft.AspNetCore.HttpOverrides (2)
Microsoft.AspNetCore.Mvc.Abstractions (6)
Microsoft.AspNetCore.Mvc.ApiExplorer (2)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
Microsoft.AspNetCore.Mvc.Core (9)
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
Microsoft.AspNetCore.Mvc.Razor (2)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.RazorPages (1)
Microsoft.AspNetCore.OpenApi (9)
Microsoft.AspNetCore.Rewrite (1)
Microsoft.AspNetCore.Routing (5)
Microsoft.AspNetCore.Server.HttpSys (3)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Server.Kestrel.Core (13)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
Microsoft.AspNetCore.Session (1)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.AspNetCore.SignalR.Client.Core (3)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Microsoft.AspNetCore.SignalR.Common (3)
Microsoft.AspNetCore.SignalR.Core (7)
Microsoft.AspNetCore.SignalR.Protocols.Json (1)
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (1)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
Microsoft.AspNetCore.WebSockets (1)
Microsoft.AspNetCore.WebUtilities (2)
Microsoft.CodeAnalysis (85)
MetadataReference\AssemblyIdentity.DisplayName.cs (5)
155public static bool TryParseDisplayName(string displayName, [NotNullWhen(true)] out AssemblyIdentity? identity)
194public static bool TryParseDisplayName(string displayName, [NotNullWhen(true)] out AssemblyIdentity? identity, out AssemblyIdentityParts parts)
209static bool tryParseDisplayName(string displayName, [NotNullWhen(true)] out AssemblyIdentity? identity, out AssemblyIdentityParts parts)
447private static bool TryParseNameToken(string displayName, ref int position, [NotNullWhen(true)] out string? value)
805private static bool TryUnescape(string str, int start, int end, [NotNullWhen(true)] out string? value)
Microsoft.CodeAnalysis.CSharp (138)
Binder\Binder_Await.cs (3)
323private bool GetGetAwaiterMethod(BoundExpression expression, SyntaxNode node, BindingDiagnosticBag diagnostics, [NotNullWhen(true)] out BoundExpression? getAwaiterCall)
368private bool GetIsCompletedProperty(TypeSymbol awaiterType, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, [NotNullWhen(true)] out PropertySymbol? isCompletedProperty)
435private bool GetGetResultMethod(BoundExpression awaiterExpression, SyntaxNode node, TypeSymbol awaitedExpressionType, BindingDiagnosticBag diagnostics, out MethodSymbol? getResultMethod, [NotNullWhen(true)] out BoundExpression? getAwaiterGetResultCall)
CSharpExtensions.cs (25)
47public static bool IsKind([NotNullWhen(true)] this SyntaxNode? node, SyntaxKind kind)
400internal static bool HasReferenceDirectives([NotNullWhen(true)] this SyntaxTree? tree)
406internal static bool HasReferenceOrLoadDirectives([NotNullWhen(true)] this SyntaxTree? tree)
412internal static bool IsAnyPreprocessorSymbolDefined([NotNullWhen(true)] this SyntaxTree? tree, ImmutableArray<string> conditionalSymbols)
418internal static bool IsPreprocessorSymbolDefined([NotNullWhen(true)] this SyntaxTree? tree, string symbolName, int position)
1112public static bool TryGetSpeculativeSemanticModelForMethodBody([NotNullWhen(true)] this SemanticModel? semanticModel, int position, BaseMethodDeclarationSyntax method, [NotNullWhen(true)] out SemanticModel? speculativeModel)
1131public static bool TryGetSpeculativeSemanticModelForMethodBody([NotNullWhen(true)] this SemanticModel? semanticModel, int position, AccessorDeclarationSyntax accessor, [NotNullWhen(true)] out SemanticModel? speculativeModel)
1150public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, TypeSyntax type, [NotNullWhen(true)] out SemanticModel? speculativeModel, SpeculativeBindingOption bindingOption = SpeculativeBindingOption.BindAsExpression)
1169public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, CrefSyntax crefSyntax, [NotNullWhen(true)] out SemanticModel? speculativeModel)
1188public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, StatementSyntax statement, [NotNullWhen(true)] out SemanticModel? speculativeModel)
1207public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, EqualsValueClauseSyntax initializer, [NotNullWhen(true)] out SemanticModel? speculativeModel)
1226public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, ArrowExpressionClauseSyntax expressionBody, [NotNullWhen(true)] out SemanticModel? speculativeModel)
1247public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, ConstructorInitializerSyntax constructorInitializer, [NotNullWhen(true)] out SemanticModel? speculativeModel)
1268public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, PrimaryConstructorBaseTypeSyntax constructorInitializer, [NotNullWhen(true)] out SemanticModel? speculativeModel)
1287public static bool TryGetSpeculativeSemanticModel([NotNullWhen(true)] this SemanticModel? semanticModel, int position, AttributeSyntax attribute, [NotNullWhen(true)] out SemanticModel? speculativeModel)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.LanguageServer (1)
Microsoft.CodeAnalysis.Rebuild (3)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces.MSBuild (10)
MSBuild\ProjectMap.cs (6)
160private bool TryFindOutputFileRefPathInProjectIdSet(string? outputRefFilePath, HashSet<ProjectId> set, [NotNullWhen(true)] out ProjectId? result)
163private bool TryFindOutputFilePathInProjectIdSet(string? outputFilePath, HashSet<ProjectId> set, [NotNullWhen(true)] out ProjectId? result)
166private static bool TryFindPathInProjectIdSet(string? path, Func<ProjectId, string?> getPathById, HashSet<ProjectId> set, [NotNullWhen(true)] out ProjectId? result)
196internal bool TryGetIdsByProjectPath(string projectPath, [NotNullWhen(true)] out HashSet<ProjectId>? ids)
199internal bool TryGetOutputFilePathById(ProjectId id, [NotNullWhen(true)] out string? outputFilePath)
202internal bool TryGetOutputRefFilePathById(ProjectId id, [NotNullWhen(true)] out string? outputRefFilePath)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (15)
Microsoft.Extensions.Caching.Abstractions (1)
Microsoft.Extensions.Caching.Memory (2)
Microsoft.Extensions.Configuration (1)
Microsoft.Extensions.Configuration.Abstractions (1)
Microsoft.Extensions.DependencyInjection (2)
Microsoft.Extensions.DependencyInjection.Abstractions (4)
Microsoft.Extensions.DependencyModel (5)
Microsoft.Extensions.FileSystemGlobbing (2)
Microsoft.Extensions.Http (1)
Microsoft.Extensions.Http.Resilience (3)
Microsoft.Extensions.Http.Resilience.Tests (1)
Microsoft.Extensions.Logging.Abstractions (2)
Microsoft.Extensions.Primitives (1)
Microsoft.Extensions.ServiceDiscovery (4)
Microsoft.Extensions.ServiceDiscovery.Abstractions (2)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Microsoft.Extensions.ServiceDiscovery.Tests (1)
Microsoft.Net.Http.Headers (34)
PresentationCore (20)
System\Windows\Nrbf\SerializationRecordExtensions.cs (18)
14private delegate bool TryGetDelegate(SerializationRecord record, [NotNullWhen(true)] out object? value);
16private static bool TryGet(TryGetDelegate get, SerializationRecord record, [NotNullWhen(true)] out object? value)
34public static bool TryGetPointF(this SerializationRecord record, [NotNullWhen(true)] out object? value)
38static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
59public static bool TryGetRectangleF(this SerializationRecord record, [NotNullWhen(true)] out object? value)
63static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
91public static bool TryGetPrimitiveType(this SerializationRecord record, [NotNullWhen(true)] out object? value)
95static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
116public static bool TryGetPrimitiveList(this SerializationRecord record, [NotNullWhen(true)] out object? list)
120static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? list)
166public static bool TryGetPrimitiveArrayList(this SerializationRecord record, [NotNullWhen(true)] out object? value)
170static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
213public static bool TryGetPrimitiveArray(this SerializationRecord record, [NotNullWhen(true)] out object? value)
217static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
253public static bool TryGetPrimitiveHashtable(this SerializationRecord record, [NotNullWhen(true)] out object? hashtable)
257static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? hashtable)
317static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? exception)
337[NotNullWhen(true)] out object? value)
System.Collections (1)
System.Collections.Immutable (7)
System.Collections.Specialized (2)
System.ComponentModel.Annotations (5)
System.ComponentModel.Composition (8)
System.ComponentModel.Primitives (14)
System.ComponentModel.TypeConverter (56)
System.Console (2)
System.Data.Common (34)
System.Data.Odbc (4)
System.Data.OleDb (1)
System.Diagnostics.DiagnosticSource (5)
System.Diagnostics.Process (7)
src\libraries\Common\src\Interop\Linux\cgroups\Interop.cgroups.cs (6)
305private static bool TryFindHierarchyMount(CGroupVersion cgroupVersion, string subsystem, [NotNullWhen(true)] out string? root, [NotNullWhen(true)] out string? path)
317internal static bool TryFindHierarchyMount(CGroupVersion cgroupVersion, string mountInfoFilePath, string subsystem, [NotNullWhen(true)] out string? root, [NotNullWhen(true)] out string? path)
400private static bool TryFindCGroupPathForSubsystem(CGroupVersion cgroupVersion, string subsystem, [NotNullWhen(true)] out string? path)
411internal static bool TryFindCGroupPathForSubsystem(CGroupVersion cgroupVersion, string procCGroupFilePath, string subsystem, [NotNullWhen(true)] out string? path)
System.Diagnostics.StackTrace (1)
System.Drawing.Primitives (7)
System.Formats.Asn1 (2)
System.Formats.Tar (5)
System.IO.FileSystem.Watcher (1)
System.IO.Packaging (4)
System.IO.Pipelines (1)
System.Linq.Expressions (14)
System.Linq.Parallel (2)
System.Memory (7)
System.Memory.Data (1)
System.Net.Http (99)
src\libraries\Common\src\System\Net\HttpKnownHeaderNames.TryGetHeaderName.cs (3)
18public static bool TryGetHeaderName(char[] array, int startIndex, int length, [NotNullWhen(true)] out string? name)
87[NotNullWhen(true)] out string? name)
343private static bool TryMatch<T>(string known, T key, int startIndex, int length, Func<string, T, int, int, bool> equals, [NotNullWhen(true)] out string? name)
System.Net.HttpListener (3)
System.Net.Mail (14)
System\Net\Mail\MailAddress.cs (8)
85public static bool TryCreate([NotNullWhen(true)] string? address, [NotNullWhen(true)] out MailAddress? result) => TryCreate(address, displayName: null, out result);
94public static bool TryCreate([NotNullWhen(true)] string? address, string? displayName, [NotNullWhen(true)] out MailAddress? result) => TryCreate(address, displayName, displayNameEncoding: null, out result);
104public static bool TryCreate([NotNullWhen(true)] string? address, string? displayName, Encoding? displayNameEncoding, [NotNullWhen(true)] out MailAddress? result)
120private static bool TryParse([NotNullWhen(true)] string? address, string? displayName, Encoding? displayNameEncoding, out (string displayName, string user, string host, Encoding displayNameEncoding) parsedData, bool throwExceptionIfFail)
271public override bool Equals([NotNullWhen(true)] object? value)
System\Net\Mail\MailAddressParser.cs (4)
210private static bool TryParseDomain(string data, ref int index, [NotNullWhen(true)] out string? domain, bool throwExceptionIfFail)
272bool expectMultipleAddresses, [NotNullWhen(true)] out string? localPart, bool throwExceptionIfFail)
358private static bool TryParseDisplayName(string data, ref int index, bool expectMultipleAddresses, [NotNullWhen(true)] out string? displayName, bool throwExceptionIfFail)
436internal static bool TryNormalizeOrThrow(string input, [NotNullWhen(true)] out string? normalizedString, bool throwExceptionIfFail)
System.Net.NameResolution (1)
System.Net.NetworkInformation (4)
System.Net.Ping (1)
System.Net.Primitives (22)
System.Net.Quic (2)
System.Net.Requests (1)
System.Net.Security (3)
System.Net.Sockets (4)
System.Numerics.Tensors (2)
System.ObjectModel (1)
System.Private.CoreLib (356)
src\libraries\System.Private.CoreLib\src\System\Byte.cs (4)
75public override bool Equals([NotNullWhen(true)] object? obj)
114public static bool TryParse([NotNullWhen(true)] string? s, out byte result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
124public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out byte result)
1111public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out byte result) => TryParse(s, NumberStyles.Integer, provider, out result);
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (14)
269public override bool Equals([NotNullWhen(true)] object? value) => value is DateOnly dateOnly && _dayNumber == dateOnly._dayNumber;
538public static bool TryParseExact(ReadOnlySpan<char> s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateOnlyFormat)] string?[]? formats, out DateOnly result) => TryParseExact(s, formats, null, DateTimeStyles.None, out result);
549public static bool TryParseExact(ReadOnlySpan<char> s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateOnlyFormat)] string?[]? formats, IFormatProvider? provider, DateTimeStyles style, out DateOnly result) =>
609public static bool TryParse([NotNullWhen(true)] string? s, out DateOnly result) => TryParse(s, null, DateTimeStyles.None, out result);
619public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, DateTimeStyles style, out DateOnly result)
638public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateOnlyFormat)] string? format, out DateOnly result) => TryParseExact(s, format, null, DateTimeStyles.None, out result);
650public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateOnlyFormat)] string? format, IFormatProvider? provider, DateTimeStyles style, out DateOnly result)
668public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateOnlyFormat)] string?[]? formats, out DateOnly result) => TryParseExact(s, formats, null, DateTimeStyles.None, out result);
679public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateOnlyFormat)] string?[]? formats, IFormatProvider? provider, DateTimeStyles style, out DateOnly result)
836public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out DateOnly result) => TryParse(s, provider, DateTimeStyles.None, out result);
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (9)
1187public override bool Equals([NotNullWhen(true)] object? value)
1783public static bool TryParse([NotNullWhen(true)] string? s, out DateTime result)
1798public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, DateTimeStyles styles, out DateTime result)
1817public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string? format, IFormatProvider? provider, DateTimeStyles style, out DateTime result)
1836public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string?[]? formats, IFormatProvider? provider, DateTimeStyles style, out DateTime result)
1849public static bool TryParseExact(ReadOnlySpan<char> s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string?[]? formats, IFormatProvider? provider, DateTimeStyles style, out DateTime result)
2032public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out DateTime result) => TryParse(s, provider, DateTimeStyles.None, out result);
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (9)
565public override bool Equals([NotNullWhen(true)] object? obj) =>
813public static bool TryParse([NotNullWhen(true)] string? input, out DateTimeOffset result)
831public static bool TryParse([NotNullWhen(true)] string? input, IFormatProvider? formatProvider, DateTimeStyles styles, out DateTimeOffset result)
857public static bool TryParseExact([NotNullWhen(true)] string? input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string? format, IFormatProvider? formatProvider, DateTimeStyles styles,
886public static bool TryParseExact([NotNullWhen(true)] string? input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string?[]? formats, IFormatProvider? formatProvider, DateTimeStyles styles,
907ReadOnlySpan<char> input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.DateTimeFormat)] string?[]? formats, IFormatProvider? formatProvider, DateTimeStyles styles, out DateTimeOffset result)
1034public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out DateTimeOffset result) => TryParse(s, provider, DateTimeStyles.None, out result);
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (4)
447public override bool Equals([NotNullWhen(true)] object? value) =>
541public static bool TryParse([NotNullWhen(true)] string? s, out decimal result) => TryParse(s, NumberStyles.Number, provider: null, out result);
551public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out decimal result)
1810public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out decimal result) => TryParse(s, NumberStyles.Number, provider, out result);
src\libraries\System.Private.CoreLib\src\System\Double.cs (4)
301public override bool Equals([NotNullWhen(true)] object? obj)
415public static bool TryParse([NotNullWhen(true)] string? s, out double result) => TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider: null, out result);
425public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out double result)
1472public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out double result) => TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider, out result);
src\libraries\System.Private.CoreLib\src\System\Enum.cs (9)
672public static bool TryParse(Type enumType, string? value, [NotNullWhen(true)] out object? result) =>
680public static bool TryParse(Type enumType, ReadOnlySpan<char> value, [NotNullWhen(true)] out object? result) =>
692public static bool TryParse(Type enumType, string? value, bool ignoreCase, [NotNullWhen(true)] out object? result)
712public static bool TryParse(Type enumType, ReadOnlySpan<char> value, bool ignoreCase, [NotNullWhen(true)] out object? result) =>
716private static unsafe bool TryParse(Type enumType, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, [NotNullWhen(true)] out object? result)
774static bool TryParseRareTypes(RuntimeType rt, ReadOnlySpan<char> value, bool ignoreCase, bool throwOnFailure, [NotNullWhen(true)] out long result)
833public static bool TryParse<TEnum>([NotNullWhen(true)] string? value, out TEnum result) where TEnum : struct =>
855public static bool TryParse<TEnum>([NotNullWhen(true)] string? value, bool ignoreCase, out TEnum result) where TEnum : struct
1190public override bool Equals([NotNullWhen(true)] object? obj)
src\libraries\System.Private.CoreLib\src\System\Half.cs (4)
367public static bool TryParse([NotNullWhen(true)] string? s, out Half result) => TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider: null, out result);
391public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out Half result)
472public override bool Equals([NotNullWhen(true)] object? obj)
2164public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out Half result) => TryParse(s, DefaultParseStyle, provider, out result);
src\libraries\System.Private.CoreLib\src\System\Int128.cs (4)
83public override bool Equals([NotNullWhen(true)] object? obj)
147public static bool TryParse([NotNullWhen(true)] string? s, out Int128 result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
157public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out Int128 result)
1934public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out Int128 result) => TryParse(s, NumberStyles.Integer, provider, out result);
src\libraries\System.Private.CoreLib\src\System\Int16.cs (4)
76public override bool Equals([NotNullWhen(true)] object? obj)
147public static bool TryParse([NotNullWhen(true)] string? s, out short result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
157public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out short result)
1308public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out short result) => TryParse(s, NumberStyles.Integer, provider, out result);
src\libraries\System.Private.CoreLib\src\System\Int32.cs (4)
93public override bool Equals([NotNullWhen(true)] object? obj)
163public static bool TryParse([NotNullWhen(true)] string? s, out int result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
173public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out int result)
1350public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out int result) => TryParse(s, NumberStyles.Integer, provider, out result);
src\libraries\System.Private.CoreLib\src\System\Int64.cs (4)
90public override bool Equals([NotNullWhen(true)] object? obj)
160public static bool TryParse([NotNullWhen(true)] string? s, out long result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
170public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out long result)
1353public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out long result) => TryParse(s, NumberStyles.Integer, provider, out result);
src\libraries\System.Private.CoreLib\src\System\SByte.cs (4)
78public override bool Equals([NotNullWhen(true)] object? obj)
150public static bool TryParse([NotNullWhen(true)] string? s, out sbyte result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
160public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out sbyte result)
1271public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out sbyte result) => TryParse(s, NumberStyles.Integer, provider, out result);
src\libraries\System.Private.CoreLib\src\System\Single.cs (4)
322public override bool Equals([NotNullWhen(true)] object? obj)
410public static bool TryParse([NotNullWhen(true)] string? s, out float result) => TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider: null, out result);
420public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out float result)
1491public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out float result) => TryParse(s, NumberStyles.Float | NumberStyles.AllowThousands, provider, out result);
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (14)
433public override bool Equals([NotNullWhen(true)] object? value) => value is TimeOnly timeOnly && _ticks == timeOnly._ticks;
708public static bool TryParseExact(ReadOnlySpan<char> s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] string?[]? formats, out TimeOnly result) => TryParseExact(s, formats, null, DateTimeStyles.None, out result);
719public static bool TryParseExact(ReadOnlySpan<char> s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] string?[]? formats, IFormatProvider? provider, DateTimeStyles style, out TimeOnly result) =>
779public static bool TryParse([NotNullWhen(true)] string? s, out TimeOnly result) => TryParse(s, null, DateTimeStyles.None, out result);
789public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, DateTimeStyles style, out TimeOnly result)
808public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] string? format, out TimeOnly result) => TryParseExact(s, format, null, DateTimeStyles.None, out result);
820public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] string? format, IFormatProvider? provider, DateTimeStyles style, out TimeOnly result)
838public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] string?[]? formats, out TimeOnly result) => TryParseExact(s, formats, null, DateTimeStyles.None, out result);
849public static bool TryParseExact([NotNullWhen(true)] string? s, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] string?[]? formats, IFormatProvider? provider, DateTimeStyles style, out TimeOnly result)
1006public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out TimeOnly result) => TryParse(s, provider, DateTimeStyles.None, out result);
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (13)
431public override bool Equals([NotNullWhen(true)] object? value) => (value is TimeSpan other) && Equals(other);
781public static bool TryParse([NotNullWhen(true)] string? s, out TimeSpan result)
792public static bool TryParse([NotNullWhen(true)] string? input, IFormatProvider? formatProvider, out TimeSpan result)
802public static bool TryParseExact([NotNullWhen(true)] string? input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string? format, IFormatProvider? formatProvider, out TimeSpan result)
815public static bool TryParseExact([NotNullWhen(true)] string? input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string?[]? formats, IFormatProvider? formatProvider, out TimeSpan result)
824public static bool TryParseExact(ReadOnlySpan<char> input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string?[]? formats, IFormatProvider? formatProvider, out TimeSpan result)
827public static bool TryParseExact([NotNullWhen(true)] string? input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string? format, IFormatProvider? formatProvider, TimeSpanStyles styles, out TimeSpan result)
844public static bool TryParseExact([NotNullWhen(true)] string? input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string?[]? formats, IFormatProvider? formatProvider, TimeSpanStyles styles, out TimeSpan result)
856public static bool TryParseExact(ReadOnlySpan<char> input, [NotNullWhen(true), StringSyntax(StringSyntaxAttribute.TimeSpanFormat)] string?[]? formats, IFormatProvider? formatProvider, TimeSpanStyles styles, out TimeSpan result)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.cs (6)
636public static bool TryFindSystemTimeZoneById(string id, [NotNullWhenAttribute(true)] out TimeZoneInfo? timeZoneInfo)
857public bool Equals([NotNullWhen(true)] TimeZoneInfo? other) =>
862public override bool Equals([NotNullWhen(true)] object? obj) => Equals(obj as TimeZoneInfo);
1104public static bool TryConvertIanaIdToWindowsId(string ianaId, [NotNullWhen(true)] out string? windowsId) => TryConvertIanaIdToWindowsId(ianaId, allocate: true, out windowsId);
1112public static bool TryConvertWindowsIdToIanaId(string windowsId, [NotNullWhen(true)] out string? ianaId) => TryConvertWindowsIdToIanaId(windowsId, region: null, allocate: true, out ianaId);
1121public static bool TryConvertWindowsIdToIanaId(string windowsId, string? region, [NotNullWhen(true)] out string? ianaId) => TryConvertWindowsIdToIanaId(windowsId, region, allocate: true, out ianaId);
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (24)
116public override bool Equals([NotNullWhen(true)] object? obj)
121bool IStructuralEquatable.Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
126private bool Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
236public override bool Equals([NotNullWhen(true)] object? obj)
241bool IStructuralEquatable.Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
246private bool Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
361public override bool Equals([NotNullWhen(true)] object? obj)
366bool IStructuralEquatable.Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
371private bool Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
496public override bool Equals([NotNullWhen(true)] object? obj)
501bool IStructuralEquatable.Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
506private bool Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
641public override bool Equals([NotNullWhen(true)] object? obj)
646bool IStructuralEquatable.Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
651private bool Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
796public override bool Equals([NotNullWhen(true)] object? obj)
801bool IStructuralEquatable.Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
806private bool Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
961public override bool Equals([NotNullWhen(true)] object? obj)
966bool IStructuralEquatable.Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
971private bool Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
1141public override bool Equals([NotNullWhen(true)] object? obj)
1146bool IStructuralEquatable.Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
1151private bool Equals([NotNullWhen(true)] object? other, IEqualityComparer comparer)
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (4)
85public override bool Equals([NotNullWhen(true)] object? obj)
149public static bool TryParse([NotNullWhen(true)] string? s, out UInt128 result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
159public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out UInt128 result)
2002public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out UInt128 result) => TryParse(s, NumberStyles.Integer, provider, out result);
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (4)
71public override bool Equals([NotNullWhen(true)] object? obj)
142public static bool TryParse([NotNullWhen(true)] string? s, out ushort result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
152public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out ushort result)
1130public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ushort result) => TryParse(s, NumberStyles.Integer, provider, out result);
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (4)
87public override bool Equals([NotNullWhen(true)] object? obj)
158public static bool TryParse([NotNullWhen(true)] string? s, out uint result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
168public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out uint result)
1175public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out uint result) => TryParse(s, NumberStyles.Integer, provider, out result);
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (4)
87public override bool Equals([NotNullWhen(true)] object? obj)
157public static bool TryParse([NotNullWhen(true)] string? s, out ulong result) => TryParse(s, NumberStyles.Integer, provider: null, out result);
167public static bool TryParse([NotNullWhen(true)] string? s, NumberStyles style, IFormatProvider? provider, out ulong result)
1168public static bool TryParse([NotNullWhen(true)] string? s, IFormatProvider? provider, out ulong result) => TryParse(s, NumberStyles.Integer, provider, out result);
System.Private.DataContractSerialization (66)
System.Private.Uri (11)
System\UriExt.cs (7)
270public static bool TryCreate([NotNullWhen(true), StringSyntax(StringSyntaxAttribute.Uri, "uriKind")] string? uriString, UriKind uriKind, [NotNullWhen(true)] out Uri? result)
290public static bool TryCreate([NotNullWhen(true), StringSyntax(StringSyntaxAttribute.Uri)] string? uriString, in UriCreationOptions creationOptions, [NotNullWhen(true)] out Uri? result)
303public static bool TryCreate(Uri? baseUri, string? relativeUri, [NotNullWhen(true)] out Uri? result)
317public static bool TryCreate(Uri? baseUri, Uri? relativeUri, [NotNullWhen(true)] out Uri? result)
421public static bool IsWellFormedUriString([NotNullWhen(true), StringSyntax(StringSyntaxAttribute.Uri, "uriKind")] string? uriString, UriKind uriKind)
System.Private.Windows.Core (71)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (30)
63internal delegate bool TryGetDelegate(SerializationRecord record, [NotNullWhen(true)] out object? value);
65internal static bool TryGet(TryGetDelegate get, SerializationRecord record, [NotNullWhen(true)] out object? value)
83public static bool TryGetPoint(this SerializationRecord record, [NotNullWhen(true)] out object? value)
87static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
108public static bool TryGetSize(this SerializationRecord record, [NotNullWhen(true)] out object? value)
112static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
133public static bool TryGetRectangle(this SerializationRecord record, [NotNullWhen(true)] out object? value)
137static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
164public static bool TryGetPointF(this SerializationRecord record, [NotNullWhen(true)] out object? value)
168static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
189public static bool TryGetSizeF(this SerializationRecord record, [NotNullWhen(true)] out object? value)
193static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
214public static bool TryGetRectangleF(this SerializationRecord record, [NotNullWhen(true)] out object? value)
218static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
245public static bool TryGetColor(this SerializationRecord record, [NotNullWhen(true)] out object? value)
249static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
284public static bool TryGetPrimitiveType(this SerializationRecord record, [NotNullWhen(true)] out object? value)
288static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
315public static bool TryGetPrimitiveList(this SerializationRecord record, [NotNullWhen(true)] out object? list)
319static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? list)
365public static bool TryGetPrimitiveArrayList(this SerializationRecord record, [NotNullWhen(true)] out object? value)
369static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
412public static bool TryGetPrimitiveArray(this SerializationRecord record, [NotNullWhen(true)] out object? value)
416static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value)
452public static bool TryGetPrimitiveHashtable(this SerializationRecord record, [NotNullWhen(true)] out Hashtable? hashtable)
462public static bool TryGetPrimitiveHashtable(this SerializationRecord record, [NotNullWhen(true)] out object? hashtable)
466static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? hashtable)
526static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? exception)
546[NotNullWhen(true)] out object? value)
562[NotNullWhen(true)] out object? value) =>
System.Private.Xml (35)
System.Private.Xml.Linq (2)
System.Reflection.Context (19)
System.Reflection.Emit (3)
System.Reflection.Metadata (20)
System.Reflection.MetadataLoadContext (17)
System.Reflection.TypeExtensions (2)
System.Runtime.Numerics (8)
System.Runtime.Serialization.Formatters (2)
System.Runtime.Serialization.Schema (1)
System.Security.AccessControl (1)
System.Security.Claims (1)
System.Security.Cryptography (31)
System.Security.Cryptography.Cose (2)
System.Security.Cryptography.Pkcs (21)
System.Security.Principal.Windows (2)
System.ServiceProcess.ServiceController (1)
System.Text.Encoding.CodePages (2)
System.Text.Json (27)
System.Text.RegularExpressions (13)
System.Threading (1)
System.Threading.AccessControl (3)
System.Threading.RateLimiting (5)
System.Threading.Tasks.Dataflow (21)
Blocks\BatchedJoinBlock.cs (4)
132public bool TryReceive(Predicate<Tuple<IList<T1>, IList<T2>>>? filter, [NotNullWhen(true)] out Tuple<IList<T1>, IList<T2>>? item)
138public bool TryReceiveAll([NotNullWhen(true)] out IList<Tuple<IList<T1>, IList<T2>>>? items) { return _source.TryReceiveAll(out items); }
387public bool TryReceive(Predicate<Tuple<IList<T1>, IList<T2>, IList<T3>>>? filter, [NotNullWhen(true)] out Tuple<IList<T1>, IList<T2>, IList<T3>>? item)
393public bool TryReceiveAll([NotNullWhen(true)] out IList<Tuple<IList<T1>, IList<T2>, IList<T3>>>? items) { return _source.TryReceiveAll(out items); }
Blocks\JoinBlock.cs (4)
119public bool TryReceive(Predicate<Tuple<T1, T2>>? filter, [NotNullWhen(true)] out Tuple<T1, T2>? item)
125public bool TryReceiveAll([NotNullWhen(true)] out IList<Tuple<T1, T2>>? items) { return _source.TryReceiveAll(out items); }
344public bool TryReceive(Predicate<Tuple<T1, T2, T3>>? filter, [NotNullWhen(true)] out Tuple<T1, T2, T3>? item)
350public bool TryReceiveAll([NotNullWhen(true)] out IList<Tuple<T1, T2, T3>>? items) { return _source.TryReceiveAll(out items); }
System.Transactions.Local (5)
System.Web.HttpUtility (2)
System.Windows.Forms (43)
System.Windows.Forms.Analyzers.CSharp.Tests (1)
System.Windows.Forms.Design (20)
System.Windows.Forms.Primitives (14)
System.Windows.Forms.Tests (5)
System.Windows.Forms.TestUtilities (8)
System.Xaml (1)
Templates.Blazor.Tests (3)
Templates.Blazor.WebAssembly.Auth.Tests (3)
Templates.Blazor.WebAssembly.Tests (3)
Templates.Mvc.Tests (3)
Templates.Tests (3)
VBCSCompiler (3)
xunit.assert (1)
3 references to NotNullWhen
mscorlib (1)
netstandard (1)
System.Runtime (1)