Obsolete the ResponseCookiesFeature constructor (#24546)

This commit is contained in:
David Fowler 2020-08-03 14:47:20 -07:00 committed by GitHub
parent 1f5149a663
commit 3f15d26851
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -26,8 +26,13 @@ namespace Microsoft.AspNetCore.Http.Features
/// <see cref="IResponseCookiesFeature"/> and the <see cref="IHttpResponseFeature"/>.
/// </param>
public ResponseCookiesFeature(IFeatureCollection features)
: this(features, builderPool: null)
{
if (features == null)
{
throw new ArgumentNullException(nameof(features));
}
_features.Initalize(features);
}
/// <summary>
@ -38,6 +43,7 @@ namespace Microsoft.AspNetCore.Http.Features
/// <see cref="IResponseCookiesFeature"/> and the <see cref="IHttpResponseFeature"/>.
/// </param>
/// <param name="builderPool">The <see cref="ObjectPool{T}"/>, if available.</param>
[Obsolete("This constructor is obsolete and will be removed in a future version.")]
public ResponseCookiesFeature(IFeatureCollection features, ObjectPool<StringBuilder>? builderPool)
{
if (features == null)