コード例 #1
0
		/// <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);
		}
コード例 #2
0
ファイル: ServiceHelper.cs プロジェクト: smillea1/NCS-V1-1
        /// <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);
        }
コード例 #3
0
        /// <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);
        }
コード例 #4
0
 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);
     }
 }
コード例 #5
0
 /// <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);
             }
         }
     }
 }
コード例 #6
0
ファイル: ServiceHelper.cs プロジェクト: bnantz/NCS-V1-1
        /// <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);
        }
コード例 #7
0
ファイル: ErrorLogService.cs プロジェクト: bnantz/NCS-V2-0
 /// <summary>
 /// Log a configuration error.
 /// </summary>
 /// <param name="configurationError">The <see cref="ConfigurationError"/> to log</param>
 public void LogError(ConfigurationError configurationError)
 {
     configurationErrors.Add(configurationError);
 }
コード例 #8
0
ファイル: MainForm.cs プロジェクト: bnantz/NCS-V2-0
 private void DisplayConfigurationError(ConfigurationError configurationError)
 {
     UpdateTreeNode(configurationError.ConfigurationNode);
     errorsListView.Items.Add(new ConfigurationErrorListViewItem(configurationError));
 }
コード例 #9
0
 /// <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);
 }
コード例 #10
0
 /// <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);
 }
コード例 #11
0
 /// <summary>
 /// Log a configuration error.
 /// </summary>
 /// <param name="configurationError">The <see cref="ConfigurationError"/> to log</param>
 public void LogError(ConfigurationError configurationError)
 {
     configurationErrors.Add(configurationError);
 }
コード例 #12
0
 /// <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);
 }
コード例 #13
0
 /// <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);
 }
コード例 #14
0
 /// <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);
 }
コード例 #15
0
 /// <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));
 }
コード例 #16
0
 /// <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));
 }
コード例 #17
0
 /// <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);
 }
コード例 #18
0
 /// <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);
 }
コード例 #19
0
 /// <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);
 }
コード例 #20
0
 /// <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);
 }
コード例 #21
0
 /// <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);
 }
コード例 #22
0
 public void LogError(ConfigurationError configurationError)
 {
     configurationErrorCollection.Add(configurationError);
 }
コード例 #23
0
 /// <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);
 }
コード例 #24
0
 /// <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);
 }
コード例 #25
0
 public void LogError(ConfigurationError configurationError)
 {
     configurationErrorCollection.Add(configurationError);
 }