Hi All,

                        I am trying to create custom tasks that have
nested build elements.

My build fragment is like this
Build fragment:

<Ftp ...>
    <upload file= ... />
    <upload file= ... />

</Ftp>

I  followed this code

private ClassElement[] _classes;

[BuildElementArray ("class")]
public ClassElement[] Classes {
  get { return _classes; }
  set { _classes = value; }
}

But I am getting error  that task does not support  multiple child
elements.....


xxxxxxxxxxxxxxxxMy Code is xxxxxxxxxxxxxxxxxx

public class ClassElement : Element

{

      private string filename;



      [TaskAttribute("file")]

      public string ClassName

      {

            get { return filename; }

            set { filename = value; }

      }

}


private ClassElement[] _classes;



      [BuildElementArray("upload")]

      public ClassElement[] upld

      {

            get { return _classes; }

            set { _classes = value; }

      }


And I am using c# method like this

        ff.upload(upld.ClassName);    //I think error is in this line

ff is a object of FtpLib dll
upload method is supported by this object


please help me.
Thanks














#########################################
THIS EMAIL MESSAGE IS FOR THE SOLE USE OF THE INTENDED RECIPIENT(S) AND MAY 
CONTAIN CONFIDENTIAL AND PRIVILEGED INFORMATION. ANY UNAUTHORIZED REVIEW, USE, 
DISCLOSURE OR DISTRIBUTION IS PROHIBITED.BEFORE OPENING ANY ATTACHMENTS PLEASE 
CHECK FOR VIRUSES AND DEFECTS.IF YOU ARE NOT THE INTENDED RECIPIENT, PLEASE 
NOTIFY US IMMEDIATELY BY REPLY E-MAIL AND DELETE THE ORIGINAL MESSAGE.
#########################################
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to