public static string GetLabel(string type, string name, CodeParameter[] parameters, bool markdown, string description) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } string result = ""; if (markdown) { result += "```ostw\n"; result += type ?? "void"; result += " "; } result += name + CodeParameter.GetLabels(parameters, false); if (markdown) { result += "\n\r```"; } if (markdown && description != null) { result += "\n\r ----- \n\r" + description; } return(result); }
public static string GetLabel(string name, CodeParameter[] parameters, bool markdown, StringOrMarkupContent description) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (parameters == null) { throw new ArgumentNullException(nameof(parameters)); } string result = ""; if (markdown) { result += "```ostw\n"; } result += name + CodeParameter.GetLabels(parameters, false); if (markdown) { result += "\n\r```"; } if (markdown && description != null) { result += "\n\r ----- \n\r" + (description.HasString ? description.String : description.MarkupContent.Value); } return(result); }