public CustomCommandFeature CreateFeature(string name, string arguments) { Type match = GetFeatureTypes() .FirstOrDefault(t => CustomCommandFeature.GetName(t).Equals(name, _comparison)); if (match == null) { throw new Exception($"The feature '{name}' was not found."); } var feature = Activator.CreateInstance(match) as CustomCommandFeature; feature.FillArguments(arguments); return(feature); }
public FeatureInfo[] GetFeatureInfos() => GetFeatureTypes() .Select(feature => new FeatureInfo { Name = CustomCommandFeature.GetName(feature), Summary = CustomCommandFeature.GetSummary(feature) }) .ToArray();