using CShells.Features;
using Elsa.Extensions;
using Elsa.Labels.Contracts;
using Elsa.Labels.Entities;
using Elsa.Labels.Services;
using JetBrains.Annotations;
using Microsoft.Extensions.DependencyInjection;
namespace Elsa.Labels.ShellFeatures;
///
/// Enables functionality to tag workflows with labels.
///
[ShellFeature(
DisplayName = "Labels",
Description = "Enables functionality to tag workflows with labels",
DependsOn = ["Mediator"])]
[UsedImplicitly]
public class LabelsFeature : IShellFeature
{
///
/// A delegate that provides an instance of an implementation of .
///
public Func LabelStore { get; set; } = sp => sp.GetRequiredService();
///
/// A delegate that provides an instance of an implementation of .
///
public Func WorkflowDefinitionLabelStore { get; set; } = sp => sp.GetRequiredService();
public void ConfigureServices(IServiceCollection services)
{
services
.AddMemoryStore