public T Configure <T>() where T : IPluginConfiguration { if (PluginTypeHelper.GetName <T>() != Name) { throw new PluginConfigurationException(Name, typeof(T)); } return((T)Config); }
public PluginConfigurationException(string name, Type type) : base($"Did you mean Configure<{PluginTypeHelper.GetType(name).Name}>(). You tried to cast {type.Name} to {PluginTypeHelper.GetType(name).Name} which is not possible.") { }