Changes
Page history
Update Osztály diagram: dispatcher rendszerek
authored
Feb 26, 2022
by
Sárközi Gergely János
Show whitespace changes
Inline
Side-by-side
Osztály-diagram.md
View page @
c0779b25
...
...
@@ -79,3 +79,42 @@ enum Phase{
```
plantuml
```
# Dispatcher rendszerek
```
plantuml
package Logic.Event {
class EventDispatcher {
{field} + <<delegate>> Listener<T : BaseEvent>(T) : void
- _listeners : IDictionary<Type, IList<Delegate>>
+ AddListener<T : BaseEvent>(Listener<T>) : void
+ RemoveListener<T : BaseEvent>(Listener<T>) : void
+ Raise(BaseEvent) : void
}
abstract BaseEvent
EventDispatcher --> BaseEvent
}
package Logic.Command {
class CommandDispatcher {
{field} + <<delegate>> Consumer<TC : BaseCommand<TR>, TR : ICommandResult>(T) : TR
- _consumers : IDictionary<Type, Delegate>
+ RegisterConsumer<TC, TR>(BaseCommand<TC, TR>) : void
+ RemoveConsumer<TC, TR>(BaseCommand<TC, TR>) : void
+ Issue<T : ICommandResult>(BaseCommand<T>) : T
}
abstract BaseCommand<T : ICommandResult>
CommandDispatcher --> BaseCommand
interface ICommandResult {
+ IsSuccess() : bool
}
BaseCommand --> ICommandResult
}
```