From 45ee50ed0f33f17dd70453d800048fc69e8bd3a1 Mon Sep 17 00:00:00 2001 From: hartvig Date: Wed, 2 Mar 2011 13:50:29 -0100 Subject: [PATCH] Adding HasCookieValue back to StateHelper and marking it obsolete --- umbraco/businesslogic/StateHelper.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/umbraco/businesslogic/StateHelper.cs b/umbraco/businesslogic/StateHelper.cs index 2a8f74cde2..10103cffdb 100644 --- a/umbraco/businesslogic/StateHelper.cs +++ b/umbraco/businesslogic/StateHelper.cs @@ -197,6 +197,21 @@ namespace umbraco.BusinessLogic #region Cookie Helpers + /// + /// Determines whether a cookie has a value with a specified key. + /// + /// The key. + /// + /// true if the cookie has a value with the specified key; otherwise, false. + /// + [Obsolete("Use !string.IsNullOrEmpty(GetCookieValue(key))", false)] + public static bool HasCookieValue(string key) + { + return !string.IsNullOrEmpty(GetCookieValue(key)); + } + + + /// /// Gets the cookie value. ///