Cogs.Reflection 1.6.0

dotnet add package Cogs.Reflection --version 1.6.0
NuGet\Install-Package Cogs.Reflection -Version 1.6.0
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="Cogs.Reflection" Version="1.6.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Cogs.Reflection --version 1.6.0
#r "nuget: Cogs.Reflection, 1.6.0"
#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 Cogs.Reflection as a Cake Addin
#addin nuget:?package=Cogs.Reflection&version=1.6.0

// Install Cogs.Reflection as a Cake Tool
#tool nuget:?package=Cogs.Reflection&version=1.6.0

This library has useful tools for when you can't be certain of some things at compile time, such as types, methods, etc. While .NET reflection is immensely powerful, it's not very quick. To address this, this library offers the following classes:

  • FastComparer - provides a method for comparing instances of a type that is not known at compile time
  • FastConstructorInfo - provides a method for invoking a constructor that is not known at compile time
  • FastDefault - provides a method for getting the default value of a type that is not known at compile time
  • FastEqualityComparer - provides methods for testing equality of and getting hash codes for instances of a type that is not known at compile time
  • FastMethodInfo - provides a method for invoking a method that is not known at compile time

All of the above classes use reflection to initialize utilities for types at runtime, however they create delegates to perform at much better speeds and cache instances of themselves to avoid having to perform the same reflection twice. And yes, the caching is thread-safe.

Also includes extension methods for Type which search for implementations of events, methods, and properties. Also includes GenericOperations which provides methods for adding, dividing, multiplying, and/or subtracting objects.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Cogs.Reflection:

Package Downloads
Cogs.ActiveExpressions

Cogs for active expressions.

Cogs.ActiveQuery

Cogs for active queries.

Cogs.Wpf

Cogs for WPF. Includes general-use behaviors, controls, validation rules, and value converters. Also includes ways to leverage Windows features beyond what WPF supports out of the box (such as using enabling blur-behind and binding system commands to controls) and the inclusion of input gestures in styles.

Cogs.Exceptions

Cogs for exceptions. Includes extension methods for fully detailing exceptions in a variety of formats.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.6.0 1,039 1/26/2023
1.5.0 713 1/21/2023
1.4.4 7,667 12/16/2021
1.4.3 1,028 11/3/2021
1.4.2 2,929 1/30/2021
1.4.1 943 11/22/2020
1.4.0 6,115 4/29/2020
1.3.2 2,933 4/11/2020
1.3.1 643 4/11/2020
1.3.0 425 4/9/2020
1.2.0 954 3/3/2020
1.1.0 579 3/3/2020
1.0.1 668 3/1/2020
1.0.0 555 2/29/2020

Non-abstract classes sealed for performance.