November Happy Hour will be moved to Thursday December 5th.

Class ApprovalDefinitionRepositoryExtensions

Extension method class for IApprovalDefinitionRepository

Inheritance
System.Object
ApprovalDefinitionRepositoryExtensions
Namespace: EPiServer.Approvals
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
public static class ApprovalDefinitionRepositoryExtensions : Object

Methods

DeleteAsync(IApprovalDefinitionRepository, Int32)

Deletes an approval definition and all versions connected to it.

Declaration
public static Task DeleteAsync(this IApprovalDefinitionRepository repository, int id)
Parameters
Type Name Description
IApprovalDefinitionRepository repository

The approval definition repository that is being extended

System.Int32 id

The identifier of the approval definition

Returns
Type Description
System.Threading.Tasks.Task
Exceptions
Type Condition
ApprovalInReviewException

The operation cannot be executed due to a conflict with an approval in review

GetAsync(IApprovalDefinitionRepository, Int32)

Gets the current approval definition version for an approval definition. Note that this can be a version that didn't exist when the approval definition were created.

Declaration
public static Task<ApprovalDefinition> GetAsync(this IApprovalDefinitionRepository repository, int id)
Parameters
Type Name Description
IApprovalDefinitionRepository repository

The approval definition repository that is being extended

System.Int32 id

The identifier of the approval definition

Returns
Type Description
System.Threading.Tasks.Task<ApprovalDefinition>

Current definition or null if no definition can be found

GetAsync(IApprovalDefinitionRepository, Uri)

Gets the current approval definition version for an approval definition. Note that this can be a version that didn't exist when the approval definition were created.

Declaration
public static Task<ApprovalDefinition> GetAsync(this IApprovalDefinitionRepository repository, Uri reference)
Parameters
Type Name Description
IApprovalDefinitionRepository repository

The approval definition repository that is being extended

System.Uri reference

Reference to the content where the definition resides

Returns
Type Description
System.Threading.Tasks.Task<ApprovalDefinition>

Current definition or null if no definition can be found