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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? defaultrepositoryselector.cs

?? 詳細(xì)講述了數(shù)據(jù)庫(kù)編程
?? CS
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):

					if (readAssemblyAttributes)
					{
						// Get the repository and type from the assembly attributes
						GetInfoForAssembly(repositoryAssembly, ref actualRepositoryName, ref actualRepositoryType);
					}

					LogLog.Debug("DefaultRepositorySelector: Assembly [" + repositoryAssembly + "] using repository [" + actualRepositoryName + "] and repository type [" + actualRepositoryType + "]");

					// Lookup the repository in the map (as this may already be defined)
					rep = m_name2repositoryMap[actualRepositoryName] as ILoggerRepository;
					if (rep == null)
					{
						// Create the repository
						rep = CreateRepository(actualRepositoryName, actualRepositoryType);

						if (readAssemblyAttributes)
						{
							try
							{
								// Look for aliasing attributes
								LoadAliases(repositoryAssembly, rep);

								// Look for plugins defined on the assembly
								LoadPlugins(repositoryAssembly, rep);

								// Configure the repository using the assembly attributes
								ConfigureRepository(repositoryAssembly, rep);
							}
							catch (Exception ex)
							{
								LogLog.Error("DefaultRepositorySelector: Failed to configure repository [" + actualRepositoryName + "] from assembly attributes.", ex);
							}
						}
					}
					else
					{
						LogLog.Debug("DefaultRepositorySelector: repository [" + actualRepositoryName + "] already exists, using repository type [" + rep.GetType().FullName + "]");

						if (readAssemblyAttributes)
						{
							try
							{
								// Look for plugins defined on the assembly
								LoadPlugins(repositoryAssembly, rep);
							}
							catch (Exception ex)
							{
								LogLog.Error("DefaultRepositorySelector: Failed to configure repository [" + actualRepositoryName + "] from assembly attributes.", ex);
							}
						}
					}
					m_assembly2repositoryMap[repositoryAssembly] = rep;
				}
				return rep;
			}
		}

		/// <summary>
		/// Creates a new repository for the specified repository.
		/// </summary>
		/// <param name="repositoryName">The repository to associate with the <see cref="ILoggerRepository"/>.</param>
		/// <param name="repositoryType">The type of repository to create, must implement <see cref="ILoggerRepository"/>.
		/// If this param is <see langword="null" /> then the default repository type is used.</param>
		/// <returns>The new repository.</returns>
		/// <remarks>
		/// <para>
		/// The <see cref="ILoggerRepository"/> created will be associated with the repository
		/// specified such that a call to <see cref="GetRepository(string)"/> with the
		/// same repository specified will return the same repository instance.
		/// </para>
		/// </remarks>
		/// <exception cref="ArgumentNullException"><paramref name="repositoryName"/> is <see langword="null" />.</exception>
		/// <exception cref="LogException"><paramref name="repositoryName"/> already exists.</exception>
		public ILoggerRepository CreateRepository(string repositoryName, Type repositoryType)
		{
			if (repositoryName == null)
			{
				throw new ArgumentNullException("repositoryName");
			}

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

			lock(this)
			{
				ILoggerRepository rep = null;

				// First check that the repository does not exist
				rep = m_name2repositoryMap[repositoryName] as ILoggerRepository;
				if (rep != null)
				{
					throw new LogException("Repository [" + repositoryName + "] is already defined. Repositories cannot be redefined.");
				}
				else
				{
					// Lookup an alias before trying to create the new repository
					ILoggerRepository aliasedRepository = m_alias2repositoryMap[repositoryName] as ILoggerRepository;
					if (aliasedRepository != null)
					{
						// Found an alias

						// Check repository type
						if (aliasedRepository.GetType() == repositoryType)
						{
							// Repository type is compatible
							LogLog.Debug("DefaultRepositorySelector: Aliasing repository [" + repositoryName + "] to existing repository [" + aliasedRepository.Name + "]");
							rep = aliasedRepository;

							// Store in map
							m_name2repositoryMap[repositoryName] = rep;
						}
						else
						{
							// Invalid repository type for alias
							LogLog.Error("DefaultRepositorySelector: Failed to alias repository [" + repositoryName + "] to existing repository ["+aliasedRepository.Name+"]. Requested repository type ["+repositoryType.FullName+"] is not compatible with existing type [" + aliasedRepository.GetType().FullName + "]");

							// We now drop through to create the repository without aliasing
						}
					}

					// If we could not find an alias
					if (rep == null)
					{
						LogLog.Debug("DefaultRepositorySelector: Creating repository [" + repositoryName + "] using type [" + repositoryType + "]");

						// Call the no arg constructor for the repositoryType
						rep = (ILoggerRepository)Activator.CreateInstance(repositoryType);

						// Set the name of the repository
						rep.Name = repositoryName;

						// Store in map
						m_name2repositoryMap[repositoryName] = rep;

						// Notify listeners that the repository has been created
						OnLoggerRepositoryCreatedEvent(rep);
					}
				}

				return rep;
			}
		}

		/// <summary>
		/// Test if a named repository exists
		/// </summary>
		/// <param name="repositoryName">the named repository to check</param>
		/// <returns><c>true</c> if the repository exists</returns>
		/// <remarks>
		/// <para>
		/// Test if a named repository exists. Use <see cref="CreateRepository(string, Type)"/>
		/// to create a new repository and <see cref="GetRepository(string)"/> to retrieve 
		/// a repository.
		/// </para>
		/// </remarks>
		public bool ExistsRepository(string repositoryName)
		{
			lock(this)
			{
				return m_name2repositoryMap.ContainsKey(repositoryName);
			}
		}

		/// <summary>
		/// Gets a list of <see cref="ILoggerRepository"/> objects
		/// </summary>
		/// <returns>an array of all known <see cref="ILoggerRepository"/> objects</returns>
		/// <remarks>
		/// <para>
		/// Gets an array of all of the repositories created by this selector.
		/// </para>
		/// </remarks>
		public ILoggerRepository[] GetAllRepositories()
		{
			lock(this)
			{
				ICollection reps = m_name2repositoryMap.Values;
				ILoggerRepository[] all = new ILoggerRepository[reps.Count];
				reps.CopyTo(all, 0);
				return all;
			}
		}

		#endregion Implementation of IRepositorySelector

		#region Public Instance Methods

		/// <summary>
		/// Aliases a repository to an existing repository.
		/// </summary>
		/// <param name="repositoryAlias">The repository to alias.</param>
		/// <param name="repositoryTarget">The repository that the repository is aliased to.</param>
		/// <remarks>
		/// <para>
		/// The repository specified will be aliased to the repository when created. 
		/// The repository must not already exist.
		/// </para>
		/// <para>
		/// When the repository is created it must utilize the same repository type as 
		/// the repository it is aliased to, otherwise the aliasing will fail.
		/// </para>
		/// </remarks>
		/// <exception cref="ArgumentNullException">
		///	<para><paramref name="repositoryAlias" /> is <see langword="null" />.</para>
		///	<para>-or-</para>
		///	<para><paramref name="repositoryTarget" /> is <see langword="null" />.</para>
		/// </exception>
		public void AliasRepository(string repositoryAlias, ILoggerRepository repositoryTarget) 
		{
			if (repositoryAlias == null) 
			{
				throw new ArgumentNullException("repositoryAlias");
			}
			if (repositoryTarget == null) 
			{
				throw new ArgumentNullException("repositoryTarget");
			}

			lock(this) 
			{
				// Check if the alias is already set
				if (m_alias2repositoryMap.Contains(repositoryAlias)) 
				{
					// Check if this is a duplicate of the current alias
					if (repositoryTarget != ((ILoggerRepository)m_alias2repositoryMap[repositoryAlias])) 
					{
						// Cannot redefine existing alias
						throw new InvalidOperationException("Repository [" + repositoryAlias + "] is already aliased to repository [" + ((ILoggerRepository)m_alias2repositoryMap[repositoryAlias]).Name + "]. Aliases cannot be redefined.");
					}
				}
					// Check if the alias is already mapped to a repository
				else if (m_name2repositoryMap.Contains(repositoryAlias)) 
				{
					// Check if this is a duplicate of the current mapping
					if ( repositoryTarget != ((ILoggerRepository)m_name2repositoryMap[repositoryAlias]) ) 
					{
						// Cannot define alias for already mapped repository
						throw new InvalidOperationException("Repository [" + repositoryAlias + "] already exists and cannot be aliased to repository [" + repositoryTarget.Name + "].");
					}
				}
				else 
				{
					// Set the alias
					m_alias2repositoryMap[repositoryAlias] = repositoryTarget;
				}
			}
		}

		#endregion Public Instance Methods

		#region Protected Instance Methods

		/// <summary>
		/// Notifies the registered listeners that the repository has been created.
		/// </summary>
		/// <param name="repository">The repository that has been created.</param>
		/// <remarks>
		/// <para>
		/// Raises the <see cref="LoggerRepositoryCreatedEvent"/> event.
		/// </para>
		/// </remarks>
		protected virtual void OnLoggerRepositoryCreatedEvent(ILoggerRepository repository) 
		{
			LoggerRepositoryCreationEventHandler handler = m_loggerRepositoryCreatedEvent;
			if (handler != null) 
			{
				handler(this, new LoggerRepositoryCreationEventArgs(repository));
			}
		}

		#endregion Protected Instance Methods

		#region Private Instance Methods

		/// <summary>

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区午夜精品| 欧美日韩国产色站一区二区三区| 精品视频在线免费看| 久久先锋影音av鲁色资源| 一区二区三区久久久| 国产一区二区三区免费| 欧美日韩你懂的| 国产精品久久久久永久免费观看 | 欧美探花视频资源| 国产色一区二区| 美女网站视频久久| 欧美艳星brazzers| 国产精品欧美精品| 国产制服丝袜一区| 欧美区一区二区三区| 17c精品麻豆一区二区免费| 精品一区二区三区在线视频| 欧美视频在线一区二区三区 | 69久久99精品久久久久婷婷| 亚洲日本乱码在线观看| 国产精品亚洲成人| 精品日韩在线观看| 日本美女一区二区| 欧美午夜在线一二页| 国产精品伦理一区二区| 韩国三级在线一区| 日韩一级二级三级| 亚洲国产精品影院| 在线观看日韩国产| 亚洲精品自拍动漫在线| proumb性欧美在线观看| 久久精品亚洲国产奇米99| 美女脱光内衣内裤视频久久影院| 欧美视频一区二| 一区二区三区欧美亚洲| 99re66热这里只有精品3直播 | 91行情网站电视在线观看高清版| 中文字幕不卡在线观看| 国产在线不卡一区| 精品国产髙清在线看国产毛片| 天堂蜜桃91精品| 欧美日韩精品系列| 亚洲国产一区二区视频| 欧美亚洲国产怡红院影院| 一区二区三区不卡在线观看| 99精品黄色片免费大全| 亚洲三级电影全部在线观看高清| 成人avav影音| 国产精品二三区| a美女胸又www黄视频久久| 中文字幕一区二区三区不卡在线| av网站免费线看精品| 成人免费在线视频观看| 99精品一区二区三区| 中文字幕亚洲欧美在线不卡| 粉嫩av亚洲一区二区图片| 国产色产综合产在线视频| 豆国产96在线|亚洲| 中文字幕中文字幕中文字幕亚洲无线| 成人精品视频一区二区三区尤物| 欧美激情一区二区| 色综合久久中文综合久久牛| 99视频一区二区三区| 综合亚洲深深色噜噜狠狠网站| 99re在线精品| 香蕉久久夜色精品国产使用方法| 欧美剧情片在线观看| 麻豆91精品91久久久的内涵| 精品国产1区二区| 风间由美一区二区av101| 1024成人网| 欧美三级视频在线观看| 免费人成黄页网站在线一区二区| 精品成人在线观看| 成人午夜精品在线| 一区二区三区久久| 日韩欧美一区二区免费| 国产成人a级片| 亚洲精品国产a| 69p69国产精品| 国模娜娜一区二区三区| 国产精品国产精品国产专区不蜜| 色噜噜狠狠一区二区三区果冻| 午夜伦欧美伦电影理论片| 精品对白一区国产伦| 成人黄色av电影| 亚洲第一福利视频在线| 欧美成人女星排行榜| 成人精品国产福利| 亚洲成在线观看| 国产午夜精品一区二区三区嫩草| 一本大道久久a久久综合| 日本sm残虐另类| 欧美高清在线视频| 欧美日韩在线不卡| 国产xxx精品视频大全| 亚洲国产精品一区二区久久 | 韩国av一区二区| 国产精品国产三级国产普通话蜜臀| 欧美亚洲日本国产| 国产精一区二区三区| 一区二区三区四区在线免费观看| 欧美大片日本大片免费观看| av一区二区久久| 日本美女一区二区三区| 中文字幕一区二区三区蜜月| 欧美一区二区在线免费观看| 成人a免费在线看| 免费黄网站欧美| 亚洲美腿欧美偷拍| 久久久久久久久久电影| 欧美午夜精品久久久久久孕妇| 国产伦精品一区二区三区视频青涩| 亚洲欧美日韩系列| 久久久亚洲精品石原莉奈 | 国产寡妇亲子伦一区二区| 亚洲成在人线免费| 中文字幕一区二区视频| 日韩欧美视频一区| 欧美性猛交xxxxxx富婆| 国产成人aaa| 日本不卡在线视频| 亚洲精品高清在线| 日本一区二区成人| 欧美成人伊人久久综合网| 欧美专区在线观看一区| 国产.欧美.日韩| 久久国产精品区| 亚洲va国产天堂va久久en| 国产精品久久久久9999吃药| 精品国产一区a| 欧美二区三区91| 日本道色综合久久| 成人黄色软件下载| 激情久久久久久久久久久久久久久久| 亚洲成人一区二区| 亚洲三级免费电影| 国产精品美女www爽爽爽| 欧美精品一区二区在线播放| 欧美日韩免费观看一区二区三区| 99精品视频在线播放观看| 国产盗摄女厕一区二区三区 | 亚洲免费在线看| 欧美激情一区二区三区四区| 精品国产一区二区三区不卡| 91精品国产综合久久国产大片| 欧美亚洲禁片免费| 在线观看国产一区二区| 91蝌蚪porny成人天涯| 成人动漫中文字幕| 国产成人在线色| 国产一区二区在线观看视频| 美腿丝袜一区二区三区| 日本免费在线视频不卡一不卡二| 亚洲成人av福利| 亚洲成人精品在线观看| 亚洲一区二区在线观看视频 | 久久久777精品电影网影网| 日韩写真欧美这视频| 欧美乱妇15p| 这里只有精品免费| 欧美一区二区三区色| 欧美一区二区在线不卡| 正在播放一区二区| 欧美大片日本大片免费观看| 精品国产乱码久久久久久1区2区 | 日韩一区二区电影网| 欧美一级一级性生活免费录像| 欧美日产在线观看| 在线播放欧美女士性生活| 777午夜精品免费视频| 91精品在线免费观看| 51精品秘密在线观看| 欧美高清激情brazzers| 91精品欧美一区二区三区综合在| 91精品久久久久久蜜臀| 3atv一区二区三区| 精品国产乱码久久| 中文在线资源观看网站视频免费不卡 | 黄一区二区三区| 国产 欧美在线| 91浏览器打开| 欧美日韩日本视频| 精品理论电影在线| 中文一区一区三区高中清不卡| 国产精品传媒入口麻豆| 亚洲网友自拍偷拍| 久久精品国产一区二区三| 国产精品一区二区x88av| 99视频超级精品| 欧美视频一区二区三区四区| 欧美电影免费提供在线观看| 久久久不卡网国产精品二区 | 精品久久久久久久久久久久包黑料| 久久中文娱乐网| 亚洲图片你懂的| 美腿丝袜亚洲色图| 国产91精品一区二区麻豆亚洲| 91麻豆福利精品推荐| 91精品国产欧美一区二区成人 |