/// <summary>
        /// Fills the specified object (<paramref name="target)"/>with the settings obtained
        /// from the store identified by the key <paramref name="key"/>.
        /// </summary>
        /// <typeparam name="T">Represents the type of the target object.</typeparam>
        /// <param name="storeKey">The settings store key.</param>
        /// <param name="target">The object to fill.</param>
        /// <returns>We return the passed in target.</returns>
        /// <remarks>
        ///     <para>
        /// If the requested type is a <see cref="IDictionary{T, T}"/> and <c>T</c> is <see cref="System.String"/>,
        /// we just return a copy of our internal dictionary.
        /// </para>
        ///     <para>
        /// We try to map the keys found in the source dictionary with properties of the target
        /// object.
        /// </para>
        /// </remarks>
        public T FillObjectFromSettingsStore <T>(string storeKey, T target) where T : class
        {
            if (target == null)
            {
                throw new ArgumentNullException("target");
            }
            if (!Stores.ContainsKey(storeKey))
            {
                throw new ArgumentException(string.Format(
                                                "Settings store {0} doesn't exist", storeKey), "storeKey");
            }

            try
            {
                serializer.FillObject(Stores[storeKey].Settings, target);
            }
            catch (Exception ex)
            {
                throw new ApplicationException(string.Format(
                                                   "Unable to cast settings from settings store {0} to type {1}:\r\n{2}",
                                                   storeKey, typeof(T), ex.ToFormattedString()));
            }

            return(target);
        }