共用方式為


SPWebServiceCollection class

代表SPWebService物件的集合。

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPWebService>
    Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPWebService>
      Microsoft.SharePoint.Administration.SPWebServiceCollection

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPWebServiceCollection _
    Inherits SPPersistedChildCollection(Of SPWebService)
'用途
Dim instance As SPWebServiceCollection
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPWebServiceCollection : SPPersistedChildCollection<SPWebService>

備註

使用SPWebServiceCollection建構函式會傳回伺服器陣列內的 Web 服務的集合。若要建立的 Web 服務,請使用SPWebService初始化 Web 服務物件,並使用Add方法將新的物件新增至伺服器陣列內的 Web 服務的集合。

若要從集合中傳回單一的 Web 服務使用索引器。例如,若集合已指派給變數 myWebServices,使用myWebServices[index]以 C# 或 Visual Basic,其中index是名稱或 GUID 識別 Web 服務中的myWebServices(index) 。

Thread safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

請參閱

參照

SPWebServiceCollection members

Microsoft.SharePoint.Administration namespace