SPWebApplicationCollection class
代表SPWebApplication物件的集合。
Inheritance hierarchy
System.Object
Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPWebApplication>
Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPWebApplication>
Microsoft.SharePoint.Administration.SPWebApplicationCollection
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPWebApplicationCollection _
Inherits SPPersistedChildCollection(Of SPWebApplication)
'用途
Dim instance As SPWebApplicationCollection
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPWebApplicationCollection : SPPersistedChildCollection<SPWebApplication>
備註
使用SPWebService類別之WebApplications屬性可傳回SPWebApplicationCollection物件,代表在 Web 服務中的 Web 應用程式的集合。若要建立新的 Web 應用程式集合內,使用SPWebApplicationBuilder類別。
若要從集合中傳回單一的 Web 應用程式中使用索引器。例如,若集合已指派給變數 myWebApplications,使用myWebApplications[index]以 C# 或 Visual Basic,其中index是名稱或 GUID 識別的 Web 應用程式中的myWebApplications(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.