コード例 #1
0
 public void Execute(IComponentStore store)
 {
     foreach (var type in ForTypes)
     {
         var reg = new Registration
         {
             Name        = Name,
             Service     = Service.MakeGenericType(new[] { type }),
             Implementor = Implementor.MakeGenericType(new[] { type })
         };
         store.AddRegistration(reg);
     }
 }
コード例 #2
0
 public void Execute(IComponentStore store)
 {
     var reg = new Registration
                   {
                       Name = Name,
                       Implementor = Implementor,
                       Service = Service,
                       Parameters = Parameters,
                   };
     if (Lifestyle != null)
         reg.Lifestyle = Lifestyle;
     store.AddRegistration(reg);
 }
コード例 #3
0
 public void Execute(IComponentStore store)
 {
     foreach (var type in ForTypes)
     {
         var reg = new Registration
                       {
                           Name = Name,
                           Service = Service.MakeGenericType(new[] {type}),
                           Implementor = Implementor.MakeGenericType(new[] {type})
                       };
         store.AddRegistration(reg);
     }
 }
コード例 #4
0
        public void Execute(IComponentStore store)
        {
            var reg = new Registration
            {
                Name        = Name,
                Implementor = Implementor,
                Service     = Service,
                Parameters  = Parameters,
            };

            if (Lifestyle != null)
            {
                reg.Lifestyle = Lifestyle;
            }
            store.AddRegistration(reg);
        }