public BebopConfiguration AddApplication(string urlRoot, BebopApplication application) { if (urlRoot == null) { throw new ArgumentNullException("urlRoot"); } if (application == null) { throw new ArgumentNullException("application"); } if (_applications.ContainsKey(urlRoot)) { throw new InvalidOperationException( String.Format( "URL root '{0}' already contains application '{1}'", urlRoot, _applications[urlRoot].GetType().FullName)); } _containerBuilder.RegisterModule(application); _routes.MapSubRoutes(urlRoot, application.Map(_routeFactory)); _applications[urlRoot] = application; return this; }
public BebopConfiguration AddApplication(BebopApplication application) { return AddApplication(String.Empty, application); }