AsyncGenerator creates unused private static event handler in SQLite20Driver.

Description

The AsyncGenerator tool creates an Async version of private static SQLite20Driver.Connection_StateChange().

However, it isn't used in CreateConnection(), but it has a follow-on effect of generating Async versions of everything that uses DriverConnectionProvider to no real effect.

Environment

None

Activity

Show:

Frédéric Delaporte October 11, 2017 at 8:40 AM

If you want to additionally report AsyncGenerator issues, it is here. But now that maca88 is on it from the PR, it may not be much useful.

Nathan Brown October 10, 2017 at 9:18 PM

If this StateChange event handler can be fire-and-forget, then the Connection_StateChange will be "async void", and should be manually changed to use ExecuteNonQueryAsync (not have a duplicate function).

This might be considered a bug in AsyncGenerator in that it's generating an unusable private event handler.

In the mean-time, I've started a pull request. https://github.com/nhibernate/nhibernate-core/pull/712

Nathan Brown October 10, 2017 at 8:32 PM

In the SQLite20Driver, this is the CreateConnection() that doesn't use the async event handler:

Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?

Created October 10, 2017 at 8:20 PM
Updated October 12, 2017 at 8:58 AM
Resolved October 12, 2017 at 8:58 AM
Who's Looking?