示例#1
0
        public void ClearStore()
        {
            if (onRecordRemoved == null)
            {
                recordStore.Clear();
                return;
            }

            LightList <T> records = LightList <T> .Get();

            records.EnsureCapacity(recordStore.Count);
            recordStore.GetAllRecords(records);
            T[] recordsArray = records.Array;
            recordStore.Clear();
            for (int i = 0; i < records.Count; i++)
            {
                onRecordRemoved.Invoke(recordsArray[i]);
            }

            LightList <T> .Release(ref records);
        }
示例#2
0
文件: Adapter.cs 项目: veboys/UIForia
 public virtual async Task <ICollection <T> > LoadRecords(ICollection <T> output)
 {
     return(store.GetAllRecords(output));
 }