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

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

?? defaultrepositoryselector.cs

?? 詳細講述了數(shù)據(jù)庫編程
?? 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;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日精品一区二区| 欧洲精品在线观看| 蜜桃视频在线一区| 亚洲成人在线观看视频| 亚洲欧美激情插| 国产精品国产自产拍高清av王其| 欧美精品一区二区三区蜜桃 | 成人精品在线视频观看| 麻豆极品一区二区三区| 丝袜亚洲另类欧美| 首页国产丝袜综合| 日韩极品在线观看| 欧美aaaaaa午夜精品| 日韩福利电影在线| 日本午夜精品视频在线观看| 丝袜美腿亚洲一区二区图片| 午夜久久福利影院| 视频一区欧美精品| 五月综合激情网| 日韩精品电影在线观看| 日本成人在线看| 久久国产乱子精品免费女| 久久99最新地址| 精品一区二区三区的国产在线播放| 蜜桃视频在线观看一区二区| 九九精品视频在线看| 奇米精品一区二区三区四区| 久久国产夜色精品鲁鲁99| 国产在线不卡一区| 国产成人免费视频精品含羞草妖精| 国产成人亚洲精品狼色在线| 福利电影一区二区三区| 99精品黄色片免费大全| 欧美中文字幕一区| 51精品久久久久久久蜜臀| 日韩欧美在线综合网| 久久久久久9999| 亚洲欧美综合另类在线卡通| 亚洲午夜影视影院在线观看| 日本亚洲免费观看| 国产不卡视频在线播放| 91在线视频网址| 欧美天天综合网| 欧美一区二区三区色| 日韩精品资源二区在线| 国产精品久久久一本精品| 一区二区三国产精华液| 欧美aa在线视频| 国产**成人网毛片九色 | 99在线精品视频| 欧美在线三级电影| 欧美精品一区二区久久久| 国产精品美女久久久久久久久久久 | 欧美日韩国产一区| 久久综合一区二区| 18涩涩午夜精品.www| 午夜精品福利久久久| 国产一二三精品| 在线观看欧美精品| 精品成人私密视频| 一区二区高清免费观看影视大全| 免费在线观看视频一区| av亚洲产国偷v产偷v自拍| 欧美日韩国产高清一区二区三区 | 99精品欧美一区二区蜜桃免费| 欧美少妇xxx| 久久久久久久久97黄色工厂| 亚洲综合小说图片| 国产成人综合视频| 欧美日本在线看| 中文字幕国产精品一区二区| 日本大胆欧美人术艺术动态| gogo大胆日本视频一区| 日韩欧美一二三| 亚洲黄色小视频| 国产乱子轮精品视频| 欧美亚洲精品一区| 国产色婷婷亚洲99精品小说| 日韩av中文字幕一区二区| proumb性欧美在线观看| 日韩精品一区二区三区视频| 亚洲人xxxx| 国产一区999| 欧美猛男超大videosgay| 国产精品美女久久久久aⅴ| 青娱乐精品视频在线| 91福利精品第一导航| 日本一区二区在线不卡| 日本91福利区| 欧美日韩午夜精品| 亚洲同性gay激情无套| 国产成人精品1024| 欧美成人高清电影在线| 偷窥国产亚洲免费视频| 一本色道久久综合亚洲91| 国产精品―色哟哟| 国产成人午夜高潮毛片| 日韩欧美一区二区久久婷婷| 午夜伊人狠狠久久| 色综合网站在线| 中文字幕一区视频| 床上的激情91.| 亚洲精品在线免费观看视频| 蜜桃av一区二区在线观看| 欧美日韩精品一区二区三区四区 | 91精品国产入口| 一区二区三区四区在线免费观看| 国产a区久久久| 久久久综合激的五月天| 97精品久久久久中文字幕 | 天堂一区二区在线| 欧洲精品在线观看| 一区二区三区日韩欧美| 9色porny自拍视频一区二区| 国产精品久久久爽爽爽麻豆色哟哟| 国产成人亚洲综合a∨婷婷图片| 精品国产人成亚洲区| 国内精品写真在线观看| 欧美成人女星排行榜| 久久精品二区亚洲w码| 精品国产免费一区二区三区四区| 欧美一激情一区二区三区| 日韩中文字幕av电影| 91精品国产综合久久精品图片| 婷婷亚洲久悠悠色悠在线播放| 欧美日韩国产首页| 爽爽淫人综合网网站| 日韩午夜激情电影| 经典三级一区二区| 久久人人爽爽爽人久久久| 国产精品99久久久久久久vr | 久久久一区二区| 国产一区二区三区黄视频 | 3d成人h动漫网站入口| 日韩国产精品91| 日韩欧美在线123| 另类小说综合欧美亚洲| 欧美精品一区二区三| 懂色中文一区二区在线播放| 国产精品久久久久久久久免费桃花 | 国产精品久久久久久亚洲毛片 | 日韩欧美国产精品一区| 国产精品自在欧美一区| 中文字幕在线观看一区二区| 一本色道**综合亚洲精品蜜桃冫| 一区二区不卡在线视频 午夜欧美不卡在 | 国产在线日韩欧美| 中文字幕一区二区三区视频 | 中文字幕一区二区三中文字幕| 欧美在线短视频| 另类小说综合欧美亚洲| 国产精品私人自拍| 欧美性猛交xxxxxxxx| 久久99国产乱子伦精品免费| 中文字幕中文字幕中文字幕亚洲无线| 在线视频欧美区| 男人的j进女人的j一区| 国产激情精品久久久第一区二区 | 欧美高清一级片在线观看| 欧美亚男人的天堂| 精品一区二区成人精品| 亚洲色图在线看| 欧美精品久久久久久久久老牛影院| 久久99久久精品| 综合久久久久久久| 日韩精品在线看片z| 99精品国产91久久久久久| 日韩1区2区3区| 中文字幕的久久| 91麻豆精品国产91久久久资源速度| 成人亚洲一区二区一| 丝袜亚洲另类欧美综合| 国产精品国产三级国产a | 久久精品亚洲国产奇米99| 在线精品视频小说1| 狠狠色丁香婷婷综合久久片| 亚洲色图欧美偷拍| 久久先锋影音av鲁色资源| 精品视频在线免费| 成人一区二区三区视频在线观看| 日本最新不卡在线| 国产精品免费免费| 精品国产乱子伦一区| 欧美性xxxxxx少妇| kk眼镜猥琐国模调教系列一区二区| 老汉av免费一区二区三区| 亚洲精品免费一二三区| 久久亚洲二区三区| 日韩一区二区三区免费观看| 在线观看亚洲精品| 成人精品小蝌蚪| 久久99精品久久只有精品| 午夜影视日本亚洲欧洲精品| 亚洲欧洲av一区二区三区久久| 久久美女艺术照精彩视频福利播放| 欧美电影一区二区三区| 色噜噜夜夜夜综合网| av亚洲精华国产精华| 国产成人精品aa毛片| 韩日欧美一区二区三区|