Skip to content

Commit e81f123

Browse files
committed
fix compile errors
1 parent 22a9c27 commit e81f123

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

samples/ConsoleSample/Domain/AddItemService.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ public Task<IServiceResult> Invoke(IServiceHandlerContext context, AddItemServic
1515
var todoItem = Guid.NewGuid();
1616

1717
return Task.FromResult(
18-
Service
19-
.Ok()
18+
new Service()
2019
.Stage(
2120
todoItem,
2221
new CreateTodoItem("do a thing"))

samples/ConsoleSample/Domain/TodoItem/TodoItemAggregate.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ public class CreateTodoItemHandler : ICommandHandler<TodoItemAggregate, CreateTo
1717
{
1818
public ICommandResult Evaluate(ICommandHandlerContext<TodoItemAggregate> context, CreateTodoItem command)
1919
{
20-
return Command
21-
.Ok()
20+
return new Command()
2221
.Stage((new TodoItemCreated(command.item)))
2322
.Invoke(new SetCompletion(false));
2423
}
@@ -28,7 +27,7 @@ public class SetCompletionHandler : ICommandHandler<TodoItemAggregate, SetComple
2827
{
2928
public ICommandResult Evaluate(ICommandHandlerContext<TodoItemAggregate> context, SetCompletion command)
3029
{
31-
return Command.Ok().Stage(new CompletionSet(command.completed));
30+
return new Command().Stage(new CompletionSet(command.completed));
3231
}
3332
}
3433

@@ -51,4 +50,4 @@ public TodoItemAggregate Apply(IEventHandlerContext<TodoItemAggregate> context,
5150
{
5251
Completed = @event.completed
5352
};
54-
}
53+
}

samples/ConsoleSample/Domain/TodoItemAddedSaga.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ namespace ConsoleSample.Domain;
88

99
public class TodoItemAddedSaga : ISaga<TodoItemCreated>
1010
{
11-
public async Task<ISagaResult> Evaluate(ISagaContext context, TodoItemCreated @event)
12-
{
13-
return Saga.Ok().Invoke(new NestedService());
14-
}
11+
public async Task<ISagaResult> Evaluate(ISagaContext context, TodoItemCreated @event)
12+
=> new Saga().Invoke(new NestedService());
1513
}

samples/ConsoleSample/Domain/TodoList/Commands/AddItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ public class AddItemHandler : ICommandHandler<TodoListAggregate, AddItem>
1111
{
1212
public ICommandResult Evaluate(ICommandHandlerContext<TodoListAggregate> context,
1313
AddItem command) =>
14-
Command.Ok().Stage(new ItemAdded(command.id));
14+
new Command().Stage(new ItemAdded(command.id));
1515
}

0 commit comments

Comments
 (0)