Inheritance: WebParameter
示例#1
0
        public static HttpPostParameter CreateFile(string name, string fileName, Stream fileStream, string contentType)
        {
            HttpPostParameter httpPostParameter = new HttpPostParameter(name, string.Empty);

            httpPostParameter.Type        = HttpPostParameterType.File;
            httpPostParameter.FileName    = fileName;
            httpPostParameter.FileStream  = fileStream;
            httpPostParameter.ContentType = contentType;
            return(httpPostParameter);
        }
示例#2
0
 public static HttpPostParameter CreateFile(string name, string fileName, string filePath, string contentType)
 {
     var parameter = new HttpPostParameter(name, string.Empty)
     {
         Type = HttpPostParameterType.File,
         FileName = fileName,
         FilePath = filePath,
         ContentType = contentType,
     };
     return parameter;
 }
示例#3
0
        public static HttpPostParameter CreateFile(string name, string fileName, Stream fileStream, string contentType)
        {
            HttpPostParameter parameter = new HttpPostParameter(name, string.Empty)
            {
                Type        = HttpPostParameterType.File,
                FileName    = fileName,
                FileStream  = fileStream,
                ContentType = contentType,
            };

            return(parameter);
        }
示例#4
0
        public static HttpPostParameter CreateFile(string name, string fileName, string filePath, string contentType)
        {
            var parameter = new HttpPostParameter(name, string.Empty)
            {
                Type        = HttpPostParameterType.File,
                FileName    = fileName,
                FilePath    = filePath,
                ContentType = contentType
            };

            return(parameter);
        }