Skip to content

Instantly share code, notes, and snippets.

@rdingwall
Created December 23, 2011 15:05
Show Gist options
  • Save rdingwall/1514426 to your computer and use it in GitHub Desktop.
Save rdingwall/1514426 to your computer and use it in GitHub Desktop.
Devart Oracle home debugging
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