Share via


SharepointListAdapterObject 接口

表示一个到 SharePoint 列表或文档库的连接。

命名空间:  Microsoft.Office.Interop.InfoPath.SemiTrust
程序集:  Microsoft.Office.Interop.InfoPath.SemiTrust(位于 Microsoft.Office.Interop.InfoPath.SemiTrust.dll 中)

语法

声明
<GuidAttribute("096cd69a-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface SharepointListAdapterObject _
    Inherits SharepointListAdapter
用法
Dim instance As SharepointListAdapterObject
[GuidAttribute("096cd69a-0786-11d1-95fa-0080c78ee3bb")]
public interface SharepointListAdapterObject : SharepointListAdapter

备注

此类型是用于 Coclass(托管代码需要此 Coclass 来实现 COM 互操作性)的包装。使用此类型来访问由此 Coclass 实现的 COM 接口。有关 COM 接口的信息(包括指向其成员说明的链接),请参阅SharepointListAdapter.

Using the members of the SharepointListAdapter interface provides compatibility with InfoPath 2003. To use new members that were added to the SharepointListAdapter2 object model in Microsoft InfoPath 2010, you must cast the object returned by the object to the SharepointListAdapter2 type. For more information, see 如何:使用与 InfoPath 2003 不兼容的 Microsoft.Office.Interop.InfoPath.SemiTrust 成员.

SharePointListAdapter对象代表用于从 SharePoint 列表或文档库检索数据的 InfoPath 数据适配器。

对于辅助数据源,SharePointListAdapter 对象可通过 DataSourceObject 对象的 QueryAdapter 属性访问。数据适配器对象可通过 XDocument 对象的 DataAdapters 属性访问。

示例

SharepointListAdapter SPList = ((SharepointListAdapter)thisXDocument.DataAdapters["SharePoint list"]);
thisXDocument.UI.Alert(SPList.SiteUrl);
SPList.Query();

在以下示例中,对 SharePointListAdapter 对象的引用可通过数据适配器对象的 QueryAdapter 属性访问,方法是将此数据适配器对象的名称传递给 DataAdaptersCollection 集合的 Item 属性:

SharepointListAdapter adapter;
adapter = (SharepointListAdapter) thisXDocument.DataAdapters["Announcements"];

设置该引用后,可以按以下示例所示使用 SharePointListAdapter 对象的方法,该示例重新查询 SharePoint 列表或库来更新数据适配器对象的 DOM 属性:

adapter.Query();

另请参阅

引用

SharepointListAdapterObject 成员

Microsoft.Office.Interop.InfoPath.SemiTrust 命名空间