public async Task DirtyState() { var control = new SettingsPageControl(_csp, _appShell, _fs); int count = 0; control.DirtyStateChanged += (s, e) => { count++; }; control.IsDirty = true; control.IsDirty.Should().BeTrue(); count.Should().Be(1); await control.SetProjectAsync(_unconfiguredProject, _properties); (await control.SaveSettingsAsync()).Should().BeTrue(); control.IsDirty.Should().BeFalse(); }
protected override async Task <int> OnApply() { return(await _control.SaveSettingsAsync() ? VSConstants.S_OK : VSConstants.E_FAIL); }