Пример #1
0
 private void RunAction(Action <IAssemblyBootstrapper> action, IAssemblyBootstrapper instance, string name)
 {
     try
     {
         action(instance);
     }
     catch (Exception e)
     {
         Console.WriteLine($"Failed to {name} in bootstrapper. Type={instance.GetType().FullName}. Exception={e}");
     }
 }
        private void RunAction(Action <IAssemblyBootstrapper> action, IAssemblyBootstrapper instance, string name)
        {
            try
            {
                action(instance);
            }
            catch (Exception e)
            {
#pragma warning disable Serilog004 // Constant MessageTemplate verifier
                Log.Warning(e, $"Failed to {name} in bootstrapper. Type={{BootstrapperType}}", instance.GetType().FullName);
#pragma warning restore Serilog004 // Constant MessageTemplate verifier
            }
        }
Пример #3
0
 public Bootstrapper(IModuleBootstrapper moduleBootstrapper, IServiceBootstrapper serviceBootstrapper, IAssemblyBootstrapper assemblyBootstrapper)
 {
     this.moduleBootstrapper   = moduleBootstrapper;
     this.serviceBootstrapper  = serviceBootstrapper;
     this.assemblyBootstrapper = assemblyBootstrapper;
 }
Пример #4
0
 private static Assembly GetAssemblyFromBootstrapper(IAssemblyBootstrapper bootstrapper)
 {
     return(Assembly.GetAssembly(bootstrapper.GetType()));
 }