Beispiel #1
0
 public ReferenceFolderTreeNode(ModuleDef module, AssemblyTreeNode parentAssembly, DnSpyFileListTreeNode dnSpyFileListTreeNode)
 {
     this.module                = module;
     this.parentAssembly        = parentAssembly;
     this.dnSpyFileListTreeNode = dnSpyFileListTreeNode;
     this.LazyLoading           = true;
 }
		internal AssemblyReferenceTreeNode(AssemblyRef r, AssemblyTreeNode parentAssembly, DnSpyFileListTreeNode dnSpyFileListTreeNode) {
			if (parentAssembly == null)
				throw new ArgumentNullException("parentAssembly");
			if (dnSpyFileListTreeNode == null)
				throw new ArgumentNullException("dnSpyFileListTreeNode");
			if (r == null)
				throw new ArgumentNullException("r");
			this.r = r;
			this.dnSpyFileListTreeNode = dnSpyFileListTreeNode;
			this.parentAssembly = parentAssembly;
			this.LazyLoading = true;
		}
Beispiel #3
0
 internal AssemblyReferenceTreeNode(AssemblyRef r, AssemblyTreeNode parentAssembly, DnSpyFileListTreeNode dnSpyFileListTreeNode)
 {
     if (parentAssembly == null)
     {
         throw new ArgumentNullException("parentAssembly");
     }
     if (dnSpyFileListTreeNode == null)
     {
         throw new ArgumentNullException("dnSpyFileListTreeNode");
     }
     if (r == null)
     {
         throw new ArgumentNullException("r");
     }
     this.r = r;
     this.dnSpyFileListTreeNode = dnSpyFileListTreeNode;
     this.parentAssembly        = parentAssembly;
     this.LazyLoading           = true;
 }
Beispiel #4
0
		void ShowAssemblyListDontAskUser(DnSpyFileList dnspyFileList) {
			// Clear the cache since the keys contain tree nodes which get recreated now. The keys
			// will never match again so shouldn't be in the cache.
			DecompileCache.Instance.ClearAll();
			UndoCommandManager.Instance.Clear();

			foreach (var tabManager in tabGroupsManager.AllTabGroups.ToArray())
				tabManager.RemoveAllTabStates();
			this.dnspyFileList = dnspyFileList;

			// Make sure memory usage doesn't increase out of control. This method allocates lots of
			// new stuff, but the GC doesn't bother to reclaim that memory for a long time.
			GC.Collect();
			GC.WaitForPendingFinalizers();

			dnspyFileList.CollectionChanged += assemblyList_Assemblies_CollectionChanged;
			dnSpyFileListTreeNode = new DnSpyFileListTreeNode(dnspyFileList);
			// Make sure CurrentAssemblyListChanged() is called after the treenodes have been created
			dnspyFileList.CollectionChanged += assemblyList_Assemblies_CollectionChanged2;
			dnSpyFileListTreeNode.FilterSettings = sessionSettings.FilterSettings.Clone();
			dnSpyFileListTreeNode.Select = SelectNode;
			dnSpyFileListTreeNode.OwnerTreeView = treeView;
			treeView.Root = dnSpyFileListTreeNode;

			UpdateTitle();
		}
Beispiel #5
0
		public MemberPickerVM(IDnSpyFileListOptions options, Language language, ITreeViewNodeFilter filter, IEnumerable<DnSpyFile> assemblies) {
			this.Language = language;
			this.filter = filter;
			this.origFilter = filter;

			dnSpyFileList = new DnSpyFileList(options, "Member Picker List");
			foreach (var file in assemblies)
				dnSpyFileList.ForceAddFileToList(file, true, false, -1, false);

			this.dnSpyFileListTreeNode = new DnSpyFileListTreeNode(dnSpyFileList);
			this.dnSpyFileListTreeNode.DisableDrop = true;
			if (dnSpyFileListTreeNode.Children.Count > 0)
				SelectedItem = dnSpyFileListTreeNode.Children[0];

			// Make sure we don't hook this event before the assembly list node because we depend
			// on the new asm node being present when we restart the search.
			dnSpyFileList.CollectionChanged += (s, e) => RestartSearch();

			CreateNewFilterSettings();
		}
		public ReferenceFolderTreeNode(ModuleDef module, AssemblyTreeNode parentAssembly, DnSpyFileListTreeNode dnSpyFileListTreeNode) {
			this.module = module;
			this.parentAssembly = parentAssembly;
			this.dnSpyFileListTreeNode = dnSpyFileListTreeNode;
			this.LazyLoading = true;
		}