poodinis/example/injectioninitializer/app.d
Mike Bierlee 9b05aa3af9 Reformat code to use otbs brace style
It's more compact and more common in the coding world these days.
2023-03-07 01:24:28 +03:00

23 lines
545 B
D

/**
* Poodinis Dependency Injection Framework
* Copyright 2014-2023 Mike Bierlee
* This software is licensed under the terms of the MIT license.
* The full terms of the license can be found in the LICENSE file.
*/
import poodinis;
import std.stdio;
class Doohickey {
}
void main() {
auto dependencies = new shared DependencyContainer();
dependencies.register!Doohickey.initializedBy({
writeln("Creating Doohickey via initializer delegate.");
return new Doohickey();
});
dependencies.resolve!Doohickey;
}