Skip to content

Releases: adamecr/Commons

Release 2.0.1

07 Jul 14:29
Compare
Choose a tag to compare

Breaking Changes

Created nuget package RadCommons.core containing BaseDisposable class, Configuration class and logging that are no longer available as source-only packages mainly due to a public members and/or limitations of having them as internal (problems with inheritance in consuming code). This nuget package is needed by some of the source-only packages.

Fixed

CommonLogging: Fix in DebugCorr (removed dummy log item)
BaseDisposable: DisposedManaged and DisposedNative thread safety
Configuration: removed reference to CommonLogging (was not used at all)
RadCommons.di.Component: removed reference to CommonLogging (was not used at all), removed reference to itself (fix)

Changes

AsyncManager: removed reference to (and used of) CommonLogging
RadCommons.di.Config: removed reference to (and used of) CommonLogging
RadCommons.di.PostInit: removed reference to (and used of) CommonLogging

Release 1.2.0

22 Jan 13:26
Compare
Choose a tag to compare

Added

  • Added Disposer - Keeps the stack of disposable objects, and disposes them when the disposer is being disposed.
  • Added Scope - The runtime "container" for scoped operations.
    The scope can be both state-less and state-full and it's valid until it's disposed.
    The scopes can be nested (when the scope is disposed, the children are disposed as well)
    and there can be multiple child scopes (siblings) living in parallel.
    The base implementation just manages the life time, child scopes and keeps the state (when provided).
    Inherit from the Scope<TState> (and IScope<TState>)
    to add the scope related operations (inherited classes have the access to state).
  • Added Context - The runtime "container" for context operations.
    The context can be both state-less and state-full and it's valid until it's disposed.
    The current context is accessible via static property Current.
    The contexts are chained, when a new context is created using static method BeginContext(),
    the Current context became the Parent of the new one and
    the newly created context will be set as the Current one.
    When the context is disposed, the Current context is set to Parent of disposing context.
    The base implementation just manages the life time, context chain and keeps the state (when provided).
    Inherit from the Context<TState> to add the context related operations
    (inherited classes have the access to state).
  • Common Logging - added StackTrace event property that will be filled from the exception stacktrace or from the current stack trace when the exception has not been thrown yet
  • Added ArrayExtensions.AppendBytes - adds the byte array to the current one and returns resulting array (concatenates two byte arrays into a new one).

Changed

  • BaseDisposable - thread safety, added AssertNotDisposed check