예제 #1
0
 /// <summary>
 /// Initialize layout options
 /// </summary>
 /// <remarks>
 /// <para>
 /// This is part of the <see cref="T:log4net.Core.IOptionHandler" /> delayed object
 /// activation scheme. The <see cref="M:log4net.Layout.PatternLayout.ActivateOptions" /> method must
 /// be called on this object after the configuration properties have
 /// been set. Until <see cref="M:log4net.Layout.PatternLayout.ActivateOptions" /> is called this
 /// object is in an undefined state and must not be used.
 /// </para>
 /// <para>
 /// If any of the configuration properties are modified then
 /// <see cref="M:log4net.Layout.PatternLayout.ActivateOptions" /> must be called again.
 /// </para>
 /// </remarks>
 public override void ActivateOptions()
 {
     this.m_head = this.CreatePatternParser(this.m_pattern).Parse();
     for (PatternConverter patternConverter = this.m_head; patternConverter != null; patternConverter = patternConverter.Next)
     {
         PatternLayoutConverter patternLayoutConverter = patternConverter as PatternLayoutConverter;
         if (patternLayoutConverter != null)
         {
             if (!patternLayoutConverter.IgnoresException)
             {
                 this.IgnoresException = false;
                 break;
             }
         }
     }
 }
예제 #2
0
        public override void ActivateOptions()
        {
            this.m_head = this.CreatePatternParser(this.m_pattern).Parse();
            PatternConverter head = this.m_head;

            while (true)
            {
                if (head != null)
                {
                    PatternLayoutConverter converter2 = head as PatternLayoutConverter;
                    if ((converter2 == null) || converter2.IgnoresException)
                    {
                        head = head.Next;
                        continue;
                    }
                    this.IgnoresException = false;
                }
                return;
            }
        }
예제 #3
0
        public override void ActivateOptions()
        {
            m_head = CreatePatternParser(m_pattern).Parse();

            PatternConverter curConverter = m_head;

            while (curConverter != null)
            {
                PatternLayoutConverter layoutConverter = curConverter as PatternLayoutConverter;
                if (layoutConverter != null)
                {
                    if (!layoutConverter.IgnoresException)
                    {
                        this.IgnoresException = false;
                        break;
                    }
                }
                curConverter = curConverter.Next;
            }
        }
예제 #4
0
        /// <summary>
        /// Initialize layout options
        /// </summary>
        /// <remarks>
        /// <para>
        /// This is part of the <see cref="T:log4net.Core.IOptionHandler" /> delayed object
        /// activation scheme. The <see cref="M:log4net.Layout.PatternLayout.ActivateOptions" /> method must
        /// be called on this object after the configuration properties have
        /// been set. Until <see cref="M:log4net.Layout.PatternLayout.ActivateOptions" /> is called this
        /// object is in an undefined state and must not be used.
        /// </para>
        /// <para>
        /// If any of the configuration properties are modified then
        /// <see cref="M:log4net.Layout.PatternLayout.ActivateOptions" /> must be called again.
        /// </para>
        /// </remarks>
        public override void ActivateOptions()
        {
            m_head = CreatePatternParser(m_pattern).Parse();
            PatternConverter patternConverter = m_head;

            while (true)
            {
                if (patternConverter != null)
                {
                    PatternLayoutConverter patternLayoutConverter = patternConverter as PatternLayoutConverter;
                    if (patternLayoutConverter != null && !patternLayoutConverter.IgnoresException)
                    {
                        break;
                    }
                    patternConverter = patternConverter.Next;
                    continue;
                }
                return;
            }
            IgnoresException = false;
        }