function generateInjectedFunc(context, namePrefix, body, params) {
    params = params || context.boundParams;
    var funcName = namePrefix.replace(',', '') + (context.injectedFunctions.length + 1);
    var funcText = 'function ' + funcName + '(' + params.join(',') + ') {\n        ' + body + '\n        }\n        ';
    context.injectedFunctions.push(funcText);
    return funcName;
}
@param {Context} context
@param {string} namePrefix
@param {string} body
@param {*?} params
@return {string}