/// <summary>
        /// Handle the error by formatting the error message first and then adding it
        /// to the validation errors. Then add it to the log.
        /// </summary>
        /// <param name="errorDescriptor"></param>
        /// <param name="resources"></param>
        /// <param name="errors"></param>
        /// <param name="ex"></param>
        /// <param name="args"></param>
        public void Handle(string errorDescriptor, ILocalizationResourceProvider resources, IErrors errors, Exception ex, string[] args)
        {
            string error        = resources.GetString(errorDescriptor);
            string errorDetails = error;

            if (args != null && args.Length > 0)
            {
                foreach (string arg in args)
                {
                    errorDetails += arg + " ";
                }
            }

            // Add to validation results.
            errors.Add(errorDetails);

            // Add to log.
            if (ex == null)
            {
                Logger.Error(errorDetails);
            }
            else
            {
                Logger.Error(errorDetails, ex);
            }
        }
        /// <summary>
        /// Handles the error by added it it the validation errors, and logging it.
        /// </summary>
        /// <param name="errorDescriptor"></param>
        /// <param name="resources"></param>
        /// <param name="errors"></param>
        public void Handle(string errorDescriptor, ILocalizationResourceProvider resources, IErrors errors, Exception ex)
        {
            string error = resources.GetString(errorDescriptor);

            // Add to error list.
            errors.Add(error);

            // Add to log.
            if (ex == null)
            {
                Logger.Error(error);
            }
            else
            {
                Logger.Error(error, ex);
            }
        }
 /// <summary>
 /// Handles the exception by getting the error description from the <paramref name="resources"/> using
 /// the key specified by <paramref name="errorDescriptorKey"/>. Converts all the <paramref name="args"/>
 /// to a string to put into the error.
 /// </summary>
 /// <param name="errorDescriptorKey">The name of key to use to get the localized errors from resources. </param>
 /// <param name="resources">The localized resources that contains the error string.</param>
 /// <param name="ex">The exception to handle.</param>
 /// <param name="args">Array of strings to report in the error.</param>
 public static void Handle(string errorDescriptorKey, ILocalizationResourceProvider resources, Exception ex, string[] args)
 {
     _localizedProvider.Handle(errorDescriptorKey, resources, ex, args);
 }
 /// <summary>
 /// Handles the exception by getting the error description from the <paramref name="resources"/> using
 /// the key specified by <paramref name="errorDescriptorKey"/>. Adds the error to <paramref name="errors"/>.
 /// </summary>
 /// <param name="errorDescriptor">The name of key to use to get the localized errors from resources. </param>
 /// <param name="resources">The localized resources that contains the error string.</param>
 /// <param name="errors">The list of errors to add to the error string to.</param>
 /// <param name="ex">The exception to handle.</param>
 public static void Handle(string errorDescriptorKey, ILocalizationResourceProvider resources, IStatusResults errors, Exception ex)
 {
     _localizedProvider.Handle(errorDescriptorKey, resources, errors, ex);
 }