File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/Http/Http.Features/src Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11// Copyright (c) .NET Foundation. All rights reserved.
22// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33
4+ #if NET6_0
45using System ;
56using System . Collections . Generic ;
7+ #endif
68
79namespace Microsoft . AspNetCore . Http
810{
@@ -26,12 +28,20 @@ public interface IResponseCookies
2628 /// <param name="options"><see cref="CookieOptions"/> included in the new cookie setting.</param>
2729 void Append ( string key , string value , CookieOptions options ) ;
2830
31+ #if NET6_0
2932 /// <summary>
3033 /// Add elements of specified dictionary as cookies.
3134 /// </summary>
3235 /// <param name="keyValuePairs">Key value pair collections whose elements will be added as cookies.</param>
3336 /// <param name="options"><see cref="CookieOptions"/> included in new cookie settings.</param>
34- void Append ( ReadOnlySpan < KeyValuePair < string , string > > keyValuePairs , CookieOptions options ) ;
37+ void Append ( ReadOnlySpan < KeyValuePair < string , string > > keyValuePairs , CookieOptions options )
38+ {
39+ foreach ( var keyValuePair in keyValuePairs )
40+ {
41+ Append ( keyValuePair . Key , keyValuePair . Value , options ) ;
42+ }
43+ }
44+ #endif
3545
3646 /// <summary>
3747 /// Sets an expired cookie.
You can’t perform that action at this time.
0 commit comments