Obsolete the ResponseCookiesFeature constructor (#24546)
This commit is contained in:
parent
1f5149a663
commit
3f15d26851
|
|
@ -26,8 +26,13 @@ namespace Microsoft.AspNetCore.Http.Features
|
||||||
/// <see cref="IResponseCookiesFeature"/> and the <see cref="IHttpResponseFeature"/>.
|
/// <see cref="IResponseCookiesFeature"/> and the <see cref="IHttpResponseFeature"/>.
|
||||||
/// </param>
|
/// </param>
|
||||||
public ResponseCookiesFeature(IFeatureCollection features)
|
public ResponseCookiesFeature(IFeatureCollection features)
|
||||||
: this(features, builderPool: null)
|
|
||||||
{
|
{
|
||||||
|
if (features == null)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException(nameof(features));
|
||||||
|
}
|
||||||
|
|
||||||
|
_features.Initalize(features);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -38,6 +43,7 @@ namespace Microsoft.AspNetCore.Http.Features
|
||||||
/// <see cref="IResponseCookiesFeature"/> and the <see cref="IHttpResponseFeature"/>.
|
/// <see cref="IResponseCookiesFeature"/> and the <see cref="IHttpResponseFeature"/>.
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="builderPool">The <see cref="ObjectPool{T}"/>, if available.</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)
|
public ResponseCookiesFeature(IFeatureCollection features, ObjectPool<StringBuilder>? builderPool)
|
||||||
{
|
{
|
||||||
if (features == null)
|
if (features == null)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue