I have an application in which some sides i am using Filter conditions,,But i dont know the meaningof usage of word "recursive" in that filter conditions Here is a bit of code
// Indicates a recursive filter. Only valid for object type property filters.
private bool m_recursive = false;
------------------------
/// <summary>
/// Method to apply an object filter to an object.
/// </summary>
/// <param name="myObject">the object to which to apply the filter</param>
/// <returns>true if the object passes the filter, false otherwise</returns>
public bool Apply(DataModelObject myObject)
{
----------------------
/// Method to apply a property filter
/// </summary>
/// <param name="myObject">the object to which to apply the filter</param>
/// <param name="filteredType">type of the object to which to apply the filter</param>
/// <returns>true if the object passes the property filter, false otherwise</returns>
public bool Apply(DataModelObject myObject, Type filteredType)
{
switch( FilterType )
{
case enumFilterType.regularExpr:
switch( Operator )
{
case enumOperator.eq:
------------------------------------
case enumFilterType.strExpr:
switch( Operator )
{
case enumOperator.eq:
-------------------------------------
case enumFilterType.objectFilt:
do
{
retval = ((ObjectFilter)m_filterValue).Apply(propVal);
myObject = propVal;
if (m_recursive && retval == false && myObject != null)
{
propVal = (DataModelObject)prop.GetValue(myObject, null);
}
else
{
myObject = null;
}
} while (myObject != null);
}
if( m_operator == enumOperator.ne )
{
retval = !retval;
}
-----------------------
public object Clone()
{
clone.m_recursive = this.m_recursive;
return clone;
}
Can any one tell me why recursive false is using here