4 instantiations of AnonymousDelegateTemplateSymbol
Microsoft.CodeAnalysis.CSharp (4)
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (4)
173
synthesizedDelegate = new
AnonymousDelegateTemplateSymbol
(
247
static (key, @this) => new
AnonymousDelegateTemplateSymbol
(@this, key.TypeDescriptor),
279
template = this.AnonymousDelegates.GetOrAdd(key, new
AnonymousDelegateTemplateSymbol
(this, typeDescr, typeParameters));
464
return new
AnonymousDelegateTemplateSymbol
(
36 references to AnonymousDelegateTemplateSymbol
Microsoft.CodeAnalysis.CSharp (36)
Emitter\EditAndContinue\CSharpSymbolMatcher.cs (3)
550
else if (sourceType is AnonymousTypeManager.
AnonymousDelegateTemplateSymbol
delegateTemplate)
686
internal bool TryFindAnonymousDelegate(AnonymousTypeManager.
AnonymousDelegateTemplateSymbol
delegateSymbol, out SynthesizedDelegateValue otherDelegateSymbol)
694
internal bool TryFindAnonymousDelegateWithIndexedName(AnonymousTypeManager.
AnonymousDelegateTemplateSymbol
type, out AnonymousTypeValue otherType)
Lowering\LocalRewriter\LoweredDynamicOperationFactory.cs (1)
802
var
synthesizedType = _factory.Compilation.AnonymousTypeManager.SynthesizeDelegate(parameterCount, byRefs, returnsVoid, generation);
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (28)
37
private ConcurrentDictionary<SynthesizedDelegateKey,
AnonymousDelegateTemplateSymbol
> _lazyAnonymousDelegates;
136
private ConcurrentDictionary<SynthesizedDelegateKey,
AnonymousDelegateTemplateSymbol
> AnonymousDelegates
149
? new ConcurrentDictionary<SynthesizedDelegateKey,
AnonymousDelegateTemplateSymbol
>()
150
: new ConcurrentDictionary<SynthesizedDelegateKey,
AnonymousDelegateTemplateSymbol
>(previousCache),
159
internal
AnonymousDelegateTemplateSymbol
SynthesizeDelegate(int parameterCount, RefKindVector refKinds, bool returnsVoid, int generation)
166
AnonymousDelegateTemplateSymbol
? synthesizedDelegate;
245
var
namedTemplate = this.AnonymousDelegates.GetOrAdd(
263
var
template = SynthesizeDelegate(parameterCount: fields.Length - 1, refKinds, returnsVoid, generation);
276
AnonymousDelegateTemplateSymbol
? template;
462
private
AnonymousDelegateTemplateSymbol
CreatePlaceholderSynthesizedDelegateValue(string name, RefKindVector refKinds, bool returnsVoid, int parameterCount)
491
var anonymousDelegatesWithIndexedNames = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
540
foreach (
var
template in anonymousDelegatesWithIndexedNames)
576
var anonymousDelegates = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
581
foreach (
var
anonymousDelegate in anonymousDelegatesWithIndexedNames)
585
foreach (
var
anonymousDelegate in anonymousDelegates)
617
private void GetCreatedAnonymousDelegatesWithIndexedNames(ArrayBuilder<
AnonymousDelegateTemplateSymbol
> builder)
623
foreach (
var
template in anonymousDelegates.Values)
639
private void GetCreatedAnonymousDelegates(ArrayBuilder<
AnonymousDelegateTemplateSymbol
> builder)
645
foreach (
var
template in delegates.Values)
656
private class SynthesizedDelegateSymbolComparer : IComparer<
AnonymousDelegateTemplateSymbol
>
660
public int Compare(
AnonymousDelegateTemplateSymbol
x,
AnonymousDelegateTemplateSymbol
y)
669
var anonymousDelegates = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
671
foreach (
var
delegateSymbol in anonymousDelegates)
701
var templates = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
705
foreach (
var
template in templates)
730
var anonymousDelegatesWithIndexedNames = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
735
var anonymousDelegates = ArrayBuilder<
AnonymousDelegateTemplateSymbol
>.GetInstance();
Symbols\AnonymousTypes\SynthesizedSymbols\AnonymousType.DelegateTemplateSymbol.cs (4)
51
static SynthesizedDelegateInvokeMethod createInvokeMethod(
AnonymousDelegateTemplateSymbol
containingType, RefKindVector refKinds, TypeSymbol? voidReturnTypeOpt)
73
private static ImmutableArray<TypeParameterSymbol> CreateTypeParameters(
AnonymousDelegateTemplateSymbol
containingType, int parameterCount, bool returnsVoid)
114
AnonymousDelegateTemplateSymbol
containingType,
185
AnonymousDelegateTemplateSymbol
containingType,