namespace DS.Module.Core.Reflection;
///
/// 抽象类
///
public abstract class FinderBase : IFinder
{
private readonly object _syncObj = new object();
public TItem[] Find(Func predicate)
{
return this.FindAll().Where(predicate).ToArray();
}
public TItem[] FindAll()
{
lock (_syncObj)
{
return this.FindAllItems();
}
}
protected abstract TItem[] FindAllItems();
}