Esempio n. 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);
        }
Esempio n. 2
0
 public virtual async Task <ICollection <T> > LoadRecords(ICollection <T> output)
 {
     return(store.GetAllRecords(output));
 }