netfx-System.TypeInheritance (nuget): Allows inspecting the exact type inheritance tree as declared in source, rather than the flattened view that reflection provides (for implemented interfaces, for example).  Enables code to determine what are the interfaces implemented directly by a type rather than a base class, as well as determine the "distance" in the hierarchy to those implementations.  var tree = typeof(Window).GetInheritanceTree();  // Gets just the base class ContentControl, instead  // of that plus 9 interfaces implemented on base types Assert.Equal(1, tree.Inheritance.Count); Assert.Equal(typeof(ContentControl), tree.Inheritance.First().Type);
Keywords: netfx|reflection