public MainWindow() { var a1 = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(a => a.DefinedTypes.Where(t => t.Name == "DefaultAnalyzerAssemblyLoader")); if (a1.Any()) { foreach (var typeInfo in a1) { Debug.WriteLine(typeInfo.ToString()); Debug.WriteLine(typeInfo.Assembly.ToString()); var loader = Activator.CreateInstance(typeInfo); AnalyzerLoader = (IAnalyzerAssemblyLoader)loader; // foreach (var constructorInfo in typeInfo.GetConstructors()) // { // Debug.WriteLine(constructorInfo.GetParameters().Length); // } break; } } ViewModel = new AppViewModel(); Diagnostics = _diagnosticsList; var tmp = Path.GetTempFileName(); File.Delete(tmp); Directory.CreateDirectory(tmp); WorkDir = tmp; AnalyzersDir = Path.Combine(WorkDir, "analyzers"); Directory.CreateDirectory(AnalyzersDir); Debug.WriteLine($"Analyzers dir is {AnalyzersDir}"); InitializeComponent(); CoerceValue(FontsProperty); Loaded += OnLoaded; // LoadAnalyzers(@"C:\temp\roslyn.analyzers.dll"); CommandBindings.Add(new CommandBinding(HideToolBar, OnExecutedHideToolBar)); }
protected virtual void OnViewModelChanged(AppViewModel oldValue, AppViewModel newValue) { }