public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject) { if (parameterObject == null) { return(false); } return(ObjectProbe.HasReadableProperty(parameterObject, ((BaseTag)tag).Property)); }
/// <summary> /// </summary> /// <param name="ctx"></param> /// <param name="tag"></param> /// <param name="parameterObject"></param> /// <returns></returns> /// <remarks> /// Updated By: Richard Beacroft /// Updated Date: 11\10\2013 /// Description: Builds full property name and checks to see if the property is readable. /// Not sure why it doesn't also cater for class Fields? /// </remarks> public override bool IsCondition(SqlTagContext ctx, SqlTag tag, object parameterObject) { if (parameterObject == null) { return(false); } var baseTag = (BaseTag)tag; // build property full name from property name - specifically handles references to current iterate item, i.e. "[]." var propertyFullName = ctx.ReplaceIterateCurrentProperty(baseTag); return(ObjectProbe.HasReadableProperty(parameterObject, propertyFullName)); }