-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
changelog.txt
1551 lines (1400 loc) · 83.6 KB
/
changelog.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Legend:
! Breaking change
* Compatible change
- Bugfix
+ New feature
===============================================================================
~~~~~~~~~
! v8.0.0:
~~~~~~~~~
+ Assembly changes:
===================
+ Targeting also .NET 8.0.
! KGySoft.CoreLibraries namespace:
==================================
! StringExtensions and SpanExtensions classes:
! Parse methods: When parsing a Type it is no longer allowed to load assemblies during the operation
if the value to parse contains assembly qualified names of non-loaded assemblies. You still can use the
Reflector.ResolveType method with the appropriate options to allow loading assemblies.
! TypeExtensions class:
! RegisterTypeConverter method:
! When this method was called repeatedly for the same type the 2nd and further calls had no effect. From now on
the latest registration will be used and possible temporary registrations can be removed.
- If this method was called after a TypeDescriptor.GetConverter call for the same type, then the further
TypeDescriptor.GetConverter calls continued to return the original converter.
+ New UnregisterTypeConverter method: It allows removing the custom type converter registrations added by the
RegisterTypeConverter method.
+ New UnregisterConversions method to remove the conversions set by the RegisterConversion methods.
+ ArrayExtensions class:
+ New AsSection overload for ArraySegment<T>
+ New AsArray2D overload for ArraySegment<T>
+ New AsArray3D overload for ArraySegment<T>
+ StringSegmentComparer class:
+ New OrdinalNonRandomized property
+ New OrdinalIgnoreCaseNonRandomized property
+ New CompareInfo property
+ New CompareOptions property
+ New Create overload with CompareOptions parameter (.NET Framework 4.6 and above)
- ByteArrayExtensions class:
- ToDecimalValuesString method: Fixing result for empty string input.
- EnumerableExtensions:
- IsNullOrEmpty (non-generic): the fallback implementation attempted to dispose the possibly disposable enumerable
instance instead of the enumerator.
- FastRandom class: Fixing possible VerificationException in .NET Framework in partially trusted domains.
- RandomExtensions class: Fixing possible VerificationException in .NET Framework in partially trusted domains.
* KGySoft.Collections namespace:
================================
* ArraySection<T> struct:
+ New constructor from ArraySegment<T>
+ New implicit operators to convert to and from ArraySegment<T>
- Fixing serialization: Since v6.0.0 the underlying array is publicly exposed but it was not completely restored.
+ Array2D<T> struct:
+ New constructor from ArraySegment<T>
+ New implicit operator to convert to ArraySegment<T>
+ Array3D<T> struct:
+ New constructor from ArraySegment<T>
+ New implicit operator to convert to ArraySegment<T>
+ StringKeyedDictionary<TValue> class:
+ New public Comparer property.
- ThreadSafeDictionary<TKey, TValue> class:
- Fixing non-generic IDictionary.Add implementation for null values.
- The PreserveMergedKeys property was ignored on serialization.
* ThreadSafeHashSet<T> class:
+ New TryAdd and TryRemove methods
- The PreserveMergedItems property was ignored on serialization.
! KGySoft.ComponentModel namespace:
===================================
! BinaryTypeConverter class:
! ConvertFrom method: It does not support any custom types anymore that contain nested custom types that are not
supported by the BinarySerializationFormatter class in safe mode natively.
+ New constructor where the expected root type can be specified for the safe deserialization.
+ New Type property.
- KGySoft.Diagnostics:
======================
- PerformanceTestBase<,> class: Fixing the sorting of results when a test case throws an exception.
! KGySoft.Reflection namespace:
===============================
! PropertyAccessor class:
! CanWrite property: starting with this version this property returns true for ref properties indicating that Set
methods work for them, even though they are technically read-only properties.
+ Original non-generic Set method:
+ Supporting ref properties (even though they are technically read-only properties)
+ The .NET Standard 2.0 build did not support setting instance fields in value types. Now this case uses regular
reflection as a fallback though with a negative impact on the performance.
+ Original non-generic Get method: Supporting ref properties
+ Generic GetStaticValue/GetInstanceValue methods: Supporting ref properties
+ Generic SetStaticValue/SetInstanceValue methods: Supporting ref properties
+ New non-generic Get/Set overloads specialized for up to 1 index parameter for better performance.
+ MethodAccessor class:
+ New non-generic Invoke overloads specialized for up to 4 parameters for better performance.
+ Invoke methods: Supporting ref return values
+ Generic InvokeStaticAction/InvokeStaticFunction/InvokeInstanceAction/InvokeStaticAction methods: Supporting also
ref return values and parameters passed by reference, though only as input parameters.
+ Invoke(object, object[]) overload: The .NET Standard 2.0 build did not support assigning back ref/out parameters
and preserving value type mutations. Now these cases use regular reflection as a fallback though with a negative
impact on the performance.
+ GetAccessor method: Better support of generating invoker methods in .NET Framework in partially trusted domains
that can avoid the previously expected VerificationException (depending on the domain configuration).
+ CreateInstanceAccessor class:
+ New non-generic Invoke overloads specialized for up to 4 parameters for better performance.
+ Generic InvokeStaticAction/InvokeStaticFunction/InvokeInstanceAction/InvokeStaticAction methods: Supporting also
parameters passed by reference, though only as input parameters.
+ CreateInstance(object[]) overload: The .NET Standard 2.0 build did not support assigning back ref/out
parameters. Now this case uses reflection as a fallback though with a negative impact on the performance.
+ FieldAccessor class:
+ Set method: The .NET Standard 2.0 build did not support setting instance fields in value types and setting
read-only fields. Now these cases use regular reflection as a fallback though with a negative impact on the
performance.
- MemberAccessor class:
- Fixing a possible Invalid owner error when generating an accessor for an interface member in some special cases.
+ Reflector class:
+ [Try]GetProperty/[Try]SetProperty methods: Supporting getting/setting ref properties if reflection way is Auto
or DynamicDelegate. The behavior of SystemReflection and TypeDescriptor ways are platform dependent.
+ [Try]InvokeMethod methods: Supporting ref return values if reflection way is Auto or DynamicDelegate.
The behavior of SystemReflection way is platform dependent.
+ [Try]GetIndexedMember/[Try]SetIndexedMember methods: Supporting getting/setting ref indexer properties if
reflection way is Auto or DynamicDelegate. The behavior of SystemReflection way is platform dependent.
! KGySoft.Resources namespace:
==============================
! ResXDataNode class:
! GetValue method: Mime types representing BinaryFormatter are no longer supported when targeting .NET 8 or later.
! GetValueSafe(ITypeResolutionService, string, bool): This method is now obsolete and throws an exception if the
typeResolver parameter is not null because custom type resolving is not enabled in safe mode. The first
parameter is not optional anymore so if no parameters are specified the new overload is used automatically.
+ New GetValueSafe(bool) overload. If the obsoleted overload was called without specifying the optional parameters
this new overload is going to be called after a rebuild.
! GetValue method: In .NET 8.0 and above it is no longer supported to deserialize resources that were serialized
by BinaryFormatter.
! GetValueSafe methods:
! File references are not allowed in safe mode. Not even strings or byte array because a file replacement may
cause an OutOfMemoryException.
! Resources serialized by the safe BinarySerializationFormatter (non-compatible mode) can only be deserialized
if the expectedType is specified and the stream does not contain nested custom types, or if the serialization
stream does not contain any type names to resolve other than the expected type.
! Embedded MemoryStream in non-compatible mode is added as a byte array rather than a binary serialized stream.
This affects the result of the GetObject methods in ResXResourceManager, HybridResourceManager and
DynamimcResourceManager classes but their GetStream methods still work the same way.
! KGySoft.Serialization.Binary namespace:
=========================================
! BinarySerializer class:
! CreateFormatter method: Return type has been changed to BinarySerializationFormatter from IFormatter to avoid
SYSLIB0011 error in .NET 8 and above. It always has returned a BinarySerializationFormatter instance anyway.
! Deserialize* methods: BinarySerializationOptions.SafeMode flag is now enabled by default
! BinarySerializationFormatter class:
! Constructor: BinarySerializationOptions.SafeMode flag is now enabled in options parameter by default
! If SafeMode is enabled, non-natively supported types cannot be automatically deserialized anymore (not even
serializable types). Every type that is stored in the serialization stream by name must be passed to the
expectedCustomTypes parameter of the new Deserialize* methods, including enum or unmanaged value type names.
! If SafeMode is enabled, no surrogate selectors can be used, not even the ones that have a SafeMode property
in this library.
! If SafeMode is enabled, only ForwardedTypesSerializationBinder can be used for deserialization if its SafeMode
is set to true. The reason for not allowing any 3rd party binders (not even the other binders in this library)
is that a custom serialization logic could weaken the SafeMode rules of BinarySerializationFormatter.
+ Better support of partially trusted application domains (.NET Framework, .NET Standard 2.0)
+ New Deserialize, DeserializeFromStream, DeserializeByReader overloads with expectedCustomTypes parameters.
+ Supporting the StringSegment struct natively
+ Supporting the CompareInfo class natively
+ Supporting the CultureInfo class natively
+ Supporting the ThreadSafeHashSet<T> class natively
+ Supporting the ThreadSafeDictionary<TKey, TValue> class natively
+ Supporting the StringKeyedDictionary<TValue> class natively
+ Supporting the ArraySegment<T> struct natively
+ Supporting the ArraySection<T> struct natively
+ Supporting the Array2D<T> struct natively
+ Supporting the Array3D<T> struct natively
+ Supporting the StrongBox<T> class natively
+ Supporting the Comparer class natively
+ Supporting the CaseInsensitiveComparer class natively
+ Supporting the known StringComparer implementations natively
+ Supporting the StringSegmentComparer implementations natively
+ Supporting the default EqualityComparer<T> implementations natively
+ Supporting the default Comparer<T> implementations natively
+ Supporting the default EnumComparer<T> implementations natively
+ Supporting the Tuple<...> classes natively (.NET Framework 4.0 and above)
+ Supporting the Complex struct natively (.NET Framework 4.0 and above)
+ Supporting the Vector2 struct natively (.NET Framework 4.6 and above)
+ Supporting the Vector3 struct natively (.NET Framework 4.6 and above)
+ Supporting the Vector4 struct natively (.NET Framework 4.6 and above)
+ Supporting the Quaternion struct natively (.NET Framework 4.6 and above)
+ Supporting the Plane struct natively (.NET Framework 4.6 and above)
+ Supporting the Matrix3x2 struct natively (.NET Framework 4.6 and above)
+ Supporting the Matrix4x4 struct natively (.NET Framework 4.6 and above)
+ Supporting the ValueTuple<...> structs natively (.NET Standard 2.0 and above)
+ Supporting the ImmutableArray<T> struct natively (.NET Core 2.0 and above)
+ Supporting the ImmutableArray<T>.Builder class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableList<T> class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableList<T>.Builder class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableHashSet<T> class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableHashSet<T>.Builder class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableSortedSet<T> class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableSortedSet<T>.Builder class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableQueue<T> class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableStack<T> class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableDictionary<TKey, TValue> class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableDictionary<TKey, TValue>.Builder class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableSortedDictionary<TKey, TValue> class natively (.NET Core 2.0 and above)
+ Supporting the ImmutableSortedDictionary<TKey, TValue>.Builder class natively (.NET Core 2.0 and above)
+ Supporting the Vector64<T> struct natively (.NET Core 3.0 and above)
+ Supporting the Vector128<T> struct natively (.NET Core 3.0 and above)
+ Supporting the Vector256<T> struct natively (.NET Core 3.0 and above)
+ Supporting the Vector512<T> struct natively (.NET 8.0 and above)
* CustomSerializerSurrogateSelector class: The class has been made obsolete
* NameInvariantSurrogateSelector class: The class has been made obsolete
! KGySoft.Serialization.Xml namespace:
======================================
! XmlSerializer class:
! DeserializeSafe and DeserializeContentSafe methods:
! These methods cannot deserialize any custom types anymore without declaring the expected types in the new
overloads. Natively supported simple types are recognized even if they are not specified as expected types.
+ Serialize* methods: Supporting more collections without fallback options (if they use a supported comparer):
+ Dictionary<TKey, TValue>
+ SortedList<TKey, TValue>
+ SortedDictionary<TKey, TValue>
+ ThreadSafeDictionary<TKey, TValue>
+ StringKeyedDictionary<TKey, TValue>
+ ConcurrentDictionary<TKey, TValue> (.NET Framework 4.0 and above)
+ HashSet<T>
+ SortedSet<T> (.NET Framework 4.0 and above)
+ ThreadSafeHashSet<T>
+ Hashtable
+ SortedList
+ ListDictionary
+ HybridDictionary
+ OrderedDictionary
+ New DeserializeSafe and DeserializeContentSafe overloads with expectedCustomTypes parameters.
+ Deserialize* methods:
+ Binary serialized content was disabled in safe mode. Now it's enabled but types resolved by name must be
declared in the expectedCustomTypes parameter of the new Deserialize[Content]Safe overloads.
+ Supporting the deserialization of ref properties
- SerializeContent methods: ForcedSerializationOfReadOnlyMembersAndCollections option was ignored for collection
members directly in the root instance.
+ XmlSerializationOptions enumeration:
+ New IncludeRefProperties flag
~~~~~~~~~
* v7.2.0:
~~~~~~~~~
* KGySoft.CoreLibraries namespace:
==================================
* DictionaryExtensions class: Some GetValueOrDefault overloads that could cause ambiguities were not added to the
.NET Core platform targets. Now these are also included also on .NET Core platforms but not as extension methods
to prevent ambiguity with the extension methods of the same name under .NET Core and .NET.
- FastRandom class:
- NextSingle method: it guarantees returning less than 1.0.
- RandomExtensions class:
- NextSingle(Random) method: it guarantees returning less than 1.0 even if the passed Random instance has a poor
NextSingle implementation including System.Random in .NET <= 7.0: https://github.com/dotnet/runtime/issues/85016
- NextHalf(Random) method: it guarantees returning less than 1.0. (.NET 5.0 and above)
* KGySoft.Collections namespace:
================================
* Common collection changes in general:
* Improving lookup performance if the generic argument is a value type
+ Cache<TKey, TValue> class:
+ New Comparer property
* ThreadSafeDictionary<TKey, TValue> class:
* Improved race condition handling when merging elements into the lock-free storage.
- [Try]Remove methods: Could return true in race conditions when the winner actually was another thread.
* ThreadSafeHashSet<T> class:
* Improved race condition handling when merging elements into the lock-free storage.
- Remove method: Could return true in race conditions when the winner actually was another thread.
* KGySoft.Security.Cryptography namespace:
==========================================
* SecureRandom class:
+ New static Instance property to obtain a shared instance
- NextSingle method: it guarantees returning less than 1.0. (.NET 6.0 and above)
~~~~~~~~~
* v7.1.0:
~~~~~~~~~
* KGySoft.CoreLibraries namespace:
==================================
+ Enum<TEnum> class:
+ New GetDefinedOrDefault methods.
+ New GetDefinedOrNull methods.
+ EnumExtensions class:
+ New GetDefinedOrDefault method.
+ New GetDefinedOrNull method.
* EnumComparer<T> class:
* Improving performance from partially trusted domains (.NET Framework 4.x).
+ KGySoft.ComponentModel namespace:
===================================
+ New BindingListDisposeBehavior enum.
+ FastBindingList class:
+ New DisposeBehavior property.
- KGySoft.Diagnostics namespace:
================================
- PerformanceTestBase<TDelegate, TResult> class:
- Fixing possible VerificationException from partially trusted domains created by an assembly
with Level2 security (eg. the sandbox domains in .NET Fiddle). Affects .NET Framework 4.x only.
~~~~~~~~~
! v7.0.0:
~~~~~~~~~
+ Assembly changes:
===================
+ Targeting also .NET 7.0.
+ KGySoft namespace
===================
+ PublicResources class: New ArgumentInvalid property.
* KGySoft.Collections namespace:
================================
+ New ThreadSafeHashSet<T> class: a scalable alternative for LockingCollection<T>
* ThreadSafeDictionary<TKey, TValue> class:
+ Adding public Comparer property
+ The IDictionary<TKey, TValue>.Remove implementation has been made public to improve the compatibility with the
regular Dictionary<TKey, TValue> class (which behaves the same way as the TryRemove method).
+ Implementing also IReadOnlyDictionary<TKey, TValue> (.NET Framework 4.5 and above)
* Better chance to initialize immediately in the lock-free storage when created from another collection.
+ CircularList<T> class: New public EnsureCapacity method
+ CircularSortedList<TKey, TValue> class:
+ New EnsureCapacity method
+ New GetKeyAtIndex/GetValueAtIndex/SetValueAtIndex methods
+ LockingCollection<T>: Implementing also IReadOnlyCollection<T> (.NET Framework 4.5 and above)
+ LockingList<T>: Implementing also IReadOnlyList<T> (.NET Framework 4.5 and above)
+ LockingDictionary<T>: Implementing also IReadOnlyDictionary<TKey, TValue> (.NET Framework 4.5 and above)
+ KGySoft.ComponentModel namespace:
===================================
+ Command and CommandBindingsCollection classes: Explicitly implemented interface events now can be specified by the
original event name. This allows using myBindings.Add(myCommand).AddSource(source, nameof(IMyInterface.EventName))
instead of myBindings.Add(myCommand).AddSource(source, "MyNamespace.IMyInterface.EventName") even if the event is
implemented explicitly.
+ Command class:
+ New CreateTwoWayPropertyBinding methods
+ New CreatePropertyChangedHandlerBinding methods
+ CommandBindingsCollection class:
+ New AddTwoWayPropertyBinding method
+ New AddPropertyChangedHandlerBinding methods
+ SimpleCommand, TargetedCommand, SourceAwareCommand, SourceAwareTargetedCommand classes:
+ Their ToString now reflect the name of the method the commands were created from to make debugging easier.
+ More descriptive error message when command parameters or command targets have invalid types.
+ CommandBinding class: Descriptive ToString implementation to make debugging easier.
! KGySoft.CoreLibraries namespace:
==================================
! StringSegment struct:
! Split methods: they were compatible with String.Split methods, which might have ignored the TrimEntries flag if
no split occurred. This turned out to be a bug fixed in .NET 7 (https://github.com/dotnet/runtime/issues/73194).
The fixed behavior in StringSegment is applied to all targets not just .NET 7 or above so this is considered as
a breaking change.
! The WaitHandleExtensions class has been moved to the new KGySoft.Threading namespace.
- ListExtensions class:
- ReplaceRange<T> method: Allowing index parameter to be equal to target.Count if the count parameter is 0,
in which case the replacement collection is inserted at the end of the target list.
+ StringExtensions class:
+ [Try]Parse methods:
+ Natively supporting Int128 and UInt128 types (.NET 7.0 and above)
+ SpanExtensions class:
+ [Try]Parse methods:
+ Natively supporting Int128 and UInt128 types (.NET 7.0 and above)
+ RandomExtensions
+ New SampleInt128 and SampleUInt128 methods (.NET 7.0 and above)
+ New NextInt128 and NextUInt128 methods (.NET 7.0 and above)
+ NextObject methods: supporting Int128 and UInt128 types (.NET 7.0 and above)
* HiResTimer class:
+ Allowing Interval change during running also for small values
- Fixing single core behavior
! KGySoft.Reflection namespace:
===============================
! Reflector class:
! New SetProperty/TrySetProperty/GetProperty/InvokeMethod overloads to be able to ignore the member name case.
These changes are considered breaking because it is possible that one of the new overloads are picked after
recompiling an existing code. This may happen if the last params argument was called with a single bool element.
For example: Reflector.SetProperty(instance, name, true, true) was resolved as
Reflector.SetProperty(instance, name, value: true, indexParameters: new object[] { true }), whereas from now on
it is resolved as Reflector.SetProperty(instance, name, ignoreCase: true, value: true, indexParameters: null).
Similarly, Reflector.InvokeMethod(instance, name, true) was resolved as
Reflector.InvokeMethod(instance, name, parameters: new object[] { true }), whereas from now on it is resolved as
Reflector.InvokeMethod(instance, name, ignoreCase: true, parameters: null).
+ New TryGetProperty/TryInvokeMethod/SetField/TrySetField/GetField/TryGetField overloads to be able to ignore the
member name case. These new overloads never cause a breaking change.
+ New IsExplicitInterfaceImplementation overloads for events, and to get also the corresponding interface member.
! PropertyAccessor class:
! Get/Set methods now do argument validation, throwing ArgumentNullException and ArgumentException instead of
letting the InvalidCastException, NullReferenceException or IndexOutOfRangeException to be thrown. The
validation is performed only when an exception occurs to prevent performance degradation on the hot path.
+ New generic GetStaticValue/SetStaticValue and GetInstanceValue/SetInstanceValue methods for better performance
when the type of the property (and declaring type, index parameter when applicable) are known at compile time.
! FieldAccessor class:
! Get/Set methods now do argument validation, throwing ArgumentNullException and ArgumentException instead of
letting the InvalidCastException or NullReferenceException to be thrown. The validation is performed only when
an exception occurs to prevent performance degradation on the hot path.
+ New generic GetStaticValue/SetStaticValue and GetInstanceValue/SetInstanceValue methods for better performance
when the type of the field (and declaring type for instance fields) are known at compile time.
! MethodAccessor class:
! The Invoke method now does argument validation, throwing ArgumentNullException and ArgumentException instead
of letting the InvalidCastException, NullReferenceException or IndexOutOfRangeException to be thrown. The
validation is performed only when an exception occurs to prevent performance degradation on the hot path.
+ New generic InvokeStaticAction/InvokeStaticFunction and InvokeInstanceAction/InvokeInstanceFunction methods for
better performance when the type of the parameters and return value are known at compile time.
! CreateInstanceAccessor class:
! The CreateInstance method now does argument validation, throwing ArgumentNullException and ArgumentException
instead of letting the InvalidCastException, NullReferenceException or IndexOutOfRangeException to be thrown.
The validation is performed only when an exception occurs to prevent performance degradation on the hot path.
+ New generic CreateInstance methods for better performance when the type of the instance and the parameters are
known at compile time.
+ KGySoft.Serialization.Binary namespace:
=========================================
+ BinarySerializationFormatter class:
+ Supporting the Int128 and UInt128 types natively (.NET 7.0 and above)
! KGySoft.Serialization.Xml namespace:
======================================
! XmlSerializer class:
! When deserializing a type that has pre-initialized properties not using the existing value if the property can
be set and a new instance can be created by a parameterless constructor. Though this might be a breaking change
it actually fixes some issues if the property was initialized by a static member that is not expected to be
mutated.
+ Supporting the Int128 and UInt128 types natively (.NET 7.0 and above)
- Fixing an issue regarding DesignerSerializerVisibilityAttribute handling.
- Not emitting type names unnecessarily for nullable members.
+ New KGySoft.Threading namespace:
==================================
+ The WaitHandleExtensions class has been moved here.
+ New AsyncHelper class to be able to provide sync/async (using APM and/or TPL) overloads for optionally parallel
operations with cancellation and reporting progress using a single shared implementation.
+ New ParallelHelper class: Advanced Parallel.For-like methods for all platforms.
+ New AsyncConfigBase, AsyncConfig, ParallelConfig, TaskConfig classes
+ New IAsyncContext, IAsyncProgress interfaces
+ New AsyncProgress<T> struct.
~~~~~~~~~
- v6.0.2:
~~~~~~~~~
- KGySoft.CoreLibraries namespace:
==================================
- EnumComparer<TEnum> class: fixing possible AccessViolationException in .NET Core 3.0 and above when a consumer
project targets the x86 platform.
~~~~~~~~~
* v6.0.1:
~~~~~~~~~
* Common changes:
=================
* Using C# 8.0 readonly modifier for all possible properties and methods of non-readonly public structs.
* KGySoft.CoreLibraries namespace:
==================================
+ EnumerableExtensions class: New TryGetCount methods.
- Enum<TEnum> class: fixing possible VerificationException from partially trusted domains created by an assembly
with Level2 security (eg. the sandbox domains in .NET Fiddle). Affects .NET Framework 4.x only.
- RandomExtensions class: NextBigInteger methods did not always use the full specified range.
~~~~~~~~~
! v6.0.0:
~~~~~~~~~
+ Assembly changes:
===================
+ Targeting also .NET Core 2.1
+ Targeting also .NET 6.0.
+ KGySoft namespace:
====================
+ LanguageSettings class:
+ New DynamicResourceManagersResXResourcesDir property to be able to control the path of the resources for all
DynamicResourceManager instances with centralized settings.
+ New EnsureResourcesGenerated, EnsureInvariantResourcesMerged, SavePendingResources and ReleaseAllResources
methods to provide more control over the centralized DynamicResourceManager instances.
! KGySoft.CoreLibraries namespace:
==================================
! ByteArrayExtensions class:
! Encrypt/Decrypt methods without a specified SymmetricAlgorithm use the Aes class instead of RijndaelManaged,
which has been obsoleted starting with .NET 6. This is a breaking change only if we want to use the Decrypt
method for the result of Encrypt of a previous version (though as a workaround, you still can explicitly pass
a RijndaelManaged instance to the Decrypt overloads).
! FastRandom class:
! The NextInt64() method used to return any long value. Unfortunately .NET 6.0 also introduced a method with the
very same name but with a different behavior. To consolidate the behavior starting with this version this method
returns values greater or equal to zero and less than Int64.MaxValue.
Use the new SampleInt64 method to generate any long value.
! NextInt32 method: To harmonize behavior with NextInt64 it returns a non-negative value less than Int32.MaxValue,
just like Next(). Use the new SampleInt32 method to generate any int value.
! NextUInt64 method: To harmonize behavior with the methods above it now always returns smaller values
than UInt64.MaxValue. Use (ulong)SampleInt64 method to generate any ulong value.
! NextUInt32 method: To harmonize behavior with the methods above it now always returns smaller values
than UInt32.MaxValue. Use (uint)SampleInt32 method to generate any uint value.
+ New constructor overload from Guid seed
+ New NextInt64(long)/NextInt64(long, long) methods (even below .NET 6.0 where base does not have such methods).
+ New NextSingle method (even below .NET 6.0 where base does not have such method).
+ New SampleInt64 method. It has the same behavior as the NextInt64 used to have before this version.
+ New SampleInt32 method. It has the same behavior as the NextInt32 used to have before this version.
! ObjectExtensions class:
! [Try]Convert methods:
! When converting to string using round-trip formats for some natively supported types that can be restored by
an opposite [Try]Convert or by StringExtensions.[Try]Parse without losing precision or information, including
negative zero value or time zone.
+ Using string as a fallback intermediate step if the registered conversions could not be used.
+ Natively supporting conversion between char and Rune collections in both ways (.NET Core 3.0 and above)
! RandomExtensions class:
! To be conform with the new NextInt64 methods appeared in .NET 6, Next[U]Int64, Next[U]Int32, Next[U]Int16 and
Next[S]Byte methods without minValue/maxValue parameters from now on return only non-negative values,
and never return the possible maximum value of their type. Use the Sample* methods to return any value.
+ New SampleSByte, SampleByte, SampleInt16, SampleUInt16, SampleInt32, SampleUInt32, SampleInt64 and SampleUInt64
methods to generate any integer value of their corresponding type.
+ New NextBigInteger and SampleBigInteger methods (.NET Framework 4.0 and above)
+ New NextRune methods (.NET Core 3.0 and above)
+ New NextHalf methods (.NET 5.0 and above)
+ New NextDateOnly and NextTimeOnly methods (.NET 6.0 and above)
+ NextObject methods:
+ Supporting BigInteger, considers GenerateObjectSettings.CollectionsLength (.NET Framework 4.0 and above)
+ Supporting Rune (.NET Core 3.0 and above)
+ Supporting Half (.NET 5.0 and above)
+ Supporting DateOnly and TimeOnly (.NET 6.0 and above)
* Improving performance
+ ThreadSafeRandom class:
+ New NextInt64 methods (even below .NET 6.0 where base does not have such methods).
+ New NextSingle method (even below .NET 6.0 where base does not have such method).
+ DateTimeExtensions class:
+ New AsLocal method
+ New ToUnixMilliseconds/ToUnixSeconds and FromUnixMilliseconds/FromUnixSeconds methods
+ EnumFormattingOptions enum: New Number option.
+ StringExtensions class:
+ [Try]Parse methods:
+ Natively supporting BigInteger type (.NET Framework 4.0 and above)
+ Natively supporting Rune type (.NET Core 3.0 and above)
+ Natively supporting Half type (.NET 5.0 and above)
+ Natively supporting DateOnly and TimeOnly types (.NET 6.0 and above)
+ SpanExtensions class:
+ [Try]Parse methods:
+ Natively supporting BigInteger type (.NET Framework 4.0 and above)
+ Natively supporting Rune type (.NET Core 3.0 and above)
+ Natively supporting Half type (.NET 5.0 and above)
+ Natively supporting DateOnly and TimeOnly types (.NET 6.0 and above)
+ StringSegmentComparer class:
+ New OrdinalRandomized property
+ New OrdinalIgnoreCaseRandomized property
* Enum<TEnum> class:
+ New TryFormat methods to allow writing enum values in Span<char> (.NET Standard 2.1 and above)
+ ToString(TEnum,EnumFormattingOptions,string): Supporting EnumFormattingOptions.Number option
* GetFlags(TEnum,bool) method: the bool parameter (onlyDefinedValues) is now optional
* EnumExtensions class:
* GetFlags<TEnum>(TEnum,bool) method: the bool parameter (onlyDefinedValues) is now optional
* SecureRandom class: improving performance
- Files class:
- GetExecutingPath method: in .NET Framework it could throw an exception from a partially trusted domain.
* KGySoft.Collections namespace:
================================
+ ArraySection<T> struct:
+ New public UnderlyingArray and Offset properties so it's not needed to obtain the AsArraySegment property
to access the underlying array.
+ StringKeyedDictionary class:
+ New constructor with (int capacity, bool ignoreCase, bool useRandomizedHash) parameters
+ New constructor with (bool ignoreCase, bool useRandomizedHash) parameters
+ ThreadSafeDictionaryClass:
+ New PreserveMergedKeys property
+ New TrimExcess method
- Automatic merging could occur even if MergeInterval was negative.
* EnumerableExtensions class:
* Shuffle methods:
* Improving performance
+ New overload with Guid seed
* GetRandomElement methods: Improving performance if source is not a list
! KGySoft.ComponentModel namespace:
===================================
! ValidationResultsCollection
! The type of the Errors, Warnings and Infos properties have been changed to ValidationResultsCollection. When
recompiling existing code, this is a non-breaking change and solves also the incompatibility issue between the
<=.NET 4.0 vs. other targets used different types (IList<ValidationResult> vs. IReadOnlyList<ValidationResult>).
+ New Empty field
+ New this[string] indexer
+ New Message property that combines all messages in this instance.
+ New TryGetFirstWithHighestSeverity method
+ SortableBindingList class:
+ New public writable and nullable SortDirection property (the non-nullable read-only IBindingList implementation
is an explicit one and used to be exposed as a protected property)
+ ICommandBinding interface
+ New Error event
+ New CommandBindingErrorContext enum
+ New CommandBindingErrorEventArgs class
+ BinaryTypeConverter: Adding InstanceDescriptor support
+ EncodingConverter:
+ Adding InstanceDescriptor support
- Supporting null reference
+ VersionConverter class:
+ Adding InstanceDescriptor support
+ Adding Version support (which is cloning like in .NET Core)
- Supporting null reference
+ StringSegmentConverter: Adding InstanceDescriptor support
- ValidatingObjectBase class
- PropertyChanged could be triggered for the ValidationResults property even without any change.
- ValidationResult class:
- Adding the missing Serializable attribute (ValidationResultsCollection was serializable anyway)
+ KGySoft.Resources namespace:
==============================
+ ResXDataNode class:
+ Supporting BigInteger type natively in non-compatible mode (.NET Framework 4.0 and above)
+ Supporting Rune type natively in non-compatible mode (.NET Core 3.0 and above)
+ Supporting Half type natively in non-compatible mode (.NET 5.0 and above)
+ Supporting DateOnly and TimeOnly types natively in non-compatible mode (.NET 6.0 and above)
+ DynamicResourceManager class:
+ New EnsureResourcesGenerated and EnsureInvariantResourcesMerged methods to be able to (re)generate merged
resource sets for a specified culture respecting the currently set merging options.
+ ResXResourceManager class:
+ New IgnoreResXParseErrors property
+ HybridResourceManager class:
+ New IgnoreResXParseErrors property
- ResXResourceWriter class:
- Generate method: Calling Generate without adding any content used to save an empty file. Now the header and the
root element is generated even without adding any content.
! KGySoft.Serialization.Binary namespace:
=========================================
! BinarySerializer class:
! SerializeValueType method: Using direct content serialization instead of the Marshal class for value types
that contain no references. This means a huge performance improvement but also that the result can be
incompatible with the previous versions for some value types. As a fallback, marshaling has also been preserved
so this is a breaking change only when considering the content of the produced byte array by previous versions.
! TrySerializeValueType method: It no longer serializes value types that have references. Performance improvement.
! DeserializeValueType methods: They might not be able to deserialize the content of the previous versions.
! [Try]SerializeValueArray, DeserializeValueArray methods: replacing the 'struct' constraint to 'unmanaged'.
Performance improvement, fixing possible exception about non-blittable types.
! Serialize* methods:
! Starting with this version The BinarySerializationOptions.CompactSerializationOfStructures flag affects
structs only without any references, which is very fast. Marshaling is used only if the obsolete
ForcedSerializationValueTypesAsFallback flag is enabled.
! The produced stream is not compatible with previous versions.
+ New generic [Try]SerializeValueType and DeserializeValueType overloads. They work only for value types without
any references.
! BinarySerializationFormatter class:
! Serialize* methods:
! Starting with this version the BinarySerializationOptions.CompactSerializationOfStructures flag affects
structs only without any references, which is very fast. Marshaling is used only if the obsolete
ForcedSerializationValueTypesAsFallback flag is enabled.
! Deserializing value types with references from raw data is not allowed in safe mode.
! The produced stream is not compatible with previous versions.
+ Supporting the BigInteger type natively (.NET Framework 4.0 and above)
+ Supporting the Rune type natively (.NET Core 3.0 and above)
+ Supporting the Index and Range types natively (.NET Standard 2.1 and above)
+ Supporting the Half type natively (.NET 5.0 and above)
+ Supporting the DateOnly and TimeOnly types natively (.NET 6.0 and above)
! KGySoft.Serialization.Xml namespace:
======================================
! XmlSerializer class:
! Serialize* methods: Starting with this version the XmlSerializationOptions.CompactSerializationOfStructures
flag affects structs only without any references, which is very fast.
! Deserializing value types with references from raw data is not allowed in safe mode.
+ Supporting the BigInteger type natively (.NET Framework 4.0 and above)
+ Supporting the Rune type natively (.NET Core 3.0 and above)
+ Supporting the Half type natively (.NET 5.0 and above)
+ Supporting the DateOnly and TimeOnly types natively (.NET 6.0 and above)
~~~~~~~~~
* v5.6.1:
~~~~~~~~~
- KGySoft.Collections namespace:
================================
- ThreadSafeCacheFactory class: When using lock free caches, fixing possible VerificationException
from partially trusted domains (eg. in .NET Fiddle). Affects .NET Framework only.
* KGySoft.CoreLibraries namespace:
==================================
* ObjectExtensions class:
+ New DeepClone<T>(T, Func<object, object?>?) method: The original DeepClone overload was less and less
reliable on the newer platforms as it uses binary serialization. This new overload performs a more direct
cloning and also allows customization or transformation by specifying a delegate.
* The existing DeepClone<T>(T, bool) method has been made obsolete in non-Framework targets in favor of the
new overload. But even in .NET Framework this overload is recommended only for remote objects to create a
local copy.
- KGySoft.Diagnostics namespace:
================================
- PerformanceTestBase<TDelegate, TResult> class:
- Fixing time-based tests interval on some platforms.
* KGySoft.Serialization.Binary namespace:
=========================================
* BinarySerializationFormatter class:
* SafeMode now protects against various OutOfMemoryException attacks as well.
* KGySoft.Serialization.Xml namespace:
======================================
* XmlSerializer class:
* DeserializeSafe and DeserializeContentSafe methods protect against some OutOfMemoryException attacks as well.
~~~~~~~~~
! v5.6.0:
~~~~~~~~~
MOST IMPORTANT CHANGES: Safe deserialization support (BinarySerializationFormatter, XmlSerializer, ResXDataNode)
! Assembly changes:
===================
! The module initializer initializes the internal resources so configuring LanguageSettings from a consumer code
is able to configure the resources even if no actual resource was accessed before.
* Members are annotated for using C# 8.0 nullable references
+ KGySoft namespace:
====================
+ PublicResource class: New publicly available localizable resources.
! KGySoft.Collections namespace:
================================
! ArraySection<T> struct:
! The indexer and the GetElementReference method do not allow out-of-range indices anymore, even if the underlying
array is large enough.
! Serialization saves the represented array only instead of the whole underlying array and offset/length.
- AsArraySegment property returns a default ArraySegment<T> if the underlying array is null.
+ New ThreadSafeDictionary<TKey, TValue> class
+ New ThreadSafeCacheFactory class
+ New ThreadSafeCacheOptionsBase/LockFreeCacheOptions/LockingCacheOptions classes
+ New HashingStrategy enum
* Cache<TKey, TValue> class: balancing out hashing performance
! KGySoft.Collections.ObjectModel namespace:
============================================
! VirtualCollection<T> class:
! The protected RemoveItem(int) method was renamed to RemoveItemAt(int) and a new virtual RemoveItem(T) method
has been introduced.
* Count property and ContainsItem method have been made virtual, too.
! FastLookupCollection<T> class:
! Inconsistency detection has been changed (may not detect the same cases as before) because the internal map is
simply dropped when it would be too expensive to maintain.
- Fixing binary deserialization
* Improving performance, reducing memory consumption
* SortableBindingList<T> class:
* Improving performance, reducing memory consumption
* Faster sorted enumerator implementation (from now on it supports also the Reset method)
! KGySoft.CoreLibraries namespace:
==================================
! StringSegment struct:
! Split methods use StringSegmentSplitOptions struct in place of the old bool removeEmptyEntries parameter.
There is a conversion from bool to StringSegmentSplitOptions (marked as obsolete) so the change is breaking
only if the various overloads were called with named removeEmptyEntries argument or by reflection.
- RandomExtensions class:
- NextObject methods: Fixing the interpretation of GenerateObjectSettings.ChanceOfNull property for all cases.
- ThreadSafeRandom class:
- If an instance was created by the factory constructor, then after disposing the Next... members could throw
a NullReferenceException. Now a disposed instance will throw an ObjectDisposedException instead.
- TypeExtensions class:
- IsImplementationOfGenericType method: fixing possible infinite loop
+ New DelegateExtensions class.
+ DictionaryExtensions class:
+ New TryAdd, TryUpdate, AddOrUpdate, GetOrAdd and TryRemove methods.
+ New StringSegmentSplitOptions struct: Implicitly compatible with StringSplitOptions enumeration but contains
the TrimEntries flag on every platform target.
! KGySoft.ComponentModel namespace:
===================================
! BinaryTypeConverter:
! ConvertFrom method: using safe mode deserialization to prevent loading assemblies during the conversion.
- FastBindingList<T>:
- FindCore method: The default implementation could throw an ArgumentNullException if the binding list contained
a null element.
- SortableBindingList<T>:
- SetItem/InsertItem methods: Not throwing an ArgumentNullException if the list is sorted by a property and a null
item is set or inserted
- StringSegmentConverter: Differentiating null and empty segments.
! KGySoft.Diagnostics namespace:
================================
! PerformanceTestBase class:
! Default value of CpuAffinity is null. So from now on it must be explicitly set to restrict test execution to a
single core.
! PerformanceTestBase<TDelegate, TResult> class:
! Warming up is time based even if Iterations is greater than 0. This provides more reliable results for low
iteration counts.
+ New Initialize, TearDown, BeforeCase and AfterCase events.
* KGySoft.Resources namespace:
==============================
+ ResXDataNode class:
+ New GetValueSafe method that ensures that no assemblies are loaded during the deserialization.
* ResXResourceWriter class:
+ New SafeMode property that ensures that no assemblies are loaded when writing ResXDataNode instances
whose raw data has to be regenerated to create a compatible .resx content.
* AddResource(string, byte[]) method: allowing null array to be conform with the nullability of the
IResourceWriter interface.
* AddMetadata(string, byte[]) method: allowing null array to be conform with AddResource(string, byte[]).
! KGySoft.Serialization.Binary namespace:
=========================================
+ BinarySerializationOptions enum:
+ New SafeMode flag that can ensure that no assemblies are loaded during deserialization when using
BinarySerializer/BinarySerializationFormatter classes. It also prevents deserializing non-serializable types.
! The AnyObjectSerializerWrapper class has been made obsolete:
! As the safety context of the consumer formatter cannot be determined, AnyObjectSerializerWrapper deserialization
uses safe mode, which denies deserializing non-serializable types. It renders this type useless, though it was
meant for BinaryFormatter anyway, which is also being obsoleted in upcoming .NET versions. To serialize
non-serializable types you still can use BinarySerializationFormatter, which now supports SafeMode (see above),
which should be enabled when deserializing anything from an untrusted source.
+ ForwardedTypesSerializationBinder class:
+ New SafeMode property that can ensure that no assemblies are loaded when resolving types by the fallback logic.
+ WeakAssemblySerializationBinder class:
+ New SafeMode property that can ensure that no assemblies are loaded when resolving types.
+ CustomSerializerSurrogateSelector class:
+ New IsTypeSupported property that can be assigned by a delegate to explicitly tell what types are supported.
+ New SafeMode property that can ensure that non-serializable types are not serialized and deserialized if
the IsTypeSupported property is null.
+ NameInvariantSurrogateSelector class:
+ New SafeMode property that can ensure that non-serializable types are not serialized and deserialized.
+ KGySoft.Serialization.Xml namespace:
======================================
+ XmlSerializer class:
+ New DeserializeSafe and DeserializeContentSafe methods.
~~~~~~~~~
* v5.5.0:
~~~~~~~~~
+ Assembly changes:
===================
+ Targeting also .NET 5.0.
KNOWN .NET 5.0 PERFORMANCE REGRESSION: https://github.com/dotnet/runtime/issues/44457
* KGySoft.CoreLibraries namespace:
==================================
* EnumerableExtensions class:
* Improving performance of Shuffle<T>(IEnumerable<T>, Random) method.
* StringSegmentComparer class:
* When targeting .NET 5.0 or later, then Equals(ReadOnlySpan<char>, ReadOnlySpan<char>) and
Compare(ReadOnlySpan<char>, ReadOnlySpan<char>) overloads can avoid allocating new strings even for
cultures other than InvariantCulture and CurrentCulture.
~~~~~~~~~
! v5.4.0:
~~~~~~~~~
! KGySoft.CoreLibraries namespace:
==================================
! ThreadSafeRandom class:
! Sequences of a given seed are not the same as in the previous versions
! The public constructors have been made obsolete. Use the static members instead.
! Implementing IDisposable. Instances created by the non-default constructor and the Create methods should be
disposed to prevent memory leaks.
* Improving performance, especially for the static Instance property (it doesn't use locks anymore)
+ New Create method that accepts a delegate to provide a thread-safe wrapper for any Random implementation.
+ New Create method that replaces the seed-specifying constructor
+ New FastRandom class
* RandomExtensions class:
- NextInt64/NetxUInt64 methods: For wide ranges it was possible to return the maxValue even if upper bound was
not inclusive
* NextByte/NextSByte/Next[U]Int* methods: improving performance in several cases
* SafeRandom class:
* Improving performance
+ KGySoft.ComponentModel namespace:
===================================
+ Command class: New CreateSynchronizedPropertyBinding methods
+ CommandBindingsCollection: New CreateSynchronizedPropertyBinding methods
- KGySoft.Resources namespace:
==============================
- ResXFileRef class: The inner converter does not dispose the memory stream after creating the object from stream,
which solves some rare issues with resources that need to keep the initializer stream to be kept alive.
! KGySoft.Serialization.Binary namespace:
=========================================
! BinarySerializationFormatter class:
! Natively supported serialization of StringBuilder have been changed (produced stream is not compatible with
previous versions)
- Natively supported serialization of StringBuilder preserves MaxCapacity
- In .NET 3.5 fixing a deserialization issue affecting some generic collections with nullable element type.
~~~~~~~~~
* v5.3.0:
~~~~~~~~~
+ KGySoft.CoreLibraries namespace:
==================================
+ The ArrayExtensions class has been made public along with some new members:
+ New AsSection methods
+ New AsArray2D/AsArray3D methods
* ByteArrayExtensions class: Improving performance of To*String methods, reducing number of allocations.
+ DoubleExtensions class:
+ New TolerantIsZero/TolerantEquals/TolerantCeiling/TolerantFloor methods
+ Enum<TEnum> class:
+ New Parse/TryParse overloads with StringSegment parameters
+ New Parse/TryParse overloads with ReadOnlySpan<char> parameters (.NET Core 3.0/.NET Standard 2.1 and above)
+ New IsDefined overload with StringSegment parameter
+ New IsDefined overload with ReadOnlySpan<char> parameter (.NET Core 3.0/.NET Standard 2.1 and above)
+ EnumerableExtensions class: New Join overload.
* Files class:
+ New GetRelativePath overload with a bool isCaseSensitive parameter
* Improving GetRelativePath path performance and reducing allocations
+ FloatExtensions class:
+ New TolerantIsZero/TolerantEquals/TolerantCeiling/TolerantFloor methods
+ New SpanExtensions class (.NET Core 3.0/.NET Standard 2.1 and above):
+ The same Parse/TryParse methods as are in StringExtensions
+ The same Read/ReadToSeparator/ReadLine methods as are in StringSegmentExtensions
+ ToEnum method
+ RemoveQuoes methods
* StringExtensions class: Improving performance of parser methods, reducing number of allocations.
+ StringSegment struct:
+ New IsNullOrWhiteSpace property
+ New Split overloads with ReadOnlySpan<char> separator (.NET Core 3.0/.NET Standard 2.1 and above)
+ New IndexOf/LastIndexOf/StartsWith/EndsWith overloads with ReadOnlySpan<char> value (.NET Core 3.0/.NET Standard
2.1 and above)
+ New Trim/TrimStart/TrimEnd overloads to allow specifying characters to trim
+ StringSegmentComparer class:
+ Implements also IComparer<string> and IEqualityComparer<string>
+ Now supports comparison between string and ReadOnlySpan<char> instances as well so it can be used in a
StringKeyedCollection<TValue> instance as a comparer to lookup entries by string, StringSegment or
ReadOnlySpan<char> (.NET Core 3.0/.NET Standard 2.1 and above) instances without allocating new strings.
+ StringSegmentExtensions class:
+ New ReadToSeparator overload with ReadOnlySpan<char> separator (.NET Core 3.0/.NET Standard 2.1 and above)
+ New ToEnum method
+ New RemoveQuoes method
* KGySoft.Collections namespace:
================================
* ArraySection struct:
- Fixing strange debugger display issue for VS2019
+ New constructor overload
+ New AsArray2D/AsArray3D methods
* Cache<TKey, TValue> class:
* Improving general performance (using a different hashing)
+ New IStringKeyedDictionary<TValue> interface
+ New IStringKeyedReadOnlyDictionary<TValue> interface (.NET 4.5 and above)
+ New StringKeyedDictionary<TValue> class, which allows lookup operations also by StringSegment and
ReadOnlySpan<char> (.NET Core 3.0/.NET Standard 2.1 and above)
~~~~~~~~~
* v5.2.0:
~~~~~~~~~
+ KGySoft namespace:
====================
+ PublicResources class: New IndexOutOfRange property
+ KGySoft.CoreLibraries namespace:
==================================
+ The StringSegment type has been made public. It offers a sort of string operations without allocating new strings.
Several new public members were added such as:
+ [Last]IndexOf[Any]
+ Substring
+ Trim[Start/End]
+ Split
+ Conversion and comparison members (numerous Equals/Compare/StartsWith/EndsWith overloads)
+ AsSpan, AsMemory (only in .NET Core 3.0 and .NET Standard 2.1)
+ New StringSegmentComparer class: provides equality and lexical comparers for the StringSegment type
+ New StringSegmentEnumerator struct
+ New StringSegmentExtensions class: provides various reader methods for the StringSegment struct, which behave
as if they mutated (consume) a StringSegment instance, similarly to a StringReader.
* ObjectExtensions class:
+ New In<T> overload with IEnumerable<T> parameter type.
- Convert/TryConvert methods: Fixing some edge-cases for type converters and fixed-size collections
+ EnumerableExtensions class: New Join method.
- WaitHandleExtensions: Fixing ambiguity when WaitOneAsync is called without additional parameters.
+ KGySoft.Collections namespace:
================================
+ New ArraySection struct
+ New ArraySectionEnumerator struct
+ New Array2D struct
+ New Array3D struct
+ KGySoft.ComponentModel namespace:
===================================
+ New StringSegmentConverter class
* ObservableObjectBase class performance: AffectsModifiedState is not queried if IsModified is already true.
~~~~~~~~~
* v5.1.1:
~~~~~~~~~