Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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();
            }
        }