/// <summary> /// Log a <see cref="ConfigurationError"/> to the <see cref="IErrorLogService"/>. /// </summary> /// <param name="serviceProvider"> /// The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects. /// </param> /// <param name="error"> /// The <see cref="ConfigurationError"/> to log. /// </param> public static void LogError(IServiceProvider serviceProvider, ConfigurationError error) { if (null == serviceProvider) throw new ArgumentNullException("serviceProvider"); IErrorLogService errorLogService = GetErrorService(serviceProvider); errorLogService.LogError(error); }
/// <summary> /// <para>Log a <see cref="ConfigurationError"/> to the <see cref="IConfigurationErrorLogService"/>.</para> /// </summary> /// <param name="serviceProvider"> /// <para>The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.</para> /// </param> /// <param name="error"> /// <para>The <see cref="ConfigurationError"/> to log.</para> /// </param> public static void LogError(IServiceProvider serviceProvider, ConfigurationError error) { ArgumentValidation.CheckForNullReference(error, "error"); IConfigurationErrorLogService configurationErrorLogService = GetConfigurationErrorService(serviceProvider); configurationErrorLogService.LogError(error); }
/// <summary> /// Log a <see cref="ConfigurationError"/> to the <see cref="IErrorLogService"/>. /// </summary> /// <param name="serviceProvider"> /// The a mechanism for retrieving a service object; that is, an object that provides custom support to other objects. /// </param> /// <param name="error"> /// The <see cref="ConfigurationError"/> to log. /// </param> public static void LogError(IServiceProvider serviceProvider, ConfigurationError error) { if (null == serviceProvider) { throw new ArgumentNullException("serviceProvider"); } IErrorLogService errorLogService = GetErrorService(serviceProvider); errorLogService.LogError(error); }
public ConfigurationErrorListViewItem(ConfigurationError error) : base() { this.error = error; if (error.ConfigurationNode != null) { Text = error.ConfigurationNode.Name; } StateImageIndex = 0; SubItems.Add(String.Empty); SubItems.Add(error.Message); if (error.ConfigurationNode != null) { SubItems.Add(error.ConfigurationNode.Path); } }
/// <summary> /// Log the configuration errors from within a <see cref="ConfigurationErrorsException"/>. /// </summary> /// <param name="configurationErrors">The <see cref="ConfigurationErrorsException"/> that contains errors to log.</param> public void LogErrors(ConfigurationErrorsException configurationErrors) { foreach (object error in configurationErrors.Errors) { ConfigurationError configurationError = error as ConfigurationError; if (configurationError != null) { LogError(configurationError); } else { ConfigurationErrorsException innerException = error as ConfigurationErrorsException; if (innerException != null) { LogErrors(innerException); } } } }
/// <summary> /// Log a configuration error. /// </summary> /// <param name="configurationError">The <see cref="ConfigurationError"/> to log</param> public void LogError(ConfigurationError configurationError) { configurationErrors.Add(configurationError); }
private void DisplayConfigurationError(ConfigurationError configurationError) { UpdateTreeNode(configurationError.ConfigurationNode); errorsListView.Items.Add(new ConfigurationErrorListViewItem(configurationError)); }
/// <summary> /// <para>Removes the first occurrence of a specific object from the <see cref="ConfigurationErrorCollection"/>.</para> /// </summary> /// <param name="configurationError"> /// <para>The <see cref="ConfigurationError"/> to remove from the <see cref="ConfigurationErrorCollection"/>.</para> /// </param> public void Remove(ConfigurationError configurationError) { InnerList.Remove(configurationError); }
/// <summary> /// <para>Log a <see cref="ConfigurationError"/> to the <see cref="IConfigurationErrorLogService"/>.</para> /// </summary> /// <param name="error"> /// <para>The <see cref="ConfigurationError"/> to log.</para> /// </param> protected void LogError(ConfigurationError error) { ServiceHelper.LogError(serviceProvider, error); }
/// <summary> /// <para>Inserts an element into the <see cref="ConfigurationErrorCollection"/> at the specified index.</para> /// </summary> /// <param name="index"> /// <para>The zero-based index at which value should be inserted.</para> /// </param> /// <param name="configurationError"> /// <para>The Object to insert.</para> /// </param> public void Insert(int index, ConfigurationError configurationError) { InnerList.Insert(index, configurationError); }
/// <summary> /// <para>Searches for the specified <see cref="ConfigurationError"/> and returns the zero-based index of the first occurrence within the entire <see cref="ConfigurationErrorCollection"/>.</para> /// </summary> /// <param name="configurationError"> /// <para>The <see cref="ConfigurationError"/> to locate in the <see cref="ConfigurationErrorCollection"/>.</para> /// </param> /// <returns> /// <para>The zero-based index of the first occurrence of value within the entire <see cref="ConfigurationErrorCollection"/>, if found; otherwise, -1.</para> /// </returns> public int IndexOf(ConfigurationError configurationError) { return InnerList.IndexOf(configurationError); }
/// <summary> /// <para>Copies the entire <see cref="ConfigurationErrorCollection"/> to a compatible one-dimensional Array, starting at the specified index of the target array.</para> /// </summary> /// <param name="array"> /// <para>The one-dimensional <see cref="ConfigurationError"/> array that is the destination of the elements copied from <see cref="ConfigurationErrorCollection"/>. The <see cref="ConfigurationError"/> array must have zero-based indexing.</para> /// </param> /// <param name="index"> /// <para>The zero-based index in array at which copying begins.</para> /// </param> public void CopyTo(ConfigurationError[] array, int index) { InnerList.CopyTo(array, index); }
/// <summary> /// <para>Determines whether the <see cref="ConfigurationErrorCollection"/> contains a specific element.</para> /// </summary> /// <param name="configurationError"> /// <para>The <see cref="ConfigurationError"/> to locate in the <see cref="ConfigurationErrorCollection"/>.</para> /// </param> /// <returns> /// <para><see langword="true"/> if the CollectionBase contains the specified value; otherwise, <see langword="false"/>.</para> /// </returns> public bool Contains(ConfigurationError configurationError) { return(InnerList.Contains(configurationError)); }
/// <summary> /// <para>Searches for the specified <see cref="ConfigurationError"/> and returns the zero-based index of the first occurrence within the entire <see cref="ConfigurationErrorCollection"/>.</para> /// </summary> /// <param name="configurationError"> /// <para>The <see cref="ConfigurationError"/> to locate in the <see cref="ConfigurationErrorCollection"/>.</para> /// </param> /// <returns> /// <para>The zero-based index of the first occurrence of value within the entire <see cref="ConfigurationErrorCollection"/>, if found; otherwise, -1.</para> /// </returns> public int IndexOf(ConfigurationError configurationError) { return(InnerList.IndexOf(configurationError)); }
/// <summary> /// <para>Add a <see cref="ConfigurationError"/> to the collection.</para> /// </summary> /// <param name="configurationError"><para>The <see cref="ConfigurationError"/> to add to the collection.</para></param> public void Add(ConfigurationError configurationError) { InnerList.Add(configurationError); }
/// <summary> /// <para>Copies the entire <see cref="ConfigurationErrorCollection"/> to a compatible one-dimensional Array, starting at the specified index of the target array.</para> /// </summary> /// <param name="array"> /// <para>The one-dimensional <see cref="ConfigurationError"/> array that is the destination of the elements copied from <see cref="ConfigurationErrorCollection"/>. The <see cref="ConfigurationError"/> array must have zero-based indexing.</para> /// </param> /// <param name="index"> /// <para>The zero-based index in array at which copying begins.</para> /// </param> public void CopyTo(ConfigurationError[] array, int index) { configurationErrorCollection.CopyTo(array, index); }
public void LogError(ConfigurationError configurationError) { configurationErrorCollection.Add(configurationError); }
/// <summary> /// <para>Determines whether the <see cref="ConfigurationErrorCollection"/> contains a specific element.</para> /// </summary> /// <param name="configurationError"> /// <para>The <see cref="ConfigurationError"/> to locate in the <see cref="ConfigurationErrorCollection"/>.</para> /// </param> /// <returns> /// <para><see langword="true"/> if the CollectionBase contains the specified value; otherwise, <see langword="false"/>.</para> /// </returns> public bool Contains(ConfigurationError configurationError) { return InnerList.Contains(configurationError); }