MeshWeaver.Reflection
2.0.3
dotnet add package MeshWeaver.Reflection --version 2.0.3
NuGet\Install-Package MeshWeaver.Reflection -Version 2.0.3
<PackageReference Include="MeshWeaver.Reflection" Version="2.0.3" />
paket add MeshWeaver.Reflection --version 2.0.3
#r "nuget: MeshWeaver.Reflection, 2.0.3"
// Install MeshWeaver.Reflection as a Cake Addin #addin nuget:?package=MeshWeaver.Reflection&version=2.0.3 // Install MeshWeaver.Reflection as a Cake Tool #tool nuget:?package=MeshWeaver.Reflection&version=2.0.3
MeshWeaver.Reflection
Overview
MeshWeaver.Reflection provides a collection of extension methods and utilities to simplify common reflection tasks in C#. This library extends the standard reflection capabilities with convenient helper methods and performance optimizations.
Features
Type Extensions
- Anonymous type detection
- Nullable type handling
- Type inheritance and interface inspection
- Attribute handling
- Property and method reflection helpers
Member Info Extensions
- Attribute inspection and caching
- Property override detection
- Virtual property analysis
- Interface declaration inspection
Reflection Helpers
- Property accessor detection
- Constant value extraction
- Generic type constraint validation
- Type signature analysis
Performance Optimizations
- Cached attribute lookups
- Optimized type comparisons
- Efficient member access
Usage Examples
// Check if type is anonymous
bool isAnonymous = type.IsAnonymous();
// Get all string constants from a type
var constants = type.GetStringConstants();
// Check if property overrides base class
bool isOverride = propertyInfo.IsOverride();
// Get custom attributes with inheritance
var attributes = memberInfo.GetCustomAttributesInherited<T>();
Integration
The library is used throughout the MeshWeaver ecosystem to provide efficient reflection capabilities where needed.
See Also
Refer to the main MeshWeaver documentation for more information about the overall project architecture.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
-
net9.0
- MeshWeaver.Utils (>= 2.0.3)
- System.Interactive (>= 6.0.1)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on MeshWeaver.Reflection:
Package | Downloads |
---|---|
MeshWeaver.Messaging.Hub
Package Description |
|
MeshWeaver.Arithmetics
Package Description |
|
MeshWeaver.DataCubes
Package Description |
|
MeshWeaver.DataSetReader.Csv
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.3 | 576 | 3/24/2025 |
2.0.2 | 552 | 3/24/2025 |
2.0.1 | 210 | 3/21/2025 |
2.0.0 | 247 | 3/20/2025 |
2.0.0-preview3 | 200 | 2/28/2025 |
2.0.0-Preview2 | 256 | 2/10/2025 |
2.0.0-preview1 | 244 | 1/6/2025 |
1.0.1 | 284 | 10/8/2024 |
1.0.0 | 273 | 10/8/2024 |