public void Append(string key, string value, CookieOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } ApplyPolicy(options); if (Policy.OnAppendCookie != null) { var context = new AppendCookieContext(Context, options, key, value); Policy.OnAppendCookie(context); key = context.CookieName; value = context.CookieValue; } Cookies.Append(key, value, options); }
public void Append(string key, string value, CookieOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } ApplyPolicy(options); if (Policy.OnAppendCookie != null) { var context = new AppendCookieContext(Context, options, key, value); Policy.OnAppendCookie(context); key = context.CookieName; value = context.CookieValue; } Cookies.Append(key, value, options); }