Skip to content

Releases: WAN-Solutions/wan24-Core

Version 2.45.0

16 Nov 19:44
Compare
Choose a tag to compare

Changes

  • ChunkStream.FromExisting(Async) parameter chunkSize is now the max. chunk size when reading the streams chunk size from the header
  • Added ChunkStream.DiscardChunkBuffer
  • Added CountEvent
  • Added AsyncConcurrentDictionary
  • Added *PoolStream.LastBufferIndex|ReturnUnusedBuffers
  • *PoolStream which was initialized with an array or memory (in case of (Frozen)MemoryPoolStream) and used the new returnData parameter with false may use off-pool initial data which won't be copied (but may be overwritten)
  • Added ReflectionExtensions.(Is|MayBe)Disposable
  • (Freezable)(Array|Memory)PoolStream performance improvements
  • Updated references

Full Changelog: v2.44.0...v2.45.0

Version 2.44.0

16 Nov 19:13
Compare
Choose a tag to compare

Changes

Additions

  • Added Fallback
  • Added (I)(Parallel)Concurrent(Item)QueueWorker(Base)
  • Added ConcurrentLockDictionary
  • Added ConcurrentChangeTokenLockDictionary
  • Added CancellationTokenExtensions.CombineWith

Fixed bugs

  • Fixed ConcurrentChangeTokenDictionary returned the wrong object for the SyncRoot property which could cause a dead-lock and other unexpected behavior
  • Fixed PriorityQueueWorker worker thread exception when the queue was empty

Full Changelog: v2.43.0...v2.44.0

Version 2.43.0

10 Nov 05:14
Compare
Choose a tag to compare

Changes

Breaking changes

  • Changed method parameter names which where field to be compatible with C# 13
  • FieldInfoExt.Field is FieldInfoExt.FieldInfo now
  • XmlFieldDocComments.Field is XmlFieldDocComments.FieldInfo now
  • PipelineBase.HandleExceptionAsync parameter ex removed (the exception can be accessed from PipelineContextBase.LastException` now)

Additions

  • Added PipelineContextBase.DisposeData
  • Added PipelineContextBase.LastException
  • Added PipelineBase.FinalizeProcessingAsync
  • (I)AsyncEvent.(Async)EventHandlers uses ConcurrentHashSet now
  • Added ChunkStream(EventArgs)
  • Added ChunkTypes
  • Added ChunkStreamEventArgs
  • Added ConstructorAttribute

Fixed bugs

  • Fixed AsyncEnumerableExtensions.ContainsAt(Least|Most)Async methods missed the Async name postfix
  • Fixed Anonymizer.AnonymizeEmailAddress returned an invalid value for email addresses with an alias that is longer than 2 characters
  • Fixed DiHelperExtensions.GetDiObjects(Async) null parameter handling
  • Fixed DiHelperExtensions.GetDiObjects(Async) parameter and value type examination

Full Changelog: v2.42.0...v2.43.0

Version 2.42.0

27 Oct 10:34
Compare
Choose a tag to compare

Changes

Additions

  • Added ICoreEnumerable<T>.Process
  • Added EnumerableBase<T>.Process
  • Added EnumerableBase<T>.ToArray
  • Added AsyncEnumerableExtensions.ProcessAsync
  • Added QueueEventWorkerBase<T>
  • Added IQueueEventWorker
  • Added QueueEventWorkerTable
  • Added Pipeline(Context)(Base)
  • Added IPipeline
  • Added PipelineTable
  • Added MacAddress

Removals

  • Removed ICoreEnumerable<T>.FirstOrDefault(Async) overloads without defaultValue parameter (the parameter uses default as default value now)
  • Removed ArrayExtensions.Contains(All|Any) (fallback to EnumerableExtensions.Contains(All|Any))

Fixed bugs

  • Fixed EnumerableAdapter.FirstOrDefault(Async) nullability

Full Changelog: v2.41.0...v2.42.0

wan24-Core-Validation version 1.5.0

27 Oct 10:59
Compare
Choose a tag to compare

Changes

  • Added (Item)MacAttribute

Full Changelog: v2.42.0...validation-v1.5.0

Version 2.41.0

21 Oct 05:14
Compare
Choose a tag to compare

Changes

Additions

  • Added AppConfigLoader<T>
  • AppConfigBase.Applied setter is public now

Fixed bugs

  • Fixed wrong nullability in ICoreEnumerable<T>.FirstOrDefault(Async) and EnumerableBase<T>.FirstOrDefault(Async)

Full Changelog: v2.40.0...v2.41.0

Version 2.40.0

20 Oct 10:42
Compare
Choose a tag to compare

Changes

Breaking changes

  • Almost all methods from EnumerableExtensions use classes from the new wan24.Core.Enumerables namespace now
  • Refactored synchronous and asynchronous enumerable extensions to match a common functionality scheme

Additions

  • Added ReflectionExstensions.InvokeStaticInterfaceMethod((Nullable)<T>)
  • Added ReflectionExtensions.GetStaticInterfaceMethodImplementation
  • Added IStorable(<T>)
  • Added StorableHelper
  • Added StorableExtensions
  • Added ReflectionExtensions.CommonBaseTypes
  • Added TypeInfoExt.(Get)Interfaces
  • Added TypeInfoExt.InterfaceCount
  • Added IPluginExt
  • Added wan24.Core.Enumerables namespace
  • Added GenericHelper.AreEqual method with object hash code parameters
  • Added PooledTempStreamMemoryLimit(Table)
  • Added PooledTempStream constructor parameters limit, limitContext and isDynamicSharedLimit
  • Added MemorySequenceStream
  • Added ICustomAttributeProviderHost

Removals

  • Removed EnumerableExtensions.Enumerate(Async) methods with a filter parameter (use Where(Async) instead)
  • Removed TypeCache due to a hash code collision risk, which can't be taken in even a lesser security-sensitive environment (no replacement available)

Fixed bugs

  • Fixed PipelineElementBase.ProcessableTypes incomplete type list
  • Fixed using object hash code as unique identifier (now using the object instance reference instead)

Full Changelog: v2.39.0...v2.40.0

Version 2.39.0

29 Sep 07:05
Compare
Choose a tag to compare

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

Version 2.38.0

21 Sep 04:15
Compare
Choose a tag to compare

Changes

wan24-Core-Validation

  • Release version 1.4.0
  • Added EndPointAttribute.UseCache
  • Added HostEndPointAttribute.UseCache

wan24-Core

Additions

  • SynchronizedStream supports more overriding now
  • Added PreBufferingStream
  • Added MapAttribute.HasMappingCondition
  • Added MapAttribute.MappingCondition
  • Added ObjectMapping.Condition_Delegate<tSource, tTarget>
  • Added ObjectMapping mapping condition support to all Add* methods
  • Added (Async)CachedEnumerablePagination
  • Added PaginationMetaData
  • Added (Async)EnumerablePagination.LastException
  • Added IPlugin
  • Added PluginInfo
  • Added PluginLoadContext
  • Added Plugin
  • Added TypeHelper.Remove(Assembly|LoadContext)
  • Added DistributedReadWriteLockBase
  • Added RegularExpressions.(RX_)WHITESPACE
  • Added Anonymizer.AnonymizeBankAccountNumber
  • Added Anonymizer.AnonymizeIban
  • Added ObjectExtensions.CombineHashCodes extension methods for T[], IEnumerable<T>, (ReadOnly)Span<T> and (ReadOnly)Memory<T>
  • Added MathExt

Fixed bugs

  • Fixed (Async)EnumerablePagination page increasing
  • Fixed ReflectionExtensions.CreateMethodInvoker created a double lambda for an object instance method

Full Changelog: v2.37.0...v2.38.0

Version 2.37.0

15 Sep 04:06
Compare
Choose a tag to compare

Changes

Breaking changes

  • Added ICache<T>.RemoveBy(Async)
  • Added ICacheEntryOptions.Size

Additions

  • Added ICacheEntry<T>.OnEntryRemoved
  • Added ICacheENtry<T>.OnRemoved
  • Added ObjectUpdateManager<T>
  • ChangeToken implements INotifyPropertyChanging now
  • Added DummyDisposable
  • Added MethodInfoExt.GetGenericMethodDefinition
  • Added TypeInfoExt.GetGenericTypeDefinition
  • Added ReflectionExtensions.GetParameterCountCached
  • Added ReflectionExtensions.GetGenericArgumentCountCached
  • Added Freezable((Ordered)Dictionary|List|Set)
  • Added FreezableExtensions
  • Added EquatableImmutableArray
  • Added EnumerableExtensions.Enumerate for ImmutableArray<T>
  • Added EnumerableExtensions.ExecuteForAll(Async) for T[], (ReadOnly)Memory<T>, I(Async)Enumerable<T>, ImmutableArray<T> and (I)List<T>
  • Added AutoDisposer<T>.OnlyExclusiveObjectUsage
  • Added AutoDisposer<T>.UseObjectExclusive
  • Added InMemoryCache<T>.ReduceBy(Async) overloads which accept a filter parameter
  • Added CacheSwitch(Options)<T>
  • A compiled ObjectMapping won't allow to add more mappings anymore
  • Added ((Async)Enumerable|Queryable)Pagination<T>
  • Added (Queryable|Enumerable)Builder(Extensions)(<T>)
  • Added EnumerableExtensions.CreateBuilder for IEnumerable<T> and IQueryable<T>
  • Added SyncEnumerator<T>
  • Added ConvertStringValueAttribute
  • ChangeToken performance optimizations
  • (Concurrent)ChangeToken(Collection|Dictionary) forwards the PropertyChanging event from ChangeToken now
  • ReflectionExtensions.CanCreate(Constructor|Method)Invoker is true for by-ref parameters now
  • ReflectionExtensions.GetRealType skips pointers now
  • ReflectionExtensions.CanCreateConstructorInvoker skips declaring by-ref-like types now

Removals

  • Removed ChangeToken<T>.DummySubscription

Full Changelog: v2.36.0...v2.37.0