亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? stringmatchfilter.cs

?? 詳細(xì)講述了數(shù)據(jù)庫編程
?? CS
字號:
#region Copyright & License
//
// Copyright 2001-2005 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#endregion

using System;
using System.Text.RegularExpressions;

using log4net;
using log4net.Core;
using log4net.Util;

namespace log4net.Filter
{
	/// <summary>
	/// Simple filter to match a string in the rendered message
	/// </summary>
	/// <remarks>
	/// <para>
	/// Simple filter to match a string in the rendered message
	/// </para>
	/// </remarks>
	/// <author>Nicko Cadell</author>
	/// <author>Gert Driesen</author>
	public class StringMatchFilter : FilterSkeleton
	{
		#region Member Variables

		/// <summary>
		/// Flag to indicate the behavior when we have a match
		/// </summary>
		protected bool m_acceptOnMatch = true;

		/// <summary>
		/// The string to substring match against the message
		/// </summary>
		protected string m_stringToMatch;

		/// <summary>
		/// A string regex to match
		/// </summary>
		protected string m_stringRegexToMatch;

		/// <summary>
		/// A regex object to match (generated from m_stringRegexToMatch)
		/// </summary>
		protected Regex m_regexToMatch;

		#endregion

		#region Constructors

		/// <summary>
		/// Default constructor
		/// </summary>
		public StringMatchFilter()
		{
		}

		#endregion

		#region Implementation of IOptionHandler

		/// <summary>
		/// Initialize and precompile the Regex if required
		/// </summary>
		/// <remarks>
		/// <para>
		/// This is part of the <see cref="IOptionHandler"/> delayed object
		/// activation scheme. The <see cref="ActivateOptions"/> method must 
		/// be called on this object after the configuration properties have
		/// been set. Until <see cref="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="ActivateOptions"/> must be called again.
		/// </para>
		/// </remarks>
		override public void ActivateOptions() 
		{
			if (m_stringRegexToMatch != null)
			{
				m_regexToMatch = new Regex(m_stringRegexToMatch, RegexOptions.Compiled);
			}
		}

		#endregion

		/// <summary>
		/// <see cref="FilterDecision.Accept"/> when matching <see cref="StringToMatch"/> or <see cref="RegexToMatch"/>
		/// </summary>
		/// <remarks>
		/// <para>
		/// The <see cref="AcceptOnMatch"/> property is a flag that determines
		/// the behavior when a matching <see cref="Level"/> is found. If the
		/// flag is set to true then the filter will <see cref="FilterDecision.Accept"/> the 
		/// logging event, otherwise it will <see cref="FilterDecision.Neutral"/> the event.
		/// </para>
		/// <para>
		/// The default is <c>true</c> i.e. to <see cref="FilterDecision.Accept"/> the event.
		/// </para>
		/// </remarks>
		public bool AcceptOnMatch
		{
			get { return m_acceptOnMatch; }
			set { m_acceptOnMatch = value; }
		}

		/// <summary>
		/// Sets the static string to match
		/// </summary>
		/// <remarks>
		/// <para>
		/// The string that will be substring matched against
		/// the rendered message. If the message contains this
		/// string then the filter will match. If a match is found then
		/// the result depends on the value of <see cref="AcceptOnMatch"/>.
		/// </para>
		/// <para>
		/// One of <see cref="StringToMatch"/> or <see cref="RegexToMatch"/>
		/// must be specified.
		/// </para>
		/// </remarks>
		public string StringToMatch
		{
			get { return m_stringToMatch; }
			set { m_stringToMatch = value; }
		}

		/// <summary>
		/// Sets the regular expression to match
		/// </summary>
		/// <remarks>
		/// <para>
		/// The regular expression pattern that will be matched against
		/// the rendered message. If the message matches this
		/// pattern then the filter will match. If a match is found then
		/// the result depends on the value of <see cref="AcceptOnMatch"/>.
		/// </para>
		/// <para>
		/// One of <see cref="StringToMatch"/> or <see cref="RegexToMatch"/>
		/// must be specified.
		/// </para>
		/// </remarks>
		public string RegexToMatch
		{
			get { return m_stringRegexToMatch; }
			set { m_stringRegexToMatch = value; }
		}

		#region Override implementation of FilterSkeleton

		/// <summary>
		/// Check if this filter should allow the event to be logged
		/// </summary>
		/// <param name="loggingEvent">the event being logged</param>
		/// <returns>see remarks</returns>
		/// <remarks>
		/// <para>
		/// The rendered message is matched against the <see cref="StringToMatch"/>.
		/// If the <see cref="StringToMatch"/> occurs as a substring within
		/// the message then a match will have occurred. If no match occurs
		/// this function will return <see cref="FilterDecision.Neutral"/>
		/// allowing other filters to check the event. If a match occurs then
		/// the value of <see cref="AcceptOnMatch"/> is checked. If it is
		/// true then <see cref="FilterDecision.Accept"/> is returned otherwise
		/// <see cref="FilterDecision.Deny"/> is returned.
		/// </para>
		/// </remarks>
		override public FilterDecision Decide(LoggingEvent loggingEvent) 
		{
			if (loggingEvent == null)
			{
				throw new ArgumentNullException("loggingEvent");
			}

			string msg = loggingEvent.RenderedMessage;

			// Check if we have been setup to filter
			if (msg == null || (m_stringToMatch == null && m_regexToMatch == null))
			{
				// We cannot filter so allow the filter chain
				// to continue processing
				return FilterDecision.Neutral;
			}
    
			// Firstly check if we are matching using a regex
			if (m_regexToMatch != null)
			{
				// Check the regex
				if (m_regexToMatch.Match(msg).Success == false)
				{
					// No match, continue processing
					return FilterDecision.Neutral;
				} 

				// we've got a match
				if (m_acceptOnMatch) 
				{
					return FilterDecision.Accept;
				} 
				return FilterDecision.Deny;
			}
			else if (m_stringToMatch != null)
			{
				// Check substring match
				if (msg.IndexOf(m_stringToMatch) == -1) 
				{
					// No match, continue processing
					return FilterDecision.Neutral;
				} 

				// we've got a match
				if (m_acceptOnMatch) 
				{
					return FilterDecision.Accept;
				} 
				return FilterDecision.Deny;
			}
			return FilterDecision.Neutral;

		}

		#endregion
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人精品3d动漫h| 国产婷婷色一区二区三区| 视频一区免费在线观看| 欧美夫妻性生活| 成人国产精品免费网站| 精品久久久久久无| 国产成人免费视频精品含羞草妖精| 国产精品夫妻自拍| 久久免费视频色| 欧美日韩精品综合在线| 99久久精品情趣| 久久精品免费观看| 日韩国产精品91| 亚洲视频1区2区| 国产日韩高清在线| 日韩欧美成人激情| 欧美日韩一区不卡| 欧美在线观看你懂的| eeuss鲁片一区二区三区在线观看| 捆绑调教美女网站视频一区| 一区二区三区欧美日| 亚洲欧美激情一区二区| 国产精品青草综合久久久久99| 26uuu亚洲婷婷狠狠天堂| 日韩午夜激情电影| 精品国产在天天线2019| 精品入口麻豆88视频| 日韩亚洲欧美综合| 3d成人h动漫网站入口| 日韩欧美亚洲国产精品字幕久久久| 欧美色网一区二区| 欧美一级爆毛片| 国产精品超碰97尤物18| 成人欧美一区二区三区| 亚洲色欲色欲www| 亚洲少妇30p| 日韩在线a电影| 久久电影网站中文字幕| 国产成a人亚洲精| 色婷婷狠狠综合| 欧美一区二区三区四区视频| 亚洲精品在线电影| 亚洲欧洲国产专区| 麻豆国产精品官网| 成人av综合在线| 777xxx欧美| 欧美激情在线观看视频免费| 亚洲免费观看在线视频| 免费成人在线视频观看| 成人涩涩免费视频| 日韩一区二区中文字幕| 亚洲色图制服丝袜| 国产精品综合二区| 欧美综合亚洲图片综合区| 欧美经典一区二区三区| 亚洲成人你懂的| 91在线视频观看| 久久亚洲欧美国产精品乐播 | 国产福利一区在线观看| 青青青伊人色综合久久| 国精产品一区一区三区mba视频| 蓝色福利精品导航| 欧美亚洲尤物久久| 国产**成人网毛片九色| 欧美亚洲综合网| 樱桃视频在线观看一区| 精东粉嫩av免费一区二区三区| 国产精品系列在线观看| 欧美中文字幕一区二区三区亚洲 | 亚洲成人第一页| 国产成人免费av在线| 欧美大片在线观看一区二区| 一区二区三区资源| 91视频在线看| 国产精品白丝在线| 成人免费黄色在线| 欧美激情中文字幕| 成人白浆超碰人人人人| 久久亚洲精华国产精华液 | 国产69精品久久久久毛片| 久久久综合精品| 日韩**一区毛片| 国产乱码精品一区二区三区av | 一区二区三区免费看视频| 成人av中文字幕| 国产精品国产三级国产普通话三级| 国产尤物一区二区| 国产精品麻豆视频| 欧美日韩一区二区三区高清| 亚洲成人免费视频| 欧美年轻男男videosbes| 午夜欧美电影在线观看| 欧美不卡123| 国产激情一区二区三区四区 | 99精品视频中文字幕| 一区二区三区小说| 日韩一区二区精品葵司在线 | 麻豆久久一区二区| 中文字幕成人av| 欧美日韩亚洲综合一区| 极品销魂美女一区二区三区| 国产精品国产a级| 欧美精品 国产精品| 激情综合网最新| 欧美日韩免费电影| 成人av在线播放网站| 日韩激情中文字幕| 亚洲伦理在线精品| 精品处破学生在线二十三| 色系网站成人免费| 成人午夜在线视频| 日韩高清不卡一区二区三区| 国产精品热久久久久夜色精品三区| 在线不卡免费av| 91九色最新地址| 成人av在线播放网址| 国产呦萝稀缺另类资源| 奇米精品一区二区三区四区 | 在线观看日韩电影| 成人av免费在线观看| 国产成人自拍高清视频在线免费播放| 天天爽夜夜爽夜夜爽精品视频| 亚洲午夜精品网| 3atv一区二区三区| 91香蕉视频黄| 国产精品综合在线视频| 亚洲国产精品一区二区www在线| 91日韩在线专区| 免费看欧美女人艹b| 免费在线成人网| 国产精品毛片高清在线完整版| 欧美一区二区在线播放| 欧美午夜片在线看| 欧美性感一区二区三区| 欧美日韩国产片| 日韩一区二区三区观看| 日韩一区国产二区欧美三区| 91精品国产综合久久国产大片| 欧美久久一二区| 日韩欧美色电影| 中文字幕一区日韩精品欧美| 国产精品天天看| 亚洲免费观看高清| 亚洲国产一区视频| 麻豆国产一区二区| 国产精品一二一区| 色欧美片视频在线观看在线视频| 欧美羞羞免费网站| 欧美精品一区二区三区四区| 国产精品成人网| 免费人成黄页网站在线一区二区 | 精品国偷自产国产一区| 中文字幕综合网| 亚洲1区2区3区4区| 丁香亚洲综合激情啪啪综合| 欧美伦理视频网站| 国产精品色呦呦| 免费不卡在线观看| 91黄色免费看| 日本一区二区久久| 日韩黄色免费电影| 国产 欧美在线| 久久久久9999亚洲精品| 欧美bbbbb| 欧美专区日韩专区| 中文字幕一区二区三| 国产一区二区三区四| 欧美大尺度电影在线| 亚洲五月六月丁香激情| 国产福利91精品一区二区三区| 日韩精品一区在线观看| 日韩电影免费在线看| 欧美另类久久久品| 亚洲国产你懂的| 欧美人与禽zozo性伦| 亚洲自拍另类综合| 欧美日韩一区二区三区在线| 日韩久久一区二区| 色综合久久久久久久久| 亚洲综合在线视频| 欧美色图在线观看| 亚洲va欧美va人人爽| 欧美日韩视频在线第一区| 日韩精品免费专区| 精品美女在线观看| 奇米色777欧美一区二区| 欧美一级欧美三级在线观看| 麻豆一区二区三| 国产精品精品国产色婷婷| av资源站一区| 亚洲1区2区3区视频| 日韩一区二区在线看片| 极品尤物av久久免费看| 日本一区二区三区电影| 国产aⅴ精品一区二区三区色成熟| 91精品久久久久久久久99蜜臂| 香港成人在线视频| 日韩欧美色电影| 韩国视频一区二区| 国产精品网友自拍|