Files

42 lines
1.2 KiB
C#
Raw Permalink Normal View History

2026-08-27 10:56:38 -06:00
using Microsoft.CodeAnalysis.CSharp.Symbols;
using Microsoft.CodeAnalysis.Symbols;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.CSharp;
internal sealed class DynamicSiteContainer : SynthesizedContainer, ISynthesizedMethodBodyImplementationSymbol, ISymbolInternal
{
private readonly MethodSymbol _topLevelMethod;
public override Symbol ContainingSymbol => _topLevelMethod.ContainingSymbol;
public override TypeKind TypeKind => (TypeKind)2;
public sealed override bool AreLocalsZeroed
{
get
{
throw ExceptionUtilities.Unreachable("/_/src/Compilers/CSharp/Portable/Lowering/LocalRewriter/DynamicSiteContainer.cs", 36);
}
}
internal override bool IsRecord => false;
internal override bool IsRecordStruct => false;
bool ISynthesizedMethodBodyImplementationSymbol.HasMethodBodyDependency => true;
IMethodSymbolInternal ISynthesizedMethodBodyImplementationSymbol.Method => (IMethodSymbolInternal)(object)_topLevelMethod;
internal DynamicSiteContainer(string name, MethodSymbol topLevelMethod, MethodSymbol containingMethod)
: base(name, containingMethod)
{
_topLevelMethod = topLevelMethod;
}
internal override bool HasPossibleWellKnownCloneMethod()
{
return false;
}
}