That is exactly what I wanted to do. I was just confused I guess by the docs
(that I was using from the pre-release .msi of .9 that Ian posted) which
only exposed a get method for Properties. 

public PropertyDictionary Properties {virtual get;}

Thanks. This got me rolling again. 

Kevin

-----Original Message-----
From: Scott Hernandez [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 22, 2002 12:33 PM
To: 'Kevin Miller'; 'Nant-Developers (E-mail)'
Subject: RE: [nant-dev] Property question


If you are writing the task, then you can just use the Properties
collection to set the property you want.

So if you want to write a SCVersion task to do this the syntax could be
something like this.

<scversion nextversion="nextVersion"/>
<echo message="next version is ${nextVersion}"/>

And your code would look something like this:

  [TaskName("scversion")]
  public class SCVersion : Task {

      [TaskAttribute("nextversion", Required=true)]
      public string NextVersionPropertyName { get{...} set{..} }

      protected override void ExecuteTask() {
                //get next version
                string nextVersion = "1.0";
                Properties[NextVersionPropertyName] = nextVersion;
        }
  }

But if you want to do something like this, as you can do in xslt, it
just doesn't work.

<property name="nextversion">
        <getnextversion />
</property>

later,
Scott

> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:nant-developers-
> [EMAIL PROTECTED]] On Behalf Of Kevin Miller
> Sent: Monday, July 22, 2002 9:48 AM
> To: Nant-Developers (E-mail)
> Subject: [nant-dev] Property question
> 
> I apologize if this seems simple but I want to populate a project
property
> with output from a task. Is this possible?
> 
> For example: I want to provide a mechanism to find the next possible
> version
> number of a source control project. That version would then need to be
a
> property to other tasks.
> 
> Kevin Miller
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nant-developers mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-developers


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to