mirror of https://github.com/icsharpcode/ILSpy.git
				
				
			
			You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							28 lines
						
					
					
						
							792 B
						
					
					
				
			
		
		
	
	
							28 lines
						
					
					
						
							792 B
						
					
					
				using System; | 
						|
using System.Linq; | 
						|
 | 
						|
namespace ICSharpCode.ILSpy.AddIn.Commands | 
						|
{ | 
						|
	class OpenProjectOutputCommand : ILSpyCommand | 
						|
	{ | 
						|
		static OpenProjectOutputCommand instance; | 
						|
 | 
						|
		public OpenProjectOutputCommand(ILSpyAddInPackage owner) | 
						|
			: base(owner, PkgCmdIDList.cmdidOpenProjectOutputInILSpy) | 
						|
		{ | 
						|
		} | 
						|
 | 
						|
		protected override void OnExecute(object sender, EventArgs e) | 
						|
		{ | 
						|
			if (owner.DTE.SelectedItems.Count != 1) return; | 
						|
			var project = owner.DTE.SelectedItems.Item(1).Project; | 
						|
			var roslynProject = owner.Workspace.CurrentSolution.Projects.FirstOrDefault(p => p.FilePath == project.FileName); | 
						|
			OpenAssembliesInILSpy(new[] { roslynProject.OutputFilePath }); | 
						|
		} | 
						|
 | 
						|
		internal static void Register(ILSpyAddInPackage owner) | 
						|
		{ | 
						|
			instance = new OpenProjectOutputCommand(owner); | 
						|
		} | 
						|
	} | 
						|
}
 | 
						|
 |