예제 #1
0
파일: GDATrace.cs 프로젝트: fabrimaciel/gda
            /// <summary>
            /// Libera a instancia.
            /// </summary>
            public void Dispose()
            {
                var info = _executionInfo;

                if (info != null)
                {
                    _stopwatch.Stop();
                    GDATrace.NotifyExecution(info.Finish(_stopwatch.Elapsed, RowsAffects));
                }
            }
예제 #2
0
파일: GDATrace.cs 프로젝트: fabrimaciel/gda
            /// <summary>
            /// Notifica o erro ocorrido.
            /// </summary>
            /// <param name="exception"></param>
            public void Fail(Exception error)
            {
                _stopwatch.Stop();
                CommandExecutionInfo executionInfo = null;

                try
                {
                    executionInfo = _executionInfo.Fail(_stopwatch.Elapsed, error);
                }
                catch (Exception ex)
                {
                    throw new GDATraceException(string.Format("An error occurred when get fail details for error \"{0}\".\r\n{1}", error.Message, ex.Message), ex);
                }
                GDATrace.NotifyExecution(executionInfo);
                _executionInfo = null;
            }