VSTO Aplication.Factory class 的接口实现缺少方法

Interface implementation for VSTO Aplication.Factory class is missing methods

我正在阅读由 Microsoft Visual Studio Office 工具 (VSTO) 框架生成的 C# 代码,并且 运行 遇到了一个我不理解的案例。我已经简化如下(我省略了方法参数):

public interface Tools.Factory
{
    RibbonFactory GetRibbonFactory();   // OK
    AddIn CreateAddIn(...);                                         // Missing
    CustomTaskPaneCollection CreateCustomTaskPaneCollection(...);   // Missing
    SmartTagCollection CreateSmartTagCollection(...);               // Missing
}

public interface ApplicationFactory : Tools.Factory
{
    SmartTag CreateSmartTag(...);       // OK
    Action CreateAction(...);           // OK
    Document GetVstoObject(...);        // OK
    bool HasVstoObject(...);            // OK
}   

public ThisAddIn(ApplicationFactory factory, IServiceProvider serviceProvider) : 
        base(factory, serviceProvider, "AddIn", "ThisAddIn")
{
    Globals.Factory = factory;
}

ThisAddIn 构造函数是由位于 designer.cs 文件中的 VSTO 自动生成的代码。它传递了一个实现 ApplicationFactory 接口的参数 (factory)。使用 F12,我找到了如图所示的界面。 return 中的接口继承了 Tools.Factory 接口,我也列出了。

我不明白的是:当我在编辑器中为 Globals.Factory 变量(如下所示)触发 IntelliSense 时,我只看到两个界面中列出的八个方法中的五个(评论为 OK在代码清单中)。 Tools.Factory 接口中的三个方法的实现缺失(在代码清单中注释为缺失)。这是为什么?

注意:代码运行良好。

EditorBrowsable 等属性可以对设计器和 IntelliSense 隐藏方法和属性。

在这种情况下,提到的方法存在并且可以调用,但被隐藏了。