다음을 통해 공유


Policy.Evaluate 메서드 (AdHocPolicyEvaluationMode, array<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 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.

참고 항목

참조

Policy 클래스

Evaluate 오버로드

Microsoft.SqlServer.Management.Dmf 네임스페이스