Add more feature constructors.
This commit is contained in:
parent
dc055f783a
commit
0ba1731928
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
@ -20,6 +21,11 @@ namespace Microsoft.AspNet.PipelineCore
|
||||||
private Stream _bodyStream;
|
private Stream _bodyStream;
|
||||||
private IReadableStringCollection _form;
|
private IReadableStringCollection _form;
|
||||||
|
|
||||||
|
public FormFeature([NotNull] IDictionary<string, string[]> form)
|
||||||
|
: this (new ReadableStringCollection(form))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public FormFeature([NotNull] IReadableStringCollection form)
|
public FormFeature([NotNull] IReadableStringCollection form)
|
||||||
{
|
{
|
||||||
_form = form;
|
_form = form;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNet.FeatureModel;
|
using Microsoft.AspNet.FeatureModel;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.HttpFeature;
|
using Microsoft.AspNet.HttpFeature;
|
||||||
|
|
@ -16,6 +17,11 @@ namespace Microsoft.AspNet.PipelineCore
|
||||||
private string _queryString;
|
private string _queryString;
|
||||||
private IReadableStringCollection _query;
|
private IReadableStringCollection _query;
|
||||||
|
|
||||||
|
public QueryFeature([NotNull] IDictionary<string, string[]> query)
|
||||||
|
: this (new ReadableStringCollection(query))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public QueryFeature([NotNull] IReadableStringCollection query)
|
public QueryFeature([NotNull] IReadableStringCollection query)
|
||||||
{
|
{
|
||||||
_query = query;
|
_query = query;
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.AspNet.FeatureModel;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.Http.Infrastructure;
|
using Microsoft.AspNet.Http.Infrastructure;
|
||||||
using Microsoft.AspNet.FeatureModel;
|
|
||||||
using Microsoft.AspNet.HttpFeature;
|
using Microsoft.AspNet.HttpFeature;
|
||||||
using Microsoft.AspNet.PipelineCore.Collections;
|
using Microsoft.AspNet.PipelineCore.Collections;
|
||||||
using Microsoft.AspNet.PipelineCore.Infrastructure;
|
using Microsoft.AspNet.PipelineCore.Infrastructure;
|
||||||
|
|
@ -19,6 +20,11 @@ namespace Microsoft.AspNet.PipelineCore
|
||||||
private RequestCookiesCollection _cookiesCollection;
|
private RequestCookiesCollection _cookiesCollection;
|
||||||
private IReadableStringCollection _cookies;
|
private IReadableStringCollection _cookies;
|
||||||
|
|
||||||
|
public RequestCookiesFeature([NotNull] IDictionary<string, string[]> cookies)
|
||||||
|
: this (new ReadableStringCollection(cookies))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public RequestCookiesFeature([NotNull] IReadableStringCollection cookies)
|
public RequestCookiesFeature([NotNull] IReadableStringCollection cookies)
|
||||||
{
|
{
|
||||||
_cookies = cookies;
|
_cookies = cookies;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue