예제 #1
0
        protected override void AttachToComponentRegistration(ATFC.IComponentRegistry componentRegistry, ATFC.IComponentRegistration registration)
        {
            // Handle constructor parameters.
            registration.Preparing += OnComponentPreparing;

            // Handle properties.
            registration.Activated += (sender, e) => InjectLoggerProperties(e.Instance);
        }
예제 #2
0
 protected override void AttachToComponentRegistration(Autofac.Core.IComponentRegistry componentRegistry, IComponentRegistration registration)
 {
     if (typeof(IDataServicesProvider).IsAssignableFrom(registration.Activator.LimitType))
     {
         var propertyInfo = registration.Activator.LimitType.GetProperty("ProviderName", BindingFlags.Static | BindingFlags.Public);
         if (propertyInfo != null)
         {
             registration.Metadata["ProviderName"] = propertyInfo.GetValue(null, null);
         }
     }
 }
 protected override void AttachToComponentRegistration(Autofac.Core.IComponentRegistry componentRegistry, Autofac.Core.IComponentRegistration registration)
 {
     registration.Preparing += OnComponentPreparing;
 }