You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an oversight and an antipattern. The library should integrate the systems using DI seamlessly on SisbaseCommandContext.
It has been discussed countless times, and its a core tenant of the rewrite : to make this version static-less.
Considering cnext::UsesAttribute would stop command execution in case of an unexistent system, and its static-less, doing this should be possible.
As it currrently stands this is the only way to feasibly get a system.
[Uses(typeof(System))]classCommandClass:ModuleBase<SisbaseCommandContext>{//Static instance of a sisbase bot stored on the main class. EEEW.Systems=Program.botInstance.Systems.Get<System>();}
The idea is to somehow integrate that into SCCTX's funcionality so that DI itself would make it seamless.
[Uses(typeof(System))]classCommandClass:ModuleBase<SisbaseCommandContext>{//`s` gets injected using di. nice.Systems;}
The text was updated successfully, but these errors were encountered:
This is an oversight and an antipattern. The library should integrate the systems using DI seamlessly on
SisbaseCommandContext
.It has been discussed countless times, and its a core tenant of the rewrite : to make this version static-less.
Considering
cnext::UsesAttribute
would stop command execution in case of an unexistent system, and its static-less, doing this should be possible.As it currrently stands this is the only way to feasibly get a system.
The idea is to somehow integrate that into SCCTX's funcionality so that DI itself would make it seamless.
The text was updated successfully, but these errors were encountered: