1 implementation of IStateTable
Microsoft.CodeAnalysis (1)
SourceGeneration\Nodes\NodeStateTable.cs (1)
61internal sealed class NodeStateTable<T> : IStateTable
18 references to IStateTable
Microsoft.CodeAnalysis (18)
SourceGeneration\Nodes\DriverStateTable.cs (1)
51if (_stateTableBuilder.TryGetTable(source, out var table))
SourceGeneration\Nodes\GeneratorRunStateTable.cs (1)
39public void RecordStepsFromOutputNodeUpdate(IStateTable table)
SourceGeneration\Nodes\NodeStateTable.cs (3)
49IStateTable AsCached(); 175IStateTable IStateTable.AsCached() => AsCached();
SourceGeneration\Nodes\StateTableStore.cs (10)
12private readonly ImmutableSegmentedDictionary<object, IStateTable> _tables; 14public static readonly StateTableStore Empty = new StateTableStore(ImmutableSegmentedDictionary<object, IStateTable>.Empty); 16private StateTableStore(ImmutableSegmentedDictionary<object, IStateTable> tables) 21public bool TryGetValue(object key, [NotNullWhen(true)] out IStateTable? table) => _tables.TryGetValue(key, out table); 30if (TryGetValue(input, out var output)) 39private readonly ImmutableSegmentedDictionary<object, IStateTable>.Builder _tableBuilder = ImmutableSegmentedDictionary.CreateBuilder<object, IStateTable>(); 43public bool TryGetTable(object key, [NotNullWhen(true)] out IStateTable? table) => _tableBuilder.TryGetValue(key, out table); 45public void SetTable(object key, IStateTable table) => _tableBuilder[key] = table; 52var cachedValue = kvp.Value.AsCached();
SourceGeneration\SyntaxStore.cs (3)
49public IStateTable GetSyntaxInputTable(SyntaxInputNode syntaxInputNode, NodeStateTable<SyntaxTree> syntaxTreeTable) 67if (compilationIsCached && !_enableTracking && _previous._tables.TryGetValue(node, out var previousStateTable)) 137if (!_tableBuilder.TryGetTable(syntaxInputNode, out var result))