uploadedfilecollection.cs
来自「PowUpload的C#源文件,用来做大文件上传的项目」· CS 代码 · 共 80 行
CS
80 行
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 + =
减小字号Ctrl + -
显示快捷键?