DocumentMapping\RazorEditService_UsingDirectives.cs (15)
119void AddNewUsingsToBlock(ref PooledArrayBuilder<RazorTextChange> edits, ImmutableArray<RazorUsingDirectiveSyntax> existingUsings, ImmutableArray<string> addedUsings)
132var currentDirective = remainingExisting[0];
155foreach (var directive in remainingExisting)
182foreach (var node in allUsingNodes)
221foreach (var node in remainingUsings)
228private static void AddRemoveEdit(ref PooledArrayBuilder<RazorTextChange> edits, RazorUsingDirectiveSyntax node, SourceText text)
267private static string GetUsingsText(ImmutableArray<RazorUsingDirectiveSyntax> usingDirectives, ImmutableArray<string> newUsings, ImmutableArray<string> removedUsings)
271var usingsMap = new Dictionary<string, RazorUsingDirectiveSyntax?>(newUsings.Length + usingDirectives.Length);
277foreach (var directive in usingDirectives)
300void AddIfNotRemoved(string @namespace, RazorUsingDirectiveSyntax? directive)
320private static (ImmutableArray<RazorUsingDirectiveSyntax> firstBlockOfUsings, ImmutableArray<RazorUsingDirectiveSyntax> remainingUsings) GetGroupedUsings(RazorCodeDocument codeDocument, CancellationToken cancellationToken)
328using var firstBlockOfUsingsBuilder = new PooledArrayBuilder<RazorUsingDirectiveSyntax>();
329using var remainingUsingsBuilder = new PooledArrayBuilder<RazorUsingDirectiveSyntax>();
336if (node is RazorUsingDirectiveSyntax razorDirective)