This documentation is archived and is not being maintained.

IAuthorizationPolicy::Evaluate Method

Evaluates whether a user meets the requirements for this authorization policy.

Namespace:  System.IdentityModel.Policy
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

bool Evaluate(
	EvaluationContext^ evaluationContext, 
	Object^% state
)

Parameters

evaluationContext
Type: System.IdentityModel.Policy::EvaluationContext
An EvaluationContext that contains the claim set that the authorization policy evaluates.
state
Type: System::Object%
A Object, passed by reference that represents the custom state for this authorization policy.

Return Value

Type: System::Boolean
false if the Evaluate method for this authorization policy must be called if additional claims are added by other authorization policies to evaluationContext; otherwise, true to state no additional evaluation is required by this authorization policy.

NoteNote

Implementers of the IAuthorizationPolicy interface should expect the Evaluate method to be called multiple times by different threads.

Implementers of the IAuthorizationPolicy interface can use the state parameter to track state between calls to the Evaluate method. If a state object is set inside a given call to the Evaluate method, the same object instance is passed to each and every subsequent call to the Evaluate method in the current evaluation process.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: