コード例 #1
0
    public static IDependencyInjectionContainer Compose()
    {
        // Create new container
        var container = new Grace.DependencyInjection.DependencyInjectionContainer();

        // Install MVC sitemap provider
        container.Configure(new MvcSiteMapProviderModule());

        // Install Controllers
        container.Configure(new MvcModule());

        // Add your DI configuration here

        return(new GraceDependencyInjectionContainer(container.RootScope));
    }
コード例 #2
0
 public DependencyInjectionContainer()
 {
     _DependencyInjectionContainer = new GraceInjector.DependencyInjectionContainer();
 }