NVelocity.Runtime.Parser.Node.BooleanPropertyExecutor.Discover C# (CSharp) Method

Discover() protected method

protected Discover ( Type clazz, String propertyName ) : void
clazz System.Type
propertyName String
return void
		protected internal override void Discover(Type clazz, String propertyName)
		{
			try
			{
				property = introspector.GetProperty(clazz, propertyName);
				if (property != null && property.PropertyType.Equals(typeof(Boolean)))
					return;

				// now the convenience, flip the 1st character
				propertyName = propertyName.Substring(0, 1).ToUpper() + propertyName.Substring(1);
				property = introspector.GetProperty(clazz, propertyName);
				if (property != null && property.PropertyType.Equals(typeof(Boolean)))
					return;

				property = null;
			}
			catch(Exception e)
			{
				rlog.Error("PROGRAMMER ERROR : BooleanPropertyExector() : " + e);
			}
		}
	}