-
-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISettingsEditorBase would be a binary breaking change for ISettingsEd…
…itor implementations
- Loading branch information
Showing
6 changed files
with
44 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
namespace Gemini.Modules.Settings | ||
{ | ||
public interface ISettingsEditor : ISettingsEditorBase | ||
public interface ISettingsEditor | ||
{ | ||
string SettingsPageName { get; } | ||
string SettingsPagePath { get; } | ||
|
||
void ApplyChanges(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
src/Gemini/Modules/Settings/ViewModels/SettingsEditorWrapper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Threading.Tasks; | ||
|
||
namespace Gemini.Modules.Settings.ViewModels | ||
{ | ||
internal sealed class SettingsEditorWrapper : ISettingsEditorAsync | ||
{ | ||
private readonly ISettingsEditor _editor; | ||
|
||
public SettingsEditorWrapper(ISettingsEditor editor) | ||
{ | ||
_editor = editor; | ||
} | ||
|
||
public string SettingsPageName => _editor.SettingsPageName; | ||
|
||
public string SettingsPagePath => _editor.SettingsPagePath; | ||
|
||
public ISettingsEditor ViewModel => _editor; | ||
|
||
public Task ApplyChangesAsync() | ||
{ | ||
_editor.ApplyChanges(); | ||
return Task.CompletedTask; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters