Skip to content

v1.0.0 - First Official Release

Choose a tag to compare

@windischb windischb released this 17 Oct 09:57
· 6 commits to develop since this release

🎉 Cocoar.Reflectensions v1.0.0

We're excited to announce the first stable release of Cocoar.Reflectensions - a powerful and intuitive .NET reflection library that makes working with reflection simple and safe.

🔄 Migration from doob.Reflectensions

This package replaces and supersedes doob.Reflectensions. If you're currently using doob.Reflectensions, please migrate to Cocoar.Reflectensions for continued support and updates.

Migration is straightforward:

  1. Remove the doob.Reflectensions package
  2. Install Cocoar.Reflectensions
  3. Update namespace imports from doob.Reflectensions to Cocoar.Reflectensions

✨ What's Included

Core Features

  • Type Casting & Conversion - Fluent APIs for safe type conversions with To<T>(), As<T>(), and Is<T>()
  • Property & Field Reflection - Easy access to object members with .GetValue(), .SetValue(), and batch operations
  • Method Invocation - Simplified method calling through reflection
  • Attribute Inspection - Streamlined attribute reading and validation
  • Collection Extensions - Enhanced LINQ-like operations for common collection tasks
  • String Utilities - Powerful string manipulation and validation helpers
  • DateTime Extensions - Unix timestamp conversions, kind management, and more

Quality & Performance

  • ✅ 166 passing tests with full CI/CD validation
  • ✅ Nullable reference types enabled for enhanced null safety
  • ✅ Zero warnings - clean, maintainable codebase
  • ✅ XML documentation for full IntelliSense support
  • ✅ Performance optimized with hot paths for common scenarios
  • ✅ Cross-platform - tested on Windows and Linux

Developer Experience

  • Intuitive fluent API with .Reflect() wrapper to avoid extension method pollution
  • Comprehensive IntelliSense documentation
  • Strong typing with nullable annotations
  • Minimal dependencies (no JSON libraries required)

📦 Installation

dotnet add package Cocoar.Reflectensions

🚀 Quick Start

using Cocoar.Reflectensions;

// Type conversion
var number = "123".Reflect().To<int>();
var date = "2024-01-01".Reflect().To<DateTime>();

// Property access
var value = myObject.Reflect().GetValue("PropertyName");
myObject.Reflect().SetValue("PropertyName", newValue);

// Attribute inspection
var hasAttribute = myType.Reflect().HasAttribute<MyAttribute>();
var attribute = myType.Reflect().GetAttribute<MyAttribute>();

// Collection operations
var merged = dict1.Merge(dict2);
var formatted = list.ToCommaSeparatedString();

🔗 Resources

📄 License

Licensed under the MIT License - see LICENSE for details.

🙏 Acknowledgments

Special thanks to all contributors and early adopters who helped shape this library!


Ready to simplify your reflection code? Install Cocoar.Reflectensions today and experience the difference!