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


C# AssemblyList.GetAssemblies方法代码示例

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


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

示例1: MainWindow_Loaded

        void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            ILSpySettings spySettings = this.spySettings;
            this.spySettings = null;

            // Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff.
            // This makes the UI come up a bit faster.
            this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList);

            ShowAssemblyList(this.assemblyList);

            string[] args = Environment.GetCommandLineArgs();
            for (int i = 1; i < args.Length; i++) {
                assemblyList.OpenAssembly(args[i]);
            }
            if (assemblyList.GetAssemblies().Length == 0)
                LoadInitialAssemblies();

            SharpTreeNode node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true);
            if (node != null) {
                SelectNode(node);

                // only if not showing the about page, perform the update check:
                ShowMessageIfUpdatesAvailableAsync(spySettings);
            } else {
                AboutPage.Display(decompilerTextView);
            }
        }
开发者ID:FriedWishes,项目名称:ILSpy,代码行数:28,代码来源:MainWindow.xaml.cs

示例2: MainWindow_Loaded

		void MainWindow_Loaded(object sender, RoutedEventArgs e)
		{
			ILSpySettings spySettings = this.spySettings;
			this.spySettings = null;
			
			// Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff.
			// This makes the UI come up a bit faster.
			this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList);
			
			HandleCommandLineArguments(App.CommandLineArguments);
			
			if (assemblyList.GetAssemblies().Length == 0
				&& assemblyList.ListName == AssemblyListManager.DefaultListName)
			{
				LoadInitialAssemblies();
			}
			
			ShowAssemblyList(this.assemblyList);
			
			HandleCommandLineArgumentsAfterShowList(App.CommandLineArguments);
			if (App.CommandLineArguments.NavigateTo == null && App.CommandLineArguments.AssembliesToLoad.Count != 1) {
				SharpTreeNode node = null;
				if (sessionSettings.ActiveTreeViewPath != null) {
					node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true);
					if (node == this.assemblyListTreeNode & sessionSettings.ActiveAutoLoadedAssembly != null) {
						this.assemblyList.OpenAssembly(sessionSettings.ActiveAutoLoadedAssembly, true);
						node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true);
					}
				}
				if (node != null) {
					SelectNode(node);
					
					// only if not showing the about page, perform the update check:
					ShowMessageIfUpdatesAvailableAsync(spySettings);
				} else {
					AboutPage.Display(decompilerTextView);
				}
			}
			
			AvalonEditTextOutput output = new AvalonEditTextOutput();
			if (FormatExceptions(App.StartupExceptions.ToArray(), output))
				decompilerTextView.ShowText(output);
		}
开发者ID:buraksarica,项目名称:ILSpy,代码行数:43,代码来源:MainWindow.xaml.cs

示例3: MainWindow_Loaded

		void MainWindow_Loaded(object sender, RoutedEventArgs e)
		{
		    this.Opacity = 0;

			ILSpySettings spySettings = this.spySettings;
			this.spySettings = null;
			
			// Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff.
			// This makes the UI come up a bit faster.
			this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList);
			
			HandleCommandLineArguments(App.CommandLineArguments);
			
			if (assemblyList.GetAssemblies().Length == 0
			    && assemblyList.ListName == AssemblyListManager.DefaultListName)
			{
				LoadInitialAssemblies();
			}
			
			ShowAssemblyList(this.assemblyList);
			
			HandleCommandLineArgumentsAfterShowList(App.CommandLineArguments);
			
			if (App.CommandLineArguments.NavigateTo == null) {
				SharpTreeNode node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true);
				if (node != null) {
					SelectNode(node);
					
					// only if not showing the about page, perform the update check:
					ShowMessageIfUpdatesAvailableAsync(spySettings);
				} else {
					AboutPage.Display(decompilerTextView);
				}
			}

		    searchBox.DataContext = SearchPane.Instance;

            // setting the opacity to 0 and then using this code to set it back to 1 is kind of a hack to get 
            // around a problem where the window doesn't render properly when using the shell integration library
            // but it works, and it looks nice
		    Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => this.Opacity = 1));
		}
开发者ID:cohenw,项目名称:ILSpy,代码行数:42,代码来源:MainWindow.xaml.cs

示例4: ShowAssemblyList

		void ShowAssemblyList(AssemblyList assemblyList)
		{
			history.Clear();
			this.assemblyList = assemblyList;

			if (assemblyList.GetAssemblies().Length == 0
			    && assemblyList.ListName == AssemblyListManager.DefaultListName)
			{
				LoadInitialAssemblies();
			}

			assemblyList.assemblies.CollectionChanged += assemblyList_Assemblies_CollectionChanged;
			
			assemblyListTreeNode = new AssemblyListTreeNode(assemblyList);
			assemblyListTreeNode.FilterSettings = sessionSettings.FilterSettings.Clone();
			assemblyListTreeNode.Select = SelectNode;
			treeView.Root = assemblyListTreeNode;
			
			if (assemblyList.ListName == AssemblyListManager.DefaultListName)
				this.Title = "ILSpy";
			else
				this.Title = "ILSpy - " + assemblyList.ListName;
		}
开发者ID:x-strong,项目名称:ILSpy,代码行数:23,代码来源:MainWindow.xaml.cs

示例5: MainWindow_Loaded

		void MainWindow_Loaded(object sender, RoutedEventArgs e)
		{
			ILSpySettings spySettings = this.spySettings;
			this.spySettings = null;
			
			// Load AssemblyList only in Loaded event so that WPF is initialized before we start the CPU-heavy stuff.
			// This makes the UI come up a bit faster.
			this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList);
			
			HandleCommandLineArguments(App.CommandLineArguments);
			
			if (assemblyList.GetAssemblies().Length == 0
			    && assemblyList.ListName == AssemblyListManager.DefaultListName)
			{
				LoadInitialAssemblies();
			}
			
			ShowAssemblyList(this.assemblyList);
			
			HandleCommandLineArgumentsAfterShowList(App.CommandLineArguments);
			
			if (App.CommandLineArguments.NavigateTo == null) {
				SharpTreeNode node = FindNodeByPath(sessionSettings.ActiveTreeViewPath, true);
				if (node != null) {
					SelectNode(node);
					
					// only if not showing the about page, perform the update check:
					ShowMessageIfUpdatesAvailableAsync(spySettings);
				} else {
					AboutPage.Display(decompilerTextView);
				}
			}

            //Fires the OnLoaded notification to the plugins
            foreach (var x in applicationLifeCycleInterceptors)
                x.Value.OnLoaded();
		}
开发者ID:95ulisse,项目名称:ILEdit,代码行数:37,代码来源:MainWindow.xaml.cs

示例6: LoadingHandler

        void LoadingHandler(int i)
        {
            switch (i) {
            case 0:
                this.CommandBindings.Add(new CommandBinding(ILSpyTreeNode.TreeNodeActivatedEvent, TreeNodeActivatedExecuted));

                ContextMenuProvider.Add(treeView);

                ILSpySettings spySettings = this.spySettings;
                this.spySettings = null;

                this.assemblyList = assemblyListManager.LoadList(spySettings, sessionSettings.ActiveAssemblyList);
                break;

            case 1:
                HandleCommandLineArguments(App.CommandLineArguments);

                if (assemblyList.GetAssemblies().Length == 0
                    && assemblyList.ListName == AssemblyListManager.DefaultListName) {
                    LoadInitialAssemblies();
                }

                ShowAssemblyListDontAskUser(this.assemblyList);
                break;

            case 2:
                HandleCommandLineArgumentsAfterShowList(App.CommandLineArguments);
                if (App.CommandLineArguments.NavigateTo == null && App.CommandLineArguments.AssembliesToLoad.Count != 1) {
                    if (ICSharpCode.ILSpy.Options.DisplaySettingsPanel.CurrentDisplaySettings.RestoreTabsAtStartup) {
                        RestoreTabGroups(sessionSettings.SavedTabGroupsState);
                        if (!sessionSettings.TabsFound)
                            AboutPage.Display(SafeActiveTextView);
                    }
                    else {
                        AboutPage.Display(SafeActiveTextView);
                    }
                }
                break;

            case 3:
                AvalonEditTextOutput output = new AvalonEditTextOutput();
                if (FormatExceptions(App.StartupExceptions.ToArray(), output))
                    SafeActiveTextView.ShowText(output);

                if (topPane.Content == null) {
                    var pane = GetPane(topPane, sessionSettings.TopPaneSettings.Name);
                    if (pane != null)
                        ShowInTopPane(pane.PaneTitle, pane);
                }
                if (bottomPane.Content == null) {
                    var pane = GetPane(bottomPane, sessionSettings.BottomPaneSettings.Name);
                    if (pane != null)
                        ShowInBottomPane(pane.PaneTitle, pane);
                }
                break;

            case 4:
                foreach (var plugin in plugins)
                    plugin.OnLoaded();

                var list = callWhenLoaded;
                callWhenLoaded = null;
                foreach (var func in list)
                    func();

                break;

            case 5:
                this.IsEnabled = true;

                // Make sure that when no tabs are created that we have focus. If we don't do this we
                // can't press Ctrl+K and open the asm search.
                this.Focus();

                // Sometimes we get keyboard focus when it's better that the text editor gets the focus instead
                this.GotKeyboardFocus += MainWindow_GotKeyboardFocus;

                loadingControl.Visibility = Visibility.Collapsed;
                mainGrid.Visibility = Visibility.Visible;

                // In case a plugin has added their own bindings
                UninstallTabCommandBindings(ActiveTabState);
                InstallTabCommandBindings(ActiveTabState);

                // Flickering workaround fix. Could reproduce it when using VMWare + WinXP
                loadingProgressBar.IsIndeterminate = false;
                return;
            default:
                return;
            }
            StartLoadingHandler(i + 1);
        }
开发者ID:DeepSkyFire,项目名称:dnSpy,代码行数:92,代码来源:MainWindow.xaml.cs

示例7: Main


//.........这里部分代码省略.........

			foreach (var dllfile in dllFileInfoList)
			{
				bool bDecompile = isDecompilingFile (dllfile.FullName, onlyDecompilingFileNameList);
				asmlist.OpenAssembly (dllfile.FullName,!bDecompile);
			}

			foreach (var dllfile in exeFileInfoList)
			{
				bool bDecompile = isDecompilingFile (dllfile.FullName, onlyDecompilingFileNameList);

				asmlist.OpenAssembly (dllfile.FullName,!bDecompile);
			}


			if (libPath != null) {
				di = new DirectoryInfo(libPath);
				libPath = di.FullName;
				dllFileInfoList = di.GetFiles("*.dll");
				foreach (var dllfile in dllFileInfoList) {
					asmlist.OpenAssembly (dllfile.FullName,true);
				}
			}
			


			StringBuilder projSln = new StringBuilder ();
			projSln.Append ("Microsoft Visual Studio Solution File, Format Version 11.00\n# Visual Studio 2010\n");

			StringBuilder globSec = new StringBuilder ();
			Guid slnProjGuid =  Guid.NewGuid();

			int num = 0;
			LoadedAssembly [] ls = asmlist.GetAssemblies ();
			var decompilationOptions = new DecompilationOptions ();
			decompilationOptions.FullDecompilation = true;
			decompilationOptions.assenmlyList = asmlist;
			decompilationOptions.DecompilerSettings = ds;
			decompilationOptions.IncludedClassName = onlyDecomileClassName;

			if(outLanguageType==LAN_TYPE_CSHARP)
			{
				foreach (LoadedAssembly asm in ls) {
					if (asm.IsAutoLoaded)
						continue;




					string projectPath = appPath + "/"+ asm.ShortName;
					if(!Directory.Exists(projectPath))
					{
						Directory.CreateDirectory (projectPath);
					}
					string projectFileName = projectPath + "/" + asm.ShortName + ".csproj";
					asm.ProjectGuid = Guid.NewGuid();
					asm.ProjectFileName = projectFileName;
				}
			}



			foreach (LoadedAssembly asm in ls) {
				num++;
				Console.WriteLine(asm.FileName + " " + num+"/"+ls.Length);
				if (asm.IsAutoLoaded)
开发者ID:aerror2,项目名称:ILSpy-For-MacOSX,代码行数:67,代码来源:Main.cs


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