data
is not a collection of tokens. It's the context in which the tokens will get evaluated. For example, this is where you would pass in the content item that will provide the context for all Content.*
tokens. ITokenizer
is the API to use, and yes, the caller is responsible for passing in the context. Otherwise, a default context may be used (the current user in the case of User
tokens for example), but it may not always be what you expect. If you described the actual scenario where you want to use this, I might be able to give better advice. You can also read this to get some more context about the feature:
http://weblogs.asp.net/bleroy/archive/2011/07/22/future-orchard-part-1-introducing-tokens.aspx http://weblogs.asp.net/bleroy/archive/2011/07/27/future-orchard-part-2-more-tokens.aspx