コード例 #1
0
 private MySqlDataReader(MySqlCommand command, ResultSetProtocol resultSetProtocol, CommandBehavior behavior)
 {
     Command           = command;
     ResultSetProtocol = resultSetProtocol;
     m_behavior        = behavior;
 }
コード例 #2
0
        internal static async Task <MySqlDataReader> CreateAsync(MySqlCommand command, CommandBehavior behavior, ResultSetProtocol resultSetProtocol, IOBehavior ioBehavior)
        {
            var dataReader = new MySqlDataReader(command, resultSetProtocol, behavior);

            command.Connection.SetActiveReader(dataReader);

            try
            {
                await dataReader.ReadFirstResultSetAsync(ioBehavior).ConfigureAwait(false);
            }
            catch (Exception)
            {
                dataReader.Dispose();
                throw;
            }

            return(dataReader);
        }