public BuildOptions ( |
||
type | ||
Résultat |
private List <UrlParameter> GetUrlParameters(BehaviorChain chain) { var action = chain.FirstCall(); var properties = _typeCache.GetPropertiesFor(action.InputType()); return(action.ParentChain().Route.Input.RouteParameters.Select( x => { var property = properties[x.Name]; var description = _memberConvention.GetDescription(property); return _configuration.UrlParameterOverrides.Apply(chain, property, new UrlParameter { Name = description.WhenNotNull(y => y.Name).OtherwiseDefault(), Comments = description.WhenNotNull(y => y.Comments).OtherwiseDefault(), Type = property.PropertyType.GetXmlName(_configuration.EnumFormat == EnumFormat.AsString), Options = _optionFactory.BuildOptions(property.PropertyType) }); }).ToList()); }
private void BuildSimpleType(DataType dataType, Type type) { dataType.IsSimple = true; dataType.LongNamespace.Clear(); dataType.ShortNamespace.Clear(); if (type.GetNullableUnderlyingType().IsEnum) { dataType.Options = _optionFactory.BuildOptions(type); } }