Share via


SPSolutionCollection class

代表SPSolution物件的集合。

Inheritance hierarchy

System.Object
  Microsoft.SharePoint.Administration.SPPersistedObjectCollection<SPSolution>
    Microsoft.SharePoint.Administration.SPPersistedChildCollection<SPSolution>
      Microsoft.SharePoint.Administration.SPSolutionCollection

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

Syntax

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

備註

使用SPFarm類別之Solutions屬性來取得安裝在伺服器陣列中的解決方案的集合。若要將方案新增至集合中,使用Add方法。

重要

使用SPSolution建構函式來建立解決方案物件不支援,並傳回NullReferenceException ,如果您嘗試實作透過建構函式建立的物件的成員。

若要從集合中傳回單一解決方案中使用索引器。例如,若集合已指派給變數myDefinitions,使用myDefinitions[index] C# 或myDefinitions(index) Visual Basic 中,其中index為解決方案的 GUID。

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.

請參閱

參照

SPSolutionCollection members

Microsoft.SharePoint.Administration namespace