Question

I'm trying to use membershipreboot oss using MEF conventions but having trouble with generics and the string constant.

The example uses ninject.

var config = MembershipRebootConfig.Create();

kernel.Bind<MembershipRebootConfiguration<HierarchicalUserAccount>>().ToConstant(config);
        kernel.Bind<UserAccountService<HierarchicalUserAccount>>().ToSelf();
        kernel.Bind<AuthenticationService<HierarchicalUserAccount>>().To<SamAuthenticationService<HierarchicalUserAccount>>();

kernel.Bind<IUserAccountRepository<HierarchicalUserAccount>>().ToMethod(ctx => new RavenUserAccountRepository("RavenDb"));

This is what i'm trying to achieve.

AuthenticationService<HierarchicalUserAccount> svc = 
                 new SamAuthenticationService<HierarchicalUserAccount>(
                      new UserAccountService<HierarchicalUserAccount>(
                          new RavenUserAccountRepository("RavenDb")));

Any help would be appreciated.

Was it helpful?

Solution

Built it manually and threw it in the container...

I'll come back another day and try to pick it apart.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top