Skip to content

code-patterns 3.3.1-beta

Pre-release
Pre-release

Choose a tag to compare

@TheTribe TheTribe released this 12 Oct 13:06
· 179 commits to master since this release
  • New Autofac-based components (new dependencies Autofac and Autofac.CommonServiceLocator.Indy):
    • Patterns.Autofac.Modules.CoreModule → registers all non-specialized interface-based components in Patterns
    • Patterns.Autofac.Modules.ConfigurationModule → registers all components needed to support IConfigurationSource injection (issue 3)
    • Patterns.Autofac.Sources.ResolveAnythingSource → resolve-anything-creatable implementation of Autofac's IRegistrationSource
  • New extensions in Patterns.Collections:
    • void ICollection{TItem}.AddRange(IEnumerable{TItem} newItems)
    • void IEnumerable{TItem}.Each(Action{TItem} action[, bool parallel = false])
  • New configuration abstraction types in Patterns.Configuration:
    • IConfiguration / ConfigurationWrapper
    • IConfigurationManager / ConfigurationManagerWrapper
    • IConfigurationSource / ConfigurationSource
  • New exception-handling delegate runners as well as a default error-handling strategy in Patterns.ExceptionHandling:
    • TValue Try.Get(Func{TValue} valueAccessor[, Func{Exception, ExceptionState} errorHandler = null])
    • void Try.Do(Action action[, Func{Exception, ExceptionState} errorHandler = null])
    • Func{Exception, ExceptionState} Try.HandleErrors.DefaultStrategy (new dependency: Common.Logging) → uses self-bound ILog instance to log exception; marks exception as "handled"
  • New DateTime components for testability in Patterns.Runtime:
    • Patterns.Runtime.IDateTimeInfoGetNow() method returns DateTime
    • Patterns.Runtime.DefaultDateTimeInfo → proxies DateTime.Now
    • Patterns.Testing.Runtime.TestDateTimeInfo → accepts a specific DateTime value and always uses that
    • DateTime DateTime.AccurateToOneSecond() (extension)
  • New ease-of-use type for regular expressions: Patterns.Text.RegularExpressions.CompiledRegex