protected override void Initialize() { _dte = GetService(typeof(DTE)) as DTE2; Package = this; Logger.Initialize(this, Constants.VSIX_NAME); Events2 events = (Events2)_dte.Events; _solutionEvents = events.SolutionEvents; _solutionEvents.AfterClosing += () => { TableDataSource.Instance.CleanAllErrors(); }; _solutionEvents.ProjectRemoved += (project) => { TableDataSource.Instance.CleanAllErrors(); }; _buildEvents = events.BuildEvents; _buildEvents.OnBuildBegin += OnBuildBegin; CreateConfig.Initialize(this); Recompile.Initialize(this); CompileOnBuild.Initialize(this); RemoveConfig.Initialize(this); CompileAllFiles.Initialize(this); CleanOutputFiles.Initialize(this); base.Initialize(); }
protected override async System.Threading.Tasks.Task InitializeAsync(CancellationToken cancellationToken, IProgress <ServiceProgressData> progress) { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); _dte = GetService(typeof(DTE)) as DTE2; Package = this; Logger.Initialize(this, Constants.VSIX_NAME); Events2 events = (Events2)_dte.Events; _solutionEvents = events.SolutionEvents; _solutionEvents.AfterClosing += () => { TableDataSource.Instance.CleanAllErrors(); }; _solutionEvents.ProjectRemoved += (project) => { TableDataSource.Instance.CleanAllErrors(); }; _buildEvents = events.BuildEvents; _buildEvents.OnBuildBegin += OnBuildBegin; CreateConfig.Initialize(this); Recompile.Initialize(this); CompileOnBuild.Initialize(this); RemoveConfig.Initialize(this); CompileAllFiles.Initialize(this); CleanOutputFiles.Initialize(this); }
static void Main(string[] args) { libDados.NORTHEntities ct = new libDados.NORTHEntities(); var res = (from x in ct.Customers.Include(x => x.Orders) select x); var res2 = res.ToList(); using (var rp = new ReadPast()) using (var rr = new RepeatableRead()) using (var r = new Recompile()) { var res3 = res.ToList(); } using (var rp = new ReadPast() { TableName = "Orders" }) using (var rr = new RepeatableRead() { TableName = "Customers" }) using (var r = new Recompile()) { var res4 = res.ToList(); } using (var rp = new ReadPast()) using (var rr = new RepeatableRead() { TableName = "Customers" }) using (var r = new Recompile()) { var res5 = res.ToList(); } using (var ofu = new Optimize_For_Unknown()) { var res6 = res.ToList(); } }
protected override void Initialize() { Logger.Initialize(this, Constants.VSIX_NAME); _dte = GetService(typeof(DTE)) as DTE2; _dispatcher = Dispatcher.CurrentDispatcher; Package = this; Events2 events = _dte.Events as Events2; _events = events.SolutionEvents; _events.AfterClosing += () => { ErrorList.CleanAllErrors(); }; _events.ProjectRemoved += (project) => { ErrorList.CleanAllErrors(); }; CreateConfig.Initialize(this); Recompile.Initialize(this); CompileOnBuild.Initialize(this); RemoveConfig.Initialize(this); CompileAllFiles.Initialize(this); base.Initialize(); }