/// <summary>
        /// Builds the automatic resolver merger for compatibles properties using the given key service for dedicated context.
        /// </summary>
        /// <param name="keyService">The key service.</param>
        /// <param name="sourceType">Type of the source.</param>
        /// <param name="destinationType">Type of the destination.</param>
        /// <returns></returns>
        public bool BuildAutoResolverMerger(object keyService, Type sourceType, Type destinationType)
        {
            ISourceMerger merger = new SourceMerger(sourceType, destinationType,
                                                    FactoryMapper.GetDefaultPropertyMappers(sourceType, destinationType,
                                                                                            this));

            return(this.RegisterMerger(merger, keyService));
        }
        /// <summary>
        /// Builds the automatic resolver merger for compatibles properties using the given key service for dedicated context and actions.
        /// </summary>
        /// <typeparam name="TSource">The type of the source.</typeparam>
        /// <typeparam name="TDestination">The type of the destination.</typeparam>
        /// <param name="keyService">The key service.</param>
        /// <param name="beforeMapping">The before mapping.</param>
        /// <param name="afterMapping">The after mapping.</param>
        /// <returns></returns>
        public bool BuildAutoResolverMerger <TSource, TDestination>(object keyService, Action <TDestination> beforeMapping, Action <TDestination> afterMapping)
            where TSource : class
            where TDestination : class
        {
            ISourceMerger merger =
                new SourceMerger <TSource, TDestination>(
                    FactoryMapper.GetDefaultPropertyMappers <TSource, TDestination>(this), beforeMapping, afterMapping);

            return(this.RegisterMerger(merger, keyService));
        }
        /// <summary>
        /// Builds the merger.
        /// </summary>
        /// <param name="beforeMapping">The before mapping.</param>
        /// <param name="afterMapping">The after mapping.</param>
        /// <param name="defaultKey">The default key.</param>
        /// <returns></returns>
        public ISourceMerger <TSource, TDestination> BuildMerger(Action <TDestination> beforeMapping, Action <TDestination> afterMapping, string defaultKey = null)
        {
            var merger = new SourceMerger <TSource, TDestination>(this.propertyMappers, beforeMapping, afterMapping);

            if (this.isObservable)
            {
                if (defaultKey == null)
                {
                    this.observer.RegisterMerger <ISourceMerger <TSource, TDestination> >(merger);
                }
                else
                {
                    this.observer.RegisterMerger <ISourceMerger <TSource, TDestination> >(merger, defaultKey);
                }
            }
            return(merger);
        }