示例#1
0
        /// <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);
            }
        }
示例#2
0
        /// <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());
        }
示例#3
0
        /// <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());
        }