public List <IWebItem> GetItems(WebZoneType webZone, ItemAvailableState avaliableState) { var webitems = items.FindAll(item => { if ((avaliableState & ItemAvailableState.Disabled) != ItemAvailableState.Disabled && item.IsDisabled()) { return(false); } var attribute = Attribute.GetCustomAttribute(item.GetType(), typeof(WebZoneAttribute), true) as WebZoneAttribute; return(attribute != null && (attribute.Type & webZone) != 0); }); return(webitems); }
public List <IWebItem> GetItems(WebZoneType webZone, ItemAvailableState avaliableState) { var copy = items.Values.ToList(); var list = copy.Where(item => { if ((avaliableState & ItemAvailableState.Disabled) != ItemAvailableState.Disabled && item.IsDisabled()) { return(false); } var attribute = (WebZoneAttribute)Attribute.GetCustomAttribute(item.GetType(), typeof(WebZoneAttribute), true); return(attribute != null && (attribute.Type & webZone) != 0); }).ToList(); list.Sort((x, y) => GetSortOrder(x).CompareTo(GetSortOrder(y))); return(list); }
public WebZoneAttribute(WebZoneType type) { Type = type; }
public List <IWebItem> GetItems(WebZoneType webZone) { return(GetItems(webZone, ItemAvailableState.Normal)); }
public List<IWebItem> GetItems(WebZoneType webZone, ItemAvailableState avaliableState) { var webitems = items.FindAll(item => { if ((avaliableState & ItemAvailableState.Disabled) != ItemAvailableState.Disabled && item.IsDisabled()) { return false; } var attribute = Attribute.GetCustomAttribute(item.GetType(), typeof(WebZoneAttribute), true) as WebZoneAttribute; return attribute != null && (attribute.Type & webZone) != 0; }); return webitems; }
public List<IWebItem> GetItems(WebZoneType webZone) { return GetItems(webZone, ItemAvailableState.Normal); }
public List <IWebItem> GetItems(Tenant tenant, WebZoneType webZone) { return(GetItems(tenant, webZone, ItemAvailableState.Normal)); }