protected void EvaluateCurrentTokens(EvaluateFor <TPart> evaluate) { evaluate .Token("Current", part => part) .Token( token => token.StartsWith("Current:", StringComparison.OrdinalIgnoreCase) ? token.Substring("Current:".Length) : null, (token, part) => part == null ? null : part.Retrieve <string>(token) ); }
protected void EvaluateAutoTokens(EvaluateFor <TPart> evaluate) { evaluate .Token((token, defaultData) => { var tokenParts = _tokenEncoder.Decode(token); if (tokenParts == null) { return(null); } var part = GetByTitle(tokenParts.Prefix); if (part == null) { return(null); } return(part.Retrieve <string>(tokenParts.SubToken)); }); }