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
LoggingInterceptor
by 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
Proceed
pointcut 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.InMemoryConfigurationSource
fromPatterns.Testing.Configuration.TestConfigurationSource
(issue 110)
- Changes made to
Patterns.Runtime.IDateTimeInfo
andPatterns.Runtime.DefaultDateTimeInfo
(issue 105): - Added
DateTime GetUtcNow()
toIDateTimeInfo
- Updated implementation of
DefaultDateTimeInfo
- Additions / changes made to
Patterns.Logging
andPatterns.Interception
(issue 96): - New type:
Patterns.Interception.DelegateInterceptor
→ implementsIInterceptor
by allowing interception actions taken at each step to be injected - Updated
LoggingInterceptor
to inherit from newDelegateInterceptor
type
- Fixes for
Patterns.Logging
/Patterns.Autofac.Logging
(issue 92): - Extracted
ILoggingConfig
fromLoggingConfig
- Switched to interface usage everywhere
- Modified
LoggingModule
logic to allow config source to be unregistered / config section to be missing; either case results in a default instance ofLoggingConfig
to be registered - Changed
MoqRegistrationSource
to 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
AutofacMoqContainer
to defensively callCreate
from withinMock
usingTry.Get
(issue 84)
- Changed
LoggingInterceptor
to use the CLRJavaScriptSerializer
to 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
IRegexEvaluator
andRegexEvaluator
to thePatterns.Text.RegularExpressions
namespace (issue 69) - Added
Evaluator
andEvaluatorAccessor
toSystem.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.ResolveAnythingSource
toPatterns.Autofac.Sources.ResolveCreatableSource
(issue 43) - Moved Moq-related components from
Patterns.Testing.Autofac
toPatterns.Testing.Autofac.Moq
(issue 59) - Added the "strategy dictionary" pattern to the
Patterns.Collections.Strategies
namespace (issue 59) - Added a short-circuit
Map<TSource,TDestination>
method toPatterns.Mapping.IMappingServices
(issue 61)
- Fixed
sectionGroup
bug inTestConfigurationSource
(Issue 60)
- Fixes for Autofac (issue 57)
- Moved/renamed
MoqContainer
toPatterns.Testing.Autofac.AutofacMoqContainer
- Extracted new interface,
Patterns.Testing.Autofac.IAutofacMoqContainer
→ provides access to Autofac-specific features
- New component in
Patterns.Testing.Configuration
:TestConfigurationSource
→ implementsIConfigurationSource
by accepting XML in its constructor and using the in-memory XML as the basis for retrievals ofAppSettings
andConnectionStrings
as well as calls toGetSection
(issue 35)
- New components in
Patterns.Mapping
(new dependency: AutoMapper):IMappingServices
→ encapsulatesIMappingEngine
,IConfiguration
, andIConfigurationProvider
from 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 TrapExceptions
option - Changed
LoggingInterceptor
to useLoggingConfig
rather than explicitbool
option 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
→ implementsIInterceptor
by calling the appropriateILog
methods throughout interception (issue 12)string Exception.ToFullString()
(extension) → concatenates exception messages, stack traces and inner exceptions (recursive)- New Autofac support for
Patterns.Logging
inPatterns.Autofac.Modules
: LoggingModule
→ registersLoggingInterceptor
, as well as attaching to all registrations in order to provide appropriately type-bound instances ofILog
on-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'sIRegistrationSource
by creating Mocks of services when registrations are missingMoqContainer
→ implementsIMoqContainer
by 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 supportIConfigurationSource
injection (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
/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-boundILog
instance to log exception; marks exception as "handled"- New DateTime components for testability in
Patterns.Runtime
: Patterns.Runtime.IDateTimeInfo
→GetNow()
method returnsDateTime
Patterns.Runtime.DefaultDateTimeInfo
→ proxiesDateTime.Now
Patterns.Testing.Runtime.TestDateTimeInfo
→ accepts a specificDateTime
value and always uses thatDateTime DateTime.AccurateToOneSecond()
(extension)- New ease-of-use type for regular expressions:
Patterns.Text.RegularExpressions.CompiledRegex
- MOVED TO GITHUB!!