HttpFileCollectionWrapper 类

定义

封装 HTTP 内部对象,它提供对客户端已上载文件的访问。Encapsulates the HTTP intrinsic object that provides access to files that were uploaded by a client.

public ref class HttpFileCollectionWrapper : System::Web::HttpFileCollectionBase
public class HttpFileCollectionWrapper : System.Web.HttpFileCollectionBase
type HttpFileCollectionWrapper = class
    inherit HttpFileCollectionBase
Public Class HttpFileCollectionWrapper
Inherits HttpFileCollectionBase
继承

注解

HttpFileCollectionWrapper类派生自 HttpFileCollectionBase 类,用作类的包装 HttpFileCollectionThe HttpFileCollectionWrapper class derives from the HttpFileCollectionBase class and serves as a wrapper for the HttpFileCollection class. 此类公开类的功能, HttpFileCollection 同时公开 HttpFileCollectionBase 类型。This class exposes the functionality of the HttpFileCollection class while also exposing the HttpFileCollectionBase type. HttpFileCollectionBase通过类,可以将应用程序中类的原始实现替换为 HttpFileCollection 自定义实现,例如在 ASP.NET 管道之外执行单元测试时。The HttpFileCollectionBase class enables you to replace the original implementation of the HttpFileCollection class in your application with a custom implementation, such as when you perform unit testing outside the ASP.NET pipeline.

构造函数

HttpFileCollectionWrapper(HttpFileCollection)

初始化 HttpFileCollectionWrapper 类的新实例。Initializes a new instance of the HttpFileCollectionWrapper class.

属性

AllKeys

获取一个数组,它包含集合中所有已发布文件对象的键(名称)。Gets an array that contains the keys (names) of all posted file objects in the collection.

Count

获取集合中的对象数。Gets the number of objects in the collection.

IsReadOnly

获取或设置一个值,通过该值指示 NameObjectCollectionBase 实例是否为只读的。Gets or sets a value indicating whether the NameObjectCollectionBase instance is read-only.

(继承自 NameObjectCollectionBase)
IsSynchronized

获取一个值,该值指示对集合的访问是否线程安全。Gets a value that indicates whether access to the collection is thread-safe.

Item[Int32]

获取指定索引处的已发布文件对象。Gets the posted file object at the specified index.

Item[String]

获取集合中具有指定名称的已发布文件对象。Gets the posted file object that has the specified name from the collection.

Keys

获取包含 NameObjectCollectionBase.KeysCollection 实例中所有键的 HttpApplicationStateWrapper 实例。Gets a NameObjectCollectionBase.KeysCollection instance that contains all the keys in the HttpApplicationStateWrapper instance.

SyncRoot

获取可用于同步对集合的访问的对象。Gets an object that can be used to synchronize access to the collection.

方法

BaseAdd(String, Object)

将具有指定键和值的项添加到 NameObjectCollectionBase 实例中。Adds an entry with the specified key and value into the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseClear()

移除 NameObjectCollectionBase 实例中的所有项。Removes all entries from the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseGet(Int32)

获取 NameObjectCollectionBase 实例的指定索引处的项值。Gets the value of the entry at the specified index of the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseGet(String)

获取 NameObjectCollectionBase 实例中第一个具有指定键的项值。Gets the value of the first entry with the specified key from the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseGetAllKeys()

返回 String 数组,该数组包含 NameObjectCollectionBase 实例中的所有键。Returns a String array that contains all the keys in the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseGetAllValues()

返回 Object 数组,该数组包含 NameObjectCollectionBase 实例中的所有值。Returns an Object array that contains all the values in the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseGetAllValues(Type)

返回指定类型的数组,该数组包含 NameObjectCollectionBase 实例中的所有值。Returns an array of the specified type that contains all the values in the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseGetKey(Int32)

获取 NameObjectCollectionBase 实例的指定索引处的项键。Gets the key of the entry at the specified index of the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseHasKeys()

获取一个值,通过该值指示 NameObjectCollectionBase 实例是否包含键不为 null 的项。Gets a value indicating whether the NameObjectCollectionBase instance contains entries whose keys are not null.

(继承自 NameObjectCollectionBase)
BaseRemove(String)

移除 NameObjectCollectionBase 实例中具有指定键的项。Removes the entries with the specified key from the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseRemoveAt(Int32)

移除 NameObjectCollectionBase 实例的指定索引处的项。Removes the entry at the specified index of the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseSet(Int32, Object)

设置 NameObjectCollectionBase 实例的指定索引处的项值。Sets the value of the entry at the specified index of the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
BaseSet(String, Object)

NameObjectCollectionBase 实例中第一个具有指定键的项设置值(如果有这样的项);否则将具有指定键和值的项添加到 NameObjectCollectionBase 实例中。Sets the value of the first entry with the specified key in the NameObjectCollectionBase instance, if found; otherwise, adds an entry with the specified key and value into the NameObjectCollectionBase instance.

(继承自 NameObjectCollectionBase)
CopyTo(Array, Int32)

从数组中指定的索引开始,将集合的元素复制到该数组。Copies the elements of the collection to an array, starting at the specified index in the array.

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Get(Int32)

返回指定索引处的已发布文件对象。Returns the posted file object at the specified index.

Get(String)

返回集合中具有指定名称的已发布文件对象。Returns the posted file object that has the specified name from the collection.

GetEnumerator()

返回一个可用于循环访问集合的枚举数。Returns an enumerator that can be used to iterate through the collection.

GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetKey(Int32)

返回指定索引处的已发布文件对象的名称。Returns the name of the posted file object at the specified index.

GetMultiple(String)

返回与指定名称相匹配的所有文件。Returns all files that match the specified name.

GetMultiple(String)

在派生类中实现时,返回与指定名称匹配的所有文件。When implemented in a derived class, returns all files that match the specified name.

(继承自 HttpFileCollectionBase)
GetObjectData(SerializationInfo, StreamingContext)

返回序列化 HttpFileCollectionWrapper 对象所需的数据。Returns the data that is required in order to serialize the HttpFileCollectionWrapper object.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
OnDeserialization(Object)

反序列化完成时引发反序列化事件。Raises the deserialization event when deserialization is finished.

ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

显式接口实现

ICollection.CopyTo(Array, Int32)

从目标数组的指定索引处开始将整个 NameObjectCollectionBase 复制到兼容的一维 ArrayCopies the entire NameObjectCollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.

(继承自 NameObjectCollectionBase)
ICollection.IsSynchronized

获取一个值,该值指示对 NameObjectCollectionBase 对象的访问是否同步(线程安全)。Gets a value indicating whether access to the NameObjectCollectionBase object is synchronized (thread safe).

(继承自 NameObjectCollectionBase)
ICollection.SyncRoot

获取一个对象,该对象可用于同步对 NameObjectCollectionBase 对象的访问。Gets an object that can be used to synchronize access to the NameObjectCollectionBase object.

(继承自 NameObjectCollectionBase)

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于