Click or drag to resize
CookieHelper Class
Provides the cookie management methods.
Inheritance Hierarchy
SystemObject
  CMS.BaseCoreMethods
    CMS.BaseAbstractHelper
      CMS.BaseAbstractHelperCookieHelper
        CMS.HelpersCookieHelper

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 10.0.0
Syntax
C#
public class CookieHelper : AbstractHelper<CookieHelper>, 
	IDataContainer, ISimpleDataContainer

The CookieHelper type exposes the following members.

Constructors
  NameDescription
Public methodCookieHelper
Top
Properties
  NameDescription
Public propertyStatic memberAllowCookies
If true, the cookies are allowed to be used.
Public propertyColumnNames
Column names.
Public propertyStatic memberCookieSettings
Dictionary of the cookie levels [CookieName -> Level]
Public propertyStatic memberCurrentCookieLevel
Current user cookie level. All cookies with level above this
Public propertyStatic memberDefaultCookieLevel
Default cookie level for new users
Public propertyStatic memberInstance
Singleton Instance of the cookie helper.
Public propertyStatic memberReadOnly
Indicates if the cookies are read-only
Public propertyStatic memberRequestCookies
Request cookies status [CookieName -> true/false]
Public propertyStatic memberResponseCookies
Response cookies collection [CookieName -> HttpCookie]
Public propertyStatic memberResponseCookiesExist
Returns true if some response cookie has been added.
Top
Methods
  NameDescription
Public methodStatic memberClearResponseCookies
Clears all cookies from cookie collection.
Public methodContainsColumn
Returns true if the object contains specified column.
Public methodStatic memberEnforceSessionCookieLevel
Removes the session cookie in case it's level is below the current cookie level and viewstate user key is disabled.
Public methodStatic memberEnsureResponseCookie
Ensure response cookie.
Protected methodGetCookieDefaultValueInternal
Gets the default value of a cookie
Public methodStatic memberGetCookieLevel
Gets the cookie level from a string value
Protected methodGetCookieLevelInternal
Gets the cookie level for the given cookie
Public methodStatic memberGetCookieTable
Gets the table of cookies.
Public methodStatic memberGetCurrentCookieLevel
Gets the cookie level
Public methodStatic memberGetDistinctCookieNames
Gets names of both request and response cookies without duplicates.
Public methodStatic memberGetExistingCookie
Returns the existing cookie.
Public methodStatic memberGetRequestCookieTable
Gets the response cookies table.
Public methodStatic memberGetResponseCookieTable
Gets the response cookies table.
Public methodStatic memberGetValue(String)
Returns the given cookie value.
Public methodStatic memberGetValue(String, Boolean)
Returns the given cookie value.
Protected methodGetValueInternal
Returns the given cookie value.
Public methodStatic memberChangeCookieExpiration
Sets the specific cookie expiration time.
Protected methodChangeCookieExpirationInternal
Sets the specific cookie expiration time.
Public methodStatic memberChangeCookieLevel
Changes the cookie level to a specified level
Public methodStatic memberIsCookieAllowed
Returns true if the cookie is allowed based on current cookie level
Protected methodIsCookieAllowedInternal
Returns true if the cookie is allowed based on current cookie level
Public methodStatic memberRegisterCookie
Registers the given cookie with the system
Public methodStatic memberRemove
Removes the cookie from the client side.
Public methodStatic memberRemoveAllCookies
Removes all the user cookies
Public methodStatic memberRemoveAllCookies(Int32)
Removes all the user cookies above given level
Protected methodRemoveAllCookiesInternal
Removes all the user cookies
Protected methodRemoveInternal
Removes the cookie from the client side.
Public methodStatic memberRequestCookieExists
Checks if request cookie exists.
Public methodStatic memberResponseCookieExists(String)
Checks if response cookie exists.
Public methodStatic memberResponseCookieExists(String, HttpCookie)
Checks if response cookie exists.
Public methodStatic memberRestoreResponseCookies
Restores response cookies.
Public methodSetAsDefaultHelper
Sets this object as the default helper
(Inherited from AbstractHelperHelperType.)
Public methodStatic memberSetValue(String, String, DateTime)
Sets the cookie.
Public methodStatic memberSetValue(String, String, String, DateTime)
Sets the cookie.
Public methodStatic memberSetValue(String, String, String, DateTime, NullableBoolean)
Sets the cookie.
Public methodStatic memberSetValue(String, String, String, DateTime, NullableBoolean, String)
Sets the cookie.
Protected methodSetValueInternal
Sets the cookie.
Public methodTryGetValue
Returns value of column.
Top
Extension Methods
  NameDescription
Public Extension MethodCheckRequiredColumns
Returns true if given list of columns do not have null values in the object
(Defined by DataExtensions.)
Public Extension MethodToJSON
Returns JSON representation of current instance of IDataContainer.
(Defined by DataExtensions.)
Public Extension MethodToXML
Returns XML representation of current instance of IDataContainer.
(Defined by DataExtensions.)
Top
See Also