Skip to content

Version 2.39.0

Compare
Choose a tag to compare
@nd1012 nd1012 released this 29 Sep 07:05
· 26 commits to main since this release

Changes

Breaking changes

  • EnumerableExtensions.ExecuteForAll(Async) handler needs to return if to yield the result
  • Moved some extension methods for IAsyncEnumerable<T> from EnumerableExtensions to AsyncEnumerableExtensions
  • ReadOnlyCollection<T> usages are replaced by ImmutableArray<T> now
  • EnumerationBase properties return Frozen(Set|Dictionary) now
  • Some DelegateExtensions.InvokeAll extension methods return an array now (before IEnumerable<>)
  • JsonExtensions works with dictionary interfaces now
  • Added HumanReadableUnits.FormatBytes parameters unitFactor and unitSeparator
  • HumanReadableUnits methods units parameter is an ImmutableArray<string> now
  • Moved TryDispose(Async) from AsyncHelper to (Async)DisposableExtensions
  • IDisposableObject implements IBasicDisposableObject now
  • Many types which previously extended Disposable(Record)Base do now extend any of (Basic|Simple)(All|Async)Disposable(Record)Base, which may have changed the disposing logic, the available base disposable features (events, etc.) and their interfaces
  • Cancellations and CombinedCancellationTokenSource are obsolete now (use CancellationTokenSource.CreateLinkedTokenSource instead)
  • MemoryPoolStream uses a MemoryPool<byte> now (before ArrayPool<byte>)
  • Using MemoryPool<T> and RentedMemory(Ref)<T> where possible (many places)
  • MemoryPoolStream length is now limited to int.MaxValue - 1

Additions

  • Added OptionValue<t1..t8>
  • Added EitherValue<t1..t8>
  • Added PipelineStream
  • Added IPipelineResult(Buffer|Stream)
  • Added PipelineElementBase
  • Added PipelineResultBase
  • Added PipelineResult((Rented)Buffer|Stream)
  • StreamBase.Ensure(Seek|Writ|Read)able are virtual now
  • Added PipelineResultReadOnlyBuffer
  • Added PipelineElementDynamic
  • Added PipelineElementStream
  • Added IPipelineElementObject(<T>)
  • Added IPipelineResultObject(<T>)
  • Added PipelineElement(Generic)ObjectBase
  • Added PipelineResultObject<T>
  • Added NullValueException
  • Added EnumerableExtensions.Distinct(By)Async
  • Added EnumerableExtensions.ExecuteResult<T>
  • Added PipelineStreamTable
  • Added EnumerableExtensions.(Where|Skip|Take|Select|Distinct(By)|First(OrDefault)) for ImmutableArray<T> and FrozenSet<T>
  • Added AsyncEnumerableExtensions.(Where|Skip|Take|Select|Distinct(By)|First(OrDefault))Async for IAsyncEnumerable<T>, ImmutableArray<T> and FrozenSet<T>
  • Added DisposableExtensions.DisposeAll for IDisposable[], (I)List<IDisposable>, ImmutableArray<IDisposable> and FrozenSet<IDisposable>
  • Added AsyncDisposableExtensions.DisposeAll for IAsyncDisposable[], (I)List<IAsyncDisposable>, ImmutableArray<IAsyncDisposable> and FrozenSet<IAsyncDisposable>
  • Added ArrayExtensions.Contains(All|Any) for (I)List<T>, ImmutableArray<T> and FrozenSet<T>
  • Added BytesExtensions.ToHexString for Span<byte>, (ReadOnly)Memory<byte> and byte[]
  • Added ChangeCallbackExtensions.Invoke for (I)List<ChangeCallback>, ImmutableArray<ChangeCallback> and FrozenSet<ChangeCallback>
  • Added DelegateExtensions.InvokeAll for (I)List<T>, ImmutableArray<T> and FrozenSet<T>
  • Added ObjectMappingExtensions.MapObjectsToAsync for (I)List<object>, ImmutableArray<object> and FrozenSet<object>
  • Added ObjectMappingExtensions.MapToAsync for (I)List<T>, ImmutableArray<T> and FrozenSet<T>
  • Added ObjectMappingExtensions.MapObjectsTo for (I)List<object>, ImmutableArray<object> and FrozenSet<object>
  • Added ObjectMappingExtensions.MapTo for (I)List<T>, ImmutableArray<T> and FrozenSet<T>
  • Added OptInOutExtensions.FilterOpt(In(Only)|Out) for (I)List<T>, ImmutableArray<T> and FrozenSet<T>
  • Added VersioningExtensions.FilterByVersion for (I)List<T>, ImmutableArray<T> and FrozenSet<T>
  • Added AsyncEnumerableExtensions.(All|Any)Async
  • Added EnumerableExtensions.(All|Any) for ImmutableArray<T> and FrozenSet<T>
  • Added HumanReadableUnits.ProgressTimeSpanUnits
  • Added HumanReadableUnits.POWERS_OF_(TWO|TEN)
  • Added HumanReadableUnits.ByteUnits2
  • Added HumanReadableUnits.FormatBytesFull
  • Added HumanReadableUnits.ByteUnitsShort
  • StringExtensions.Parse allows any IDictionary<string, string> as data parameter now
  • StringParserContext.(Data|Parsed) is IDictionary<string, string> now
  • Added DisposableHelper.TryDisposeAll for (I)List<object>, ImmutableArray<object> and FrozenSet<object>
  • Added AsyncDisposableHelper.TryDisposeAll for (I)List<object>, ImmutableArray<object> and FrozenSet<object>
  • Added ParallelExtensions
  • Added IBasicDisposableObject
  • Added Basic(All|Async)Disposable(Record)Base (which isn't an IDisposableObject!)
  • Added ENV.ClrPlatformTarget
  • Added MemoryPoolExtensions
  • Added RentedMemory(Ref)<T>
  • Added MemoryOwner<T> which implements IMemoryOwner<T> and can wrap any existing Memory<T>
  • MemoryPoolStream can now be initialized with a copy-free memory from a memory pool (IMemoryOwner<T>) or by wrapping any existing Memory<byte> with MemoryOwner<byte>
  • MemoryPoolStream can now be read-only with the byte[] or IMemoryOwner<byte> constructor parameter, if writable was set to false
  • The MemoryPoolStream constructor with an existing byte[] parameter won't copy the given array if read-only
  • Added MemoryPoolStream constructor overloads for ReadOnly(Span|Memory)<byte>
  • Added parameters offset and length for many EnumerableExtensions methods
  • Added Settings.ClearBuffers
  • Added AppConfig.ClearBuffers
  • Rented(Array|Memory)*.Clear uses Settings.ClearBuffers per default now
  • Added ArrayPoolStream
  • Added Freezable(Array|Memory)PoolStream
  • Added FreezableList.RemoveRange
  • MemoryPoolStream now uses Settings.ClearBuffers for the default CleanReturned property value of an instance
  • Added MemorySequenceSegment<T>
  • Added MemoryPoolStream.ToReadOnlySequence

Removals

  • Removed EnumerableExtensions for (ReadOnly)Memory<T> because of bad performance when having to access Span while iterating
  • Removed (Async)DisposableExtensions for (ReadOnly)Memory<T> because of bad performance when having to access Span while iterating

Fixed bugs

  • Fixed OptInOutExtensions.FilterOptOut filtered opt-in elements
  • Fixed HumanReadableUnits.FormatBytes wrong formatting for values greater than ExaByte
  • Fixed SimpleDisposable(Record)Base destructor locked for disposing and missing creation stack information
  • Fixed XmlDocComments descriptions are trimmed now

Full Changelog: v2.38.0...v2.39.0