Example #1
0
 DnSpyFile FindByKey_NoLock(IDnSpyFilenameKey key)
 {
     if (key == null)
     {
         return(null);
     }
     foreach (var file in files)
     {
         if (key.Equals(file.Key))
         {
             return(file);
         }
     }
     return(null);
 }
Example #2
0
 IDnSpyFile Find_NoLock(IDnSpyFilenameKey key)
 {
     Debug.Assert(key != null);
     if (key == null)
     {
         return(null);
     }
     foreach (var file in files)
     {
         if (key.Equals(file.Key))
         {
             return(file);
         }
     }
     return(null);
 }
Example #3
0
        IDnSpyFile Remove_NoLock(IDnSpyFilenameKey key)
        {
            if (key == null)
            {
                return(null);
            }

            for (int i = 0; i < files.Count; i++)
            {
                if (key.Equals(files[i].Key))
                {
                    files.RemoveAt(i);
                    return(files[i]);
                }
            }

            return(null);
        }
Example #4
0
        public void Remove(IDnSpyFilenameKey key)
        {
            Debug.Assert(key != null);
            if (key == null)
            {
                return;
            }

            IDnSpyFile removedFile;

            lock (lockObj)
                removedFile = Remove_NoLock(key);
            Debug.Assert(removedFile != null);

            if (removedFile != null)
            {
                CallCollectionChanged(NotifyFileCollectionChangedEventArgs.CreateRemove(removedFile, null));
            }
        }
Example #5
0
		DnSpyFile FindByKey_NoLock(IDnSpyFilenameKey key) {
			if (key == null)
				return null;
			foreach (var file in files) {
				if (key.Equals(file.Key))
					return file;
			}
			return null;
		}
Example #6
0
		public DnSpyFile FindByKey(IDnSpyFilenameKey key) {
			lock (lockObj)
				return FindByKey_NoLock(key);
		}
Example #7
0
 DnSpyFile FindAssemblyByKey(IDnSpyFilenameKey key)
 {
     return(DnSpyFileList.FindByKey(key));
 }
 IDnSpyFile FindAssemblyByKey(IDnSpyFilenameKey key) => fileManager.Find(key);
Example #9
0
        IDnSpyFile Remove_NoLock(IDnSpyFilenameKey key)
        {
            if (key == null)
                return null;

            for (int i = 0; i < files.Count; i++) {
                if (key.Equals(files[i].Key)) {
                    files.RemoveAt(i);
                    return files[i];
                }
            }

            return null;
        }
		IDnSpyFile FindAssemblyByKey(IDnSpyFilenameKey key) {
			return fileManager.Find(key);
		}
Example #11
0
 IDnSpyFile Find_NoLock(IDnSpyFilenameKey key)
 {
     Debug.Assert(key != null);
     if (key == null)
         return null;
     foreach (var file in files) {
         if (key.Equals(file.Key))
             return file;
     }
     return null;
 }
Example #12
0
        public void Remove(IDnSpyFilenameKey key)
        {
            Debug.Assert(key != null);
            if (key == null)
                return;

            IDnSpyFile removedFile;
            lock (lockObj)
                removedFile = Remove_NoLock(key);
            Debug.Assert(removedFile != null);

            if (removedFile != null)
                CallCollectionChanged(NotifyFileCollectionChangedEventArgs.CreateRemove(removedFile, null));
        }
Example #13
0
 public IDnSpyFile Find(IDnSpyFilenameKey key)
 {
     lock (lockObj)
         return Find_NoLock(key);
 }
Example #14
0
 IDnSpyFile FindAssemblyByKey(IDnSpyFilenameKey key)
 {
     return(fileManager.Find(key));
 }
Example #15
0
 public IDnSpyFile Find(IDnSpyFilenameKey key)
 {
     lock (lockObj)
         return(Find_NoLock(key));
 }
Example #16
0
		DnSpyFile FindAssemblyByKey(IDnSpyFilenameKey key) {
			return DnSpyFileList.FindByKey(key);
		}
Example #17
0
 public DnSpyFile FindByKey(IDnSpyFilenameKey key)
 {
     lock (lockObj)
         return(FindByKey_NoLock(key));
 }