Ejemplo n.º 1
0
        void Emit(LS1Command command)
        {
            if (HideRestricted && command.Restricted)
            {
                return;
            }

            EmitLine(string.Format("## Command: {0}", command.Name));

            if (command.Restricted)
            {
                EmitLine("- Restricted: Yes");
                EmitLine("");
            }

            if (command.Forms != null)
            {
                EmitLine("### Syntax");
                foreach (LS1CommandForm f in command.Forms)
                {
                    Emit(command, f);
                }
            }

            EmitLine("");
        }
Ejemplo n.º 2
0
        void Emit(LS1Command command, LS1CommandForm form)
        {
            if (form.Parameters == null || form.Parameters.Count == 0)
            {
                EmitLine(string.Format("* `{0}`", command.Name));
            }
            else
            {
                string parameters = string.Empty;

                foreach (LS1Parameter p in form.Parameters)
                {
                    if (parameters.Length > 0)
                    {
                        parameters += " ";
                    }
                    parameters += EmitDeclaration(p, " ");
                }

                EmitLine(string.Format("* `{0}` {1}", command.Name, parameters));
            }

#if MINIMUM_BUILD
            if (form.MinimumBuild > 0)
            {
                EmitLine(string.Format("  * Minimum Build: {0}", form.MinimumBuild));
            }
#endif
            if (!string.IsNullOrEmpty(form.Description))
            {
                EmitLine("  * " + form.Description);
            }
        }