Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheException"/> class.
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="action">The action.</param>
        /// <param name="status">The status.</param>
        /// <param name="innerException">The inner exception.</param>
        public CacheException(string title, IndexusMessage.ActionValue action, IndexusMessage.StatusValue status, Exception innerException)
        {
            #region Access Log
                        #if TRACE
            {
                Handler.LogHandler.Tracking("Access Method: " + this.GetType().ToString() + "->" + ((object)MethodBase.GetCurrentMethod()).ToString() + " ;");
            }
                        #endif
            #endregion Access Log

            this.action = action;
            this.status = status;
            this.title  = title;
            this.innerExceptionMessage = innerException.Message;
            this.source     = innerException.Source;
            this.stackTrace = innerException.StackTrace;
        }
 /// <summary>
 /// Adding an item to cache with all possibility options. All overloads are using this
 /// method to add items based on various provided variables. e.g. expire date time,
 /// item priority or to a specific host
 /// </summary>
 /// <param name="key">The key for cache item</param>
 /// <param name="payload">The payload which is the object itself.</param>
 /// <param name="expires">Identify when item will expire from the cache.</param>
 /// <param name="action">The action is always Add item to cache. See also <see cref="IndexusMessage.ActionValue"/> options.</param>
 /// <param name="prio">Item priority - See also <see cref="IndexusMessage.CacheItemPriority"/></param>
 /// <param name="status">The status of the request. See also <see cref="IndexusMessage.StatusValue"/></param>
 /// <param name="host">The host, represents the specific server node.</param>
 internal abstract void Add(string key, byte[] payload, DateTime expires, IndexusMessage.ActionValue action, IndexusMessage.CacheItemPriority prio, IndexusMessage.StatusValue status, string host);
		/// <summary>
		/// Initializes a new instance of the <see cref="CacheException"/> class.
		/// </summary>
		/// <param name="title">The title.</param>
		/// <param name="action">The action.</param>
		/// <param name="status">The status.</param>
		/// <param name="innerException">The inner exception.</param>
		public CacheException(string title, IndexusMessage.ActionValue action, IndexusMessage.StatusValue status, Exception innerException)
		{
			#region Access Log
			#if TRACE
			
			{
				Handler.LogHandler.Tracking("Access Method: " + this.GetType().ToString() + "->" + ((object)MethodBase.GetCurrentMethod()).ToString() + " ;");
			}
			#endif
			#endregion Access Log

			this.action = action;
			this.status = status;
			this.title = title;
			this.innerExceptionMessage = innerException.Message;
			this.source = innerException.Source;
			this.stackTrace = innerException.StackTrace;
		}