Condividi tramite


Metodo Evaluate (AdHocPolicyEvaluationMode, Object[])

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

Spazio dei nomi:  Microsoft.SqlServer.Management.Dmf
Assembly:  Microsoft.SqlServer.Dmf (in Microsoft.SqlServer.Dmf.dll)

Sintassi

'Dichiarazione
Public Function Evaluate ( _
    evaluationMode As AdHocPolicyEvaluationMode, _
    ParamArray targetObjects As Object() _
) As Boolean
'Utilizzo
Dim instance As Policy
Dim evaluationMode As AdHocPolicyEvaluationMode
Dim targetObjects As Object()
Dim returnValue As Boolean

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

Parametri

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

Valore restituito

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

Osservazioni

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

Questo spazio dei nomi, classe o membro è supportato solo nella versione 2.0 di Microsoft .NET Framework.