public void Configure(ConfigurationContext context, ServiceConfigurationBuilder <IDatabase> builder) { if (context.ProfileIs <InMemoryProfile>()) { builder.Bind <InMemoryDatabase>(); } else { builder.Bind <Database>(); } }
public void Configure(ConfigurationContext context, ServiceConfigurationBuilder <B> builder) { builder.Bind((c, t) => new B(t)); }
public void Configure(ConfigurationContext context, ServiceConfigurationBuilder <Token> builder) { builder.Bind(c => c.Get <TokenSource>().CreateToken()); }
public void Configure(ConfigurationContext context, ServiceConfigurationBuilder <IService> builder) { builder.Bind <ImplTwo>(); }
public void Configure(ConfigurationContext context, ServiceConfigurationBuilder <IA> builder) { builder.Bind <A1>(); }
public void Configure(ConfigurationContext context, ServiceConfigurationBuilder <SomeConstantSwitch> builder) { builder.Bind(new SomeConstantSwitch { Value = 42 }); }