Class ContentApprovalDefinitionRepositoryExtensions
NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version. Extension method class for IApprovalDefinitionRepository
Inheritance
Inherited Members
Namespace: EPiServer.Approvals.ContentApprovals
Assembly: EPiServer.dll
Version: 11.20.7Syntax
public static class ContentApprovalDefinitionRepositoryExtensions
Methods
GetAsync(IApprovalDefinitionRepository, ContentReference)
Gets an approval definition by using content reference.
Declaration
public static Task<ContentApprovalDefinition> GetAsync(this IApprovalDefinitionRepository repository, ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
IApprovalDefinitionRepository | repository | The approval definition repository that is being extended |
ContentReference | contentLink | A content reference to get an approval instance for |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ContentApprovalDefinition> | A approval definition instance |
GetItemsAsync(IApprovalDefinitionRepository, IEnumerable<ContentReference>)
Gets a list of approval definitions by using content references.
Declaration
public static Task<IEnumerable<ContentApprovalDefinition>> GetItemsAsync(this IApprovalDefinitionRepository repository, IEnumerable<ContentReference> contentLinks)
Parameters
Type | Name | Description |
---|---|---|
IApprovalDefinitionRepository | repository | The approval definition repository that is being extended |
System.Collections.Generic.IEnumerable<ContentReference> | contentLinks | A list of content references to get approval instances for |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ContentApprovalDefinition>> | A list of approval definition instances |
ResolveAsync(IApprovalDefinitionRepository, ContentReference)
Traverses the content tree upwards starting at the ContentReference looking for a definition.
Declaration
public static Task<ApprovalDefinitionResolveResult> ResolveAsync(this IApprovalDefinitionRepository repository, ContentReference contentLink)
Parameters
Type | Name | Description |
---|---|---|
IApprovalDefinitionRepository | repository | The approval repository that is being extended |
ContentReference | contentLink | Reference to the content where traversal begins |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ApprovalDefinitionResolveResult> | A result class where Definition is the current definition or null if no definition can be found |