Cocoar.Reflectensions
1.0.1
dotnet add package Cocoar.Reflectensions --version 1.0.1
NuGet\Install-Package Cocoar.Reflectensions -Version 1.0.1
<PackageReference Include="Cocoar.Reflectensions" Version="1.0.1" />
<PackageVersion Include="Cocoar.Reflectensions" Version="1.0.1" />
<PackageReference Include="Cocoar.Reflectensions" />
paket add Cocoar.Reflectensions --version 1.0.1
#r "nuget: Cocoar.Reflectensions, 1.0.1"
#:package Cocoar.Reflectensions@1.0.1
#addin nuget:?package=Cocoar.Reflectensions&version=1.0.1
#tool nuget:?package=Cocoar.Reflectensions&version=1.0.1
Cocoar.Reflectensions
Advanced reflection utilities for .NET — type parsing, fluent reflection extensions, smart type conversion, and dynamic invocation. Zero external dependencies.
Install
dotnet add package Cocoar.Reflectensions # Core library
dotnet add package Cocoar.Reflectensions.Invoke # + Dynamic method invocation
dotnet add package Cocoar.Reflectensions.ExpandableObject # + Dynamic expandable objects
You only need Core unless you need invocation or expandable objects. Targets .NET 8.0 and .NET Standard 2.0.
Quick Start
using Cocoar.Reflectensions;
// Parse complex type names from strings
var type = TypeHelper.FindType("Dictionary<string, List<int>>");
// Fluent reflection queries
var methods = typeof(MyClass).GetMethods()
.WithName("Process")
.WithReturnType<Task>()
.WithParametersOfType(typeof(string));
// Smart type conversion — discovers implicit operators automatically
DateTime date = "2021-03-21T15:50:17+00:00".Reflect().To<DateTime>();
int number = "42".Reflect().To<int>();
Truck truck = camaro.Reflect().To<Truck>(); // uses implicit operator
Key Features
- Advanced Type Parsing — Parse
Dictionary<string, List<int>>from strings, with custom type mappings. - Fluent Reflection API — Chainable LINQ-style extensions for types, methods, properties, and parameters.
- Smart Type Conversion —
Reflect().To<T>()with automatic implicit operator detection, Parse/TryParse, IConvertible fallbacks, and optimized hot paths (8x faster for common conversions). - Zero-Cost Abstractions —
ObjectReflection<T>readonly structs with no heap allocations. - Dynamic Invocation — Invoke methods via MethodInfo with automatic parameter type conversion and async support.
- Expandable Objects — Dynamic objects with dictionary-like behavior and
INotifyPropertyChanged. - Zero Dependencies — Completely self-contained, no third-party NuGet packages.
Packages
| Package | Description |
|---|---|
| Cocoar.Reflectensions | Core — type helpers, reflection extensions, type conversion, string/enum/DateTime/array utilities |
| Cocoar.Reflectensions.Invoke | Dynamic method invocation with parameter matching |
| Cocoar.Reflectensions.ExpandableObject | Dynamic objects with dictionary-like behavior |
Migration from doob.Reflectensions
<PackageReference Include="doob.Reflectensions" Version="6.4.2" />
<PackageReference Include="Cocoar.Reflectensions" Version="1.0.0" />
See the Migration Guide for namespace changes and removed packages.
Contributing
Contributions welcome! See CONTRIBUTING.md for guidelines.
License
Apache-2.0 — Copyright 2025 COCOAR e.U.
| Product | Versions 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 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Cocoar.Reflectensions:
| Package | Downloads |
|---|---|
|
Cocoar.Reflectensions.Invoke
Dynamic method invocation helpers with automatic parameter matching and type conversion. |
|
|
Cocoar.Reflectensions.ExpandableObject
Dynamic expandable objects with dictionary-like behavior for Reflectensions. |
|
|
Cocoar.SignalARRR.Server
SignalARRR server library — typed bidirectional RPC over SignalR with authorization, streaming, server-to-client calls, and ServerMethods organization. |
|
|
Cocoar.SignalARRR.Client
SignalARRR client library — typed bidirectional RPC over SignalR with streaming, cancellation, and source-generated proxies. |
|
|
Cocoar.SignalARRR.Client.FullFramework
SignalARRR client for .NET Framework 4.6.2+ — typed bidirectional RPC over SignalR with streaming, authorization, cancellation, and file transfer. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 37 | 3/25/2026 |
| 1.0.0 | 623 | 10/17/2025 |
| 0.1.0-alpha.109 | 126 | 10/17/2025 |
Full release notes: https://github.com/cocoar-dev/Cocoar.Reflectensions/blob/develop/CHANGELOG.md