Esempio n. 1
0
		/// <summary>
		/// Initializes a new instance of the <see cref="WrapperMap" />
		/// </summary>
		/// <param name="createWrapperHandler">The handler to use to create the wrapper objects.</param>
		/// <remarks>
		/// <para>
		/// Initializes a new instance of the <see cref="WrapperMap" /> class with 
		/// the specified handler to create the wrapper objects.
		/// </para>
		/// </remarks>
		public WrapperMap(WrapperCreationHandler createWrapperHandler) 
		{
			m_createWrapperHandler = createWrapperHandler;

			// Create the delegates for the event callbacks
			m_shutdownHandler = new LoggerRepositoryShutdownEventHandler(ILoggerRepository_Shutdown);
		}
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WrapperMap" />
        /// </summary>
        /// <param name="createWrapperHandler">The handler to use to create the wrapper objects.</param>
        /// <remarks>
        /// <para>
        /// Initializes a new instance of the <see cref="WrapperMap" /> class with
        /// the specified handler to create the wrapper objects.
        /// </para>
        /// </remarks>
        public WrapperMap(WrapperCreationHandler createWrapperHandler)
        {
            m_createWrapperHandler = createWrapperHandler;

            // Create the delegates for the event callbacks
            m_shutdownHandler = new LoggerRepositoryShutdownEventHandler(ILoggerRepository_Shutdown);
        }
        protected virtual void OnShutdown(EventArgs e)
        {
            e ??= EventArgs.Empty;
            LoggerRepositoryShutdownEventHandler shutdownEvent = this.m_shutdownEvent;

            if (shutdownEvent != null)
            {
                shutdownEvent(this, e);
            }
        }
        /// <summary>
        /// Notify the registered listeners that the repository is shutting down
        /// </summary>
        /// <param name="e">Empty EventArgs</param>
        /// <remarks>
        /// <para>
        /// Notify any listeners that this repository is shutting down.
        /// </para>
        /// </remarks>
        protected virtual void OnShutdown(EventArgs e)
        {
            if (e == null)
            {
                e = EventArgs.Empty;
            }

            LoggerRepositoryShutdownEventHandler handler = m_shutdownEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Esempio n. 5
0
 public WrapperMap(WrapperCreationHandler createWrapperHandler)
 {
     this.m_createWrapperHandler = createWrapperHandler;
     this.m_shutdownHandler      = new LoggerRepositoryShutdownEventHandler(this.ILoggerRepository_Shutdown);
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:log4net.Core.WrapperMap" />
 /// </summary>
 /// <param name="createWrapperHandler">The handler to use to create the wrapper objects.</param>
 /// <remarks>
 /// <para>
 /// Initializes a new instance of the <see cref="T:log4net.Core.WrapperMap" /> class with
 /// the specified handler to create the wrapper objects.
 /// </para>
 /// </remarks>
 public WrapperMap(WrapperCreationHandler createWrapperHandler)
 {
     m_createWrapperHandler = createWrapperHandler;
     m_shutdownHandler      = ILoggerRepository_Shutdown;
 }