Exemple #1
0
        public OwinRequestData(RouteData routeData, OwinRequestBody body)
        {
            AddValues(new RouteDataValues(routeData));

            AddValues(Querystring, new DictionaryKeyValues(body.Querystring()));
            AddValues(FormPost, new DictionaryKeyValues(body.FormData ?? new Dictionary <string, string>()));

            AddValues(RequestDataSource.Header.ToString(), new DictionaryKeyValues(body.Headers()));
        }
Exemple #2
0
        public OwinRequestData(RouteData routeData, OwinRequestBody body)
        {
            AddValues(new RouteDataValues(routeData));

            AddValues("OwinQuerystring", new DictionaryKeyValues(body.Querystring()));
            AddValues("OwinFormPost", new DictionaryKeyValues(body.FormData ?? new Dictionary<string, string>()));

            AddValues(RequestDataSource.Header.ToString(), new DictionaryKeyValues(body.Headers()));
        }
        public OwinAggregateDictionary(RouteData routeData, OwinRequestBody body)
        {
            Func <string, object> locator = key =>
            {
                object found;
                routeData.Values.TryGetValue(key, out found);
                return(found);
            };

            AddLocator(RequestDataSource.Route.ToString(), locator, () => routeData.Values.Keys);
            AddLocator(RequestDataSource.Request.ToString(), key => findRequestValue(key, body), () => valuesForRequest(body).Keys);

            addDictionaryLocator("Query string", body.Querystring());
            addDictionaryLocator("Form Post", body.FormData ?? new Dictionary <string, string>());
            addDictionaryLocator(RequestDataSource.Header.ToString(), body.Headers());
        }
        public OwinAggregateDictionary(RouteData routeData, OwinRequestBody body)
        {
            Func<string, object> locator = key =>
            {
                object found;
                routeData.Values.TryGetValue(key, out found);
                return found;
            };

            AddLocator(RequestDataSource.Route.ToString(), locator, () => routeData.Values.Keys);
            AddLocator(RequestDataSource.Request.ToString(), key => findRequestValue(key, body), () => valuesForRequest(body).Keys);

            addDictionaryLocator("Query string", body.Querystring());
            addDictionaryLocator("Form Post", body.FormData ?? new Dictionary<string, string>());
            addDictionaryLocator(RequestDataSource.Header.ToString(), body.Headers());
        }
        public OwinAggregateDictionary(RouteData routeData, OwinRequestBody body)
        {
            // TODO -- this is duplication w/ AspNetAggregateDictionary.  DRY it baby!
            Func<string, object> locator = key =>
            {
                object found;
                routeData.Values.TryGetValue(key, out found);
                return found;
            };

            AddLocator(RequestDataSource.Route.ToString(), locator, () => routeData.Values.Keys);

            addDictionaryLocator("Query string", body.Querystring());
            addDictionaryLocator("Form Post", body.FormData ?? new Dictionary<string, string>());

            addDictionaryLocator(RequestDataSource.Header.ToString(), body.Headers());
        }
        public OwinAggregateDictionary(RouteData routeData, OwinRequestBody body)
        {
            // TODO -- this is duplication w/ AspNetAggregateDictionary.  DRY it baby!
            Func <string, object> locator = key =>
            {
                object found;
                routeData.Values.TryGetValue(key, out found);
                return(found);
            };


            AddLocator(RequestDataSource.Route.ToString(), locator, () => routeData.Values.Keys);

            addDictionaryLocator("Query string", body.Querystring());
            addDictionaryLocator("Form Post", body.FormData ?? new Dictionary <string, string>());

            addDictionaryLocator(RequestDataSource.Header.ToString(), body.Headers());
        }