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