public CalculatorModule(RouteRegistrar routeRegistrar, bool useParamsRegistration)
		{
			if (useParamsRegistration)
				routeRegistrar.RegisterServicesInto(this, typeof(AddService), typeof(MultiplyService));
			else
				routeRegistrar.RegisterServicesInto(this, new[] {typeof(AddService), typeof(MultiplyService)}.AsEnumerable());
		}
Пример #2
0
 public CalculatorModule(RouteRegistrar routeRegistrar, bool useParamsRegistration)
 {
     if (useParamsRegistration)
     {
         routeRegistrar.RegisterServicesInto(this, typeof(AddService), typeof(MultiplyService));
     }
     else
     {
         routeRegistrar.RegisterServicesInto(this, new[] { typeof(AddService), typeof(MultiplyService) }.AsEnumerable());
     }
 }
 public ApiModule(RouteRegistrar routes)
 {
     routes.RegisterServicesInto(
         this,
         AllTypes.InAssembly.Where(
             x => x.Namespace.StartsWith("Restall.Nancy.Demo.ServiceRouting.Api") && x.Name.EndsWith("Service")));
 }