public ProxyParameterDescriptor(List <PropertyInfo> properties) { Properties = new Dictionary <string, PropertyContentTypeInfo>(StringComparer.OrdinalIgnoreCase); foreach (var prop in properties) { PropertyContentType contentType = PropertyContentType.String; if (typeof(IFormFile).IsAssignableFrom(prop.PropertyType)) { HasFormFile = true; contentType = PropertyContentType.Multipart; } Properties.Add(prop.Name, new PropertyContentTypeInfo(prop, contentType)); } }
public PropertyContentTypeInfo(PropertyInfo propertyInfo, PropertyContentType contentType) { PropertyInfo = propertyInfo; PropertyContentType = contentType; }