2021-04-28 23:30:12 +02:00
|
|
|
/**
|
|
|
|
* Poodinis Dependency Injection Framework
|
2022-02-17 22:45:03 +01:00
|
|
|
* Copyright 2014-2022 Mike Bierlee
|
2021-04-28 23:30:12 +02:00
|
|
|
* 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();
|
2021-04-29 00:11:34 +02:00
|
|
|
dependencies.register!Doohickey.initializedBy({
|
2021-04-28 23:30:12 +02:00
|
|
|
writeln("Creating Doohickey via initializer delegate.");
|
|
|
|
return new Doohickey();
|
|
|
|
});
|
|
|
|
|
|
|
|
dependencies.resolve!Doohickey;
|
|
|
|
}
|