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 IApproval
Inheritance
Namespace: EPiServer.Approvals.ContentApprovals
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public static class ContentApprovalDefinitionRepositoryExtensions : Object
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 |
---|---|---|
IApproval |
repository | The approval definition repository that is being extended |
Content |
contentLink | A content reference to get an approval instance for |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
IApproval |
repository | The approval definition repository that is being extended |
System. |
contentLinks | A list of content references to get approval instances for |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
IApproval |
repository | The approval repository that is being extended |
Content |
contentLink | Reference to the content where traversal begins |
Returns
Type | Description |
---|---|
System. |
A result class where Definition is the current definition or null if no definition can be found |