【发布时间】:2015-07-31 09:08:55
【问题描述】:
我正在用 C# 开发一个 Web api。在 Webapi 中,我调用了 SharePoint Web 服务。
在方法中,我使用方法 listservice.GetListItems。问题是它不是异步的,我想让它异步。是否有可能使其异步?
//create listservice instance
var listService = GetListService();
//Get the listName and rowlimit
string rowLimit = MaxItemsList;
//Create elements for the faq list
XmlElement query = xmlDoc.CreateElement("Query");
XmlElement viewFields = xmlDoc.CreateElement("ViewFields");
XmlElement queryOptions = xmlDoc.CreateElement("QueryOptions");
var sPList = listService.GetList(listName);
if (sPList != null)
{
//get the faq items
return listService.GetListItems(listName, string.Empty, query, viewFields, rowLimit,
queryOptions, null);
}
希望大家帮帮我
【问题讨论】:
标签: c# web-services sharepoint asynchronous sharepoint-2010