/// <summary> /// Looks for first plugin of this type in Plugins. /// Reflection performance penalty. /// </summary> public T GetPlugin <T>() where T : class, IPlugin { return(Plugins.FirstOrDefault(x => x is T) as T); }
public bool HasPlugin <T>() where T : class, IPlugin { return(Plugins.FirstOrDefault(x => x is T) != null); }
/// <summary> /// Looks for first plugin of this type in Plugins. /// Reflection performance penalty. /// </summary> public TPlugin GetPlugin <TPlugin>() where TPlugin : class, IPlugin { return(Plugins.FirstOrDefault(x => x is TPlugin) as TPlugin); }