summaryrefslogtreecommitdiffstats
path: root/src/main.lib/Plugins/TargetPlugins/Manual/Manual.cs
blob: 72edb900e23c5139c7ea10b6528edb323c2e7dd3 (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
29
30
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 Task<Target> Generate()
        {
            return Task.FromResult(new Target()
            {
                FriendlyName = $"[{nameof(Manual)}] {_options.CommonName}",
                CommonName = _options.CommonName,
                Parts = new List<TargetPart> {
                    new TargetPart {
                        Identifiers = _options.AlternativeNames
                    }
                }
            });
        }

        bool IPlugin.Disabled => false;
    }
}