The following log details the outward-facing changes made to code-patterns since its first migration to GitHub.
- Updated resources to reflect new versioning/deployment plans (stable-only on NuGet/CI builds on MyGet)
- Bumped Autofac dependencies to version 3.3.0 (issue 143)
- Provided greater flexibility in
LoggingInterceptorby making the argument and return value formatter injectable (issue 139) - introduced new interface:
ILogValueFormatter - new base type for value formatters:
LogValueFormatterBase - new formatter type:
JsonLogValueFormatter - updated tests and modules to include the new types
- Dropped reference to Reactive Extensions (issue 123)
- Updated MappingServices to use underlying types for collections (issue 126)
- Added support for overriding mock behavior in
IMoqContainer(issue 125) - Fixed TimeExtensions feature bug (issue 129)
- Added new
Proceedpointcut toDelegateInterceptor(issue 135)
- Fixes for
IMoqContainer(issue 114) - Calls to
Create<TService>now either return the registered instance, or a mock. No hidden updates. - Calls to
Create<TService, TImplementation>update the container with the implementation type, and return the newly-registered instance.
- Extracted
Patterns.Configuration.InMemoryConfigurationSourcefromPatterns.Testing.Configuration.TestConfigurationSource(issue 110)
- Changes made to
Patterns.Runtime.IDateTimeInfoandPatterns.Runtime.DefaultDateTimeInfo(issue 105): - Added
DateTime GetUtcNow()toIDateTimeInfo - Updated implementation of
DefaultDateTimeInfo
- Additions / changes made to
Patterns.LoggingandPatterns.Interception(issue 96): - New type:
Patterns.Interception.DelegateInterceptor→ implementsIInterceptorby allowing interception actions taken at each step to be injected - Updated
LoggingInterceptorto inherit from newDelegateInterceptortype
- Fixes for
Patterns.Logging/Patterns.Autofac.Logging(issue 92): - Extracted
ILoggingConfigfromLoggingConfig - Switched to interface usage everywhere
- Modified
LoggingModulelogic to allow config source to be unregistered / config section to be missing; either case results in a default instance ofLoggingConfigto be registered - Changed
MoqRegistrationSourceto only return registrations when creating new Mock-based ones; now returns an empty set in all other cases (issue 93)
- Updated out-of-date NuGet references (issue 73)
- Changed
AutofacMoqContainerto defensively callCreatefrom withinMockusingTry.Get(issue 84)
- Changed
LoggingInterceptorto use the CLRJavaScriptSerializerto format complex values for display (issue 81)
- Added
Patterns.Collections.ConfigurableEqualityComparer<TValue>(issue 66) - Fixed type casting error in
Patterns.Testing.Autofac.Moq.AutofacMoqContainer(issue 67) - Fixed issue with up-front service type inspection in
Patterns.Testing.Autofac.Moq.MoqRegistrationSource(issue 68) - Added
IRegexEvaluatorandRegexEvaluatorto thePatterns.Text.RegularExpressionsnamespace (issue 69) - Added
EvaluatorandEvaluatorAccessortoSystem.Text.RegularExpressions.CompiledRegex(issue 70) - Added
Patterns.Runtime.TemporaryScope - Added
ActionValueStrategies<TValue> - Added
FuncValueStrategies<TValue, TOut>
- Expanded capabilities of
Patterns.Mapping.IMappingServices(issue 65)
- Renamed
Patterns.Autofac.Sources.ResolveAnythingSourcetoPatterns.Autofac.Sources.ResolveCreatableSource(issue 43) - Moved Moq-related components from
Patterns.Testing.AutofactoPatterns.Testing.Autofac.Moq(issue 59) - Added the "strategy dictionary" pattern to the
Patterns.Collections.Strategiesnamespace (issue 59) - Added a short-circuit
Map<TSource,TDestination>method toPatterns.Mapping.IMappingServices(issue 61)
- Fixed
sectionGroupbug inTestConfigurationSource(Issue 60)
- Fixes for Autofac (issue 57)
- Moved/renamed
MoqContainertoPatterns.Testing.Autofac.AutofacMoqContainer - Extracted new interface,
Patterns.Testing.Autofac.IAutofacMoqContainer→ provides access to Autofac-specific features
- New component in
Patterns.Testing.Configuration:TestConfigurationSource→ implementsIConfigurationSourceby accepting XML in its constructor and using the in-memory XML as the basis for retrievals ofAppSettingsandConnectionStringsas well as calls toGetSection(issue 35)
- New components in
Patterns.Mapping(new dependency: AutoMapper):IMappingServices→ encapsulatesIMappingEngine,IConfiguration, andIConfigurationProviderfrom AutoMapper (issue 53)MappingServices→ simplest implementation ofIMappingEngine; uses constructor injection
- New module in
Patterns.Autofac.Mapping:MappingModule→ registers static AutoMapper assets to facilitate injection intoMappingServices(issue 54)
- Changes to
Patterns.Logging: - New type:
LoggingConfig→ inherits fromConfigurationSection; encapsulates thebool TrapExceptionsoption - Changed
LoggingInterceptorto useLoggingConfigrather than explicitbooloption for exception trapping - Solution-wide refactor: moved components to more appropriate locations
- 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)
- 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
- 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
- MOVED TO GITHUB!!