2011/7/12 Kagamin <s...@here.lot>:
> You want an IOC container like Unity?
exactly
> And you want the interface-to-class mapping to be configurable externally 
> rather than version out these classes directly in source?
> like
> version(UseGL)
> {
>  static import wrappers.gl;
>  alias wrappers.gl.WindowImpl Window;
> }
> else version(UseWhat)
> {
>  static import wrappers.what;
>  alias wrappers.what.WindowImpl Window;
> }
> container.register!(IWindow,Window)();
>
> client:
>
> IWindow myWindow=container.resolve!(IWindow)();
>
that's right :)

Reply via email to