Skip to content

Commit 9ef521d

Browse files
committed
transitive propagation of UI thread requirements
1 parent a1f6fa1 commit 9ef521d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

SharedProject/Options/AppOptionsProvider.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public void RaiseOptionsChanged(IAppOptions appOptions)
3131
public IAppOptions Get()
3232
{
3333
var options = new AppOptions(true);
34+
ThreadHelper.ThrowIfNotOnUIThread();
3435
LoadSettingsFromStorage(options);
3536
return options;
3637
}
@@ -55,6 +56,7 @@ private PropertyInfo[] ReflectProperties()
5556

5657
public void LoadSettingsFromStorage(AppOptions instance)
5758
{
59+
ThreadHelper.ThrowIfNotOnUIThread();
5860
var settingsStore = EnsureStore();
5961

6062

@@ -87,6 +89,7 @@ public void LoadSettingsFromStorage(AppOptions instance)
8789

8890
public void SaveSettingsToStorage(AppOptions appOptions)
8991
{
92+
ThreadHelper.ThrowIfNotOnUIThread();
9093
var settingsStore = EnsureStore();
9194

9295
foreach (var property in ReflectProperties())

0 commit comments

Comments
 (0)