コード例 #1
0
ファイル: AnalyzePhase.cs プロジェクト: EmilZhou/ConfuserEx
		void RegisterRenamers(ConfuserContext context, NameService service) {
			bool wpf = false,
			     caliburn = false,
			     winforms = false;

			foreach (var module in context.Modules)
				foreach (var asmRef in module.GetAssemblyRefs()) {
					if (asmRef.Name == "WindowsBase" || asmRef.Name == "PresentationCore" ||
					    asmRef.Name == "PresentationFramework" || asmRef.Name == "System.Xaml") {
						wpf = true;
					}
					else if (asmRef.Name == "Caliburn.Micro") {
						caliburn = true;
					}
					else if (asmRef.Name == "System.Windows.Forms") {
						winforms = true;
					}
				}

			if (wpf) {
				var wpfAnalyzer = new WPFAnalyzer();
				context.Logger.Debug("WPF found, enabling compatibility.");
				service.Renamers.Add(wpfAnalyzer);
				if (caliburn) {
					context.Logger.Debug("Caliburn.Micro found, enabling compatibility.");
					service.Renamers.Add(new CaliburnAnalyzer(wpfAnalyzer));
				}
			}

			if (winforms) {
				var winformsAnalyzer = new WinFormsAnalyzer();
				context.Logger.Debug("WinForms found, enabling compatibility.");
				service.Renamers.Add(winformsAnalyzer);
			}
		}
コード例 #2
0
 public CaliburnAnalyzer(WPFAnalyzer wpfAnalyzer)
 {
     wpfAnalyzer.AnalyzeBAMLElement += AnalyzeBAMLElement;
 }
コード例 #3
0
 public CaliburnAnalyzer(WPFAnalyzer wpfAnalyzer)
 {
     wpfAnalyzer.AnalyzeBAMLElement += AnalyzeBAMLElement;
 }
コード例 #4
0
 // Token: 0x06000012 RID: 18 RVA: 0x000028A1 File Offset: 0x00000AA1
 public CaliburnAnalyzer(WPFAnalyzer wpfAnalyzer)
 {
     wpfAnalyzer.AnalyzeBAMLElement += new Action <BAMLAnalyzer, BamlElement>(this.AnalyzeBAMLElement);
 }