Here's the code for the prefix attribute:
/// <summary>
/// <para>The prefix to use for the specified registry key values.</para>
/// <para>If this attribute is used then all registry values will be read and stored as properties with this prefix.</para>
/// </summary>
/// <example>
/// <para>Registry values a, b, c will be turned into prefixa, prefixb, prefixc named properties</para>
/// </example>
[TaskAttribute("prefix")]
public virtual string PropertyPrefix {
get { return _propPrefix; }
set { _propPrefix = value; }
}


Then the code states:
else if (_propName == null && _propPrefix != null) {
mykey = LookupRegKey(_regKey, _regHive);
foreach (string name in mykey.GetValueNames()) {
Properties[_propPrefix + "." + name] = mykey.GetValue(name).ToString();
}


After testing it myself, I found that the example for prefix is wrong. Registry values a, b, c would be turned into prefix.a, prefix.b, prefix.c named properties.



Colin Svingen


------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to