Skip to content

Commit

Permalink
誤字修正
Browse files Browse the repository at this point in the history
  • Loading branch information
miyaji255 committed Apr 30, 2024
1 parent 5efa7ea commit c42d74d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion KoeBook.Core/Contracts/Services/IStoryCreatorService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace KoeBook.Core.Contracts.Services;

public interface IStoryCreaterService
public interface IStoryCreatorService
{
/// <returns>XML</returns>
public ValueTask<string> CreateStoryAsync(StoryGenre genre, string instruction, CancellationToken cancellationToken);
Expand Down
2 changes: 1 addition & 1 deletion KoeBook/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public App()
if (mockOptions.ISoundGenerationService.HasValue && mockOptions.ISoundGenerationService.Value)
services.AddSingleton<ISoundGenerationService, SoundGenerationServiceMock>();
if (mockOptions.IStoryCreaterService.HasValue && mockOptions.IStoryCreaterService.Value)
services.AddSingleton<IStoryCreaterService, StoryCreaterServiceMock>();
services.AddSingleton<IStoryCreatorService, StoryCreatorServiceMock>();
})
.Build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace KoeBook.Services.CoreMocks
{
public class StoryCreaterServiceMock : IStoryCreaterService
public class StoryCreatorServiceMock : IStoryCreatorService
{
public ValueTask<string> CreateStoryAsync(StoryGenre genre, string instruction, CancellationToken cancellationToken)
{
Expand Down
8 changes: 4 additions & 4 deletions KoeBook/ViewModels/CreateStoryViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public sealed partial class CreateStoryViewModel : ObservableObject
{
private readonly IGenerationTaskService _generationTaskService;
private readonly IDialogService _dialogService;
private readonly IStoryCreaterService _storyCreaterService;
private readonly IStoryCreatorService _storyCreatorService;

public ImmutableArray<StoryGenre> Genres { get; } = [
new("青春小説", "学校生活、友情、恋愛など、若者の成長物語"),
Expand Down Expand Up @@ -41,20 +41,20 @@ public sealed partial class CreateStoryViewModel : ObservableObject

public string AiStoryTitle => AiStory?.Title ?? "";

public CreateStoryViewModel(IGenerationTaskService generationTaskService, IDialogService dialogService, IStoryCreaterService storyCreaterService)
public CreateStoryViewModel(IGenerationTaskService generationTaskService, IDialogService dialogService, IStoryCreatorService storyCreatorService)
{
_selectedGenre = Genres[0];
_generationTaskService = generationTaskService;
_dialogService = dialogService;
_storyCreaterService = storyCreaterService;
_storyCreatorService = storyCreatorService;
}

public bool CanCreateStory => !string.IsNullOrWhiteSpace(Instruction);

[RelayCommand(CanExecute = nameof(CanCreateStory))]
private async Task OnCreateStoryAsync(CancellationToken cancellationToken)
{
using var sr = new StringReader(await _storyCreaterService.CreateStoryAsync(SelectedGenre, Instruction, cancellationToken));
using var sr = new StringReader(await _storyCreatorService.CreateStoryAsync(SelectedGenre, Instruction, cancellationToken));
var serializer = new XmlSerializer(typeof(AiStory));
try
{
Expand Down

0 comments on commit c42d74d

Please sign in to comment.