コード例 #1
0
ファイル: WrapperMap.cs プロジェクト: kevinswarner/Hover_OLD
		/// <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);
		}
コード例 #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);
        }
コード例 #3
0
        protected virtual void OnShutdown(EventArgs e)
        {
            e ??= EventArgs.Empty;
            LoggerRepositoryShutdownEventHandler shutdownEvent = this.m_shutdownEvent;

            if (shutdownEvent != null)
            {
                shutdownEvent(this, e);
            }
        }
コード例 #4
0
        /// <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);
            }
        }
コード例 #5
0
 public WrapperMap(WrapperCreationHandler createWrapperHandler)
 {
     this.m_createWrapperHandler = createWrapperHandler;
     this.m_shutdownHandler      = new LoggerRepositoryShutdownEventHandler(this.ILoggerRepository_Shutdown);
 }
コード例 #6
0
ファイル: WrapperMap.cs プロジェクト: bzmework/log4net
 /// <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;
 }