summaryrefslogtreecommitdiffstats
path: root/src/main.lib/Plugins/TargetPlugins/Manual/Manual.cs
blob: de82b5a1f585314e5b9abe4ebead4bd27d0296fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using PKISharp.WACS.DomainObjects;
using PKISharp.WACS.Plugins.Interfaces;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace PKISharp.WACS.Plugins.TargetPlugins
{
    internal class Manual : ITargetPlugin
    {
        private readonly ManualOptions _options;

        public Manual(ManualOptions options) => _options = options;

        public async Task<Target?> Generate()
        {
            return new Target()
            {
                FriendlyName = $"[{nameof(Manual)}] {_options.CommonName}",
                CommonName = _options.CommonName,
                Parts = new List<TargetPart> {
                    new TargetPart(_options.AlternativeNames)
                }
            };
        }

        bool IPlugin.Disabled => false;
    }
}