private void WriteBodyTypeInfo(BodyTypeInfo bodyTypeInfo) { var type = bodyTypeInfo.Type; if (type == typeof(Empty)) { _builder.AppendLine(EmptyBodyPattern); return; } var countDescription = GetCountDescription(bodyTypeInfo); _builder.AppendLine($"{countDescription} `{type.FullName}`"); _viewDocGenerator.WriteBodyDescription(bodyTypeInfo.Type); }
private string GetCountDescription(BodyTypeInfo bodyTypeInfo) { switch (bodyTypeInfo.CountType) { case ObjectCountType.Single: return(SingleObjectPattern); case ObjectCountType.List: return(ObjectListPattern); case ObjectCountType.SingleOrList: return(SingleObjectOrListPattern); default: throw new ArgumentOutOfRangeException(); } }