C# Class PhotoSharingApp.Universal.Models.CategoryMatchFinder

Helper class for finding matches of category names.
Show file Open project: Microsoft/Appsample-Photosharing Class Usage Examples

Public Methods

Method Description
GetMatchingCategories ( string categoryName, IEnumerable categories ) : IEnumerable

Determines which categories are matching the given category name.

IsCategoryPartOfList ( string categoryName, IEnumerable categories ) : bool

Determines if the given category is part of the given list.

SearchCategories ( string categoryName, IEnumerable categories ) : IEnumerable

Searches for a category name within a set of given categories.

ValidateCategoryAcceptanceCriteria ( string categoryName, IEnumerable categories ) : void

Determines if the given category is part of the give list.

Method Details

GetMatchingCategories() public method

Determines which categories are matching the given category name.
public GetMatchingCategories ( string categoryName, IEnumerable categories ) : IEnumerable
categoryName string The category name to match.
categories IEnumerable The list of categories.
return IEnumerable

IsCategoryPartOfList() public method

Determines if the given category is part of the given list.
public IsCategoryPartOfList ( string categoryName, IEnumerable categories ) : bool
categoryName string The category name to match.
categories IEnumerable The list that is matched against.
return bool

SearchCategories() public method

Searches for a category name within a set of given categories.
public SearchCategories ( string categoryName, IEnumerable categories ) : IEnumerable
categoryName string The category name to search for.
categories IEnumerable The list of categories.
return IEnumerable

ValidateCategoryAcceptanceCriteria() public method

Determines if the given category is part of the give list.
/// Thrown when the given category /// is part of the list. ///
public ValidateCategoryAcceptanceCriteria ( string categoryName, IEnumerable categories ) : void
categoryName string The category name to match.
categories IEnumerable The list that is matched against.
return void