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
            });
        }
Beispiel #3
0
        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
                       };
        }
Beispiel #4
0
        private INancyModule GetModuleFromMatchResult(NancyContext context, MatchResult result)
        {
            var module =
                this.catalog.GetModule(result.ModuleType, context);

            return this.moduleBuilder.BuildModule(module, context);
        }