Пример #1
0
 private ComponentCollection GetComponentList(IPayLoad context)
 {
     IComponentManager manager = new ComponentsManager();
     var mc = new ComponentCollection();
     mc.Name = "Componets";
     var hostUrl = context.HostUrl;
     List<IComponent> list = manager.GetAllComponents();
     List<Component> components = new List<Component>();
     foreach (IComponent c in list)
     {
         string name = c.GetID();
         components.Add(new Component() { Name = name, Url = hostUrl + "component/" + name + context.Query });
     }
     components = components.OrderBy(o => o.Name).ToList();
     mc.Components = components;
     return mc;
 }
 private ComponentCollection GetComponentList(IPayLoad context)
 {
     IComponentManager manager = new ComponentsManager();
     var mc = new ComponentCollection();
     mc.Name = "Componets";
     List<IComponent> list = manager.GetAllComponents();
     List<Component> components = new List<Component>();
     foreach (IComponent c in list)
     {
         string name = c.GetID();
         if (name == "fx.default" || name == "fx.allcomponents")
         {
             continue;
         }
         components.Add(new Component() { Name = name, Url = context.HostUrl + "components/" + name, Detail = AttributeHelper.GetComponentDetail(c) });
     }
     components = components.OrderBy(o => o.Name).ToList();
     mc.Components = components;
     return mc;
 }