Пример #1
0
        internal static bool?IsRequired(this ApiParameterDescription apiParameterDescription)
        {
            var property = apiParameterDescription.GetType().GetProperty("IsRequired");

            if (property == null)
            {
                // ApiExplorer < 2.2 does not support IsRequired.
                return(null);
            }

            return((bool)property.GetValue(apiParameterDescription));
        }