Info
Version: | 1.1.1 |
Author(s): | Daniel Cazzulino, kzu, Clarius |
Last Update: | Thursday, August 2, 2012 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | http://netfx.codeplex.com |
NuGet Url: | https://www.nuget.org/packages/netfx-System.TypeInheritance |
Install
Install-Package netfx-System.TypeInheritance
dotnet add package netfx-System.TypeInheritance
paket add netfx-System.TypeInheritance
netfx-System.TypeInheritance Download (Unzip the "nupkg" after downloading)
Dependencies
- netfx-Guard(1.2.0.0)
- netfx-System.Collections.Generic.IEnumerable.Traverse(1.0.0.9)
Tags
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);.