当前位置: 首页>>代码示例>>C#>>正文


C# ILSpyTreeNode.Select方法代码示例

本文整理汇总了C#中ICSharpCode.ILSpy.TreeNodes.ILSpyTreeNode.Select方法的典型用法代码示例。如果您正苦于以下问题:C# ILSpyTreeNode.Select方法的具体用法?C# ILSpyTreeNode.Select怎么用?C# ILSpyTreeNode.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICSharpCode.ILSpy.TreeNodes.ILSpyTreeNode的用法示例。


在下文中一共展示了ILSpyTreeNode.Select方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Execute

		static void Execute(ILSpyTreeNode[] nodes) {
			if (!CanExecute(nodes))
				return;

			var nsNodes = nodes.Select(a => (NamespaceTreeNode)a).ToArray();
			UndoCommandManager.Instance.Add(new DeleteNamespaceCommand(nsNodes));
		}
开发者ID:nakijun,项目名称:dnSpy,代码行数:7,代码来源:NamespaceCommands.cs

示例2: Execute

        internal static void Execute(ILSpyTreeNode[] nodes)
        {
            if (!CanExecute(nodes))
                return;

            var propNodes = nodes.Select(a => (PropertyTreeNode)a).ToArray();
            UndoCommandManager.Instance.Add(new DeletePropertyDefCommand(propNodes));
        }
开发者ID:se7ensoft,项目名称:dnSpy,代码行数:8,代码来源:PropertyDefCommands.cs

示例3: Execute

        internal static void Execute(ILSpyTreeNode[] nodes)
        {
            if (!CanExecute(nodes))
                return;

            var rsrcNodes = nodes.Select(a => (ResourceElementTreeNode)a).ToArray();
            UndoCommandManager.Instance.Add(new DeleteResourceElementCommand(rsrcNodes));
        }
开发者ID:gsong2014,项目名称:dnSpy,代码行数:8,代码来源:ResourceCommands.cs

示例4: Execute

        internal static void Execute(ILSpyTreeNode[] nodes)
        {
            if (!CanExecute(nodes))
                return;

            var eventNodes = nodes.Select(a => (EventTreeNode)a).ToArray();
            UndoCommandManager.Instance.Add(new DeleteEventDefCommand(eventNodes));
        }
开发者ID:BahNahNah,项目名称:dnSpy,代码行数:8,代码来源:EventDefCommands.cs

示例5: Execute

		internal static void Execute(ILSpyTreeNode[] nodes)
		{
			if (!CanExecute(nodes))
				return;

			var asmNodes = nodes.Select(a => (AssemblyTreeNode)a).ToArray();
			var modNodes = new HashSet<AssemblyTreeNode>(asmNodes);
			modNodes.AddRange(asmNodes.SelectMany(a => a.IsNetModule ? new AssemblyTreeNode[0] : a.Children.Cast<AssemblyTreeNode>()));
			if (!SaveModule.Saver.AskUserToSaveIfModified(modNodes))
				return;

			UndoCommandManager.Instance.Add(new RemoveAssemblyCommand(asmNodes));
		}
开发者ID:lisong521,项目名称:dnSpy,代码行数:13,代码来源:AssemblyCommands.cs

示例6: Execute

		static void Execute(ILSpyTreeNode[] nodes) {
			if (!CanExecute(nodes))
				return;

			if (!AskDeleteDef("method"))
				return;

			var methodNodes = nodes.Select(a => (MethodTreeNode)a).ToArray();
			UndoCommandManager.Instance.Add(new DeleteMethodDefCommand(methodNodes));
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:10,代码来源:MethodDefCommands.cs

示例7: Execute

		static void Execute(ILSpyTreeNode[] nodes) {
			if (!CanExecute(nodes))
				return;

			var asmNodes = nodes.Select(a => (AssemblyTreeNode)a).ToArray();
			var modNodes = new HashSet<AssemblyTreeNode>(asmNodes);
			modNodes.AddRange(asmNodes.SelectMany(a => !a.IsAssembly ? new AssemblyTreeNode[0] : a.Children.Cast<AssemblyTreeNode>()));
			if (!SaveModule.Saver.AskUserToSaveIfModified(modNodes))
				return;

			var keepNodes = new List<AssemblyTreeNode>();
			var freeNodes = new List<AssemblyTreeNode>();
			var onlyInRedoHistory = new List<AssemblyTreeNode>();
			foreach (var info in UndoCommandManager.Instance.GetUndoRedoInfo(asmNodes)) {
				if (!info.IsInUndo && !info.IsInRedo) {
					// This asm is safe to remove
					freeNodes.Add(info.Node);
				}
				else if (!info.IsInUndo && info.IsInRedo) {
					// If we add a RemoveAssemblyCommand, the redo history will be cleared, so this
					// assembly will be cleared from the history and don't need to be kept.
					onlyInRedoHistory.Add(info.Node);
				}
				else {
					// The asm is in the undo history, and maybe in the redo history. We must keep it.
					keepNodes.Add(info.Node);
				}
			}

			if (keepNodes.Count > 0 || onlyInRedoHistory.Count > 0) {
				// We can't free the asm since older commands might reference it so we must record
				// it in the history. The user can click Clear History to free everything.
				foreach (var node in keepNodes) {
					var mod = node.DnSpyFile.ModuleDef as ModuleDefMD;
					if (mod != null)
						mod.MetaData.PEImage.UnsafeDisableMemoryMappedIO();
				}
				UndoCommandManager.Instance.Add(new RemoveAssemblyCommand(keepNodes.ToArray()));
				// Redo history was cleared
				FreeAssemblies(onlyInRedoHistory);
			}

			FreeAssemblies(freeNodes);
			if (freeNodes.Count > 0 || onlyInRedoHistory.Count > 0)
				UndoCommandManager.Instance.CallGc();
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:46,代码来源:AssemblyCommands.cs

示例8: ConvertNetModuleToAssemblyCommand

 ConvertNetModuleToAssemblyCommand(ILSpyTreeNode[] nodes)
 {
     this.nodes = nodes.Select(n => (AssemblyTreeNode)n).ToArray();
     this.savedStates = new SavedState[this.nodes.Length];
     for (int i = 0; i < this.savedStates.Length; i++)
         this.savedStates[i] = new SavedState();
 }
开发者ID:4058665,项目名称:dnSpy,代码行数:7,代码来源:ModuleCommands.cs

示例9: ConvertAssemblyToNetModuleCommand

 ConvertAssemblyToNetModuleCommand(ILSpyTreeNode[] nodes)
 {
     this.nodes = nodes.Select(n => (AssemblyTreeNode)n).ToArray();
 }
开发者ID:4058665,项目名称:dnSpy,代码行数:4,代码来源:ModuleCommands.cs

示例10: Execute

        internal static void Execute(ILSpyTreeNode[] nodes)
        {
            if (!CanExecute(nodes))
                return;

            if (!Method.DeleteMethodDefCommand.AskDeleteDef("field"))
                return;

            var fieldNodes = nodes.Select(a => (FieldTreeNode)a).ToArray();
            UndoCommandManager.Instance.Add(new DeleteFieldDefCommand(fieldNodes));
        }
开发者ID:damnya,项目名称:dnSpy,代码行数:11,代码来源:FieldDefCommands.cs


注:本文中的ICSharpCode.ILSpy.TreeNodes.ILSpyTreeNode.Select方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。