2.2.0
What's new
- Updated
ToolBX.OPEX
to version 2.2.0 - Updated
ToolBX.Mathemancy
to version 2.2.1 - Updated
ToolBX.OutWarden
to version 2.2.0 - Updated
ToolBX.Reflection4Humans.Extensions
to version 2.2.0
Caching
CachingDictionary
now throwsArgumentNullException
whenRemove
andTryRemove
are used with a nullIEnumerable<TKey>
CachingDictionary.TryGetValue
now returns aResult<T>
instead of aTryGetResult<T>
CachingDictionary
can now be compared to aObservableDictionary
==
and!=
operators were added toCachingDictionary
- Added a
ToCachingDictionary
extension method that takes aIEnumerable<KeyValuePair<TKey, TValue>>
, making it easier to convert another dictionary type to aCachingDictionary
CachingStack
now implements theCopyTo
methodCachingStack.TryPeek
now returns aResult<T>
instead of aTryGetResult<T>
CachingStack.TryPop
now returns aResult<T>
instead of aTryGetResult<T>
==
and!=
operators were added toCachingStack
- Added
System.Text.Json
support toCachingDictionary
but must be done manually by addingnew CachingDictionaryJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithCachingConverters()
extension method - Added
System.Text.Json
support toCachingList
but must be done manually by addingnew CachingListJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithCachingConverters()
extension method - Added
System.Text.Json
support toCachingStack
but must be done manually by addingnew CachingStackJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithCachingConverters()
extension method
Common
CollectionChangeEventArgs<T>
no longer inheritsEventArgs
and is now arecord
type
Grid
GridChangedEventArgs<T>
implements proper value equality and hashcode- Added
System.Text.Json
support toGrid<T>
but must be done manually by addingnew GridJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithGridConverters()
extension method - Added
System.Text.Json
support toOverlapGrid<T>
but must be done manually by addingnew OverlapGridJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithGridConverters()
extension method - Fixed a potential issue with
OverlapGrid<T>
'sEquals
method erroneously taking internal collection ordering by taking advantage ofToolBX.OPEX
's newUnorderedEqualOrNull
extension method
Inventory
Entry<T>
is nowsealed
and inherits a newEntryBase<T>
GroupedEntry<T>
is nowsealed
and inherits a newEntryBase<T>
IndexedEntry<T>
is nowsealed
and inherits a newEntryBase<T>
GroupedEntry<T>
now correctly implements value equality and hash codeGroupedEntry<T>
has a newToString
override which returns its indexes in addition to theItem
andQuantity
Inventory<T>
no longer uses itsStack
property for its hashcode sinceStack
is mutable- Added
System.Text.Json
support toInventoryList<T>
but must be done manually by addingnew InventoryListJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithInventoryConverters()
extension method - Added
System.Text.Json
support toInventoryTable<T>
but must be done manually by addingnew InventoryTableJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithInventoryConverters()
extension method - Added
System.Text.Json
support toStockSearchResult<T>
but must be done manually by addingnew StockSearchResultJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithInventoryConverters()
extension method - Fixed an issue with
StockSearchResult<T>
that incorrectly grouped items
ObservableDictionary
- Added
System.Text.Json
support toObservableDictionary<TKey, TValue>
but must be done manually by addingnew ObservableDictionaryJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithObservableDictionaryConverters()
extension method - The
TryGetValue
method now returnsResult<T>
instead ofTryGetResult<T>
ObservableList
- Added
System.Text.Json
support toObservableList<T>
but must be done manually by addingnew ObservableListJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithObservableListConverters()
extension method
ObservableStack
- Added
System.Text.Json
support toObservableStack<T>
but must be done manually by addingnew ObservableStackJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithObservableListConverters()
extension method - The
TryPeek
method now returnsResult<T>
instead ofTryGetResult<T>
- The
TryPop
method now returnsResult<T>
instead ofTryGetResult<T>
ReadOnly
- You can now instantiate a new
ReadOnlyList<T>
withReadOnlyList.Create(1, 2, 3)
as you would with the officialSystem.Collections.Immutable.ImmutableList<T>
butReadOnlyList<T>
's constructor is still supported - Added
System.Text.Json
support but must be done manually by addingnew ReadOnlyListJsonConverterFactory()
toJsonSerializerOptions
or use theoptions.WithReadOnlyConverters()
extension method Newtonsoft.Json
is still supported by default (no custom converter required)ReadOnlyList<T>
now has proper value-based hashcode- The
ToReadOnlyList<T>()
extension method no longer instantiates a newReadOnlyList<T>
when used on aReadOnlyList<T>
ReadOnlyList<T>.Empty
now returns aReadOnlyList<T>
instead of anIReadOnlyList<T>
UnitTesting
New package added to help unit testing ToolBX.Collections
types
Breaking soon
Grid
GridChangedEventArgs<T>
'sOldValues
andNewValues
properties will be changed toIReadOnlyList<T>
(fromIList<T>
)
Inventory
Entry<T>
will now throw an exception when you try to initialize itsQuantity
property with a negative or zero number