public void Item_String ()
		{
			var req = new HttpRequest ("default.aspx", "http://localhost/default.aspx", String.Empty);
			var files = req.Files;
			var wrapper = new HttpFileCollectionWrapper (files);

			Assert.IsNull (wrapper ["DoesNotExist"], "#A1");
			Assert.IsNull (wrapper [null], "#A2");
		}
		public void Item_Int ()
		{
			var req = new HttpRequest ("default.aspx", "http://localhost/default.aspx", String.Empty);
			var files = req.Files;
			var wrapper = new HttpFileCollectionWrapper (files);

			AssertExtensions.Throws<ArgumentOutOfRangeException> (() => {
				var f = wrapper [0];
			}, "#A1");
		}
示例#3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="key"></param>
        /// <param name="fileCollection"></param>
        /// <param name="autoSize"></param>
        /// <param name="thumbnailInfoes"></param>
        /// <returns></returns>
        public static List<FileInfo> UploadFileCollectionAndReturnInfo(string key, HttpFileCollection fileCollection, int autoSize, out IList<ThumbnailInfo> thumbnailInfoes)
        {
            HttpFileCollectionBase obj = new HttpFileCollectionWrapper(fileCollection);

            return UploadFileCollectionAndReturnInfo(key, fileCollection, autoSize, out thumbnailInfoes);
        }
示例#4
0
        /// <summary>
        /// 文件集合上传
        /// </summary>
        /// <param name="key">服务端索配置引名</param>
        /// <param name="fileCollection">文件集合</param>
        /// <param name="AutoSize">允许上传的集合大小</param>
        /// <returns></returns>
        public static List<FileInfo> UploadFileCollection(string key, HttpFileCollection fileCollection, int autoSize)
        {
            HttpFileCollectionBase obj = new HttpFileCollectionWrapper(fileCollection);

            return UploadFileCollection(key, fileCollection, autoSize);
        }