/// <summary> /// Конструктор /// </summary> public PluginItem(string name, string descr, string version, string fileName, PlaginStates state) { State = state; Name = name; Descr = descr; Version = version; FileName = fileName; }
/// <summary> /// Конструктор /// </summary> public PluginItem(PluginSpec pluginSpec, PlaginStates state) { State = state; Name = pluginSpec.Name; Descr = pluginSpec.Descr; Version = pluginSpec.Version; FileName = Path.GetFileName(Assembly.GetAssembly(pluginSpec.GetType()).Location); }
/// <summary> /// Получить строковое представление состояния плагина /// </summary> protected string StateToStr(PlaginStates state) { switch (state) { case PlaginStates.Inactive: return(PlgPhrases.InactiveState); case PlaginStates.Active: return(PlgPhrases.ActiveState); default: // PlaginStates.NotLoaded: return(PlgPhrases.NotLoadedState); } }