/// <summary>
 /// Rename all the variables in this block
 /// </summary>
 /// <param name="origName"></param>
 /// <param name="newName"></param>
 public override void RenameVariable(string origName, string newName)
 {
     ArrayLength.RenameRawValue(origName, newName);
     InitialValue.RenameRawValue(origName, newName);
     _loopVariable.RenameParameter(origName, newName);
     RenameBlockVariables(origName, newName);
 }
Beispiel #2
0
        /// <summary>
        /// Rename the parameter name to the new name as long as it matches the old name.
        /// </summary>
        /// <param name="oldname"></param>
        /// <param name="newname"></param>
        public void RenameParameter(string oldname, string newname)
        {
            if (ParameterName == oldname)
            {
                ParameterName = newname;
            }

            if (InitialValue != null)
            {
                InitialValue.RenameRawValue(oldname, newname);
            }
        }