public RenameFunction ( String oldName, String newName ) : |
||
oldName | String | /// The old name of the function. /// |
newName | String | /// The new name for the function. /// |
return |
public ParseContext RenameFunction(String oldName, String newName)
{
if (_functions.ContainsKey(oldName))
{
var buffer = _functions[oldName];
_functions.Remove(oldName);
_functions.Add(newName, buffer);
}
return this;
}
/// <summary> /// Renames an existing function (custom or defined). /// </summary> /// <param name="context">The context of the function.</param> /// <param name="oldName">The old name of the function.</param> /// <param name="newName">The new name for the function.</param> /// <returns>The given context.</returns> public static ParseContext RenameFunction(ParseContext context, string oldName, string newName) { context.RenameFunction(oldName, newName); return(context); }