Ejemplo n.º 1
0
 public T Configure <T>() where T : IPluginConfiguration
 {
     if (PluginTypeHelper.GetName <T>() != Name)
     {
         throw new PluginConfigurationException(Name, typeof(T));
     }
     return((T)Config);
 }
Ejemplo n.º 2
0
 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.")
 {
 }