public void Delete(string key, CookieOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } ApplyPolicy(options); if (Policy.OnDeleteCookie != null) { var context = new DeleteCookieContext(Context, options, key); Policy.OnDeleteCookie(context); key = context.CookieName; } Cookies.Delete(key, options); }
public void Delete(string key, CookieOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } ApplyPolicy(options); if (Policy.OnDeleteCookie != null) { var context = new DeleteCookieContext(Context, options, key); Policy.OnDeleteCookie(context); key = context.CookieName; } Cookies.Delete(key, options); }