Last active
December 30, 2015 10:08
-
-
Save ronnieoverby/7813502 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ClutchProvider : WrappedInsightDbProvider | |
| { | |
| private ClutchProvider() | |
| { | |
| } | |
| public override IEnumerable<Type> SupportedTypes | |
| { | |
| get | |
| { | |
| return new[] { typeof(DbTracingConnection), typeof(DbTracingCommand) }; | |
| } | |
| } | |
| public static void RegisterProvider() | |
| { | |
| new ClutchProvider().Register(); | |
| } | |
| public override IDbConnection GetInnerConnection(IDbConnection connection) | |
| { | |
| var conn = (DbTracingConnection)connection; | |
| return conn.UnderlyingConnection; | |
| } | |
| public override IDbCommand GetInnerCommand(IDbCommand command) | |
| { | |
| var cmd = (DbTracingCommand)command; | |
| return cmd.UnderlyingCommand; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment