mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-18 09:44:28 +08:00
调整结构
This commit is contained in:
@@ -29,7 +29,12 @@ namespace Infrastructure
|
||||
Func<T, K> parentIdSelector,
|
||||
K rootId = default(K))
|
||||
{
|
||||
foreach (var c in collection.Where(c => parentIdSelector(c).Equals(rootId)))
|
||||
foreach (var c in collection.Where(u =>
|
||||
{
|
||||
var selector = parentIdSelector(u);
|
||||
return (rootId == null && selector == null)
|
||||
|| (rootId != null &&rootId.Equals(selector));
|
||||
}))
|
||||
{
|
||||
yield return new TreeItem<T>
|
||||
{
|
||||
|
Reference in New Issue
Block a user