• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ILSpy.ILSpySettings类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ILSpySettings类属于ICSharpCode.ILSpy命名空间,在下文中一共展示了ILSpySettings类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: MainWindow

		public MainWindow()
		{
			instance = this;
			spySettings = ILSpySettings.Load();
			this.sessionSettings = new SessionSettings(spySettings);
			this.assemblyListManager = new AssemblyListManager(spySettings);
			
			if (Environment.OSVersion.Version.Major >= 6)
				this.Icon = new BitmapImage(new Uri("pack://application:,,,/ILSpy;component/images/ILSpy.ico"));
			else
				this.Icon = Images.AssemblyLoading;
			
			this.DataContext = sessionSettings;
			this.Left = sessionSettings.WindowBounds.Left;
			this.Top = sessionSettings.WindowBounds.Top;
			this.Width = sessionSettings.WindowBounds.Width;
			this.Height = sessionSettings.WindowBounds.Height;
			// TODO: validate bounds (maybe a monitor was removed...)
			this.WindowState = sessionSettings.WindowState;
			
			InitializeComponent();
			decompilerTextView.mainWindow = this;
			
			if (sessionSettings.SplitterPosition > 0 && sessionSettings.SplitterPosition < 1) {
				leftColumn.Width = new GridLength(sessionSettings.SplitterPosition, GridUnitType.Star);
				rightColumn.Width = new GridLength(1 - sessionSettings.SplitterPosition, GridUnitType.Star);
			}
			sessionSettings.FilterSettings.PropertyChanged += filterSettings_PropertyChanged;
			
			this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
		}
开发者ID:stgwilli,项目名称:ILSpy,代码行数:31,代码来源:MainWindow.xaml.cs


示例2: CheckForUpdatesIfEnabledAsync

 /// <summary>
 /// If automatic update checking is enabled, checks if there are any updates available.
 /// Returns the download URL if an update is available.
 /// Returns null if no update is available, or if no check was performed.
 /// </summary>
 public static Task<string> CheckForUpdatesIfEnabledAsync(ILSpySettings spySettings)
 {
     var tcs = new TaskCompletionSource<string>();
     UpdateSettings s = new UpdateSettings(spySettings);
     if (checkForUpdateCode && s.AutomaticUpdateCheckEnabled) {
         // perform update check if we never did one before;
         // or if the last check wasn't in the past 7 days
         if (s.LastSuccessfulUpdateCheck == null
             || s.LastSuccessfulUpdateCheck < DateTime.UtcNow.AddDays(-7)
             || s.LastSuccessfulUpdateCheck > DateTime.UtcNow)
         {
             GetLatestVersionAsync().ContinueWith(
                 delegate (Task<AvailableVersionInfo> task) {
                     try {
                         s.LastSuccessfulUpdateCheck = DateTime.UtcNow;
                         AvailableVersionInfo v = task.Result;
                         if (v.Version > currentVersion)
                             tcs.SetResult(v.DownloadUrl);
                         else
                             tcs.SetResult(null);
                     } catch (AggregateException) {
                         // ignore errors getting the version info
                         tcs.SetResult(null);
                     }
                 });
         } else {
             tcs.SetResult(null);
         }
     } else {
         tcs.SetResult(null);
     }
     return tcs.Task;
 }
开发者ID:4058665,项目名称:dnSpy,代码行数:38,代码来源:AboutPage.cs


示例3: MainWindow

		public MainWindow()
		{
			instance = this;
			spySettings = ILSpySettings.Load();
			this.sessionSettings = new SessionSettings(spySettings);
			this.assemblyListManager = new AssemblyListManager(spySettings);
			
			this.Icon = new BitmapImage(new Uri("pack://application:,,,/ILSpy;component/images/ILSpy.ico"));
			
			this.DataContext = sessionSettings;
			
			InitializeComponent();
			App.CompositionContainer.ComposeParts(this);
			mainPane.Content = decompilerTextView;
			
			if (sessionSettings.SplitterPosition > 0 && sessionSettings.SplitterPosition < 1) {
				leftColumn.Width = new GridLength(sessionSettings.SplitterPosition, GridUnitType.Star);
				rightColumn.Width = new GridLength(1 - sessionSettings.SplitterPosition, GridUnitType.Star);
			}
			sessionSettings.FilterSettings.PropertyChanged += filterSettings_PropertyChanged;
			
			InitMainMenu();
			InitToolbar();
			ContextMenuProvider.Add(treeView, decompilerTextView);
			
			this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
		}
开发者ID:buraksarica,项目名称:ILSpy,代码行数:27,代码来源:MainWindow.xaml.cs


示例4: LoadList

		/// <summary>
		/// Loads an assembly list from the ILSpySettings.
		/// If no list with the specified name is found, the default list is loaded instead.
		/// </summary>
		public AssemblyList LoadList(ILSpySettings spySettings, string listName)
		{
			AssemblyList list = DoLoadList(spySettings, listName);
			if (!AssemblyLists.Contains(list.ListName))
				AssemblyLists.Add(list.ListName);
			return list;
		}
开发者ID:nakijun,项目名称:dnSpy,代码行数:11,代码来源:AssemblyListManager.cs


示例5: AssemblyListManager

		public AssemblyListManager(ILSpySettings spySettings)
		{
			XElement doc = spySettings["AssemblyLists"];
			foreach (var list in doc.Elements("List")) {
				AssemblyLists.Add(SessionSettings.Unescape((string)list.Attribute("name")));
			}
		}
开发者ID:nakijun,项目名称:dnSpy,代码行数:7,代码来源:AssemblyListManager.cs


示例6: CheckForUpdatesAsync

 public static Task<string> CheckForUpdatesAsync(ILSpySettings spySettings)
 {
     var tcs = new TaskCompletionSource<string>();
     UpdateSettings s = new UpdateSettings(spySettings);
     CheckForUpdateInternal(tcs, s);
     return tcs.Task;
 }
开发者ID:FaceHunter,项目名称:ILSpy,代码行数:7,代码来源:AboutPage.cs


示例7: MainWindow

        public MainWindow()
        {
            spySettings = ILSpySettings.Load();
            this.sessionSettings = new SessionSettings(spySettings);
            this.assemblyListManager = new AssemblyListManager(spySettings);

            this.DataContext = sessionSettings;
            this.Left = sessionSettings.WindowBounds.Left;
            this.Top = sessionSettings.WindowBounds.Top;
            this.Width = sessionSettings.WindowBounds.Width;
            this.Height = sessionSettings.WindowBounds.Height;
            // TODO: validate bounds (maybe a monitor was removed...)
            this.WindowState = sessionSettings.WindowState;

            InitializeComponent();
            decompilerTextView.mainWindow = this;

            if (sessionSettings.SplitterPosition > 0 && sessionSettings.SplitterPosition < 1) {
                leftColumn.Width = new GridLength(sessionSettings.SplitterPosition, GridUnitType.Star);
                rightColumn.Width = new GridLength(1 - sessionSettings.SplitterPosition, GridUnitType.Star);
            }
            sessionSettings.FilterSettings.PropertyChanged += filterSettings_PropertyChanged;

            #if DEBUG
            AddDebugItemsToToolbar();
            #endif
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
        }
开发者ID:FriedWishes,项目名称:ILSpy,代码行数:28,代码来源:MainWindow.xaml.cs


示例8: MainWindow

		public MainWindow()
		{
			instance = this;
			spySettings = ILSpySettings.Load();
			this.sessionSettings = new SessionSettings(spySettings);
			this.assemblyListManager = new AssemblyListManager(spySettings);
			
			this.Icon = new BitmapImage(new Uri("pack://application:,,,/ILSpy;component/images/ILSpy.ico"));
			
			this.DataContext = sessionSettings;
			this.Left = sessionSettings.WindowBounds.Left;
			this.Top = sessionSettings.WindowBounds.Top;
			this.Width = sessionSettings.WindowBounds.Width;
			this.Height = sessionSettings.WindowBounds.Height;
			// TODO: validate bounds (maybe a monitor was removed...)
			this.WindowState = sessionSettings.WindowState;
			
			InitializeComponent();
			App.CompositionContainer.ComposeParts(this);
			Grid.SetRow(decompilerTextView, 1);
			rightPane.Children.Add(decompilerTextView);
			
			if (sessionSettings.SplitterPosition > 0 && sessionSettings.SplitterPosition < 1) {
				leftColumn.Width = new GridLength(sessionSettings.SplitterPosition, GridUnitType.Star);
				rightColumn.Width = new GridLength(1 - sessionSettings.SplitterPosition, GridUnitType.Star);
			}
			sessionSettings.FilterSettings.PropertyChanged += filterSettings_PropertyChanged;
			
			InitMainMenu();
			InitToolbar();
			ContextMenuProvider.Add(treeView);
			ContextMenuProvider.Add(analyzerTree);
			
			this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
		}
开发者ID:ThomasZitzler,项目名称:ILSpy,代码行数:35,代码来源:MainWindow.xaml.cs


示例9: LoadDecompilerSettings

		public static DecompilerSettings LoadDecompilerSettings(ILSpySettings settings)
		{
			XElement e = settings["DecompilerSettings"];
			DecompilerSettings s = new DecompilerSettings();
			s.AnonymousMethods = (bool?)e.Attribute("anonymousMethods") ?? s.AnonymousMethods;
			s.YieldReturn = (bool?)e.Attribute("yieldReturn") ?? s.YieldReturn;
			return s;
		}
开发者ID:hlesesne,项目名称:ILSpy,代码行数:8,代码来源:DecompilerSettingsPanel.xaml.cs


示例10: LoadDecompilerSettings

		public static DecompilerSettings LoadDecompilerSettings(ILSpySettings settings)
		{
			XElement e = settings["DecompilerSettings"];
			DecompilerSettings s = new DecompilerSettings();
			s.AnonymousMethods = (bool?)e.Attribute("anonymousMethods") ?? s.AnonymousMethods;
			s.YieldReturn = (bool?)e.Attribute("yieldReturn") ?? s.YieldReturn;
			s.QueryExpressions = (bool?)e.Attribute("queryExpressions") ?? s.QueryExpressions;
			s.UseDebugSymbols = (bool?)e.Attribute("useDebugSymbols") ?? s.UseDebugSymbols;
			return s;
		}
开发者ID:tris2481,项目名称:ILSpy,代码行数:10,代码来源:DecompilerSettingsPanel.xaml.cs


示例11: Load

		public override void Load(ILSpySettings settings)
		{
			// For loading options, use ILSpySetting's indexer.
			// If the specified section does exist, the indexer will return a new empty element.
			XElement e = settings[ns + "CustomOptions"];
			// Now load the options from the XML document:
			Options s = new Options();
			s.UselessOption1 = (bool?)e.Attribute("useless1") ?? s.UselessOption1;
			s.UselessOption2 = (double?)e.Attribute("useless2") ?? s.UselessOption2;
			this.options = s;
		}
开发者ID:nakijun,项目名称:dnSpy,代码行数:11,代码来源:CustomOptionPage.cs


示例12: Load

        public void Load(ILSpySettings settings)
        {
            //Creates the viewmodel
            var vm = new ILEditOptionPageViewModel();

            //Initializes the viewmodel
            vm.Load();

            //Sets the data context
            this.DataContext = vm;
        }
开发者ID:95ulisse,项目名称:ILEdit,代码行数:11,代码来源:ILEditOptionPage.xaml.cs


示例13: LinqPadSpyContainer

        public LinqPadSpyContainer(Application currentApplication, Language decompiledLanguage)
        {
            if (currentApplication == null)
            {
                throw new ArgumentNullException("currentApplication");
            }
            if (decompiledLanguage == null)
            {
                throw new ArgumentNullException("decompiledLanguage");
            }

            this.decompiledLanguage = decompiledLanguage;

            this.currentApplication = currentApplication;

            // Initialize supported ILSpy languages. Values used for the combobox.
            Languages.Initialize(CompositionContainerBuilder.Container);

            this.CurrentAssemblyList = new AssemblyList("LINQPadAssemblyList", this.currentApplication);

            ICSharpCode.ILSpy.App.CompositionContainer = CompositionContainerBuilder.Container;

            CompositionContainerBuilder.Container.ComposeParts(this);

            // A hack to get around the global shared state of the Window object throughout ILSpy.
            ICSharpCode.ILSpy.MainWindow.SpyWindow = this;

            this.spySettings = ILSpySettings.Load();

            this.sessionSettings = new SessionSettings(this.spySettings)
            {
                ActiveAssemblyList = this.CurrentAssemblyList.ListName
            };

            SetUpDataContext();

            this.assemblyPath = LinqPadUtil.GetLastLinqPadQueryAssembly();

            this.decompilerTextView = GetDecompilerTextView();

            InitializeComponent();

            this.mainPane.Content = this.decompilerTextView;

            this.InitToolbar();

            this.Loaded += new RoutedEventHandler(this.MainWindowLoaded);
        }
开发者ID:modulexcite,项目名称:linqpadspy,代码行数:48,代码来源:LinqPadSpyContainer.xaml.cs


示例14: DoLoadList

		AssemblyList DoLoadList(ILSpySettings spySettings, string listName)
		{
			XElement doc = spySettings["AssemblyLists"];
			if (listName != null) {
				foreach (var list in doc.Elements("List")) {
					if (SessionSettings.Unescape((string)list.Attribute("name")) == listName) {
						return new AssemblyList(list);
					}
				}
			}
			XElement firstList = doc.Elements("List").FirstOrDefault();
			if (firstList != null)
				return new AssemblyList(firstList);
			else
				return new AssemblyList(listName ?? DefaultListName);
		}
开发者ID:nakijun,项目名称:dnSpy,代码行数:16,代码来源:AssemblyListManager.cs


示例15: Load

		public override void Load(ILSpySettings settings) {
			this.settings = DebuggerSettings.Instance.Clone();
			this.BreakProcessType = this.settings.BreakProcessType;
		}
开发者ID:nakijun,项目名称:dnSpy,代码行数:4,代码来源:DebuggerSettingsVM.cs


示例16: 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


示例17: 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


示例18: ShowMessageIfUpdatesAvailableAsync

 public void ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings, bool forceCheck = false)
 {
     Task<string> result;
     if (forceCheck) {
         result = AboutPage.CheckForUpdatesAsync(spySettings);
     } else {
         result = AboutPage.CheckForUpdatesIfEnabledAsync(spySettings);
     }
     result.ContinueWith(task => AdjustUpdateUIAfterCheck(task, forceCheck), TaskScheduler.FromCurrentSynchronizationContext());
 }
开发者ID:Zvirja,项目名称:ILSpy,代码行数:10,代码来源:MainWindow.xaml.cs


示例19: 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);
			
			ShowAssemblyList(this.assemblyList);
			
			HandleCommandLineArgumentsAfterShowList(App.CommandLineArguments);
			if (App.CommandLineArguments.NavigateTo == null && App.CommandLineArguments.AssembliesToLoad.Count != 1) {
				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);
				}
			}
			
			NavigationCommands.Search.InputGestures.Add(new KeyGesture(Key.E, ModifierKeys.Control));
			
			AvalonEditTextOutput output = new AvalonEditTextOutput();
			if (FormatExceptions(App.StartupExceptions.ToArray(), output))
				decompilerTextView.ShowText(output);
		}
开发者ID:x-strong,项目名称:ILSpy,代码行数:32,代码来源:MainWindow.xaml.cs


示例20: ShowMessageIfUpdatesAvailableAsync

		void ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings)
		{
			AboutPage.CheckForUpdatesIfEnabledAsync(spySettings).ContinueWith(
				delegate (Task<string> task) {
					if (task.Result != null) {
						updateAvailableDownloadUrl = task.Result;
						updateAvailablePanel.Visibility = Visibility.Visible;
					}
				},
				TaskScheduler.FromCurrentSynchronizationContext()
			);
		}
开发者ID:buraksarica,项目名称:ILSpy,代码行数:12,代码来源:MainWindow.xaml.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ILSpy.LoadedAssembly类代码示例发布时间:2022-05-26
下一篇:
C# ILSpy.DecompilationOptions类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap