⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uploadedfilecollection.cs

📁 PowUpload的C#源文件,用来做大文件上传的项目
💻 CS
字号:
namespace ElementIT.PowUpload
{
    using System;
    using System.Collections.Specialized;
    using System.Reflection;

    public class UploadedFileCollection : NameObjectCollectionBase
    {
        internal UploadedFileCollection()
        {
        }

        internal void AddFile(string key, UploadedFile file)
        {
            base.BaseAdd(key, file);
        }

        public void Dispose()
        {
            UploadModule.AddDebugInfo("UploadedFileCollection.Dispose(): Files count:" + this.Count.ToString() + " Stack trace for current level: " + Environment.StackTrace);
            for (int i = 0; i <= (this.Count - 1); i++)
            {
                try
                {
                    if (this[i] != null)
                    {
                        this[i].Dispose();
                    }
                }
                catch
                {
                }
            }
        }

        ~UploadedFileCollection()
        {
            this.Dispose();
        }

        public string GetKey(int index)
        {
            return base.BaseGetKey(index);
        }

        public string[] AllKeys
        {
            get
            {
                return base.BaseGetAllKeys();
            }
        }

        public override int Count
        {
            get
            {
                return base.Count;
            }
        }

        public UploadedFile this[string fieldName]
        {
            get
            {
                return (UploadedFile) base.BaseGet(fieldName);
            }
        }

        public UploadedFile this[int index]
        {
            get
            {
                return (UploadedFile) base.BaseGet(index);
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -