private INancyModule GetModuleFromMatchResult(NancyContext context, MatchResult result) { var module = this.catalog.GetModule(result.ModuleType, context); return(this.moduleBuilder.BuildModule(module, context)); }
private ResolveResult BuildResult(NancyContext context, MatchResult result) { var associatedModule = this.GetModuleFromMatchResult(context, result); var route = associatedModule.Routes.ElementAt(result.RouteIndex); var parameters = DynamicDictionary.Create(result.Parameters); return(new ResolveResult { Route = route, Parameters = parameters, Before = associatedModule.Before, After = associatedModule.After, OnError = associatedModule.OnError }); }
private ResolveResult BuildResult(NancyContext context, MatchResult result) { var associatedModule = this.GetModuleFromMatchResult(context, result); var route = associatedModule.Routes.ElementAt(result.RouteIndex); var parameters = DynamicDictionary.Create(result.Parameters); return new ResolveResult { Route = route, Parameters = parameters, Before = associatedModule.Before, After = associatedModule.After, OnError = associatedModule.OnError }; }
private INancyModule GetModuleFromMatchResult(NancyContext context, MatchResult result) { var module = this.catalog.GetModule(result.ModuleType, context); return this.moduleBuilder.BuildModule(module, context); }