SPDiagnosticsServiceBase.GetLocalToFarm<T> method
會傳回SPDiagnosticsServiceBaseT參數所描述的衍生類別的執行個體。
Namespace: Microsoft.SharePoint.Administration
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Protected Shared Function GetLocalToFarm(Of T As {New, SPDiagnosticsServiceBase}) ( _
farm As SPFarm _
) As T
'用途
Dim farm As SPFarm
Dim returnValue As T
returnValue = SPDiagnosticsServiceBase.GetLocalToFarm(farm)
protected static T GetLocalToFarm<T>(
SPFarm farm
)
where T : new(), SPDiagnosticsServiceBase
Type parameters
- T
必須是類別衍生自SPDiagnosticsServiceBase。
參數
farm
Type: Microsoft.SharePoint.Administration.SPFarm要從中取得類別的執行個體的伺服器陣列衍生自SPDiagnosticsServiceBase。
傳回值
Type: T
會傳回SPDiagnosticsServiceBaseT參數所描述的衍生類別的執行個體。
請參閱
參照
SPDiagnosticsServiceBase class