About .NET, ASP.NET, MVC, C#, WPF, WCF and everything related to .NET and more.

Mugen Injection [Registering bindings as constant]

The MugenInjector can accept a ready-made instance as a service creator:
This code demonstrate how you can register interface(IAlpha) to constant value:

public interface IAlpha { }
public class Alpha : IAlpha { }

// Create your MugenInjector.
_injector = new MugenInjector();

_injector.Bind<IAlpha>().ToConstant(new Alpha());

Leave a Reply
* Bullet List
** Bullet List 2
# Number List
## Number List 2
{"Do not apply formatting"}
{code:language} code here {code:language}.
Supports: aspx c#, c#, c++, html, sql, xml