示例#1
0
        /// <summary>
        /// Initialize the GodLesZ.Library.Logging system using the specified config
        /// </summary>
        /// <param name="element">the element containing the root of the config</param>
        /// <remarks>
        /// <para>
        /// This method provides the same functionality as the
        /// <see cref="IBasicRepositoryConfigurator.Configure(IAppender)"/> method implemented
        /// on this object, but it is protected and therefore can be called by subclasses.
        /// </para>
        /// </remarks>
        protected void XmlRepositoryConfigure(System.Xml.XmlElement element)
        {
            ArrayList configurationMessages = new ArrayList();

            using (new LogLog.LogReceivedAdapter(configurationMessages)) {
                XmlHierarchyConfigurator config = new XmlHierarchyConfigurator(this);
                config.Configure(element);
            }

            Configured = true;

            ConfigurationMessages = configurationMessages;

            // Notify listeners
            OnConfigurationChanged(new ConfigurationChangedEventArgs(configurationMessages));
        }
示例#2
0
		/// <summary>
		/// Initialize the GodLesZ.Library.Logging system using the specified config
		/// </summary>
		/// <param name="element">the element containing the root of the config</param>
		/// <remarks>
		/// <para>
		/// This method provides the same functionality as the 
		/// <see cref="IBasicRepositoryConfigurator.Configure(IAppender)"/> method implemented
		/// on this object, but it is protected and therefore can be called by subclasses.
		/// </para>
		/// </remarks>
		protected void XmlRepositoryConfigure(System.Xml.XmlElement element) {
			ArrayList configurationMessages = new ArrayList();

			using (new LogLog.LogReceivedAdapter(configurationMessages)) {
				XmlHierarchyConfigurator config = new XmlHierarchyConfigurator(this);
				config.Configure(element);
			}

			Configured = true;

			ConfigurationMessages = configurationMessages;

			// Notify listeners
			OnConfigurationChanged(new ConfigurationChangedEventArgs(configurationMessages));
		}