private void Fill(AsyncDataAdapterCommand asyncDataAdapterCommand)
    {
        Assert.IsNotNull(asyncDataAdapterCommand);

        Exception exception = null;
        var       command   = asyncDataAdapterCommand.Command;

        try
        {
            ExecuteReader(asyncDataAdapterCommand, command);
        }
        catch (ThreadAbortException)
        {
            Thread.ResetAbort();
        }
        catch (Exception e)
        {
            if (Thread.CurrentThread.ThreadState == ThreadState.AbortRequested)
            {
                try
                {
                    Thread.ResetAbort();
                }
                catch
                {
                }
            }

            exception = e;
        }
        finally
        {
            if (command != null && command.Parameters != null)
            {
                _resultWriter.WriteParameters(command.Parameters);
            }

            _endFill(this, exception);
        }
    }
Beispiel #2
0
 void IResultWriter.WriteParameters(IDataParameterCollection parameters) => _logResultWriter.WriteParameters(parameters);