Site.RunHealthCheck 方法

Runs a health check as follows. (The health rules referenced below perform an implementation-dependent check on the health of a site collection.)If ruleId is not an empty GUID, runs the specified site collection health rule and returns a summary of the results. If ruleId is an empty GUID, runs all of the site collection health rules and returns a summary of the results.If bRepair is true, runs the specified rules in repair mode. In this case, and if a given rule is repairable, an attempt will be made to repair issues found by the rule, and the results from that attempted repairs are returned. If bRepair is false, an attempt to repair issues found is not made.If bRunAlways is true, rules are always run by this method, and the results are returned. If false, cached results from a recent previous run can be returned instead.

命名空间:  Microsoft.SharePoint.Client
程序集:   Microsoft.SharePoint.Client.Silverlight(位于 Microsoft.SharePoint.Client.Silverlight.dll 中);  Microsoft.SharePoint.Client.Phone(位于 Microsoft.SharePoint.Client.Phone.dll 中)  Microsoft.SharePoint.Client(位于 Microsoft.SharePoint.Client.dll 中)

语法

声明
Public Function RunHealthCheck ( _
    ruleId As Guid, _
    bRepair As Boolean, _
    bRunAlways As Boolean _
) As SiteHealthSummary
用法
Dim instance As Site
Dim ruleId As Guid
Dim bRepair As Boolean
Dim bRunAlways As Boolean
Dim returnValue As SiteHealthSummary

returnValue = instance.RunHealthCheck(ruleId, _
    bRepair, bRunAlways)
public SiteHealthSummary RunHealthCheck(
    Guid ruleId,
    bool bRepair,
    bool bRunAlways
)

参数

  • ruleId
    类型:System.Guid

    Specifies the rule or rules to be run. If the value is an empty GUID, all rules are run, otherwise only the specified rule is run.

  • bRepair
    类型:System.Boolean

    Specifies whether repairable rules are to be run in repair mode.

  • bRunAlways
    类型:System.Boolean

    Specifies whether the rules will be run as a result of this call or cached results from a previous run can be returned.

返回值

类型:Microsoft.SharePoint.Client.SiteHealth.SiteHealthSummary

另请参阅

引用

Site 类

Site 成员

Microsoft.SharePoint.Client 命名空间