Evaluate 方法 (AdHocPolicyEvaluationMode, Object[])

Immediately executes the policy against the specified target objects by using the specified evaluation mode.

命名空间:  Microsoft.SqlServer.Management.Dmf
程序集:  Microsoft.SqlServer.Dmf(在 Microsoft.SqlServer.Dmf.dll 中)

语法

声明
<STraceConfigurationAttribute(SkipAutoTrace := True)> _
Public Function Evaluate ( _
    evaluationMode As AdHocPolicyEvaluationMode, _
    ParamArray targetObjects As Object() _
) As Boolean
用法
Dim instance As Policy
Dim evaluationMode As AdHocPolicyEvaluationMode
Dim targetObjects As Object()
Dim returnValue As Boolean

returnValue = instance.Evaluate(evaluationMode, _
    targetObjects)
[STraceConfigurationAttribute(SkipAutoTrace = true)]
public bool Evaluate(
    AdHocPolicyEvaluationMode evaluationMode,
    params Object[] targetObjects
)
[STraceConfigurationAttribute(SkipAutoTrace = true)]
public:
bool Evaluate(
    AdHocPolicyEvaluationMode evaluationMode, 
    ... array<Object^>^ targetObjects
)
[<STraceConfigurationAttribute(SkipAutoTrace = true)>]
member Evaluate : 
        evaluationMode:AdHocPolicyEvaluationMode * 
        targetObjects:Object[] -> bool 
public function Evaluate(
    evaluationMode : AdHocPolicyEvaluationMode, 
    ... targetObjects : Object[]
) : boolean

参数

  • targetObjects
    类型:array<System. . :: . .Object> [] () [] []
    An array<Object>[]()[][] object that specifies target objects.

返回值

类型:System. . :: . .Boolean
A Boolean value that verifies whether the policy was executed successfully.
If True, the policy was executed successfully. Otherwise, False.

注释

This ignores all target filters and policy groups. This will throw an exception if the query expression isn’t a single object.