Esempio n. 1
0
            /// <summary>
            /// Libera a instancia.
            /// </summary>
            public void Dispose()
            {
                var info = _executionInfo;

                if (info != null)
                {
                    _stopwatch.Stop();
                    GDATrace.NotifyExecution(info.Finish(_stopwatch.Elapsed, RowsAffects));
                }
            }
Esempio n. 2
0
            /// <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;
            }