/// <summary> /// /// </summary> /// <param name="ctx"></param> /// <param name="tag"></param> /// <param name="parameterObject"></param> /// <returns></returns> public override int DoStartFragment(SqlTagContext ctx, SqlTag tag, object parameterObject) { IterateContext iterate = (IterateContext)ctx.GetAttribute(tag); if (iterate == null) { string propertyName = ((BaseTag)tag).Property; object collection; if (propertyName != null && propertyName.Length > 0) { collection = ObjectProbe.GetMemberValue(parameterObject, propertyName, this.AccessorFactory); } else { collection = parameterObject; } iterate = new IterateContext(collection); ctx.AddAttribute(tag, iterate); } if (iterate != null && iterate.HasNext) { return(BaseTagHandler.INCLUDE_BODY); } else { return(BaseTagHandler.SKIP_BODY); } }