Policy.Evaluate Method (AdHocPolicyEvaluationMode, Object[])
Immediately executes the policy against the specified target objects by using the specified evaluation mode.
Namespace: Microsoft.SqlServer.Management.Dmf
Assembly: Microsoft.SqlServer.Dmf (in microsoft.sqlserver.dmf.dll)
Syntax
'Deklaracja
Public Function Evaluate ( _
evaluationMode As AdHocPolicyEvaluationMode, _
ParamArray targetObjects As Object() _
) As Boolean
public bool Evaluate (
AdHocPolicyEvaluationMode evaluationMode,
params Object[] targetObjects
)
public:
bool Evaluate (
AdHocPolicyEvaluationMode evaluationMode,
... array<Object^>^ targetObjects
)
public boolean Evaluate (
AdHocPolicyEvaluationMode evaluationMode,
Object[] targetObjects
)
public function Evaluate (
evaluationMode : AdHocPolicyEvaluationMode,
... targetObjects : Object[]
) : boolean
Parameters
- evaluationMode
An AdHocPolicyEvaluationMode object that specifies the evaluation mode to use when the policy executes against the specified target.
- targetObjects
An Object[] object that specifies target objects.
Return Value
A Boolean value that verifies whether the policy was executed successfully. If True, the policy was executed successfully. Otherwise, False.
Remarks
This ignores all target filters and policy groups. This will throw an exception if the query expression isn’t a single object.
This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.
Thread Safety
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server.
Target Platforms
Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional with Service Pack 2 (SP2), Windows 2000 Professional, Windows 2000 Advanced Server, Windows XP Home Edition, For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server., Windows Vista, Windows Mobile 5.0, Windows Mobile 2003 for Pocket PC, Windows CE 5.0