Replaces tokens in the original input with user-supplied values.
For a list of all members of this type, see ReplaceTokens Members.
System.Object
NAnt.Core.Element
NAnt.Core.Filters.ChainableReader
NAnt.Core.Filters.Filter
NAnt.Core.Filters.ReplaceTokens
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
This filter replaces all token surrounded by a beginning and ending token. The default beginning and ending tokens both default to '@'. The optional BeginToken and EndToken attributes can be specified to change either token. By default string comparisons are case sensitive but this can be changed by setting the optional IgnoreCase attribute to true.
Tokens are specified by using the Token element. It is possible to specify from 1 to n tokens and replacement values. Values can be any valid NAnt expression.
Filters are intended to be used as a element of a FilterChain.
Replace all occurrences of the string @DATE@ with the value of property "TODAY".
<replacetokens> <token key="DATE" value="${TODAY}" /> </replacetokens>
Replace all occurrences of the string <DATE> with the value of property "TODAY".
<replacetokens begintoken="<" endtoken=">"> <token key="DATE" value="${TODAY}" /> </replacetokens>
Namespace: NAnt.Core.Filters
Assembly: NAnt.Core (in NAnt.Core.dll)
ReplaceTokens Members | NAnt.Core.Filters Namespace