共用方式為


SPTimerJobUsageEntry.WebApplicationId Property

Gets or sets the unique identifier of the Web application that is associated with the timer job.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Property WebApplicationId As Guid
    Get
    Set
'Usage
Dim instance As SPTimerJobUsageEntry
Dim value As Guid

value = instance.WebApplicationId

instance.WebApplicationId = value
public Guid WebApplicationId { get; set; }

Property Value

Type: System.Guid
Returns a Guid when the job runs under the scope of a Web application; otherwise, returns a null reference (Nothing in Visual Basic).

Remarks

For timer jobs that run under the Web application scope, you can view and filter the job definition by Web application. For these jobs, the log entry contains the Web application name and ID. If not running in the scope of a Web application, this value should be a null reference (Nothing in Visual Basic).

See Also

Reference

SPTimerJobUsageEntry Class

SPTimerJobUsageEntry Members

Microsoft.SharePoint.Administration Namespace