Releases: Tynab/YANLib
v8.3.1
YANLib 8.3.1 - Snowflake ID Refinements & Property Encapsulation Improvements
Snowflake ID Generator Enhancements
-
Improved Property Encapsulation
- Refactored
IdGeneratorclass to use auto-implemented properties for better encapsulation - Changed
Sequenceproperty access modifier frominternal settoprivate setfor improved security - Removed redundant private backing fields in favor of direct property initialization
- Refactored
-
Code Structure Optimization
- Streamlined internal implementation of bit allocation properties
- Enhanced memory efficiency by eliminating unnecessary field duplication
- Improved code readability and maintainability through consistent property patterns
-
Constructor Refinements
- Optimized constructor implementation for better performance
- Enhanced initialization flow for predefined bit allocation strategies
- Maintained full backward compatibility with existing code
Architecture Improvements
- Strengthened encapsulation of internal state management
- Reduced memory footprint through elimination of redundant fields
- Improved overall code quality and maintainability
- Enhanced consistency across the Snowflake ID implementation
Bug Fixes
- Fixed potential thread safety issues with sequence property access
- Addressed edge cases in property initialization patterns
- Ensured consistent behavior across all constructor overloads
This maintenance release focuses on internal improvements to the Snowflake ID implementation, enhancing code quality while maintaining full compatibility with existing applications.
See full documentation at: https://github.com/Tynab/YANLib/wiki
v8.3.0
YANLib 8.3.0 - Snowflake ID Implementation & Customizable Distributed Identifiers
Distributed ID Generation
-
Snowflake Algorithm Integration
- Added robust implementation of the Snowflake ID algorithm for distributed systems
- Implemented 64-bit unique ID generation with timestamp, worker ID, datacenter ID, and sequence components
- Full support for time-ordered, sortable identifiers with millisecond precision
- Thread-safe implementation for concurrent ID generation in multi-threaded environments
-
Predefined Bit Allocation Strategies
-
Added BitAllocationStrategy enum for simplified bit allocation configuration
-
Included four predefined strategies optimized for different use cases:
- Default (5-5-13): Balanced approach for most applications
- MoreDistributed (10-10-3): Optimized for systems with many workers and datacenters
- HighVolume (2-2-19): Optimized for generating many IDs per millisecond on few nodes
- Balanced (8-8-7): Middle ground between distribution and sequence capacity
-
Simplified constructor overloads for intuitive API usage
-
Automatic validation of worker and datacenter IDs based on selected strategy
-
-
Customizable Bit Allocation
- Added support for customizing bit allocation between worker ID, datacenter ID, and sequence components
- Flexible configuration to optimize for different distributed system requirements
- Automatic validation to ensure the total bit allocation remains within the 64-bit constraint
- Runtime calculation of maximum values based on configured bit allocations
-
String Representation Support
- Added base-26 alphabetic (A-Z) string representation for more compact IDs
- Implemented base-36 alphanumeric (0-9, A-Z) encoding for maximum compactness
- Bidirectional conversion between numeric IDs and string representations
- Support for custom epoch timestamps for application-specific time ranges
Performance
- Optimized bit manipulation operations for efficient ID composition
- High-throughput ID generation with minimal overhead
- Efficient string conversion algorithms for alphabetic and alphanumeric formats
- Thread synchronization with minimal contention for concurrent scenarios
- Automatic sequence handling with configurable capacity per millisecond
Improvements
- Component extraction methods to retrieve timestamp, worker ID, and datacenter ID from existing IDs
- Strategy-aware component extraction for simplified ID parsing
- Clock drift protection to prevent duplicate IDs when system time moves backwards
- Comprehensive XML documentation for all Snowflake ID-related methods
- Configurable worker and datacenter IDs for distributed deployment scenarios
- Seamless integration with existing YANLib components
See full documentation at: https://github.com/Tynab/YANLib/wiki
v8.2.1
YANLib 8.2.1 - TimeSpan Support & Parsing Enhancements
Enhanced Type Support
-
TimeSpan Parsing Integration
- Added comprehensive TimeSpan support to
Parse<T>extension methods - Implemented TimeSpan parsing with various format patterns (days, hours, minutes, seconds, milliseconds)
- Full support for nullable TimeSpan (
TimeSpan?) parsing with graceful null handling
- Added comprehensive TimeSpan support to
-
Collection TimeSpan Support
- Extended
Parses<T>to handle collections of TimeSpan values - Added TimeSpan support to dictionary parsing with
Parses<TKey, TValue> - Implemented TimeSpan support in lookup parsing with
Parses<TKey, TElement> - Support for mixed TimeSpan formats within collections
- Extended
Performance
- Optimized TimeSpan parsing with efficient string format detection
- Improved handling of TimeSpan components for maximum accuracy
- Enhanced parsing performance for TimeSpan collections
- Reduced memory allocations in TimeSpan conversion operations
Improvements
- Consistent behavior between DateTime and TimeSpan parsing
- Graceful handling of invalid TimeSpan formats
- Extended XML documentation for all TimeSpan-related methods
- Comprehensive test coverage for TimeSpan parsing scenarios
- Improved type safety with TimeSpan-specific handling
See full documentation at: https://github.com/Tynab/YANLib/wiki
v8.2.0
YANLib 8.2.0 - Enhanced Collection Operations & Type Conversion
New Features
-
YANEnumerable Expansion
- Added
YANEnumerable.Genericfor converting collections of objects to strongly-typed collections - Introduced
YANEnumerable.Generic.Immutablefor immutable collection support - Comprehensive support for arrays, lists, hash sets, dictionaries, and lookups
- Added
-
YANRandom Enhancements
- Added
YANRandom.Genericfor generating random values from object collections - Introduced
YANRandom.Generic.Collectionfor generating random collections from object collections - New methods for selecting random elements from existing collections
- Support for both generic and non-generic collection inputs
- Added
-
YANUnmanaged Collection Parsing
- Added dictionary parsing with
Parses<TKey, TValue>for IDictionary<object, object?> - Introduced lookup parsing with
Parses<TKey, TElement>for ILookup<object?, object?> - Enhanced type conversion for complex collection structures
- Added dictionary parsing with
Performance
- Optimized collection conversion with specialized implementations for different collection types
- Improved random value generation with efficient selection algorithms
- Enhanced parsing performance for dictionaries and lookups
- Parallel processing for large collections to maximize throughput
- Reduced memory allocations through careful implementation
Improvements
- Fixed internal
AsyncEnumerableEmpty<T>method in YANTask.Collection - Extended XML documentation for all new methods
- Consistent behavior across all collection operations
- Improved type safety with generic constraints
- Graceful handling of null collections and edge cases
See full documentation at: https://github.com/Tynab/YANLib/wiki
v8.1.0
YANLib 8.1.0 - Enhanced Task Collection Operations
New Features
- Added new asynchronous collection operations to YANTask component
- Introduced
WaitAnyWithConditions<T>for efficient conditional task filtering with early termination - Added
WhenAnyWithConditions<T>for comprehensive conditional task processing - Support for limiting result collection with the
takenparameter - Full cancellation token integration for all new methods
- Enhanced asynchronous enumeration capabilities
Performance
- Optimized task collection processing with minimal allocations
- Improved exception handling with zero overhead for failed tasks
- Efficient early termination when conditions are met
- Smart task completion detection to avoid unnecessary waiting
- Reduced memory pressure through streaming result pattern
Improvements
- Comprehensive XML documentation for all new methods
- Extended test coverage for edge cases and concurrency scenarios
- Consistent behavior with existing YANTask methods
- Graceful handling of null collections and empty task sets
See full documentation at: https://github.com/Tynab/YANLib/wiki
v8.0.1
v8.0.0
YANLib 8.0.0 - Complete Rebuild for .NET 8
Breaking Changes
- Complete rebuild targeting .NET 8
- All previous extensions are now obsolete
- New namespace structure and API design
- Not backward compatible with previous versions
New Features
- Rebuilt components with modern architecture: YANJson, YANUnmanaged, YANRandom, YANTask, YANText, YANObject, YANProcess, YANMath, YANDateTime, YANExpression
- Consistent null handling and collection operations
- Enhanced generic type support
- Thread-safety improvements
Performance
- Significant performance improvements across all components
- Reduced memory allocations
- Optimized algorithms and caching strategies
See full documentation at: https://github.com/Tynab/YANLib/wiki