次の方法で共有


SPDiagnosticsService constructor (String, SPFarm)

Initializes a new instance of the SPDiagnosticsService class based on the specified service name and server farm.

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

Syntax

'Declaration
Public Sub New ( _
    name As String, _
    parent As SPFarm _
)
'Usage
Dim name As String
Dim parent As SPFarm

Dim instance As New SPDiagnosticsService(name, parent)
public SPDiagnosticsService(
    string name,
    SPFarm parent
)

Parameters

  • name
    Type: System.String

    A String object that contains a name that identifies this instance of the service.

Remarks

This constructor initializes an instance of the SPDiagnosticsService class with configuration data from the registry of the local server. If a registry key for the service does not exist on the local server, the instance is initialized with default configuration values.

Important

If you want the instance of the service that is currently in use throughout the server farm, access the static Local property rather than creating an object with this constructor.

See also

Reference

SPDiagnosticsService class

SPDiagnosticsService members

SPDiagnosticsService overload

Microsoft.SharePoint.Administration namespace

Local