Example #1
0
        public List <PluginItem> GetPluginList(bool secret = false)
        {
            List <PluginItem> list = PluginList.Select(p =>
            {
                var pi = new PluginItem();
                pi.CopyFrom(p, secret);
                return(pi);
            }).ToList();

            return(list);
        }
Example #2
0
 public void CopyFrom(PluginItem pi, bool secret = false)
 {
     this.ID          = pi.ID;
     this.Name        = pi.Name;
     this.Description = pi.Description;
     this.HasConfig   = pi.HasConfig;
     this.IsRunning   = pi.IsRunning;
     this.Order       = pi.Order;
     this.InitFail    = pi.InitFail;
     this.StartFail   = pi.StartFail;
     this.Message     = pi.Message;
 }
Example #3
0
        public PluginItem GetPluginInfo(string pluginId, bool secret = false)
        {
            PluginInfo pi = PluginList.FirstOrDefault(x => x.ID == pluginId);

            if (pi != null)
            {
                PluginItem p = new PluginItem();
                p.CopyFrom(pi, secret);
                return(p);
            }

            return(null);
        }