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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? defaultrepositoryselector.cs

?? 詳細講述了數據庫編程
?? CS
?? 第 1 頁 / 共 3 頁
字號:
#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

// .NET Compact Framework 1.0 has no support for reading assembly attributes
// and uses the CompactRepositorySelector instead
#if !NETCF

using System;
using System.Collections;
using System.Configuration;
using System.Reflection;

using log4net.Config;
using log4net.Util;
using log4net.Repository;

namespace log4net.Core
{
	/// <summary>
	/// The default implementation of the <see cref="IRepositorySelector"/> interface.
	/// </summary>
	/// <remarks>
	/// <para>
	/// Uses attributes defined on the calling assembly to determine how to
	/// configure the hierarchy for the repository.
	/// </para>
	/// </remarks>
	/// <author>Nicko Cadell</author>
	/// <author>Gert Driesen</author>
	public class DefaultRepositorySelector : IRepositorySelector
	{
		#region Public Events

		/// <summary>
		/// Event to notify that a logger repository has been created.
		/// </summary>
		/// <value>
		/// Event to notify that a logger repository has been created.
		/// </value>
		/// <remarks>
		/// <para>
		/// Event raised when a new repository is created.
		/// The event source will be this selector. The event args will
		/// be a <see cref="LoggerRepositoryCreationEventArgs"/> which
		/// holds the newly created <see cref="ILoggerRepository"/>.
		/// </para>
		/// </remarks>
		public event LoggerRepositoryCreationEventHandler LoggerRepositoryCreatedEvent 
		{
			add { m_loggerRepositoryCreatedEvent += value; }
			remove { m_loggerRepositoryCreatedEvent -= value; }
		}

		#endregion Public Events

		#region Public Instance Constructors

		/// <summary>
		/// Creates a new repository selector.
		/// </summary>
		/// <param name="defaultRepositoryType">The type of the repositories to create, must implement <see cref="ILoggerRepository"/></param>
		/// <remarks>
		/// <para>
		/// Create an new repository selector.
		/// The default type for repositories must be specified,
		/// an appropriate value would be <see cref="log4net.Repository.Hierarchy.Hierarchy"/>.
		/// </para>
		/// </remarks>
		/// <exception cref="ArgumentNullException"><paramref name="defaultRepositoryType"/> is <see langword="null" />.</exception>
		/// <exception cref="ArgumentOutOfRangeException"><paramref name="defaultRepositoryType"/> does not implement <see cref="ILoggerRepository"/>.</exception>
		public DefaultRepositorySelector(Type defaultRepositoryType)
		{
			if (defaultRepositoryType == null)
			{
				throw new ArgumentNullException("defaultRepositoryType");
			}

			// Check that the type is a repository
			if (! (typeof(ILoggerRepository).IsAssignableFrom(defaultRepositoryType)) )
			{
				throw log4net.Util.SystemInfo.CreateArgumentOutOfRangeException("defaultRepositoryType", defaultRepositoryType, "Parameter: defaultRepositoryType, Value: [" + defaultRepositoryType + "] out of range. Argument must implement the ILoggerRepository interface");
			}

			m_defaultRepositoryType = defaultRepositoryType;

			LogLog.Debug("DefaultRepositorySelector: defaultRepositoryType [" + m_defaultRepositoryType + "]");
		}

		#endregion Public Instance Constructors

		#region Implementation of IRepositorySelector

		/// <summary>
		/// Gets the <see cref="ILoggerRepository"/> for the specified assembly.
		/// </summary>
		/// <param name="repositoryAssembly">The assembly use to lookup the <see cref="ILoggerRepository"/>.</param>
		/// <remarks>
		/// <para>
		/// The type of the <see cref="ILoggerRepository"/> created and the repository 
		/// to create can be overridden by specifying the <see cref="log4net.Config.RepositoryAttribute"/> 
		/// attribute on the <paramref name="repositoryAssembly"/>.
		/// </para>
		/// <para>
		/// The default values are to use the <see cref="log4net.Repository.Hierarchy.Hierarchy"/> 
		/// implementation of the <see cref="ILoggerRepository"/> interface and to use the
		/// <see cref="AssemblyName.Name"/> as the name of the repository.
		/// </para>
		/// <para>
		/// The <see cref="ILoggerRepository"/> created will be automatically configured using 
		/// any <see cref="log4net.Config.ConfiguratorAttribute"/> attributes defined on
		/// the <paramref name="repositoryAssembly"/>.
		/// </para>
		/// </remarks>
		/// <returns>The <see cref="ILoggerRepository"/> for the assembly</returns>
		/// <exception cref="ArgumentNullException"><paramref name="repositoryAssembly"/> is <see langword="null" />.</exception>
		public ILoggerRepository GetRepository(Assembly repositoryAssembly)
		{
			if (repositoryAssembly == null)
			{
				throw new ArgumentNullException("repositoryAssembly");
			}
			return CreateRepository(repositoryAssembly, m_defaultRepositoryType);
		}

		/// <summary>
		/// Gets the <see cref="ILoggerRepository"/> for the specified repository.
		/// </summary>
		/// <param name="repositoryName">The repository to use to lookup the <see cref="ILoggerRepository"/>.</param>
		/// <returns>The <see cref="ILoggerRepository"/> for the specified repository.</returns>
		/// <remarks>
		/// <para>
		/// Returns the named repository. If <paramref name="repositoryName"/> is <c>null</c>
		/// a <see cref="ArgumentNullException"/> is thrown. If the repository 
		/// does not exist a <see cref="LogException"/> is thrown.
		/// </para>
		/// <para>
		/// Use <see cref="CreateRepository(string, Type)"/> to create a repository.
		/// </para>
		/// </remarks>
		/// <exception cref="ArgumentNullException"><paramref name="repositoryName"/> is <see langword="null" />.</exception>
		/// <exception cref="LogException"><paramref name="repositoryName"/> does not exist.</exception>
		public ILoggerRepository GetRepository(string repositoryName)
		{
			if (repositoryName == null)
			{
				throw new ArgumentNullException("repositoryName");
			}

			lock(this)
			{
				// Lookup in map
				ILoggerRepository rep = m_name2repositoryMap[repositoryName] as ILoggerRepository;
				if (rep == null)
				{
					throw new LogException("Repository [" + repositoryName + "] is NOT defined.");
				}
				return rep;
			}
		}

		/// <summary>
		/// Create a new repository for the assembly specified 
		/// </summary>
		/// <param name="repositoryAssembly">the assembly to use to create the repository to associate with the <see cref="ILoggerRepository"/>.</param>
		/// <param name="repositoryType">The type of repository to create, must implement <see cref="ILoggerRepository"/>.</param>
		/// <returns>The repository created.</returns>
		/// <remarks>
		/// <para>
		/// The <see cref="ILoggerRepository"/> created will be associated with the repository
		/// specified such that a call to <see cref="GetRepository(Assembly)"/> with the
		/// same assembly specified will return the same repository instance.
		/// </para>
		/// <para>
		/// The type of the <see cref="ILoggerRepository"/> created and
		/// the repository to create can be overridden by specifying the
		/// <see cref="log4net.Config.RepositoryAttribute"/> attribute on the 
		/// <paramref name="repositoryAssembly"/>.  The default values are to use the 
		/// <paramref name="repositoryType"/> implementation of the 
		/// <see cref="ILoggerRepository"/> interface and to use the
		/// <see cref="AssemblyName.Name"/> as the name of the repository.
		/// </para>
		/// <para>
		/// The <see cref="ILoggerRepository"/> created will be automatically
		/// configured using any <see cref="log4net.Config.ConfiguratorAttribute"/> 
		/// attributes defined on the <paramref name="repositoryAssembly"/>.
		/// </para>
		/// <para>
		/// If a repository for the <paramref name="repositoryAssembly"/> already exists
		/// that repository will be returned. An error will not be raised and that 
		/// repository may be of a different type to that specified in <paramref name="repositoryType"/>.
		/// Also the <see cref="log4net.Config.RepositoryAttribute"/> attribute on the
		/// assembly may be used to override the repository type specified in 
		/// <paramref name="repositoryType"/>.
		/// </para>
		/// </remarks>
		/// <exception cref="ArgumentNullException"><paramref name="repositoryAssembly"/> is <see langword="null" />.</exception>
		public ILoggerRepository CreateRepository(Assembly repositoryAssembly, Type repositoryType)
		{
			return CreateRepository(repositoryAssembly, repositoryType, DefaultRepositoryName, true);
		}

		/// <summary>
		/// Creates a new repository for the assembly specified.
		/// </summary>
		/// <param name="repositoryAssembly">the assembly to use to create the repository to associate with the <see cref="ILoggerRepository"/>.</param>
		/// <param name="repositoryType">The type of repository to create, must implement <see cref="ILoggerRepository"/>.</param>
		/// <param name="repositoryName">The name to assign to the created repository</param>
		/// <param name="readAssemblyAttributes">Set to <c>true</c> to read and apply the assembly attributes</param>
		/// <returns>The repository created.</returns>
		/// <remarks>
		/// <para>
		/// The <see cref="ILoggerRepository"/> created will be associated with the repository
		/// specified such that a call to <see cref="GetRepository(Assembly)"/> with the
		/// same assembly specified will return the same repository instance.
		/// </para>
		/// <para>
		/// The type of the <see cref="ILoggerRepository"/> created and
		/// the repository to create can be overridden by specifying the
		/// <see cref="log4net.Config.RepositoryAttribute"/> attribute on the 
		/// <paramref name="repositoryAssembly"/>.  The default values are to use the 
		/// <paramref name="repositoryType"/> implementation of the 
		/// <see cref="ILoggerRepository"/> interface and to use the
		/// <see cref="AssemblyName.Name"/> as the name of the repository.
		/// </para>
		/// <para>
		/// The <see cref="ILoggerRepository"/> created will be automatically
		/// configured using any <see cref="log4net.Config.ConfiguratorAttribute"/> 
		/// attributes defined on the <paramref name="repositoryAssembly"/>.
		/// </para>
		/// <para>
		/// If a repository for the <paramref name="repositoryAssembly"/> already exists
		/// that repository will be returned. An error will not be raised and that 
		/// repository may be of a different type to that specified in <paramref name="repositoryType"/>.
		/// Also the <see cref="log4net.Config.RepositoryAttribute"/> attribute on the
		/// assembly may be used to override the repository type specified in 
		/// <paramref name="repositoryType"/>.
		/// </para>
		/// </remarks>
		/// <exception cref="ArgumentNullException"><paramref name="repositoryAssembly"/> is <see langword="null" />.</exception>
		public ILoggerRepository CreateRepository(Assembly repositoryAssembly, Type repositoryType, string repositoryName, bool readAssemblyAttributes)
		{
			if (repositoryAssembly == null)
			{
				throw new ArgumentNullException("repositoryAssembly");
			}

			// If the type is not set then use the default type
			if (repositoryType == null)
			{
				repositoryType = m_defaultRepositoryType;
			}

			lock(this)
			{
				// Lookup in map
				ILoggerRepository rep = m_assembly2repositoryMap[repositoryAssembly] as ILoggerRepository;
				if (rep == null)
				{
					// Not found, therefore create
					LogLog.Debug("DefaultRepositorySelector: Creating repository for assembly [" + repositoryAssembly + "]");

					// Must specify defaults
					string actualRepositoryName = repositoryName;
					Type actualRepositoryType = repositoryType;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色8久久精品久久久久久蜜| 韩国精品免费视频| 精品国产在天天线2019| 99re视频精品| 国内久久婷婷综合| 亚洲gay无套男同| 国产精品第五页| 精品国产91久久久久久久妲己| 一本大道久久a久久综合| 国产成人在线看| 日本在线不卡一区| 一区二区欧美精品| 国产精品久久久久精k8| 国产亚洲污的网站| 精品欧美黑人一区二区三区| 欧美日韩成人综合在线一区二区| 亚洲色图清纯唯美| 在线观看一区二区视频| 欧美卡1卡2卡| 美女视频免费一区| 香蕉乱码成人久久天堂爱免费| 欧美国产欧美综合| 久久综合成人精品亚洲另类欧美 | 国产盗摄一区二区三区| 视频在线观看一区| 亚洲国产一区二区在线播放| 亚洲人成网站精品片在线观看| 久久精品在线观看| 国产午夜亚洲精品午夜鲁丝片 | 国产精品色婷婷| 精品国产成人系列| 欧美一区二区视频在线观看2020 | 亚洲123区在线观看| 亚洲激情欧美激情| 一本大道久久a久久精二百| 欧美在线一二三四区| 色呦呦一区二区三区| 91丨九色丨蝌蚪富婆spa| fc2成人免费人成在线观看播放| 国产一区二区三区高清播放| 激情综合色丁香一区二区| 卡一卡二国产精品| 久久成人免费日本黄色| 国产自产2019最新不卡| 国产很黄免费观看久久| 国产91精品久久久久久久网曝门| 国产精品自在在线| 国产凹凸在线观看一区二区| 成人深夜视频在线观看| 99精品国产视频| 在线视频一区二区免费| 欧美理论在线播放| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 久久日韩粉嫩一区二区三区| 国产亚洲自拍一区| 自拍偷拍亚洲综合| 亚洲 欧美综合在线网络| 欧美夫妻性生活| 国产精品自在欧美一区| 久久午夜羞羞影院免费观看| 国产亚洲一区二区三区在线观看 | 亚洲成人av中文| 奇米影视在线99精品| 狠狠狠色丁香婷婷综合激情 | 亚洲国产精品久久久久秋霞影院| 亚洲午夜免费电影| 美女精品一区二区| 成人av网站在线| 欧美吞精做爰啪啪高潮| 精品久久久久久亚洲综合网| 中文欧美字幕免费| 舔着乳尖日韩一区| 黑人巨大精品欧美一区| 色综合色综合色综合色综合色综合| 欧美在线999| 精品国产免费一区二区三区香蕉| 国产日韩精品一区| 久久免费国产精品| 国产精品久久久久久久久果冻传媒| 欧美亚洲禁片免费| 一本久道中文字幕精品亚洲嫩 | 欧美日韩成人一区二区| 欧美精品一区二| 曰韩精品一区二区| 精久久久久久久久久久| 91年精品国产| 日韩精品影音先锋| 亚洲精品美国一| 国产麻豆日韩欧美久久| 欧美视频精品在线| 国产三级久久久| 视频一区二区三区在线| 不卡av免费在线观看| 日韩欧美的一区二区| 亚洲裸体在线观看| 国内久久婷婷综合| 欧美另类高清zo欧美| 国产精品久久久一本精品 | 欧美韩国日本综合| 日韩av二区在线播放| 99久久精品99国产精品| 久久国产生活片100| 91视频免费看| 日韩欧美精品在线视频| 欧美日韩国产综合视频在线观看| 国产视频一区在线观看| 免费高清在线一区| 在线观看国产日韩| 国产精品麻豆久久久| 美日韩一级片在线观看| 一本色道久久综合亚洲91| 国产午夜精品美女毛片视频| 轻轻草成人在线| 欧美日韩亚洲综合| 一区二区久久久久久| 99精品一区二区| 国产精品视频线看| 国产精品正在播放| 精品久久久久久综合日本欧美| 性做久久久久久免费观看| 在线欧美日韩精品| 亚洲欧美日韩在线不卡| 成人性视频网站| 国产偷v国产偷v亚洲高清| 久久精品999| 日韩美一区二区三区| 日本不卡一区二区| 日韩一区二区不卡| 日韩1区2区3区| 日韩一区二区在线看片| 午夜激情久久久| 欧美丰满高潮xxxx喷水动漫| 亚洲国产一区二区视频| 欧洲一区二区三区在线| 亚洲狠狠丁香婷婷综合久久久| 91视视频在线直接观看在线看网页在线看| 国产欧美一区二区三区鸳鸯浴| 精品一区二区三区免费播放| 久久综合九色综合97婷婷女人| 国产一区欧美二区| 国产午夜精品久久| av午夜精品一区二区三区| 亚洲女子a中天字幕| 91久久精品一区二区| 亚洲自拍偷拍麻豆| 欧美少妇bbb| 美女视频黄久久| 久久久久99精品一区| 国产盗摄一区二区| 亚洲欧美另类图片小说| 欧美亚洲日本一区| 美女视频免费一区| 国产欧美一区二区三区鸳鸯浴 | 亚洲成人激情av| 欧美日韩精品一区二区在线播放| 日韩精品一区第一页| 欧美精品一区二区高清在线观看 | 国产盗摄视频一区二区三区| 国产精品国产三级国产普通话蜜臀 | 日韩电影免费一区| 精品国产青草久久久久福利| 成人性生交大片免费| 亚洲一区免费在线观看| 日韩精品中文字幕一区二区三区 | 制服丝袜激情欧洲亚洲| 精品在线观看视频| 国产精品国产三级国产aⅴ无密码| 99精品偷自拍| 三级不卡在线观看| 国产欧美日韩精品a在线观看| 91久久精品一区二区三| 老司机免费视频一区二区| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产精品一二三在| 夜夜精品视频一区二区 | 欧美人妇做爰xxxⅹ性高电影| 久久精品国产秦先生| 一区在线观看免费| 日韩一区二区在线看| 成人av电影在线| 蜜臀av一区二区在线免费观看 | 欧美日韩一区 二区 三区 久久精品 | 国产喂奶挤奶一区二区三区| 欧美午夜精品电影| 国产盗摄女厕一区二区三区 | 国产乱码精品一品二品| 亚洲一二三四在线观看| 日韩精品专区在线影院重磅| www.欧美日韩| 毛片不卡一区二区| 亚洲精品乱码久久久久久日本蜜臀| 日韩一区二区在线看| 一本在线高清不卡dvd| 国产一区二区三区在线观看免费 | 色综合天天综合网天天看片| 久久国产福利国产秒拍| 亚洲网友自拍偷拍| 亚洲欧洲日韩av| 久久久亚洲精华液精华液精华液| 欧美三级韩国三级日本三斤|