Example #1
0
 public void Register(Type from, Type to, Wave.InstanceScope scope)
 {
     if (scope == Wave.InstanceScope.Singleton)
     {
         this.container.Configure(x => x.For(from).LifecycleIs(new global::StructureMap.Pipeline.SingletonLifecycle()).Use(to));
     }
     else
     {
         this.container.Configure(x => x.For(from).LifecycleIs(new global::StructureMap.Pipeline.TransientLifecycle()).Use(to));
     }
 }
Example #2
0
 public void Register <TFrom, TTo>(Wave.InstanceScope scope)
     where TTo : TFrom
 {
     this.Register(typeof(TFrom), typeof(TTo), scope);
 }