コード例 #1
0
ファイル: EventException.cs プロジェクト: lstern/practices
 /// <summary>
 /// Initializes a new instance of the <see cref="EventException"/> class.
 /// </summary>
 /// <param name="eventVO">
 /// The event vo.
 /// </param>
 /// <param name="ex">
 /// The excetion
 /// </param>
 public EventException(EventVO eventVO, Exception ex)
     : base(eventVO.Title, ex)
 {
     this.Details = eventVO.Details;
     this.StoreId = eventVO.StoreId;
     this.AppName = eventVO.AppName;
     this.LogType = eventVO.LogType;
 }
コード例 #2
0
ファイル: EventException.cs プロジェクト: lstern/practices
 /// <summary>
 /// Initializes a new instance of the <see cref="EventException"/> class.
 /// </summary>
 /// <param name="eventlog">
 /// The eventlog.
 /// </param>
 public EventException(EventVO eventlog)
     : base(eventlog.Title)
 {
     this.Details = eventlog.Details;
     this.StoreId = eventlog.StoreId;
     this.AppName = eventlog.AppName;
     this.LogType = eventlog.LogType;
 }
コード例 #3
0
ファイル: DebugLogger.cs プロジェクト: lstern/practices
 /// <summary>
 /// Registra um evento
 /// </summary>
 /// <param name="eventVO">
 /// The event VO.
 /// </param>
 public void LogEvent(EventVO eventVO)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
ファイル: NullLogger.cs プロジェクト: lstern/practices
 /// <summary>
 /// Registra um evento
 /// </summary>
 /// <param name="eventVO">
 /// The event VO.
 /// </param>
 public void LogEvent(EventVO eventVO)
 {
 }
コード例 #5
0
ファイル: ElmahLogger.cs プロジェクト: lstern/practices
        /// <summary>
        /// Registra um evento
        /// </summary>
        /// <param name="eventVO">
        /// The event VO.
        /// </param>
        public void LogEvent(EventVO eventVO)
        {
            // Encadeamento
            if (!this.IsChild && threadChain != null)
            {
                foreach (var childLogger in threadChain)
                {
                    childLogger.LogEvent(eventVO);
                }
            }

            if (!this.IsChild && staticChain != null)
            {
                foreach (var childLogger in staticChain)
                {
                    childLogger.LogEvent(eventVO);
                }
            }

            var exception = new EventException(eventVO);
            this.elmah.Log(new Error(exception));
        }