55 references to AddIfNotNull
Microsoft.CodeAnalysis.CSharp.Features (5)
CSharpDeclarationComputer.cs (2)
263blocks.AddIfNotNull(t.Body); 264blocks.AddIfNotNull(t.ExpressionBody);
NavigationBar\CSharpNavigationBarItemService.cs (3)
80memberItems.AddIfNotNull(CreateItemForMember(solution, method, tree, cancellationToken)); 81memberItems.AddIfNotNull(CreateItemForMember(solution, method.PartialImplementationPart, tree, cancellationToken)); 87memberItems.AddIfNotNull(CreateItemForMember(solution, member, tree, cancellationToken));
Microsoft.CodeAnalysis.EditorFeatures (2)
Diagnostics\AbstractPushOrPullDiagnosticsTaggerProvider.PullDiagnosticsTaggerProvider.cs (1)
57taggers.AddIfNotNull(taggerProvider.CreateTagger<TTag>(buffer));
GoToDefinition\GoToDefinitionHelpers.cs (1)
63definitions.AddIfNotNull(thirdPartyItem);
Microsoft.CodeAnalysis.Features (18)
AddImport\AbstractAddImportFeatureService.cs (2)
111result.AddIfNotNull(fixData); 582result.AddIfNotNull(TryCreateCodeAction(document, fix, installerService));
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (2)
76actions.AddIfNotNull(methodAction); 79actions.AddIfNotNull(localFunctionAction);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
378builder.AddIfNotNull(symbol);
Common\AbstractProjectExtensionProvider.cs (1)
166builder.AddIfNotNull((TExtension?)Activator.CreateInstance(typeInfo.AsType()));
FindUsages\AbstractFindUsagesService_FindReferences.cs (1)
81result.AddIfNotNull(thirdParty);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (2)
810accessors.AddIfNotNull(GetAccessorBody(property.GetMethod, cancellationToken)); 813accessors.AddIfNotNull(GetAccessorBody(property.SetMethod, cancellationToken));
Workspace\BackgroundCompiler.cs (1)
124compilations.AddIfNotNull(compilation);
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (8)
161unwrapActions.AddIfNotNull(await GetUnwrapAllCodeActionAsync(parentTitle, WrappingStyle.UnwrapFirst_IndentRest).ConfigureAwait(false)); 167unwrapActions.AddIfNotNull(await GetUnwrapAllCodeActionAsync(parentTitle, WrappingStyle.WrapFirst_IndentRest).ConfigureAwait(false)); 222codeActions.AddIfNotNull(await GetWrapLongLineCodeActionAsync( 229codeActions.AddIfNotNull(await GetWrapLongLineCodeActionAsync( 237codeActions.AddIfNotNull(await GetWrapLongLineCodeActionAsync( 346codeActions.AddIfNotNull(await GetWrapEveryNestedCodeActionAsync( 355codeActions.AddIfNotNull(await GetWrapEveryNestedCodeActionAsync( 364codeActions.AddIfNotNull(await GetWrapEveryNestedCodeActionAsync(
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Handler\Definitions\AbstractGoToDefinitionHandler.cs (1)
63locations.AddIfNotNull(location);
Handler\References\FindImplementationsHandler.cs (2)
56locations.AddIfNotNull(await ProtocolConversions.DocumentSpanToLocationWithTextAsync(sourceSpan, text, cancellationToken).ConfigureAwait(false)); 60locations.AddIfNotNull(await ProtocolConversions.DocumentSpanToLocationAsync(sourceSpan, cancellationToken).ConfigureAwait(false));
Handler\Symbols\DocumentSymbolsHandler.cs (4)
60symbols.AddIfNotNull(GetDocumentSymbol(item, text, cancellationToken)); 66symbols.AddIfNotNull(GetSymbolInformation(item, document, text, containerName: null)); 69symbols.AddIfNotNull(GetSymbolInformation(childItem, document, text, item.Text)); 131list.AddIfNotNull(GetDocumentSymbol(item, text, cancellationToken));
Microsoft.CodeAnalysis.VisualBasic.Features (3)
NavigationBar\VisualBasicNavigationBarItemService.vb (3)
112items.AddIfNotNull(CreateItemForEnum(solution, type, semanticModel.SyntaxTree, symbolDeclarationService)) 114items.AddIfNotNull(CreatePrimaryItemForType(solution, type, semanticModel.SyntaxTree, workspaceSupportsDocumentChanges, symbolDeclarationService, cancellationToken)) 137items.AddIfNotNull(CreateItemForEvents(
Microsoft.CodeAnalysis.Workspaces (14)
Diagnostics\DiagnosticData.cs (2)
291builder.AddIfNotNull(CreateLocation(document.Project.Solution.GetDocument(location.SourceTree), location)); 296builder.AddIfNotNull(CreateLocation(document.Project.GetTextDocument(textDocumentId), location));
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (1)
148result.AddIfNotNull(mappedSymbol is INamespaceSymbol ns
FindSymbols\FindReferences\DependentTypeFinder_Remote.cs (1)
91builder.AddIfNotNull(namedType);
FindSymbols\FindReferences\Finders\AbstractMethodOrPropertyOrEventSymbolReferenceFinder.cs (2)
39result.AddIfNotNull(property.SetMethod); 42result.AddIfNotNull(property.GetMethod);
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (1)
81symbols.AddIfNotNull(parameter.GetAssociatedSynthesizedRecordProperty(cancellationToken));
FindSymbols\FindReferences\Finders\PropertySymbolReferenceFinder.cs (2)
53result.AddIfNotNull(symbol.GetMethod); 54result.AddIfNotNull(symbol.SetMethod);
Rename\Renamer.cs (2)
130actions.AddIfNotNull(renameAction); 136actions.AddIfNotNull(action);
Shared\Extensions\TokenSemanticInfo.cs (3)
45result.AddIfNotNull(DeclaredSymbol); 46result.AddIfNotNull(AliasSymbol); 51result.AddIfNotNull(Type ?? ConvertedType);
Microsoft.VisualStudio.LanguageServices (4)
FindReferences\Contexts\WithoutReferencesFindUsagesContext.cs (2)
87entries.AddIfNotNull(entry); 110entries.AddIfNotNull(entry);
FindReferences\Contexts\WithReferencesFindUsagesContext.cs (1)
79declarations.AddIfNotNull(definitionEntry);
Workspace\VisualStudioSymbolNavigationService.cs (1)
268documentsBuilder.AddIfNotNull(loc.Document);
Microsoft.VisualStudio.LanguageServices.Xaml (2)
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (2)
95locations.AddIfNotNull(await GetSourceDefinitionLocationAsync(sourceDefinition, context, cancellationToken).ConfigureAwait(false)); 166locations.AddIfNotNull(location);