-
Notifications
You must be signed in to change notification settings - Fork 935
NH-3724 - Added support for notification handlers #363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
05be46a
5e4346c
e407dc9
2e7cc07
1715a7a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,17 @@ public OleDbDriver() | |
{ | ||
} | ||
|
||
public override void AddNotificationHandler(IDbConnection con, Delegate handler) | ||
{ | ||
//NH-3724 | ||
if (handler is OleDbInfoMessageEventHandler) | ||
{ | ||
(con as OleDbConnection).InfoMessage += (OleDbInfoMessageEventHandler)handler; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What if con is not OleDbConnection? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you tell me please how a connection created by OleDbDriver is not an OleDbConnection? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No ideas. |
||
} | ||
|
||
base.AddNotificationHandler(con, handler); | ||
} | ||
|
||
public override IDbConnection CreateConnection() | ||
{ | ||
return new OleDbConnection(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably better to throw not supported exception