Exemple #1
0
        /// <summary>
        /// Replaces tokens in strSourceText parameter with the property values
        /// </summary>
        /// <param name="strSourceText">String with [Object:Property] tokens</param>
        /// <param name="row"></param>
        /// <returns>string containing replaced values</returns>
        public string ReplaceEnvironmentTokens(string strSourceText, DataRow row)
        {
            var rowProperties = new DataRowPropertyAccess(row);

            PropertySource["field"] = rowProperties;
            PropertySource["row"]   = rowProperties;
            return(ReplaceTokens(strSourceText));
        }
Exemple #2
0
        /// <summary>
        /// Replaces tokens in strSourceText parameter with the property values
        /// </summary>
        /// <param name="strSourceText">String with [Object:Property] tokens</param>
        /// <param name="Custom">NameValueList for replacing [custom:name] tokens, where 'custom' is specified in next param and name is either thekey or the index number in the string </param>
        /// <param name="CustomCaption">Token name to be used inside token  [custom:name]</param>
        /// <param name="Row">DataRow, from which field values shall be used for replacement</param>
        /// <returns>string containing replaced values</returns>
        /// <history>
        /// 08/10/2007 sLeupold created
        /// </history>
        public string ReplaceEnvironmentTokens(string strSourceText, ArrayList Custom, string CustomCaption, DataRow Row)
        {
            var rowProperties = new DataRowPropertyAccess(Row);

            PropertySource["field"] = rowProperties;
            PropertySource["row"]   = rowProperties;
            PropertySource[CustomCaption.ToLower()] = new ArrayListPropertyAccess(Custom);
            return(ReplaceTokens(strSourceText));
        }
Exemple #3
0
        /// <summary>
        /// Replaces tokens in sourceText parameter with the property values
        /// </summary>
        /// <param name="sourceText">String with [Object:Property] tokens</param>
        /// <param name="custom">NameValueList for replacing [custom:name] tokens, where 'custom' is specified in next param and name is either thekey or the index number in the string </param>
        /// <param name="customCaption">Token name to be used inside token  [custom:name]</param>
        /// <param name="row">DataRow, from which field values shall be used for replacement</param>
        /// <returns>string containing replaced values</returns>
        public string ReplaceEnvironmentTokens(string sourceText, ArrayList custom, string customCaption, DataRow row)
        {
            var rowProperties = new DataRowPropertyAccess(row);

            PropertySource["field"] = rowProperties;
            PropertySource["row"]   = rowProperties;
            PropertySource[customCaption.ToLowerInvariant()] = new ArrayListPropertyAccess(custom);
            return(ReplaceTokens(sourceText));
        }
Exemple #4
0
        /// <summary>
        /// Replaces tokens in strSourceText parameter with the property values
        /// </summary>
        /// <param name="strSourceText">String with [Object:Property] tokens</param>
        /// <param name="row"></param>
        /// <returns>string containing replaced values</returns>
        public string ReplaceEnvironmentTokens(string strSourceText, DataRow row)
        {
            var rowProperties = new DataRowPropertyAccess(row);

            PropertySource["field"] = rowProperties;
            PropertySource["row"]   = rowProperties;
            if (IsMyTokensInstalled())
            {
                return(TokenizeWithMyTokens(strSourceText));
            }
            return(ReplaceTokens(strSourceText));
        }
 /// <summary>
 /// Replaces tokens in strSourceText parameter with the property values
 /// </summary>
 /// <param name="strSourceText">String with [Object:Property] tokens</param>
 /// <param name="Custom">NameValueList for replacing [custom:name] tokens, where 'custom' is specified in next param and name is either thekey or the index number in the string </param>
 /// <param name="CustomCaption">Token name to be used inside token  [custom:name]</param>
 /// <param name="Row">DataRow, from which field values shall be used for replacement</param>
 /// <returns>string containing replaced values</returns>
 /// <history>
 /// 08/10/2007 sLeupold created
 /// </history>
 public string ReplaceEnvironmentTokens(string strSourceText, ArrayList Custom, string CustomCaption, DataRow Row)
 {
     var rowProperties = new DataRowPropertyAccess(Row);
     PropertySource["field"] = rowProperties;
     PropertySource["row"] = rowProperties;
     PropertySource[CustomCaption.ToLower()] = new ArrayListPropertyAccess(Custom);
     if (IsMyTokensInstalled())
         return TokenizeWithMyTokens(strSourceText);
     return ReplaceTokens(strSourceText);
 }
 /// <summary>
 /// Replaces tokens in strSourceText parameter with the property values
 /// </summary>
 /// <param name="strSourceText">String with [Object:Property] tokens</param>
 /// <param name="row"></param>
 /// <returns>string containing replaced values</returns>
 public string ReplaceEnvironmentTokens(string strSourceText, DataRow row)
 {
     var rowProperties = new DataRowPropertyAccess(row);
     PropertySource["field"] = rowProperties;
     PropertySource["row"] = rowProperties;
     if (IsMyTokensInstalled())
         return TokenizeWithMyTokens(strSourceText);
     return ReplaceTokens(strSourceText);
 }
Exemple #7
0
 /// <summary>
 /// Replaces tokens in strSourceText parameter with the property values
 /// </summary>
 /// <param name="strSourceText">String with [Object:Property] tokens</param>
 /// <param name="row"></param>
 /// <returns>string containing replaced values</returns>
 public string ReplaceEnvironmentTokens(string strSourceText, DataRow row)
 {
     var rowProperties = new DataRowPropertyAccess(row);
     PropertySource["field"] = rowProperties;
     PropertySource["row"] = rowProperties;
     return ReplaceTokens(strSourceText);
 }