We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In case you register an interface with a class and you forgot to add the interface to the class definition, there is an error message:
sample2.d(23,18): Error: template poodinis.container.DependencyContainer.register does not match any template declaration
Execute with dub sample2
dub sample2
/+ dub.sdl: name "sample2" dependency "poodinis" version="8.0.3" +/ import std; import poodinis; interface IfFileSystem { string readTextFile(string filePath); } class FileSystem { string readTextFile(string filePath) {return readText(filePath);} } class DefaultApplicationContext : ApplicationContext { public override void registerDependencies(shared(DependencyContainer) container) { container.register!(IfFileSystem, FileSystem); } } void main() { auto dc = new shared DependencyContainer(); dc.registerContext!DefaultApplicationContext; }
The text was updated successfully, but these errors were encountered:
This is implemented now
Sorry, something went wrong.
No branches or pull requests
In case you register an interface with a class and you forgot to add the interface to the class definition,
there is an error message:
Execute with
dub sample2
The text was updated successfully, but these errors were encountered: