static private SearchTestResult ( bool>.Func |
||
query | bool>.Func | |
ordering | object>.Func | |
desc | bool | |
return | IOrderedEnumerable |
internal static IOrderedEnumerable<ITestResult> SearchTestResult(
Func<ITestResult, bool> query,
Func<ITestResult, object> ordering,
bool desc)
{
IOrderedEnumerable<ITestResult> result = null;
if (desc) {
result =
from testResult in getAllTestResults()
where query(testResult)
orderby ordering(testResult) descending
select testResult;
} else {
result =
from testResult in getAllTestResults()
where query(testResult)
orderby ordering(testResult) ascending
select testResult;
}
return result;
}
}