public void EmbedAllMembersOfImplementedInterface(SyntaxNode syntaxNodeOpt, DiagnosticBag diagnostics) { Debug.Assert(UnderlyingNamedType.IsInterfaceType()); if (_embeddedAllMembersOfImplementedInterface) { return; } _embeddedAllMembersOfImplementedInterface = true; // Embed all members foreach (MethodSymbol m in UnderlyingNamedType.GetMethodsToEmit()) { if ((object)m != null) { TypeManager.EmbedMethod(this, m, syntaxNodeOpt, diagnostics); } } // We also should embed properties and events, but we don't need to do this explicitly here // because accessors embed them automatically. // Do the same for implemented interfaces. foreach (NamedTypeSymbol @interface in UnderlyingNamedType.GetInterfacesToEmit()) { TypeManager.ModuleBeingBuilt.Translate(@interface, syntaxNodeOpt, diagnostics, fromImplements: true); } }
protected override IEnumerable <MethodSymbol> GetMethodsToEmit() { return(UnderlyingNamedType.GetMethodsToEmit()); }