Ejemplo n.º 1
0
 public void Trigger <TArg>(string methodName, TArg parameter)
 {
     Bootstrappers.ForEach(bootstrapper =>
                           ExecuteIfNotNull(
                               bootstrapper.GetType()
                               .GetMethod(methodName, new[] { typeof(TArg) }),
                               methodInfo => methodInfo.Invoke(bootstrapper, new object[] { parameter }))
                           );
 }
Ejemplo n.º 2
0
 public void TriggerConfigure(Func <Type, object> serviceLocator = null)
 {
     Bootstrappers.ForEach(bootstrapper =>
     {
         Config.ConfigureMethods
         .Where(c => c.Value())
         .ToList()
         .ForEach(methodConfiguration =>
                  ExecuteIfNotNull(
                      GetMethodInfoByName(bootstrapper.GetType(), methodConfiguration.Key, serviceLocator),
                      methodInfo => methodInfo.InvokeWithDynamicallyResolvedParameters(bootstrapper, serviceLocator))
                  );
     });
 }
Ejemplo n.º 3
0
 private static void LoadBootstrappers()
 {
     Bootstrappers = GetClassesOfType <IBootstrapper>();
     Bootstrappers.ForEach(b => b.Init());
 }