Skip to content

Commit

Permalink
Merge pull request #23 from lelerabino/patch-1
Browse files Browse the repository at this point in the history
fix the code snippet for sample kediatr-core usage
  • Loading branch information
bilal-kilic authored May 30, 2022
2 parents 194f280 + e7f09ba commit 698b6ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class ManuelDependencyProvider(
}

fun main() {
val handler = MyCommandHandler()
val handlers: HashMap<Class<*>, Any> = hashMapOf(Pair(MyCommandHandler::class.java, handler))
val handler = HelloCommandHandler()
val handlers: HashMap<Class<*>, Any> = hashMapOf(Pair(HelloCommandHandler::class.java, handler))
val provider = ManuelDependencyProvider(handlers)
val bus: CommandBus = CommandBusBuilder(provider).build()
bus.executeCommand(HelloCommand("hello"))
Expand All @@ -81,7 +81,7 @@ fun main() {
class HelloCommand(val message: String) : Command

class HelloCommandHandler : CommandHandler<HelloCommand> {
override fun handle(command: MyCommand) {
override fun handle(command: HelloCommand) {
println(command.message)
}
}
Expand Down

0 comments on commit 698b6ce

Please sign in to comment.