/// <summary> /// name or rename a procedure for a single block. /// </summary> public static void SetProcedureName(Block block, string newName) { ProcedureMutator procedure = block.Mutator as ProcedureMutator; if (procedure != null) { procedure.SetProcedureName(newName); } }
/// <summary> /// If the block is a procedure block, returns the argument list. Otherwise, it returns null. /// </summary> public static List <string> GetProcedureArguments(Block block) { ProcedureMutator procedure = block.Mutator as ProcedureMutator; return(procedure == null ? null : procedure.GetArgumentNameList()); }
/// <summary> /// If the block is a procedure definition or procedure call/reference, it returns the name of the procedure. /// </summary> public static string GetProcedureName(Block block) { ProcedureMutator procedure = block.Mutator as ProcedureMutator; return(procedure == null ? null : procedure.GetProcedureName()); }