예제 #1
0
        /// <summary>
        /// Set data to http context
        /// </summary>
        /// <param name="key">key</param>
        /// <param name="value">value</param>
        public void AddContextValue(string key, object value)
        {
            if (string.IsNullOrWhiteSpace(key))
            {
                return;
            }

            HttpContext current = HttpContextWrapper.Current;

            if (current != null && !current.Items.ContainsKey(UseBackupKey))
            {
                current.Items[key.Trim()] = value;
            }
            else
            {
                m_backupCallContext.AddContextValue(key, value);
            }
        }