Class EntityTagManager
Inherited Members
Namespace: Volo.CmsKit.Tags
Assembly: Volo.CmsKit.Domain.dll
Syntax
public class EntityTagManager : DomainService, IDomainService, ITransientDependency
Constructors
EntityTagManager(IEntityTagRepository, ITagRepository, ITagDefinitionStore, TagManager)
Declaration
public EntityTagManager(IEntityTagRepository entityTagRepository, ITagRepository tagRepository, ITagDefinitionStore tagDefinitionStore, TagManager tagManager)
Parameters
Type | Name | Description |
---|---|---|
IEntityTagRepository | entityTagRepository | |
ITagRepository | tagRepository | |
ITagDefinitionStore | tagDefinitionStore | |
TagManager | tagManager |
Properties
EntityTagRepository
Declaration
protected IEntityTagRepository EntityTagRepository { get; }
Property Value
Type | Description |
---|---|
IEntityTagRepository |
TagDefinitionStore
Declaration
protected ITagDefinitionStore TagDefinitionStore { get; }
Property Value
Type | Description |
---|---|
ITagDefinitionStore |
TagManager
Declaration
protected TagManager TagManager { get; }
Property Value
Type | Description |
---|---|
TagManager |
TagRepository
Declaration
protected ITagRepository TagRepository { get; }
Property Value
Type | Description |
---|---|
ITagRepository |
Methods
AddTagToEntityAsync(Guid, string, string, Guid?, CancellationToken)
Declaration
public virtual Task<EntityTag> AddTagToEntityAsync(Guid tagId, string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | tagId | |
string | entityType | |
string | entityId | |
Guid? | tenantId | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<EntityTag> |
GetEntityIdsFilteredByTagAsync(Guid, Guid?, CancellationToken)
Declaration
public Task<List<string>> GetEntityIdsFilteredByTagAsync(Guid tagId, Guid? tenantId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | tagId | |
Guid? | tenantId | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<string>> |
GetEntityIdsFilteredByTagNameAsync(string, string, Guid?, CancellationToken)
Declaration
public Task<List<string>> GetEntityIdsFilteredByTagNameAsync(string tagName, string entityType, Guid? tenantId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | tagName | |
string | entityType | |
Guid? | tenantId | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<string>> |
RemoveTagFromEntityAsync(Guid, string, string, Guid?, CancellationToken)
Declaration
public virtual Task RemoveTagFromEntityAsync(Guid tagId, string entityType, string entityId, Guid? tenantId = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Guid | tagId | |
string | entityType | |
string | entityId | |
Guid? | tenantId | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
SetEntityTagsAsync(string, string, List<string>)
Declaration
public Task SetEntityTagsAsync(string entityType, string entityId, List<string> tags)
Parameters
Type | Name | Description |
---|---|---|
string | entityType | |
string | entityId | |
List<string> | tags |
Returns
Type | Description |
---|---|
Task |