Skip to content
This repository was archived by the owner on Oct 31, 2018. It is now read-only.
This repository was archived by the owner on Oct 31, 2018. It is now read-only.

Remove Interface Abuse - Rise of the Services #38

@khionu

Description

@khionu

The IMessageAction interface approach is inefficient. A service would be much more clean. .Enable(string key) being one example of what can be done with a service. This will also allow MessageHandlers to be toggled via command.

Also, I suggest turning the ContactsBot class back into the Program class, while breaking everything out of it, turning AsyncMain into a function that does nothing more than initialize all the services of the bot. Turning the root functionality into a class seems useless, without the bot being a component of a greater whole.

The bot should be, in essence, a collection of services that work with each other and for each other. The root should reflect that. If it becomes "too large", it can be broken down into stages, each stage it's own method in Program

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions