Esempio n. 1
0
        private INancyModule GetModuleFromMatchResult(NancyContext context, MatchResult result)
        {
            var module =
                this.catalog.GetModule(result.ModuleType, context);

            return(this.moduleBuilder.BuildModule(module, context));
        }
Esempio n. 2
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
            });
        }
Esempio n. 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
                       };
        }
Esempio n. 4
0
        private INancyModule GetModuleFromMatchResult(NancyContext context, MatchResult result)
        {
            var module =
                this.catalog.GetModule(result.ModuleType, context);

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