4 instantiations of IndentBlockOperation
Microsoft.CodeAnalysis.Analyzers (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
110operations.Add(new IndentBlockOperation(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (1)
39list.Add(new IndentBlockOperation(_token1, _token2, _span, _baseIndentation, IndentBlockOption.AbsolutePosition));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\FormattingOperations.cs (2)
63=> new(startToken, endToken, textSpan, indentationDelta, option); 79=> new(baseToken, startToken, endToken, textSpan, indentationDelta, option);
64 references to IndentBlockOperation
Microsoft.CodeAnalysis.Analyzers (64)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (14)
51var operation = GetIndentationDataFor(tree.GetRoot(cancellationToken), token, position); 110IndentBlockOperation startingOperation, 137List<IndentBlockOperation> list, 145var operation = tuple.operation; 184private (int indentation, IndentBlockOperation? operation) GetIndentationRuleOfCurrentPosition( 185SyntaxNode root, List<IndentBlockOperation> list, int position) 189foreach (var operation in operations) 213private List<IndentBlockOperation> GetParentIndentBlockOperations(SyntaxToken token) 218var list = new List<IndentBlockOperation>(); 278private IndentBlockOperation? GetIndentationDataFor(SyntaxNode root, SyntaxToken token, int position) 283var list = new List<IndentBlockOperation>(); 311private static IEnumerable<IndentBlockOperation> GetIndentBlockOperationsFromSmallestSpan(SyntaxNode root, List<IndentBlockOperation> list, int position) 319var operation = list[i];
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (8)
53private List<IndentBlockOperation> _initialIndentBlockOperations = []; 96var initialOperation = indentationOperations[0]; 121SegmentedList<IndentBlockOperation> operations, 146var mergedList = new List<IndentBlockOperation>(count); 178public void AddIndentBlockOperation(IndentBlockOperation operation) 192Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 196Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> relativeIndentationDeltaGetter = static (self, operation, effectiveBaseToken) => 431public IEnumerable<IndentBlockOperation> GetAllRelativeIndentBlockOperations()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.IndentationData.cs (9)
43private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken> _effectiveBaseTokenGetter; 44private readonly Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> _indentationDeltaGetter; 56public RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter) 70private RelativeIndentationData(FormattingContext formattingContext, int inseparableRegionSpanStart, TextSpan textSpan, IndentBlockOperation operation, Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter, Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> indentationDeltaGetter, Func<FormattingContext, SyntaxToken, int> baseIndentationGetter, int lazyIndentationDelta) 85public IndentBlockOperation Operation { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (5)
43public (List<IndentBlockOperation> indentOperations, ImmutableArray<SuppressOperation> suppressOperations) Do(SyntaxToken startToken, SyntaxToken endToken) 66private List<IndentBlockOperation> GetInitialIndentBlockOperations(SyntaxToken startToken, SyntaxToken endToken) 73var operations = new List<IndentBlockOperation>(); 74var list = new List<IndentBlockOperation>(); 82foreach (var element in list)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (2)
160var indentBlockOperationScratch = new List<IndentBlockOperation>(); 417private static SyntaxToken FindCorrectBaseTokenOfRelativeIndentBlockOperation(IndentBlockOperation operation, TokenStream tokenStream)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (1)
58public void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode currentNode)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\NodeOperations.cs (2)
17private static readonly ObjectPool<SegmentedList<IndentBlockOperation>> s_indentBlockOperationPool = new(() => []); 24public SegmentedList<IndentBlockOperation> IndentBlockOperation { get; } = s_indentBlockOperationPool.Allocate();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
344this IndentBlockOperation operation, IHeaderFacts headerFacts, SyntaxNode root, SyntaxToken indentationAnchor)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\AbstractFormattingRule.cs (1)
35public virtual void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (6)
31public override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation) 54private void AddNextIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation) 65private void AdjustIndentBlockOperation(List<IndentBlockOperation> list) 107private bool Myself(IndentBlockOperation operation) 116private IndentBlockOperation CloneAndAdjustFormattingOperation(IndentBlockOperation operation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (2)
33public sealed override void AddIndentBlockOperations(List<IndentBlockOperation> list, SyntaxNode node, in NextIndentBlockOperationAction nextOperation) 84public virtual void AddIndentBlockOperationsSlow(List<IndentBlockOperation> list, SyntaxNode node, ref NextIndentBlockOperationAction nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\NextIndentBlockOperationAction.cs (1)
15List<IndentBlockOperation> list)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\FormattingOperations.cs (6)
53public static IndentBlockOperation CreateIndentBlockOperation(SyntaxToken startToken, SyntaxToken endToken, int indentationDelta, IndentBlockOption option) 62public static IndentBlockOperation CreateIndentBlockOperation(SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 68public static IndentBlockOperation CreateRelativeIndentBlockOperation(SyntaxToken baseToken, SyntaxToken startToken, SyntaxToken endToken, int indentationDelta, IndentBlockOption option) 78public static IndentBlockOperation CreateRelativeIndentBlockOperation(SyntaxToken baseToken, SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 158internal static IEnumerable<IndentBlockOperation> GetIndentBlockOperations(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxNode node, SyntaxFormattingOptions options) 162var list = new List<IndentBlockOperation>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\IndentBlockOption.cs (5)
10/// Options for <see cref="IndentBlockOperation"/>. 21/// <see cref="IndentBlockOperation.IndentationDeltaOrPosition"/> will be interpreted as delta of its enclosing indentation 26/// <see cref="IndentBlockOperation.IndentationDeltaOrPosition"/> will be interpreted as absolute position 39/// Each <see cref="IndentBlockOperation"/> specifies one of the position options to indicate the primary 45/// Increase the <see cref="IndentBlockOperation.IndentationDeltaOrPosition"/> if the block is part of a
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (1)
22public static readonly Comparison<IndentBlockOperation> IndentBlockOperationComparer = (o1, o2) =>