Created
December 23, 2011 15:05
-
-
Save rdingwall/1514426 to your computer and use it in GitHub Desktop.
Devart Oracle home debugging
This file contains 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
using System; | |
using System.Reflection; | |
using Devart.Data.Oracle; | |
void PrintDevartOracleHome() | |
{ | |
// SUPER HACKY | |
// Get internal property OracleHomeCollection.SingletonInstance | |
var homes = (OracleHomeCollection)typeof(OracleHomeCollection) | |
.GetProperties(BindingFlags.Static | BindingFlags.NonPublic) | |
.Single(p => p.Name == "SingletonInstance") | |
.GetValue(null, BindingFlags.GetProperty, null, null, null); | |
Console.WriteLine("Using Oracle home name = {0} version = {1} path = {2}", | |
homes.DefaultHome.Name, homes.DefaultHome.ClientVersion, homes.DefaultHome.Path); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment