3 instantiations of AnonymousDelegateTemplateSymbol
Microsoft.CodeAnalysis.CSharp (3)
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (3)
168
synthesizedDelegate = new
AnonymousDelegateTemplateSymbol
(
246
static (key, @this) => new
AnonymousDelegateTemplateSymbol
(@this, key.TypeDescriptor),
278
template = this.AnonymousDelegates.GetOrAdd(key, new
AnonymousDelegateTemplateSymbol
(this, typeDescr, typeParameters));
36 references to AnonymousDelegateTemplateSymbol
Microsoft.CodeAnalysis.CSharp (36)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (6)
102
=> _visitor.TryGetMatchingDelegateWithIndexedName((AnonymousTypeManager.
AnonymousDelegateTemplateSymbol
)delegateTemplate, values, out match);
352
else if (sourceType is AnonymousTypeManager.
AnonymousDelegateTemplateSymbol
delegateTemplate)
481
private bool TryGetAnonymousDelegateValue(AnonymousTypeManager.
AnonymousDelegateTemplateSymbol
delegateSymbol, out SynthesizedDelegateValue otherDelegateSymbol)
494
var
delegateTemplate = (AnonymousTypeManager.
AnonymousDelegateTemplateSymbol
)template;
504
internal bool TryGetMatchingDelegateWithIndexedName(AnonymousTypeManager.
AnonymousDelegateTemplateSymbol
delegateTemplate, ImmutableArray<AnonymousTypeValue> values, out AnonymousTypeValue match)
Emitter\Model\PEModuleBuilder.cs (1)
529
internal virtual bool TryGetAnonymousDelegateValue(AnonymousTypeManager.
AnonymousDelegateTemplateSymbol
template, out SynthesizedDelegateValue delegateValue)
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
788
var
synthesizedType = _factory.Compilation.AnonymousTypeManager.SynthesizeDelegate(parameterCount, byRefs, returnsVoid, generation);
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (24)
36
private ConcurrentDictionary<SynthesizedDelegateKey,
AnonymousDelegateTemplateSymbol
>? _lazyAnonymousDelegates;
133
private ConcurrentDictionary<SynthesizedDelegateKey,
AnonymousDelegateTemplateSymbol
> AnonymousDelegates
144
? new ConcurrentDictionary<SynthesizedDelegateKey,
AnonymousDelegateTemplateSymbol
>()
145
: new ConcurrentDictionary<SynthesizedDelegateKey,
AnonymousDelegateTemplateSymbol
>(previousCache),
153
internal
AnonymousDelegateTemplateSymbol
SynthesizeDelegate(int parameterCount, RefKindVector refKinds, bool returnsVoid, int generation)
161
AnonymousDelegateTemplateSymbol
? synthesizedDelegate;
244
var
namedTemplate = this.AnonymousDelegates.GetOrAdd(
262
var
template = SynthesizeDelegate(parameterCount: fields.Length - 1, refKinds, returnsVoid, generation);
275
AnonymousDelegateTemplateSymbol
? template;
462
var anonymousDelegates = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
463
var anonymousDelegatesWithIndexedNames = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
519
foreach (
var
anonymousDelegate in anonymousDelegatesWithIndexedNames)
523
foreach (
var
anonymousDelegate in anonymousDelegates)
579
private void GetCreatedAnonymousDelegatesWithIndexedNames(ArrayBuilder<
AnonymousDelegateTemplateSymbol
> builder)
585
foreach (
var
template in anonymousDelegates.Values)
601
private void GetCreatedAnonymousDelegates(ArrayBuilder<
AnonymousDelegateTemplateSymbol
> builder)
607
foreach (
var
template in delegates.Values)
618
private class SynthesizedDelegateSymbolComparer : IComparer<
AnonymousDelegateTemplateSymbol
>
622
public int Compare(
AnonymousDelegateTemplateSymbol
x,
AnonymousDelegateTemplateSymbol
y)
630
var anonymousDelegates = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
659
var templates = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
687
var anonymousDelegatesWithIndexedNames = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
692
var anonymousDelegates = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (4)
52
static SynthesizedDelegateInvokeMethod createInvokeMethod(
AnonymousDelegateTemplateSymbol
containingType, RefKindVector refKinds, TypeSymbol? voidReturnTypeOpt)
74
private static ImmutableArray<TypeParameterSymbol> CreateTypeParameters(
AnonymousDelegateTemplateSymbol
containingType, int parameterCount, bool returnsVoid, bool hasParamsArray)
119
AnonymousDelegateTemplateSymbol
containingType,
193
AnonymousDelegateTemplateSymbol
containingType,