protected override bool TryBinding(IHttpContext context, out object value)
{
if (BindingTargetType == typeof(HttpPostedFile))
{
HttpPostedFile file = context.Request.Files[Key];
if (file != null && file.ContentLength > 0)
{
value = file;
return true;
}
else
{
value = null;
return false;
}
}
if (SerializationHelper.TryDeserialize(context.Request.Form, Key, BindingTargetType, out value))
return Optional ? true : value != null;
return false;
}
}