Exemple #1
0
 public void Configure(ConfigurationContext context, ContainerConfigurationBuilder builder)
 {
     builder.Contract("all").UnionOf("c1", "c2", "c3");
     builder.Contract("c1").BindDependency <FileAccessor>("fileName", "qq");
     builder.Contract("c2").BindDependency <FileAccessor>("fileName", "ww1");
     builder.Contract("c3").BindDependency <FileAccessor>("fileName", "ww2");
     builder.WithInstanceFilter <FileAccessorWrap>(a => a.IsValid());
 }
 public void Configure(ConfigurationContext context, ContainerConfigurationBuilder builder)
 {
     builder.Contract("all").UnionOf("c1", "c2", "c3");
     builder.Contract("c1").BindDependency<FileAccessor>("fileName", "qq");
     builder.Contract("c2").BindDependency<FileAccessor>("fileName", "ww1");
     builder.Contract("c3").BindDependency<FileAccessor>("fileName", "ww2");
     builder.WithInstanceFilter<FileAccessorWrap>(a => a.IsValid());
 }
 public void Configure(ConfigurationContext context, ContainerConfigurationBuilder builder)
 {
     builder.Contract("composite-contract").UnionOf("c1", "c2");
 }