elsa-core/src/common/Elsa.Features/Services/InstalledFeatureRegistry.cs
Marko Lahma 492d6fcd35
Fixing some analyzer warnings (#5617)
* Fixing some analyzer warnings

* review feedback

---------

Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
2024-07-05 15:14:28 +02:00

19 lines
607 B
C#

using Elsa.Features.Contracts;
using Elsa.Features.Models;
namespace Elsa.Features.Services;
/// <inheritdoc />
public class InstalledFeatureRegistry : IInstalledFeatureRegistry
{
private readonly Dictionary<string, FeatureDescriptor> _descriptors = new();
/// <inheritdoc />
public void Add(FeatureDescriptor descriptor) => _descriptors[descriptor.FullName] = descriptor;
/// <inheritdoc />
public IEnumerable<FeatureDescriptor> List() => _descriptors.Values;
/// <inheritdoc />
public FeatureDescriptor? Find(string fullName) => _descriptors.GetValueOrDefault(fullName);
}