-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from r-koubou/refactor/usecase_dump
Refactor/usecase dump
- Loading branch information
Showing
17 changed files
with
146 additions
and
161 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
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
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
28 changes: 0 additions & 28 deletions
28
...anager/Sources/Runtime/Applications/Standalone.Core/Controllers/Dump/DumpFilePresenter.cs
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
KeySwitchManager/Sources/Runtime/Applications/Standalone.Core/Presenters/DumpPresenter.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,42 @@ | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
using KeySwitchManager.Applications.Standalone.Core.Views.LogView; | ||
using KeySwitchManager.UseCase.KeySwitches.Delete; | ||
using KeySwitchManager.UseCase.KeySwitches.Dump; | ||
|
||
namespace KeySwitchManager.Applications.Standalone.Core.Presenters | ||
{ | ||
public sealed class DumpPresenter : IDumpPresenter | ||
{ | ||
public static readonly IDeletePresenter Null = new NullImpl(); | ||
|
||
private ILogTextView TextView { get; } | ||
|
||
public DumpPresenter( ILogTextView textView ) | ||
{ | ||
TextView = textView; | ||
} | ||
|
||
public async Task HandleAsync( DumpOutputData outputData, CancellationToken cancellationToken = default ) | ||
{ | ||
TextView.Append( $"{outputData.Value.DumpDataCount} record(s) dumped" ); | ||
await Task.CompletedTask; | ||
} | ||
|
||
#region NullObject | ||
private class NullImpl : IDeletePresenter | ||
{ | ||
public async Task HandleDeleteBeginAsync( DeleteInputData inputData, CancellationToken cancellationToken = default ) | ||
{ | ||
await Task.CompletedTask; | ||
} | ||
|
||
public async Task HandleAsync( DeleteOutputData outputData, CancellationToken cancellationToken = default ) | ||
{ | ||
await Task.CompletedTask; | ||
} | ||
} | ||
#endregion | ||
} | ||
} |
75 changes: 19 additions & 56 deletions
75
...Runtime/Applications/Xamarin.Mac/.idea/.idea.Applications.Xamarin.Mac/.idea/workspace.xml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.