Beispiel #1
0
        public EECompilationContextMethod(CSharpCompilation compilation, MethodSymbol underlyingMethod)
        {
            Debug.Assert(underlyingMethod.IsDefinition);

            _compilation = compilation;

            var typeMap = underlyingMethod.ContainingType.TypeSubstitution ?? TypeMap.Empty;

            typeMap.WithAlphaRename(underlyingMethod, this, out _typeParameters);

            _underlyingMethod = underlyingMethod.ConstructIfGeneric(TypeArgumentsWithAnnotations);
            _parameters       = SynthesizedParameterSymbol.DeriveParameters(_underlyingMethod, this);
        }