HappyReflection 0.0.2-beta.4

This is a prerelease version of HappyReflection.
There is a newer version of this package available.
See the version list below for details.
dotnet add package HappyReflection --version 0.0.2-beta.4                
NuGet\Install-Package HappyReflection -Version 0.0.2-beta.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HappyReflection" Version="0.0.2-beta.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HappyReflection --version 0.0.2-beta.4                
#r "nuget: HappyReflection, 0.0.2-beta.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install HappyReflection as a Cake Addin
#addin nuget:?package=HappyReflection&version=0.0.2-beta.4&prerelease

// Install HappyReflection as a Cake Tool
#tool nuget:?package=HappyReflection&version=0.0.2-beta.4&prerelease                

HappyReflection

nightly build

C# Helper util to easily find types by their name, interface or annotated attribute.

Examples

Find all classes that implement a specific interface

// class declaration
public class ChocolateFabric : IChocolateFabric {
  ...
}

// HappyReflection code      
IList<Type> aListContainingChocolateFabric = HappyReflection.GetClassesByInterface<IChocolateFabric>();

// result 
new List<Type> { typeof(ChocolateFabric) }

Find a type by it's name

// class declaration
public class ChocolateFabric {
  ...
}

// HappyReflection code    
Type typeOfChocolateFabric = HappyReflection.GetTypeByName("ChocolateFabric");

// result   
typeof(ChocolateFabric)

Find all classes annotating a specific attribute

// class declaration
[ILoveChocolateAttribute]
public class ChocolateFabric {
  ...
}

// HappyReflection code    
IList<Type> typeOfChocolateFabric = HappyReflection.GetClassesByAttribute<ILoveChocolateAttribute>();

// result   
new List<Type> { typeof(ChocolateFabric) }
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 430 5/15/2022
0.0.2-beta.5 129 3/27/2022
0.0.2-beta.4 118 3/26/2022
0.0.2-beta.2 115 3/26/2022
0.0.2-beta.1 121 3/26/2022