public IDnSpyFile ForceAdd(IDnSpyFile file, bool delayLoad, object data) { if (file == null) { throw new ArgumentNullException(); } lock (lockObj) files.Add(file); CallCollectionChanged(NotifyFileCollectionChangedEventArgs.CreateAdd(file, data), delayLoad); return(file); }
public IDnSpyFile GetOrAdd(IDnSpyFile file) { if (file == null) { throw new ArgumentNullException(); } IDnSpyFile result; lock (lockObj) result = GetOrAdd_NoLock(file); if (result == file) { CallCollectionChanged(NotifyFileCollectionChangedEventArgs.CreateAdd(result, null)); } return(result); }