endswithhbmxmlfilter.cs

来自「NHibernate NET开发者所需的」· CS 代码 · 共 20 行

CS
20
字号
using System;

namespace NHibernate.Cfg.MappingSchema
{
	/// <summary>
	/// Responsible for checking that a resource name matches the default pattern of "*.hbm.xml". This is the
	/// default filter for <see cref="MappingDocumentAggregator" />.
	/// </summary>
	public class EndsWithHbmXmlFilter : IAssemblyResourceFilter
	{
		public bool ShouldParse(string resourceName)
		{
			if (resourceName == null)
				throw new ArgumentNullException("resourceName");

			// TODO: ignore case?
			return resourceName.EndsWith(".hbm.xml");
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?