591 references to NotNullWhen
Microsoft.CodeAnalysis.CodeStyle (357)
AbstractBlockFacts.cs (3)
12public abstract bool IsScopeBlock([NotNullWhen(true)] SyntaxNode? node); 13public abstract bool IsExecutableBlock([NotNullWhen(true)] SyntaxNode? node); 16public abstract bool IsStatementContainer([NotNullWhen(true)] SyntaxNode? node);
AbstractFormatEngine.OperationApplier.cs (2)
231[NotNullWhen(true)] out IList<TokenData>? tokenData) 256[NotNullWhen(true)] out IList<TokenData>? tokenData,
AbstractHeaderFacts.cs (9)
23public abstract bool IsOnTypeHeader(SyntaxNode root, int position, bool fullHeader, [NotNullWhen(true)] out SyntaxNode? typeDeclaration); 24public abstract bool IsOnPropertyDeclarationHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? propertyDeclaration); 25public abstract bool IsOnParameterHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? parameter); 26public abstract bool IsOnMethodHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? method); 27public abstract bool IsOnLocalFunctionHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? localFunction); 28public abstract bool IsOnLocalDeclarationHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? localDeclaration); 29public abstract bool IsOnIfStatementHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? ifStatement); 30public abstract bool IsOnWhileStatementHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? whileStatement); 31public abstract bool IsOnForeachHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? foreachStatement);
AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (1)
137[NotNullWhen(returnValue: true)] out string? targetNamespace)
AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
296[NotNullWhen(returnValue: true)] out string? id, 821[NotNullWhen(returnValue: true)] out string? id,
AbstractSimplifyInterpolationHelpers.cs (1)
235private static bool HasNonImplicitInstance(IInvocationOperation invocation, [NotNullWhen(true)] out IOperation? instance)
AbstractSimplifyLinqExpressionDiagnosticAnalyzer.cs (2)
72static bool TryGetEnumerableTypeSymbol(Compilation compilation, [NotNullWhen(true)] out INamedTypeSymbol? enumerableType) 78static bool TryGetLinqWhereExtensionMethod(INamedTypeSymbol enumerableType, [NotNullWhen(true)] out IMethodSymbol? whereMethod)
AbstractSpeculationAnalyzer.cs (5)
474protected abstract bool IsParenthesizedExpression([NotNullWhen(true)] SyntaxNode? node); 679private bool ReplacementBreaksSystemObjectMethodResolution(SyntaxNode currentOriginalNode, SyntaxNode currentReplacedNode, [NotNullWhen(true)] SyntaxNode? previousOriginalNode, [NotNullWhen(true)] SyntaxNode? previousReplacedNode) 703private static bool IsSymbolSystemObjectInstanceMethod([NotNullWhen(true)] ISymbol? symbol) 834protected abstract bool ExpressionMightReferenceMember([NotNullWhen(true)] SyntaxNode? node);
AbstractTriviaFormatter.cs (1)
139protected bool IsNullOrWhitespace([NotNullWhen(true)] string? text)
AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (5)
43protected abstract bool IsNullCheck(TExpressionSyntax condition, [NotNullWhen(true)] out TExpressionSyntax? checkedExpression); 48protected abstract bool TryGetEmbeddedStatement(TIfStatementSyntax ifStatement, [NotNullWhen(true)] out TStatementSyntax? whenTrueStatement); 130[NotNullWhen(true)] out TExpressionSyntax? expressionToCoalesce) 188bool IsLegalWhenTrueStatementForAssignment([NotNullWhen(true)] out SyntaxNode? whenPartToAnalyze) 222[NotNullWhen(true)] out TExpressionSyntax? expressionToCoalesce)
AbstractUseNullPropagationDiagnosticAnalyzer.cs (4)
75[NotNullWhen(true)] out TExpressionSyntax? conditionPartToCheck, out bool isEquals); 200[NotNullWhen(true)] out TExpressionSyntax? conditionPartToCheck, 232[NotNullWhen(true)] out TExpressionSyntax? conditionPartToCheck, out bool isEquals) 255[NotNullWhen(true)] out TExpressionSyntax? conditionPartToCheck,
AbstractUseNullPropagationDiagnosticAnalyzer_IfStatement.cs (2)
26TIfStatementSyntax ifStatement, [NotNullWhen(true)] out TExpressionSyntax? condition, [NotNullWhen(true)] out TStatementSyntax? trueStatement);
AbstractUseThrowExpressionDiagnosticAnalyzer.cs (4)
170[NotNullWhen(true)] out IExpressionStatementOperation? expressionStatement, 171[NotNullWhen(true)] out IAssignmentOperation? assignmentExpression) 211[NotNullWhen(true)] out ISymbol? localOrParameter) 243[NotNullWhen(true)] out ISymbol? localOrParameter)
BidirectionalMap.cs (2)
35public bool TryGetValue(TKey key, [NotNullWhen(true)] out TValue? value) 38public bool TryGetKey(TValue value, [NotNullWhen(true)] out TKey? key)
CodeStyleHelpers.cs (4)
16public static bool TryParseStringEditorConfigCodeStyleOption(string arg, CodeStyleOption2<string> defaultValue, [NotNullWhen(true)] out CodeStyleOption2<string>? option) 52string arg, [NotNullWhen(true)] out string? value) 63string arg, NotificationOption2 defaultNotification, [NotNullWhen(true)] out string? value, [NotNullWhen(true)] out NotificationOption2 notification)
DictionaryAnalyzerConfigOptions.cs (1)
24public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value)
EditorConfigFile.cs (4)
32[NotNullWhen(true)] out Section? sectionResult) 41[NotNullWhen(true)] out Section? sectionResult) 58[NotNullWhen(true)] out Section? sectionResult) 74[NotNullWhen(true)] out Section? sectionResult)
EditorConfigNamingStyleParser_NamingRule.cs (1)
20[NotNullWhen(true)] out SerializableNamingRule? serializableNamingRule)
EditorConfigNamingStyleParser_NamingStyle.cs (3)
22[NotNullWhen(true)] out NamingScheme? namingScheme) 89[NotNullWhen(true)] out TResult? namingStyle) 174[NotNullWhen(true)] out Capitalization? capitalization)
EditorConfigNamingStyleParser_SymbolSpec.cs (3)
25[NotNullWhen(true)] out ApplicableSymbolInfo? applicableSymbolInfo) 50[NotNullWhen(true)] out SymbolSpecification? symbolSpec) 76[NotNullWhen(true)] out TResult? symbolSpec)
FileNameUtilities.cs (1)
31internal static bool IsFileName([NotNullWhen(returnValue: true)] string? path)
GeneratedCodeUtilities.cs (1)
61private static bool IsGeneratedCodeFile([NotNullWhen(returnValue: true)] string? filePath)
HashCodeAnalyzer.cs (1)
35public static bool TryGetAnalyzer(Compilation compilation, [NotNullWhen(true)] out HashCodeAnalyzer analyzer)
HashCodeAnalyzer.OperationDeconstructor.cs (1)
177private static bool TryGetFieldOrProperty(IOperation operation, [NotNullWhen(true)] out ISymbol? symbol)
IBlockFacts.cs (3)
22bool IsScopeBlock([NotNullWhen(true)] SyntaxNode? node); 28bool IsExecutableBlock([NotNullWhen(true)] SyntaxNode? node); 37bool IsStatementContainer([NotNullWhen(true)] SyntaxNode? node);
IDEDiagnosticIdToOptionMappingHelper.cs (2)
27public static bool TryGetMappedOptions(string diagnosticId, string language, [NotNullWhen(true)] out ImmutableHashSet<IOption2>? options) 32public static bool TryGetMappedFadingOption(string diagnosticId, [NotNullWhen(true)] out PerLanguageOption2<bool>? fadingOption)
IHeaderFacts.cs (9)
16bool IsOnTypeHeader(SyntaxNode root, int position, bool fullHeader, [NotNullWhen(true)] out SyntaxNode? typeDeclaration); 18bool IsOnPropertyDeclarationHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? propertyDeclaration); 19bool IsOnParameterHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? parameter); 20bool IsOnMethodHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? method); 21bool IsOnLocalFunctionHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? localFunction); 22bool IsOnLocalDeclarationHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? localDeclaration); 23bool IsOnIfStatementHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? ifStatement); 24bool IsOnWhileStatementHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? whileStatement); 25bool IsOnForeachHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? foreachStatement);
IHeaderFactsExtensions.cs (1)
14public static bool IsOnTypeHeader(this IHeaderFacts headerFacts, SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? typeDeclaration)
IMethodSymbolExtensions.cs (1)
42public static bool HasEventHandlerSignature(this IMethodSymbol method, [NotNullWhen(returnValue: true)] INamedTypeSymbol? eventArgsType)
ImmutableHashMap.cs (2)
474internal bool TryExchangeKey(TKey key, [NotNullWhen(true)] out TKey? existingKey) 496private static bool TryCastToImmutableMap(IEnumerable<KeyValuePair<TKey, TValue>> sequence, [NotNullWhen(true)] out ImmutableHashMap<TKey, TValue>? other)
INamedTypeSymbolExtensions.cs (1)
52public static bool IsContainedWithin([NotNullWhen(returnValue: true)] this INamedTypeSymbol? symbol, INamedTypeSymbol outer)
IntegerUtilities.cs (1)
81public static bool IsIntegral([NotNullWhen(true)] object? value)
ISemanticFacts.cs (9)
51bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 58bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 59bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 60bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 61bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 63bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken); 72bool TryGetSpeculativeSemanticModel(SemanticModel oldSemanticModel, SyntaxNode oldNode, SyntaxNode newNode, [NotNullWhen(true)] out SemanticModel? speculativeModel); 100bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken); 107bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken);
ISemanticFactsExtensions.cs (2)
111private static bool IsUserDefinedOperator([NotNullWhen(returnValue: true)] ISymbol? symbol) 118private static bool IsFloatingPoint([NotNullWhen(returnValue: true)] ITypeSymbol? type)
ISymbolExtensions.cs (47)
110public static bool IsOverridable([NotNullWhen(true)] this ISymbol? symbol) 119public static bool IsImplementableMember([NotNullWhen(true)] this ISymbol? symbol) 162public static bool IsErrorType([NotNullWhen(true)] this ISymbol? symbol) 165public static bool IsModuleType([NotNullWhen(true)] this ISymbol? symbol) 168public static bool IsInterfaceType([NotNullWhen(true)] this ISymbol? symbol) 171public static bool IsArrayType([NotNullWhen(true)] this ISymbol? symbol) 174public static bool IsTupleType([NotNullWhen(true)] this ISymbol? symbol) 177public static bool IsAnonymousFunction([NotNullWhen(true)] this ISymbol? symbol) 180public static bool IsKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind) 183public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind) 186public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind1, SymbolKind kind2) 192public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, SymbolKind kind1, SymbolKind kind2, SymbolKind kind3) 198public static bool MatchesKind([NotNullWhen(true)] this ISymbol? symbol, params SymbolKind[] kinds) 204public static bool IsReducedExtension([NotNullWhen(true)] this ISymbol? symbol) 207public static bool IsEnumMember([NotNullWhen(true)] this ISymbol? symbol) 213public static bool IsLocalFunction([NotNullWhen(true)] this ISymbol? symbol) 216public static bool IsAnonymousOrLocalFunction([NotNullWhen(true)] this ISymbol? symbol) 219public static bool IsModuleMember([NotNullWhen(true)] this ISymbol? symbol) 222public static bool IsConstructor([NotNullWhen(true)] this ISymbol? symbol) 225public static bool IsStaticConstructor([NotNullWhen(true)] this ISymbol? symbol) 228public static bool IsDestructor([NotNullWhen(true)] this ISymbol? symbol) 231public static bool IsUserDefinedOperator([NotNullWhen(true)] this ISymbol? symbol) 234public static bool IsConversion([NotNullWhen(true)] this ISymbol? symbol) 237public static bool IsOrdinaryMethod([NotNullWhen(true)] this ISymbol? symbol) 240public static bool IsOrdinaryMethodOrLocalFunction([NotNullWhen(true)] this ISymbol? symbol) 243public static bool IsDelegateType([NotNullWhen(true)] this ISymbol? symbol) 246public static bool IsAnonymousType([NotNullWhen(true)] this ISymbol? symbol) 249public static bool IsNormalAnonymousType([NotNullWhen(true)] this ISymbol? symbol) 252public static bool IsAnonymousDelegateType([NotNullWhen(true)] this ISymbol? symbol) 255public static bool IsAnonymousTypeProperty([NotNullWhen(true)] this ISymbol? symbol) 258public static bool IsTupleField([NotNullWhen(true)] this ISymbol? symbol) 261public static bool IsIndexer([NotNullWhen(true)] this ISymbol? symbol) 264public static bool IsWriteableFieldOrProperty([NotNullWhen(true)] this ISymbol? symbol) 272public static bool IsRequired([NotNullWhen(true)] this ISymbol? symbol) 337public static bool IsFunctionValue([NotNullWhen(true)] this ISymbol? symbol) 340public static bool IsThisParameter([NotNullWhen(true)] this ISymbol? symbol) 354public static bool IsParams([NotNullWhen(true)] this ISymbol? symbol) 409public static bool IsAttribute([NotNullWhen(true)] this ISymbol? symbol) 418public static bool RequiresUnsafeModifier([NotNullWhen(true)] this ISymbol? member) 468public static bool IsStaticType([NotNullWhen(true)] this ISymbol? symbol) 471public static bool IsNamespace([NotNullWhen(true)] this ISymbol? symbol) 475[NotNullWhen(true)] this ISymbol? symbol, ISymbol withinType, IAssemblySymbol withinAssembly, CancellationToken cancellationToken) 545public static bool IsAccessor([NotNullWhen(true)] this ISymbol? symbol) 548public static bool IsPropertyAccessor([NotNullWhen(true)] this ISymbol? symbol) 551public static bool IsEventAccessor([NotNullWhen(true)] this ISymbol? symbol) 576public static bool IsAwaitableNonDynamic([NotNullWhen(true)] this ISymbol? symbol, SemanticModel semanticModel, int position) 715public static bool IsKind<TSymbol>(this ISymbol symbol, SymbolKind kind, [NotNullWhen(true)] out TSymbol? result) where TSymbol : class, ISymbol
ISyntaxFacts.cs (71)
122bool IsPredefinedType([NotNullWhen(true)] SyntaxNode? node); 123bool IsPredefinedType([NotNullWhen(true)] SyntaxNode? node, PredefinedType type); 172bool IsUsingOrExternOrImport([NotNullWhen(true)] SyntaxNode? node); 173bool IsGlobalAssemblyAttribute([NotNullWhen(true)] SyntaxNode? node); 174bool IsGlobalModuleAttribute([NotNullWhen(true)] SyntaxNode? node); 175bool IsDeclaration([NotNullWhen(true)] SyntaxNode? node); 178bool IsUsingAliasDirective([NotNullWhen(true)] SyntaxNode? node); 190bool IsEntirelyWithinStringOrCharOrNumericLiteral([NotNullWhen(true)] SyntaxTree? syntaxTree, int position, CancellationToken cancellationToken); 194bool TryGetExternalSourceInfo([NotNullWhen(true)] SyntaxNode? directive, out ExternalSourceInfo info); 196bool IsDeclarationExpression([NotNullWhen(true)] SyntaxNode? node); 198bool IsConversionExpression([NotNullWhen(true)] SyntaxNode? node); 199bool IsCastExpression([NotNullWhen(true)] SyntaxNode? node); 201bool IsExpressionOfForeach([NotNullWhen(true)] SyntaxNode? node); 210bool IsLeftSideOfAssignment([NotNullWhen(true)] SyntaxNode? node); 212bool IsAnyAssignmentStatement([NotNullWhen(true)] SyntaxNode? statement); 213bool IsSimpleAssignmentStatement([NotNullWhen(true)] SyntaxNode? statement); 218bool IsLeftSideOfAnyAssignment([NotNullWhen(true)] SyntaxNode? node); 220bool IsLeftSideOfCompoundAssignment([NotNullWhen(true)] SyntaxNode? node); 223bool IsInferredAnonymousObjectMemberDeclarator([NotNullWhen(true)] SyntaxNode? node); 224bool IsOperandOfIncrementExpression([NotNullWhen(true)] SyntaxNode? node); 225bool IsOperandOfIncrementOrDecrementExpression([NotNullWhen(true)] SyntaxNode? node); 227bool IsLeftSideOfDot([NotNullWhen(true)] SyntaxNode? node); 244bool IsLeftSideOfExplicitInterfaceSpecifier([NotNullWhen(true)] SyntaxNode? node); 246bool IsNameOfSimpleMemberAccessExpression([NotNullWhen(true)] SyntaxNode? node); 247bool IsNameOfAnyMemberAccessExpression([NotNullWhen(true)] SyntaxNode? node); 248bool IsNameOfMemberBindingExpression([NotNullWhen(true)] SyntaxNode? node); 281bool IsPointerMemberAccessExpression([NotNullWhen(true)] SyntaxNode? node); 283bool IsNamedArgument([NotNullWhen(true)] SyntaxNode? node); 284bool IsNameOfNamedArgument([NotNullWhen(true)] SyntaxNode? node); 286bool IsParameterList([NotNullWhen(true)] SyntaxNode? node); 297bool IsMemberBindingExpression([NotNullWhen(true)] SyntaxNode? node); 298bool IsPostfixUnaryExpression([NotNullWhen(true)] SyntaxNode? node); 309bool IsSimpleArgument([NotNullWhen(true)] SyntaxNode? node); 310bool IsArgument([NotNullWhen(true)] SyntaxNode? node); 311bool IsAttributeArgument([NotNullWhen(true)] SyntaxNode? node); 325bool IsUsingDirectiveName([NotNullWhen(true)] SyntaxNode? node); 331bool IsAttributeNamedArgumentIdentifier([NotNullWhen(true)] SyntaxNode? node); 332bool IsMemberInitializerNamedAssignmentIdentifier([NotNullWhen(true)] SyntaxNode? node, [NotNullWhen(true)] out SyntaxNode? initializedInstance); 333bool IsAnyInitializerExpression([NotNullWhen(true)] SyntaxNode? node, [NotNullWhen(true)] out SyntaxNode? creationExpression); 335bool IsDirective([NotNullWhen(true)] SyntaxNode? node); 336bool IsStatement([NotNullWhen(true)] SyntaxNode? node); 337bool IsExecutableStatement([NotNullWhen(true)] SyntaxNode? node); 338bool IsGlobalStatement([NotNullWhen(true)] SyntaxNode? node); 342bool IsDeconstructionAssignment([NotNullWhen(true)] SyntaxNode? node); 343bool IsDeconstructionForEachStatement([NotNullWhen(true)] SyntaxNode? node); 357bool IsMethodBody([NotNullWhen(true)] SyntaxNode? node); 366bool IsElementAccessExpression([NotNullWhen(true)] SyntaxNode? node); 387bool IsInNamespaceOrTypeContext([NotNullWhen(true)] SyntaxNode? node); 389bool IsBaseTypeList([NotNullWhen(true)] SyntaxNode? node); 391bool IsInConstantContext([NotNullWhen(true)] SyntaxNode? node); 393bool IsMethodLevelMember([NotNullWhen(true)] SyntaxNode? node); 394bool IsTopLevelNodeWithMembers([NotNullWhen(true)] SyntaxNode? node); 417bool ContainsInMemberBody([NotNullWhen(true)] SyntaxNode? node, TextSpan span); 455bool IsNameOfSubpattern([NotNullWhen(true)] SyntaxNode? node); 458bool IsAnyPattern([NotNullWhen(true)] SyntaxNode? node); 459bool IsBinaryPattern([NotNullWhen(true)] SyntaxNode? node); 460bool IsUnaryPattern([NotNullWhen(true)] SyntaxNode? node); 486bool IsParameterNameXmlElementSyntax([NotNullWhen(true)] SyntaxNode? node); 494bool IsAnonymousFunctionExpression([NotNullWhen(true)] SyntaxNode? node); 495bool IsBaseNamespaceDeclaration([NotNullWhen(true)] SyntaxNode? node); 496bool IsBinaryExpression([NotNullWhen(true)] SyntaxNode? node); 497bool IsLiteralExpression([NotNullWhen(true)] SyntaxNode? node); 498bool IsMemberAccessExpression([NotNullWhen(true)] SyntaxNode? node); 499bool IsSimpleName([NotNullWhen(true)] SyntaxNode? node); 501bool IsNamedMemberInitializer([NotNullWhen(true)] SyntaxNode? node); 502bool IsElementAccessInitializer([NotNullWhen(true)] SyntaxNode? node); 504bool IsObjectMemberInitializer([NotNullWhen(true)] SyntaxNode? node); 505bool IsObjectCollectionInitializer([NotNullWhen(true)] SyntaxNode? node); 550bool IsEqualsValueOfPropertyDeclaration([NotNullWhen(true)] SyntaxNode? node);
ISyntaxFactsExtensions.cs (83)
23public static bool IsMemberInitializerNamedAssignmentIdentifier(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 606public static bool IsExpressionOfAwaitExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 615public static bool IsExpressionOfInvocationExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 625public static bool IsExpressionOfMemberAccessExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 635public static bool IsRightOfQualifiedName(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 645public static bool IsTypeOfObjectCreationExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 682public static bool IsSkippedTokensTrivia(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 722public static bool IsGenericName(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 725public static bool IsIdentifierName(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 728public static bool IsQualifiedName(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 735public static bool IsTupleType(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 742public static bool IsCharacterLiteralExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 745public static bool IsDefaultLiteralExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 748public static bool IsFalseLiteralExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 751public static bool IsNumericLiteralExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 754public static bool IsNullLiteralExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 757public static bool IsStringLiteralExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 760public static bool IsTrueLiteralExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 767public static bool IsArrayCreationExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 770public static bool IsAwaitExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 773public static bool IsBaseExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 776public static bool IsConditionalExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 779public static bool IsConditionalAccessExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 782public static bool IsImplicitArrayCreationExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 785public static bool IsImplicitObjectCreationExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 788public static bool IsIndexExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 791public static bool IsInterpolatedStringExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 794public static bool IsInterpolation(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 797public static bool IsInterpolatedStringText(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 800public static bool IsInvocationExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 803public static bool IsIsTypeExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 806public static bool IsIsNotTypeExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 809public static bool IsIsPatternExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 812public static bool IsLogicalAndExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 815public static bool IsLogicalOrExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 818public static bool IsLogicalNotExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 821public static bool IsObjectCreationExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 824public static bool IsParenthesizedExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 827public static bool IsQueryExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 830public static bool IsRangeExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 833public static bool IsRefExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 836public static bool IsSimpleMemberAccessExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 839public static bool IsThisExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 842public static bool IsThrowExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 845public static bool IsTupleExpression(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 855public static bool IsAndPattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 858public static bool IsConstantPattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 861public static bool IsDeclarationPattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 864public static bool IsNotPattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 867public static bool IsOrPattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 870public static bool IsParenthesizedPattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 873public static bool IsRecursivePattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 876public static bool IsRelationalPattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 879public static bool IsTypePattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 882public static bool IsVarPattern(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 889public static bool IsExpressionStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 892public static bool IsForEachStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 895public static bool IsIfStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 898public static bool IsLocalDeclarationStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 901public static bool IsLocalFunctionStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 904public static bool IsLockStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 907public static bool IsReturnStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 910public static bool IsThrowStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 913public static bool IsUsingStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 916public static bool IsWhileStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 919public static bool IsYieldReturnStatement(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 926public static bool IsAttribute(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 929public static bool IsClassDeclaration(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 932public static bool IsConstructorDeclaration(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 935public static bool IsEnumDeclaration(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 938public static bool IsGlobalAttribute(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 941public static bool IsInterfaceDeclaration(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 944public static bool IsParameter(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 947public static bool IsTypeConstraint(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 950public static bool IsVariableDeclarator(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 953public static bool IsFieldDeclaration(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 956public static bool IsPropertyDeclaration(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 959public static bool IsStructDeclaration(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 962public static bool IsTypeArgumentList(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 969public static bool IsElseClause(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 971public static bool IsEqualsValueClause(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 978public static bool IsImplicitElementAccess(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node) 981public static bool IsIndexerMemberCref(this ISyntaxFacts syntaxFacts, [NotNullWhen(true)] SyntaxNode? node)
ITypeSymbolExtensions.cs (25)
22public static bool IsIntegralType([NotNullWhen(returnValue: true)] this ITypeSymbol? type) 25public static bool IsSignedIntegralType([NotNullWhen(returnValue: true)] this ITypeSymbol? type) 28public static bool CanAddNullCheck([NotNullWhen(returnValue: true)] this ITypeSymbol? type) 53public static bool IsAbstractClass([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 56public static bool IsSystemVoid([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 59public static bool IsNullable([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 62public static bool IsNonNullableValueType([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 66[NotNullWhen(true)] this ITypeSymbol? symbol, 67[NotNullWhen(true)] out ITypeSymbol? underlyingType) 79public static bool IsModuleType([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 82public static bool IsInterfaceType([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 85public static bool IsDelegateType([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 88public static bool IsFunctionPointerType([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 91public static bool IsStructType([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 94public static bool IsAnonymousType([NotNullWhen(returnValue: true)] this INamedTypeSymbol? symbol) 245public static bool IsFormattableStringOrIFormattable([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 282public static bool IsNumericType([NotNullWhen(returnValue: true)] this ITypeSymbol? type) 311public static bool ContainsAnonymousType([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 370public static bool IsSpecialType([NotNullWhen(returnValue: true)] this ITypeSymbol? symbol) 587public static bool IsOrDerivesFromExceptionType([NotNullWhen(returnValue: true)] this ITypeSymbol? type, Compilation compilation) 620public static bool IsEnumType([NotNullWhen(true)] this ITypeSymbol? type) 623public static bool IsEnumType([NotNullWhen(true)] this ITypeSymbol? type, [NotNullWhen(true)] out INamedTypeSymbol? enumType) 714public static bool IsDisposable([NotNullWhen(returnValue: true)] this ITypeSymbol? type, [NotNullWhen(returnValue: true)] ITypeSymbol? iDisposableType)
J\s\src\Compilers\Core\Portable\InternalUtilities\StringExtensions.cs\StringExtensions.cs (4)
98internal static bool IsValidClrTypeName([NotNullWhen(returnValue: true)] this string? name) 106internal static bool IsValidClrNamespaceName([NotNullWhen(returnValue: true)] this string? name) 144[NotNullWhen(returnValue: true)] out string? result) 159[NotNullWhen(returnValue: true)] out string? result)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
18public static bool OverlapsHiddenPosition([NotNullWhen(returnValue: true)] this SyntaxTree? tree, TextSpan span, CancellationToken cancellationToken)
ListExtensions.cs (1)
48public static bool TryRemoveFirst<T, TArg>(this IList<T> list, Func<T, TArg, bool> selector, TArg arg, [NotNullWhen(true)] out T? removedItem)
Logger.cs (1)
43private static bool TryGetActiveLogger(FunctionId functionId, [NotNullWhen(true)] out ILogger? activeLogger)
OperationExtensions.cs (3)
250public static bool IsInLeftOfDeconstructionAssignment(this IOperation operation, [NotNullWhen(true)] out IDeconstructionAssignmentOperation? deconstructionAssignment) 348public static bool HasAnyOperationDescendant(this IOperation operationBlock, Func<IOperation, bool> predicate, [NotNullWhen(true)] out IOperation? foundOperation) 390public static bool IsSingleThrowNotImplementedOperation([NotNullWhen(true)] this IOperation? firstBlock)
OrderModifiersHelpers.cs (2)
43public bool TryGetOrComputePreferredOrder(string value, [NotNullWhen(true)] out Dictionary<int, int>? preferredOrder) 68protected virtual bool TryParse(string value, [NotNullWhen(true)] out Dictionary<int, int>? parsed)
PathUtilities.cs (2)
353public static bool IsAbsolute([NotNullWhen(true)] string? path) 745public static bool IsValidFilePath([NotNullWhen(true)] string? fullPath)
RoslynString.cs (2)
12public static bool IsNullOrEmpty([NotNullWhen(returnValue: false)] string? value) 16public static bool IsNullOrWhiteSpace([NotNullWhen(returnValue: false)] string? value)
SemanticModelExtensions.cs (1)
201[NotNullWhen(true)] out string? parameterName)
SimplifierOptions.cs (1)
48public bool TryGetQualifyMemberAccessOption(SymbolKind symbolKind, [NotNullWhen(true)] out CodeStyleOption2<bool>? option)
SimplifyTypeNamesDiagnosticAnalyzerBase.cs (1)
113public bool TrySimplify(SemanticModel model, SyntaxNode node, [NotNullWhen(true)] out Diagnostic? diagnostic, TSimplifierOptions options, CancellationToken cancellationToken)
StructuredAnalyzerConfigOptions.cs (4)
34public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value) 49public override bool TryGetValue(string key, [NotNullWhen(true)] out string? value) 75public static bool TryGetStructuredOptions(AnalyzerConfigOptions configOptions, [NotNullWhen(true)] out StructuredAnalyzerConfigOptions? options) 107private static bool TryGetCorrespondingCodeStyleInstance(AnalyzerConfigOptions configOptions, [NotNullWhen(true)] out StructuredAnalyzerConfigOptions? options)
SuppressMessageAttributeState.cs (1)
140[NotNullWhen(returnValue: true)] out IOperation? argumentValueOperation)
SymbolKey.BodyLevelSymbolKey.cs (1)
117[NotNullWhen(true)] out SemanticModel? semanticModel)
SyntaxNodeExtensions.cs (1)
124public static bool CheckParent<T>([NotNullWhen(returnValue: true)] this SyntaxNode? node, Func<T, bool> valueChecker) where T : SyntaxNode
SyntaxPath.cs (2)
136public bool TryResolve<TNode>(SyntaxTree syntaxTree, CancellationToken cancellationToken, [NotNullWhen(true)] out TNode? node) 142public bool TryResolve<TNode>(SyntaxNode? root, [NotNullWhen(true)] out TNode? node)
TokenStream.Changes.cs (1)
36public readonly bool TryGet(int key, [NotNullWhen(true)] out TriviaData? triviaInfo)
UnicodeCharacterUtilities.cs (1)
91public static bool IsValidIdentifier([NotNullWhen(returnValue: true)] string? name)
UseCollectionInitializerAnalyzer.cs (2)
142[NotNullWhen(true)] out SyntaxNode? instance) 185[NotNullWhen(true)] out SyntaxNode? instance)
UseConditionalExpressionForAssignmentHelpers.cs (3)
17[NotNullWhen(true)] out IOperation trueStatement, 18[NotNullWhen(true)] out IOperation? falseStatement, 58[NotNullWhen(true)] IOperation? statement,
UseConditionalExpressionForReturnHelpers.cs (2)
18[NotNullWhen(true)] out IOperation? trueStatement, 19[NotNullWhen(true)] out IOperation? falseStatement,
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
AbstractMakeMemberStaticCodeFixProvider.cs (1)
19protected abstract bool TryGetMemberDeclaration(SyntaxNode node, [NotNullWhen(true)] out SyntaxNode? memberDeclaration);
AbstractMakeTypeAbstractCodeFixProvider.cs (1)
20protected abstract bool IsValidRefactoringContext(SyntaxNode? node, [NotNullWhen(true)] out TTypeDeclarationSyntax? typeDeclaration);
AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (2)
157[NotNullWhen(true)] out IVariableDeclarationGroupOperation? localDeclaration, 158[NotNullWhen(true)] out IVariableDeclaratorOperation? declarator)
AbstractUseNullPropagationCodeFixProvider.cs (1)
51protected abstract bool TryGetBlock(SyntaxNode? node, [NotNullWhen(true)] out TStatementSyntax? block);
ArrayExtensions.cs (1)
12public static bool IsNullOrEmpty<T>([NotNullWhen(returnValue: false)] this T[]? array)
CodeGenerationHelpers.cs (2)
84public static bool IsSpecialType([NotNullWhen(true)] ITypeSymbol? type, SpecialType specialType) 117ISymbol symbol, string commentToken, [NotNullWhen(true)] out string? comment, CancellationToken cancellationToken = default)
Fixer.cs (1)
116[NotNullWhen(true)] out ITypeSymbol? targetArgumentConversionType)
SimplificationHelpers.cs (1)
94public static bool IsValidSymbolInfo([NotNullWhen(true)] ISymbol? symbol)
Microsoft.CodeAnalysis.CSharp.CodeStyle (193)
BlockSyntaxExtensions.cs (3)
22[NotNullWhen(true)] out ExpressionSyntax? expression, 52[NotNullWhen(true)] out ArrowExpressionClauseSyntax? arrowExpression, 114private static bool TryGetExpression(StatementSyntax firstStatement, LanguageVersion languageVersion, [NotNullWhen(true)] out ExpressionSyntax? expression, out SyntaxToken semicolonToken)
CastSimplifier.cs (1)
754private static bool IsNullOrErrorType([NotNullWhen(false)] ITypeSymbol? type)
ConvertNamespaceAnalysis.cs (2)
25public static bool CanOfferUseBlockScoped(CodeStyleOption2<NamespaceDeclarationPreference> option, [NotNullWhen(true)] BaseNamespaceDeclarationSyntax? declaration, bool forAnalyzer) 41internal static bool CanOfferUseFileScoped(CodeStyleOption2<NamespaceDeclarationPreference> option, CompilationUnitSyntax root, [NotNullWhen(true)] BaseNamespaceDeclarationSyntax? declaration, bool forAnalyzer)
CSharpAccessibilityFacts.cs (3)
322public static bool ParentIsFieldDeclaration([NotNullWhen(true)] SyntaxNode? node) 325public static bool ParentIsEventFieldDeclaration([NotNullWhen(true)] SyntaxNode? node) 328public static bool ParentIsLocalDeclarationStatement([NotNullWhen(true)] SyntaxNode? node)
CSharpAsAndNullCheckDiagnosticAnalyzer.cs (5)
270[NotNullWhen(true)] out VariableDeclaratorSyntax? declarator, 271[NotNullWhen(true)] out BinaryExpressionSyntax? asExpression, 272[NotNullWhen(true)] out ILocalSymbol? localSymbol) 318[NotNullWhen(true)] out ILocalSymbol? localSymbol, 319[NotNullWhen(true)] out VariableDeclaratorSyntax? declarator)
CSharpBlockFacts.cs (3)
22public override bool IsScopeBlock([NotNullWhen(true)] SyntaxNode? node) 25public override bool IsExecutableBlock([NotNullWhen(true)] SyntaxNode? node) 42public override bool IsStatementContainer([NotNullWhen(true)] SyntaxNode? node)
CSharpHeaderFacts.cs (9)
24public override bool IsOnTypeHeader(SyntaxNode root, int position, bool fullHeader, [NotNullWhen(true)] out SyntaxNode? typeDeclaration) 38public override bool IsOnPropertyDeclarationHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? propertyDeclaration) 51public override bool IsOnParameterHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? parameter) 64public override bool IsOnMethodHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? method) 77public override bool IsOnLocalFunctionHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? localFunction) 90public override bool IsOnLocalDeclarationHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? localDeclaration) 105public override bool IsOnIfStatementHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? ifStatement) 118public override bool IsOnWhileStatementHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? whileStatement) 131public override bool IsOnForeachHeader(SyntaxNode root, int position, [NotNullWhen(true)] out SyntaxNode? foreachStatement)
CSharpIsAndCastCheckDiagnosticAnalyzer.cs (4)
153[NotNullWhen(true)] out IfStatementSyntax? ifStatement, 154[NotNullWhen(true)] out LocalDeclarationStatementSyntax? localDeclarationStatement, 155[NotNullWhen(true)] out VariableDeclaratorSyntax? declarator, 156[NotNullWhen(true)] out CastExpressionSyntax? castExpression)
CSharpMakeStructReadOnlyDiagnosticAnalyzer.cs (2)
73[NotNullWhen(true)] out TypeDeclarationSyntax? typeDeclaration, 74[NotNullWhen(true)] out CodeStyleOption2<bool>? option)
CSharpOrderModifiersHelper.cs (1)
25protected override bool TryParse(string value, [NotNullWhen(true)] out Dictionary<int, int>? parsed)
CSharpRemoveUnnecessaryLambdaExpressionDiagnosticAnalyzer.cs (2)
280[NotNullWhen(true)] out InvocationExpressionSyntax? invocation, 303[NotNullWhen(true)] out InvocationExpressionSyntax? invocation,
CSharpRemoveUnnecessaryNullableDirectiveDiagnosticAnalyzer.cs (2)
75private static bool IsReducing([NotNullWhen(true)] NullableContextOptions? oldOptions, [NotNullWhen(true)] NullableContextOptions? newOptions)
CSharpSemanticFacts.cs (9)
38public bool IsWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 41public bool IsOnlyWrittenTo(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 44public bool IsInOutContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 47public bool IsInRefContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 50public bool IsInInContext(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 53public bool CanReplaceWithRValue(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? expression, CancellationToken cancellationToken) 112[NotNullWhen(true)] out SemanticModel? speculativeModel) 365public bool IsInsideNameOfExpression(SemanticModel semanticModel, [NotNullWhen(true)] SyntaxNode? node, CancellationToken cancellationToken) 389public bool IsInExpressionTree(SemanticModel semanticModel, SyntaxNode node, [NotNullWhen(true)] INamedTypeSymbol? expressionType, CancellationToken cancellationToken)
CSharpSyntaxFacts.cs (68)
121public bool IsEntirelyWithinStringOrCharOrNumericLiteral([NotNullWhen(true)] SyntaxTree? syntaxTree, int position, CancellationToken cancellationToken) 131public bool IsDirective([NotNullWhen(true)] SyntaxNode? node) 134public bool TryGetExternalSourceInfo([NotNullWhen(true)] SyntaxNode? node, out ExternalSourceInfo info) 155public bool IsNameOfSimpleMemberAccessExpression([NotNullWhen(true)] SyntaxNode? node) 161public bool IsNameOfAnyMemberAccessExpression([NotNullWhen(true)] SyntaxNode? node) 164public bool IsNameOfMemberBindingExpression([NotNullWhen(true)] SyntaxNode? node) 177public bool IsDeclarationExpression([NotNullWhen(true)] SyntaxNode? node) 183public bool IsNamedArgument([NotNullWhen(true)] SyntaxNode? node) 186public bool IsNameOfNamedArgument([NotNullWhen(true)] SyntaxNode? node) 192public bool IsParameterList([NotNullWhen(true)] SyntaxNode? node) 195public bool IsUsingDirectiveName([NotNullWhen(true)] SyntaxNode? node) 199public bool IsUsingAliasDirective([NotNullWhen(true)] SyntaxNode? node) 210public bool IsDeconstructionForEachStatement([NotNullWhen(true)] SyntaxNode? node) 213public bool IsDeconstructionAssignment([NotNullWhen(true)] SyntaxNode? node) 226public bool IsStatement([NotNullWhen(true)] SyntaxNode? node) 229public bool IsExecutableStatement([NotNullWhen(true)] SyntaxNode? node) 232public bool IsGlobalStatement([NotNullWhen(true)] SyntaxNode? node) 257public bool IsMethodBody([NotNullWhen(true)] SyntaxNode? node) 533public bool IsPostfixUnaryExpression([NotNullWhen(true)] SyntaxNode? node) 536public bool IsMemberBindingExpression([NotNullWhen(true)] SyntaxNode? node) 539public bool IsPointerMemberAccessExpression([NotNullWhen(true)] SyntaxNode? node) 578public bool IsInNamespaceOrTypeContext([NotNullWhen(true)] SyntaxNode? node) 581public bool IsBaseTypeList([NotNullWhen(true)] SyntaxNode? node) 593public bool IsArgument([NotNullWhen(true)] SyntaxNode? node) 596public bool IsAttributeArgument([NotNullWhen(true)] SyntaxNode? node) 599public bool IsSimpleArgument([NotNullWhen(true)] SyntaxNode? node) 606public bool IsInConstantContext([NotNullWhen(true)] SyntaxNode? node) 618public bool IsAttributeNamedArgumentIdentifier([NotNullWhen(true)] SyntaxNode? node) 632public bool IsNameOfSubpattern([NotNullWhen(true)] SyntaxNode? node) 641[NotNullWhen(true)] SyntaxNode? node, [NotNullWhen(true)] out SyntaxNode? initializedInstance) 672public bool IsAnyInitializerExpression([NotNullWhen(true)] SyntaxNode? node, [NotNullWhen(true)] out SyntaxNode? creationExpression) 724public bool IsMethodLevelMember([NotNullWhen(true)] SyntaxNode? node) 732public bool IsTopLevelNodeWithMembers([NotNullWhen(true)] SyntaxNode? node) 959public bool ContainsInMemberBody([NotNullWhen(true)] SyntaxNode? node, TextSpan span) 1138public bool IsLeftSideOfDot([NotNullWhen(true)] SyntaxNode? node) 1153public bool IsLeftSideOfExplicitInterfaceSpecifier([NotNullWhen(true)] SyntaxNode? node) 1156public bool IsLeftSideOfAssignment([NotNullWhen(true)] SyntaxNode? node) 1159public bool IsLeftSideOfAnyAssignment([NotNullWhen(true)] SyntaxNode? node) 1162public bool IsLeftSideOfCompoundAssignment([NotNullWhen(true)] SyntaxNode? node) 1168public bool IsInferredAnonymousObjectMemberDeclarator([NotNullWhen(true)] SyntaxNode? node) 1172public bool IsOperandOfIncrementExpression([NotNullWhen(true)] SyntaxNode? node) 1176public static bool IsOperandOfDecrementExpression([NotNullWhen(true)] SyntaxNode? node) 1180public bool IsOperandOfIncrementOrDecrementExpression([NotNullWhen(true)] SyntaxNode? node) 1221public bool IsUsingOrExternOrImport([NotNullWhen(true)] SyntaxNode? node) 1227public bool IsGlobalAssemblyAttribute([NotNullWhen(true)] SyntaxNode? node) 1230public bool IsGlobalModuleAttribute([NotNullWhen(true)] SyntaxNode? node) 1233private static bool IsGlobalAttribute([NotNullWhen(true)] SyntaxNode? node, SyntaxKind attributeTarget) 1291public bool IsSimpleAssignmentStatement([NotNullWhen(true)] SyntaxNode? statement) 1318public bool IsAnyAssignmentStatement([NotNullWhen(true)] SyntaxNode? node) 1350public bool IsExpressionOfForeach([NotNullWhen(true)] SyntaxNode? node) 1396public bool IsConversionExpression([NotNullWhen(true)] SyntaxNode? node) 1399public bool IsCastExpression([NotNullWhen(true)] SyntaxNode? node) 1422public bool IsParameterNameXmlElementSyntax([NotNullWhen(true)] SyntaxNode? node) 1451public bool IsAnyPattern([NotNullWhen(true)] SyntaxNode? node) 1480public bool IsBinaryPattern([NotNullWhen(true)] SyntaxNode? node) 1483public bool IsUnaryPattern([NotNullWhen(true)] SyntaxNode? node) 1535public bool IsAnonymousFunctionExpression([NotNullWhen(true)] SyntaxNode? node) 1538public bool IsBaseNamespaceDeclaration([NotNullWhen(true)] SyntaxNode? node) 1541public bool IsBinaryExpression([NotNullWhen(true)] SyntaxNode? node) 1544public bool IsLiteralExpression([NotNullWhen(true)] SyntaxNode? node) 1547public bool IsMemberAccessExpression([NotNullWhen(true)] SyntaxNode? node) 1550public bool IsSimpleName([NotNullWhen(true)] SyntaxNode? node) 1553public bool IsNamedMemberInitializer([NotNullWhen(true)] SyntaxNode? node) 1556public bool IsElementAccessInitializer([NotNullWhen(true)] SyntaxNode? node) 1559public bool IsObjectMemberInitializer([NotNullWhen(true)] SyntaxNode? node) 1562public bool IsObjectCollectionInitializer([NotNullWhen(true)] SyntaxNode? node)
CSharpTypeStyleHelper.State.cs (1)
103private static bool IsMadeOfSpecialTypes([NotNullWhen(true)] ITypeSymbol? type)
CSharpUseCoalesceExpressionForIfNullStatementCheckDiagnosticAnalyzer.cs (2)
43protected override bool IsNullCheck(ExpressionSyntax condition, [NotNullWhen(true)] out ExpressionSyntax? checkedExpression) 60protected override bool TryGetEmbeddedStatement(IfStatementSyntax ifStatement, [NotNullWhen(true)] out StatementSyntax? whenTrueStatement)
CSharpUseCompoundCoalesceAssignmentDiagnosticAnalyzer.cs (3)
105[NotNullWhen(true)] out StatementSyntax? whenTrue, 106[NotNullWhen(true)] out AssignmentExpressionSyntax? assignment) 188[NotNullWhen(true)] out ExpressionSyntax? testedExpression)
CSharpUseDeconstructionDiagnosticAnalyzer.cs (3)
90[NotNullWhen(true)] out INamedTypeSymbol? tupleType, 120[NotNullWhen(true)] out INamedTypeSymbol? tupleType, 139[NotNullWhen(true)] out INamedTypeSymbol? tupleType,
CSharpUseIndexOperatorDiagnosticAnalyzer.InfoCache.cs (1)
43public static bool TryCreate(Compilation compilation, [NotNullWhen(true)] out InfoCache? infoCache)
CSharpUseLocalFunctionDiagnosticAnalyzer.cs (4)
167[NotNullWhen(true)] out LocalDeclarationStatementSyntax? localDeclaration) 183[NotNullWhen(true)] out LocalDeclarationStatementSyntax? localDeclaration) 287[NotNullWhen(true)] out LocalDeclarationStatementSyntax? localDeclaration) 314[NotNullWhen(true)] out LocalDeclarationStatementSyntax? localDeclaration)
CSharpUseNullPropagationDiagnosticAnalyzer.cs (3)
44[NotNullWhen(true)] out ExpressionSyntax? conditionPartToCheck, out bool isEquals) 71[NotNullWhen(true)] out ExpressionSyntax? condition, 72[NotNullWhen(true)] out StatementSyntax? trueStatement)
CSharpUseRangeOperatorDiagnosticAnalyzer.InfoCache.cs (1)
55public static bool TryCreate(Compilation compilation, [NotNullWhen(true)] out InfoCache? infoCache)
CSharpUseTupleSwapDiagnosticAnalyzer.cs (3)
131[NotNullWhen(true)] StatementSyntax? assignmentStatement, 132[NotNullWhen(true)] out ExpressionSyntax? left, 133[NotNullWhen(true)] out ExpressionSyntax? right)
ElasticTriviaFormattingRule.cs (1)
239private static bool TryGetOperationBeforeDocComment(SyntaxToken currentToken, [NotNullWhen(true)] out AdjustNewLinesOperation? operation)
ExpressionSyntaxExtensions.cs (21)
38public static bool IsSimpleMemberAccessExpressionName([NotNullWhen(true)] this ExpressionSyntax? expression) 41public static bool IsAnyMemberAccessExpressionName([NotNullWhen(true)] this ExpressionSyntax? expression) 50public static bool IsMemberBindingExpressionName([NotNullWhen(true)] this ExpressionSyntax? expression) 54public static bool IsRightSideOfQualifiedName([NotNullWhen(true)] this ExpressionSyntax? expression) 63public static bool IsRightSideOfDotOrArrow([NotNullWhen(true)] this ExpressionSyntax? name) 69public static bool IsRightSideOfDotOrArrowOrColonColon([NotNullWhen(true)] this ExpressionSyntax name) 79public static bool IsLeftSideOfDot([NotNullWhen(true)] this ExpressionSyntax? expression) 99public static bool IsLeftSideOfExplicitInterfaceSpecifier([NotNullWhen(true)] this NameSyntax? name) 106public static bool TryGetNameParts(this ExpressionSyntax expression, [NotNullWhen(true)] out IList<string>? parts) 163public static bool IsInConstantContext([NotNullWhen(true)] this ExpressionSyntax? expression) 190public static bool IsInOutContext([NotNullWhen(true)] this ExpressionSyntax? expression) 194public static bool IsInRefContext([NotNullWhen(true)] this ExpressionSyntax? expression) 201public static bool IsInRefContext([NotNullWhen(true)] this ExpressionSyntax? expression, [NotNullWhen(true)] out SyntaxNode? refParent) 217public static bool IsInInContext([NotNullWhen(true)] this ExpressionSyntax? expression) 233public static bool IsOnlyWrittenTo([NotNullWhen(true)] this ExpressionSyntax? expression) 320[NotNullWhen(true)] this ExpressionSyntax? expression, 383public static bool IsAttributeNamedArgumentIdentifier([NotNullWhen(true)] this ExpressionSyntax? expression) 410[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 440[NotNullWhen(true)] this ExpressionSyntax? expression, SemanticModel semanticModel, CancellationToken cancellationToken) 873[NotNullWhen(true)] out StatementSyntax? statement)
FormattingHelpers.cs (4)
197public static bool IsEmbeddedStatement([NotNullWhen(true)] this SyntaxNode? node) 362public static bool IsEmbeddedStatementOwnerWithCloseParen([NotNullWhen(true)] this SyntaxNode? node) 387public static bool IsInitializerForObjectOrAnonymousObjectCreationExpression([NotNullWhen(true)] this SyntaxNode? node) 423public static bool IsInitializerForArrayOrCollectionCreationExpression([NotNullWhen(true)] this SyntaxNode? node)
Helpers.cs (1)
51public static bool IsSubtraction(IOperation operation, [NotNullWhen(true)] out IBinaryOperation? subtraction)
MakeLocalFunctionStaticHelper.cs (1)
17private static bool TryGetDataFlowAnalysis(LocalFunctionStatementSyntax localFunction, SemanticModel semanticModel, [NotNullWhen(returnValue: true)] out DataFlowAnalysis? dataFlow)
SimplifyPropertyPatternHelpers.cs (3)
15[NotNullWhen(true)] out SubpatternSyntax? innerSubpattern, 16[NotNullWhen(true)] out BaseExpressionColonSyntax? outerExpressionColon) 50public static bool IsMergable([NotNullWhen(true)] ExpressionSyntax? expression)
SyntaxNodeExtensions.cs (18)
30public static bool IsKind<TNode>([NotNullWhen(returnValue: true)] this SyntaxNode? node, SyntaxKind kind, [NotNullWhen(returnValue: true)] out TNode? result) 43public static bool IsParentKind([NotNullWhen(returnValue: true)] this SyntaxNode? node, SyntaxKind kind) 46public static bool IsParentKind<TNode>([NotNullWhen(returnValue: true)] this SyntaxNode? node, SyntaxKind kind, [NotNullWhen(returnValue: true)] out TNode? result) 89public static bool IsAnyArgumentList([NotNullWhen(returnValue: true)] this SyntaxNode? node) 128public static bool IsEmbeddedStatementOwner([NotNullWhen(returnValue: true)] this SyntaxNode? node) 306public static bool IsAsyncSupportingFunctionSyntax([NotNullWhen(returnValue: true)] this SyntaxNode? node) 313public static bool IsAnyLambda([NotNullWhen(returnValue: true)] this SyntaxNode? node) 320public static bool IsAnyLambdaOrAnonymousMethod([NotNullWhen(returnValue: true)] this SyntaxNode? node) 347public static bool IsLeftSideOfAssignExpression([NotNullWhen(returnValue: true)] this SyntaxNode? node) 351public static bool IsLeftSideOfAnyAssignExpression([NotNullWhen(true)] this SyntaxNode? node) 358public static bool IsRightSideOfAnyAssignExpression([NotNullWhen(true)] this SyntaxNode? node) 365public static bool IsLeftSideOfCompoundAssignExpression([NotNullWhen(true)] this SyntaxNode? node) 970[NotNullWhen(returnValue: true)] this SyntaxNode? node, 972[NotNullWhen(returnValue: true)] INamedTypeSymbol? expressionTypeOpt, 1023[NotNullWhen(returnValue: true)] this SyntaxNode? node, 1024[NotNullWhen(returnValue: true)] out SyntaxNode? deconstructionLeft)
SyntaxTokenExtensions.cs (1)
25public static bool IsLastTokenOfNode<T>(this SyntaxToken token, [NotNullWhen(true)] out T? node) where T : SyntaxNode
UseExpressionBodyForLambdaHelpers.cs (1)
110[NotNullWhen(true)] out ExpressionSyntax? expression)
UseExpressionBodyHelper.cs (1)
29public abstract bool CanOfferUseBlockBody(CodeStyleOption2<ExpressionBodyPreference> preference, SyntaxNode declaration, bool forAnalyzer, out bool fixesError, [NotNullWhen(true)] out ArrowExpressionClauseSyntax? expressionBody);
UseExpressionBodyHelper`1.cs (5)
72public override bool CanOfferUseBlockBody(CodeStyleOption2<ExpressionBodyPreference> preference, SyntaxNode declaration, bool forAnalyzer, out bool fixesError, [NotNullWhen(true)] out ArrowExpressionClauseSyntax? expressionBody) 118[NotNullWhen(true)] out ArrowExpressionClauseSyntax? expressionWhenOnSingleLine, 128[NotNullWhen(true)] out ArrowExpressionClauseSyntax? expressionWhenOnSingleLine, out SyntaxToken semicolonWhenOnSingleLine) 148[NotNullWhen(true)] out ArrowExpressionClauseSyntax? arrowExpression, 173[NotNullWhen(true)] out ArrowExpressionClauseSyntax? expressionBody)
UsePatternMatchingHelpers.cs (1)
16[NotNullWhen(true)] out ConditionalAccessExpressionSyntax? conditionalAccessExpression,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (28)
ConvertToRecordHelpers.cs (5)
568[NotNullWhen(true)] out ISymbol? assignedVariable) 786[NotNullWhen(true)] out ISymbol? boundVariable, 832bool TryGetBoundVariableForIsPattern(IPatternOperation isPattern, [NotNullWhen(true)] out ISymbol? boundVariable) 959[NotNullWhen(true)] out ISymbol? otherC, 960[NotNullWhen(true)] out IEnumerable<IOperation>? statementsToCheck)
CSharpAddYieldCodeFixProvider.cs (3)
92SemanticModel model, ExpressionSyntax? expression, [NotNullWhen(true)] out ITypeSymbol? returnExpressionType) 107[NotNullWhen(true)] out ITypeSymbol? methodReturnType) 214SyntaxNode root, TextSpan span, [NotNullWhen(true)] out SyntaxNode? node)
CSharpChangeToIEnumerableCodeFixProvider.cs (2)
120[NotNullWhen(true)] out INamedTypeSymbol? ienumerableSymbol, 121[NotNullWhen(true)] out INamedTypeSymbol? ienumerableGenericSymbol)
CSharpDisambiguateSameVariableCodeFixProvider.cs (3)
58[NotNullWhen(true)] out SimpleNameSyntax? leftName, 59[NotNullWhen(true)] out ISymbol? matchingMember, 60[NotNullWhen(true)] out string? title)
CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
39[NotNullWhen(true)] out TypeConstraintSyntax? constraint,
CSharpMakeMemberStaticCodeFixProvider.cs (1)
31protected override bool TryGetMemberDeclaration(SyntaxNode node, [NotNullWhen(true)] out SyntaxNode? memberDeclaration)
CSharpMakeTypeAbstractCodeFixProvider.cs (1)
29protected override bool IsValidRefactoringContext(SyntaxNode? node, [NotNullWhen(true)] out TypeDeclarationSyntax? typeDeclaration)
CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
36Diagnostic diagnostic, CancellationToken cancellationToken, [NotNullWhen(true)] out RecordDeclarationSyntax? recordDeclaration)
CSharpUseNullPropagationCodeFixProvider.cs (1)
36protected override bool TryGetBlock(SyntaxNode? statement, [NotNullWhen(true)] out StatementSyntax? block)
DocumentationCommentExtensions.cs (1)
13public static bool IsMultilineDocComment([NotNullWhen(true)] this DocumentationCommentTriviaSyntax? documentationComment)
ITypeSymbolExtensions.cs (1)
151public static bool TryGetRecordPrimaryConstructor(this INamedTypeSymbol typeSymbol, [NotNullWhen(true)] out IMethodSymbol? primaryConstructor)
ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
113public static bool TryCreateNativeIntegerType(INamedTypeSymbol symbol, [NotNullWhen(true)] out TypeSyntax? syntax)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxNodeExtensions.cs\SyntaxNodeExtensions.cs (1)
11public static bool IsDelegateOrConstructorOrLocalFunctionOrMethodOrOperatorParameterList([NotNullWhen(true)] this SyntaxNode? node, bool includeOperators)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
610private static bool IsGenericInterfaceOrDelegateTypeParameterList([NotNullWhen(true)] SyntaxNode? node)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
684public static bool IsPartialTypeDeclarationNameContext(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, [NotNullWhen(true)] out TypeDeclarationSyntax? declarationSyntax)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
15public static bool TryParseGenericName(this SyntaxToken genericIdentifier, CancellationToken cancellationToken, [NotNullWhen(true)] out GenericNameSyntax? genericName)
PropertyGenerator.cs (2)
155[NotNullWhen(true)] out ArrowExpressionClauseSyntax? arrowExpression, out SyntaxToken semicolonToken) 234[NotNullWhen(true)] out ArrowExpressionClauseSyntax? arrowExpression, out SyntaxToken semicolonToken)
TypeSyntaxExtensions.cs (1)
16public static bool IsPotentialTypeName([NotNullWhen(true)] this TypeSyntax? typeSyntax, SemanticModel? semanticModelOpt, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
VisualBasicSyntaxFacts.vb (1)
1731Public Function IsBaseNamespaceDeclaration(<NotNullWhen(True)> node As SyntaxNode) As Boolean Implements ISyntaxFacts.IsBaseNamespaceDeclaration
VisualBasicUseCoalesceExpressionForIfNullStatementCheckDiagnosticAnalyzer.vb (2)
40Protected Overrides Function IsNullCheck(condition As ExpressionSyntax, <NotNullWhen(True)> ByRef checkedExpression As ExpressionSyntax) As Boolean 58Protected Overrides Function TryGetEmbeddedStatement(ifBlock As MultiLineIfBlockSyntax, <NotNullWhen(True)> ByRef whenTrueStatement As StatementSyntax) As Boolean