Skip to content
Proof of concept D Dependency Injection Framework
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
source
.gitignore
.travis.yml
LICENSE
README.rst
package.json

README.rst

dejector

Build status

This is a proof of concept of dependency injection framework for D and my way of learning the language.

Example usage

import std.conv : to;
import std.stdio : writefln;

import dejector : Dejector;

interface Greeter {
    string greet();
}

class GreeterImplementation : Greeter {
    string greet() { return "Hello!"; }
}

void main() {
    Dejector dejector;
    dejector.bind!(Greeter, GreeterImplementation);
    auto greeter = dejector.get!Greeter;
    writefln(greeter.greet)
}

Output:

Hello!

Running tests

You need to have dub >= 0.9.21 installed and reacheble from your PATH.

dub --verbose test

Copyright

Copyright (C) 2013 Jakub Stasiak

This source code is licensed under MIT license, see LICENSE file for details.

You can’t perform that action at this time.