private static void ConfigureRouter(Robot robot, NuGetPackageAssemblyResolver nugetResolver) { var robotEnabledVar = robot.GetConfigVariable("MMBOT_ROUTER_ENABLED"); if (robotEnabledVar != null && robotEnabledVar.ToLower() == "true" || robotEnabledVar == "yes") { var routerType = nugetResolver.GetCompiledRouterFromPackages(); if (routerType != null) { robot.Logger.Info(string.Format("Loading router '{0}'", routerType.Name)); robot.ConfigureRouter(routerType); } else { robot.Logger.Warn("The router was enabled but no implementation was found. Make sure you have installed the relevant router package"); } } }