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 } }
public Bootstrapper(IModuleBootstrapper moduleBootstrapper, IServiceBootstrapper serviceBootstrapper, IAssemblyBootstrapper assemblyBootstrapper) { this.moduleBootstrapper = moduleBootstrapper; this.serviceBootstrapper = serviceBootstrapper; this.assemblyBootstrapper = assemblyBootstrapper; }
private static Assembly GetAssemblyFromBootstrapper(IAssemblyBootstrapper bootstrapper) { return(Assembly.GetAssembly(bootstrapper.GetType())); }