C# Class Geta.EPi.Extensions.CategoryListExtensions

CategoryList extensions.
显示文件 Open project: Geta/EPi.Extensions

Public Methods

Method Description
Contains ( this categoryList, string name ) : bool

Returns a value indicating whether the specified category by name occurs within this CategoryList.

GetCategoryNames ( this categoryList ) : IEnumerable

Returns names of categories for provided CategoryList.

GetCommaSeparatedCategories ( this categoryList, bool requireAvailable = false, bool requireSelectable = false ) : string

Builds a comma separated string of categories using LocalizedDescription as name.

GetFullCategories ( this categoryList ) : IEnumerable

Returns enumeration of Category for provided CategoryList.

Method Details

Contains() public static method

Returns a value indicating whether the specified category by name occurs within this CategoryList.
public static Contains ( this categoryList, string name ) : bool
categoryList this CategoryList with categories.
name string Category name to seek.
return bool

GetCategoryNames() public static method

Returns names of categories for provided CategoryList.
public static GetCategoryNames ( this categoryList ) : IEnumerable
categoryList this CategoryList with categories.
return IEnumerable

GetCommaSeparatedCategories() public static method

Builds a comma separated string of categories using LocalizedDescription as name.
public static GetCommaSeparatedCategories ( this categoryList, bool requireAvailable = false, bool requireSelectable = false ) : string
categoryList this CategoryList with categories.
requireAvailable bool Flag to filter by Available.
requireSelectable bool Flag to filter by Selectable.
return string

GetFullCategories() public static method

Returns enumeration of Category for provided CategoryList.
public static GetFullCategories ( this categoryList ) : IEnumerable
categoryList this CategoryList with categories.
return IEnumerable