共用方式為


SPDatabaseServiceCollection class

代表SPDatabaseService物件的集合。

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPDatabaseService>
    Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPDatabaseService>
      Microsoft.SharePoint.Administration.SPDatabaseServiceCollection

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

Syntax

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

備註

使用SPDatabaseServiceCollection建構函式會傳回的資料庫服務執行於伺服器陣列中的集合。若要新增至集合中的資料庫服務,使用Add方法。

若要從集合中傳回單一資料庫服務使用索引器。例如,若集合已指派給變數 myDatabaseServices,使用myDatabaseServices[index]以 C# 或 Visual Basic,其中index是名稱或 GUID 識別的資料庫服務中的myDatabaseServices(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.

請參閱

參照

SPDatabaseServiceCollection members

Microsoft.SharePoint.Administration namespace