コード例 #1
0
        /// <summary>
        /// Helper method for generating the string representation of a given ModelMethod.
        /// </summary>
        /// <param name="method">The ModelMethod for which to generate a string representation.</param>
        /// <returns>The string representation of the ModelMethod.</returns>
        public static string GetString(ModelMethod method, string[] args = null, bool withEnding = false)
        {
            var methodName = method.ToString().Replace("__", ".");
            var concatArgs = args == null ? string.Empty : string.Join(",", args);
            var outString  = methodName + "(" + concatArgs + ")";

            if (withEnding)
            {
                outString += ";\n";
            }
            return(outString);
        }