本文整理汇总了C#中SearchParameters.IsLast方法的典型用法代码示例。如果您正苦于以下问题:C# SearchParameters.IsLast方法的具体用法?C# SearchParameters.IsLast怎么用?C# SearchParameters.IsLast使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SearchParameters
的用法示例。
在下文中一共展示了SearchParameters.IsLast方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Matches2
private bool Matches2(SearchParameters searchParameters)
{
foreach (SearchOptions search in searchParameters)
{
bool lastSearch = (!searchParameters.MatchAll) || searchParameters.IsLast(search);
bool found;
switch (search.SearchType)
{
case SearchType.ThemeName:
found = MatchName(search); break;
case SearchType.ThemeSummary:
found = MatchSummary(search); break;
case SearchType.ThemeDescription:
found = MatchDescription(search); break;
case SearchType.ThemeTags:
found = MatchTags(search); break;
case SearchType.Theme:
found = MatchName(search) || MatchSummary(search) || MatchDescription(search) || MatchTags(search); break;
case SearchType.PubDate:
found = MatchDate(search); break;
case SearchType.Metadata:
found = MatchMeta(search); break; //FIXME - since this is in a loop, we may load metadata multiple times
default:
Debug.WriteLine("Invalid Search Condition");
found = false; break;
}
if (lastSearch && found)
return true;
if (searchParameters.MatchAll && !found)
return false;
}
return false;
}