Beispiel #1
0
        public NamedParameterDetailsSection(NamedValuedParameterDocumentation model)
        {
            m_Model = model ?? throw new ArgumentNullException(nameof(model));

            var name = model.Name ?? model.ShortName;

            Heading = new MdHeading(3, new MdCompositeSpan(new MdCodeSpan(name !), " Parameter"));
        }
Beispiel #2
0
        protected void AppendUsage(StringBuilder stringBuilder, NamedValuedParameterDocumentation parameter)
        {
            stringBuilder
            .AppendIf(!parameter.Required, "[")
            .Apply(AppendParameterName, parameter);

            stringBuilder
            .Append(" ")
            .Append("<")
            .Append(String.IsNullOrWhiteSpace(parameter.ValuePlaceHolderName) ? "VALUE" : parameter.ValuePlaceHolderName)
            .Append(">");

            stringBuilder
            .AppendIf(!parameter.Required, "]")
            .AppendLine();
        }