Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1e76cb9

Browse files
majochaKevinRansom
authored andcommitted
fix options regression (dotnet#5863)
1 parent1463066 commit1e76cb9

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

‎vsintegration/src/FSharp.Editor/Options/SettingsPersistence.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ type SettingsStore(serviceProvider: IServiceProvider) =
4848
settingsManager.SetValueAsync(settings.GetType()|> storageKey, JsonConvert.SerializeObject settings,false)
4949
|> Async.AwaitTask|> Async.StartImmediate
5050

51-
member__.Register defaultSettings=
51+
member__.Register(defaultSettings:'options)=
5252
defaultSettings|> updateFromStore|> write
5353
letsubset= defaultSettings.GetType()|> storageKey|> settingsManager.GetSubset
5454

5555
PropertyChangedAsyncEventHandler(fun _ _->
56-
read()|> updateFromStore|> write
56+
(read():'options)|> updateFromStore|> write
5757
System.Threading.Tasks.Task.CompletedTask)
5858
|> subset.add_SettingChangedAsync
5959

‎vsintegration/src/FSharp.Editor/Options/UIHelpers.fs‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ open Microsoft.VisualStudio.ComponentModelHost
1010
moduleinternalOptionsUIHelpers=
1111

1212
[<AbstractClass>]
13-
typeAbstractOptionPage<'t>()as this=
13+
typeAbstractOptionPage<'options>()as this=
1414
inherit UIElementDialogPage()
1515

1616
letview=lazy this.CreateView()
@@ -26,20 +26,10 @@ module internal OptionsUIHelpers =
2626
overridethis.Child=upcast view.Value
2727

2828
overridethis.SaveSettingsToStorage()=
29-
this.GetResult()|> optionService.Value.Write
29+
downcast view.Value.DataContext|> optionService.Value.Write<'options>
3030

3131
overridethis.LoadSettingsFromStorage()=
32-
optionService.Value.Read()|> this.SetViewModel
33-
34-
//Override this method when using immutable settings type
35-
member__.SetViewModel(settings:'t)=
36-
// in case settings are a CLIMutable record
37-
view.Value.DataContext<-null
38-
view.Value.DataContext<- settings
39-
40-
//Override this method when using immutable settings type
41-
member__.GetResult():'t=
42-
downcast view.Value.DataContext
32+
view.Value.DataContext<- optionService.Value.Read<'options>()
4333

4434
//data binding helpers
4535
letradioButtonCoverter=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp