Exemple #1
0
        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));
            }
        }
Exemple #2
0
 public PropertyContentTypeInfo(PropertyInfo propertyInfo, PropertyContentType contentType)
 {
     PropertyInfo        = propertyInfo;
     PropertyContentType = contentType;
 }