using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Telerik.WinControls; namespace Pilz.Plugins.Advanced { public abstract class PluginFeature { /// /// The type of the feature defines where the feature get integrated. /// public string Type { get; init; } /// /// The identifier of the feature should be uniquie for the current . /// It defines a feature within a type. /// public string Identifier { get; init; } /// /// The full identifier of the feature should be uniquie and is the combination of and . /// It defines a feature across all types. /// public string FullIdentifier => GetFullIdentifier(Type, Identifier); /// /// The (display) name of the feature. /// public virtual string? Name { get; init; } /// /// The symbol for the feature. /// public virtual RadSvgImage? Icon { get; set; } /// /// Defines if the feature is enabled/visible. /// public virtual bool Enabled { get; set; } = true; protected PluginFeature(string featureType, string identifier) { Identifier = identifier; Type = featureType; } protected PluginFeature(string featureType, string featureIdentifier, string? featureName) : this(featureType, featureIdentifier) { Name = featureName; } public static string GetFullIdentifier(string featureType, string identifier) { return $"{featureType}:{identifier}"; } } }