Releases: patterns-group/code-patterns
Releases · patterns-group/code-patterns
code-patterns 3.5.0-beta
- Removed
Patterns.Testing.Runtime.TestDateTimeInfo→ mocks are easier to work with than this type - New components in
Patterns.Reflection:PropertyValue→ holds metadata and runtime value of a propertyIEnumerable<PropertyValue> object.GetPropertyValues()(extension)
code-patterns 3.4.0-beta
- New logging components in
Patterns.Logging(new dependency: Castle.Core):LoggingInterceptor→ implementsIInterceptorby calling the appropriateILogmethods throughout interception (issue 12)string Exception.ToFullString()(extension) → concatenates exception messages, stack traces and inner exceptions (recursive)
- New Autofac support for
Patterns.LogginginPatterns.Autofac.Modules:LoggingModule→ registersLoggingInterceptor, as well as attaching to all registrations in order to provide appropriately type-bound instances ofILogon-demand
- New Autofac container type for increased accessibility:
Patterns.Autofac.AccessibleContainer - New Moq / IoC components in
Patterns.Testing.Moq:IMoqContainer(depends on Microsoft.Practices.ServiceLocation and Moq) → exposesIServiceLocator; provides full IoC container support; providesMock{TObject}creation supportMoqRegistrationSource→ implements Autofac'sIRegistrationSourceby creating Mocks of services when registrations are missingMoqContainer→ implementsIMoqContainerby using Autofac withMoqRegistrationSource
code-patterns 3.3.1-beta
- New Autofac-based components (new dependencies Autofac and Autofac.CommonServiceLocator.Indy):
Patterns.Autofac.Modules.CoreModule→ registers all non-specialized interface-based components in PatternsPatterns.Autofac.Modules.ConfigurationModule→ registers all components needed to supportIConfigurationSourceinjection (issue 3)Patterns.Autofac.Sources.ResolveAnythingSource→ resolve-anything-creatable implementation of Autofac'sIRegistrationSource
- 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/ConfigurationWrapperIConfigurationManager/ConfigurationManagerWrapperIConfigurationSource/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-boundILoginstance to log exception; marks exception as "handled"
- New DateTime components for testability in
Patterns.Runtime:Patterns.Runtime.IDateTimeInfo→GetNow()method returnsDateTimePatterns.Runtime.DefaultDateTimeInfo→ proxiesDateTime.NowPatterns.Testing.Runtime.TestDateTimeInfo→ accepts a specificDateTimevalue and always uses thatDateTime DateTime.AccurateToOneSecond()(extension)
- New ease-of-use type for regular expressions:
Patterns.Text.RegularExpressions.CompiledRegex