Edit

PolicyHttpClient.GetPolicyEvaluationsAsync Method

Definition

Overloads

GetPolicyEvaluationsAsync(Guid, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Object, CancellationToken)

[Preview API] Retrieves a list of all the policy evaluation statuses for a specific pull request.

GetPolicyEvaluationsAsync(String, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Object, CancellationToken)

[Preview API] Retrieves a list of all the policy evaluation statuses for a specific pull request.

GetPolicyEvaluationsAsync(Guid, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Object, CancellationToken)

[Preview API] Retrieves a list of all the policy evaluation statuses for a specific pull request.

public System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.TeamFoundation.Policy.WebApi.PolicyEvaluationRecord>> GetPolicyEvaluationsAsync(Guid project, string artifactId, Nullable<bool> includeNotApplicable = null, Nullable<int> top = null, Nullable<int> skip = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
member this.GetPolicyEvaluationsAsync : Guid * string * Nullable<bool> * Nullable<int> * Nullable<int> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.TeamFoundation.Policy.WebApi.PolicyEvaluationRecord>>

Parameters

project
Guid

Project ID

artifactId
String

A string which uniquely identifies the target of a policy evaluation.

includeNotApplicable
Nullable<Boolean>

Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request.

top
Nullable<Int32>

The number of policy evaluation records to retrieve.

skip
Nullable<Int32>

The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to

GetPolicyEvaluationsAsync(String, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Int32>, Object, CancellationToken)

[Preview API] Retrieves a list of all the policy evaluation statuses for a specific pull request.

public System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.TeamFoundation.Policy.WebApi.PolicyEvaluationRecord>> GetPolicyEvaluationsAsync(string project, string artifactId, Nullable<bool> includeNotApplicable = null, Nullable<int> top = null, Nullable<int> skip = null, object userState = null, System.Threading.CancellationToken cancellationToken = null);
member this.GetPolicyEvaluationsAsync : string * string * Nullable<bool> * Nullable<int> * Nullable<int> * obj * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.List<Microsoft.TeamFoundation.Policy.WebApi.PolicyEvaluationRecord>>

Parameters

project
String

Project ID or project name

artifactId
String

A string which uniquely identifies the target of a policy evaluation.

includeNotApplicable
Nullable<Boolean>

Some policies might determine that they do not apply to a specific pull request. Setting this parameter to true will return evaluation records even for policies which don't apply to this pull request.

top
Nullable<Int32>

The number of policy evaluation records to retrieve.

skip
Nullable<Int32>

The number of policy evaluation records to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.

userState
Object
cancellationToken
CancellationToken

The cancellation token to cancel operation.

Returns

Applies to