HttpFileCollectionBase 類別

定義

作為類別的基底類別,其中前者會提供由用戶端上傳之檔案的存取權。Serves as the base class for classes that provide access to files that were uploaded by a client.

public ref class HttpFileCollectionBase abstract : System::Collections::Specialized::NameObjectCollectionBase, System::Collections::ICollection
public abstract class HttpFileCollectionBase : System.Collections.Specialized.NameObjectCollectionBase, System.Collections.ICollection
type HttpFileCollectionBase = class
    inherit NameObjectCollectionBase
    interface ICollection
    interface IEnumerable
Public MustInherit Class HttpFileCollectionBase
Inherits NameObjectCollectionBase
Implements ICollection
繼承
HttpFileCollectionBase
衍生
實作

備註

HttpFileCollectionBase類別是抽象類別,其包含與類別相同的成員 HttpFileCollectionThe HttpFileCollectionBase class is an abstract class that contains the same members as the HttpFileCollection class. HttpFileCollectionBase類別可讓您建立類似類別的衍生類別 HttpFileCollection ,但您可以自訂,也可以在 ASP.NET 管線之外進行自訂作業。The HttpFileCollectionBase class lets you create derived classes that are like the HttpFileCollection class, but that you can customize and that work outside the ASP.NET pipeline. 當您執行單元測試時,您通常會使用衍生類別來執行自訂行為的成員,以滿足您正在測試的案例。When you perform unit testing, you typically use a derived class to implement members with customized behavior that fulfills the scenario that you are testing.

HttpFileCollectionWrapper 類別衍生自 HttpFileCollectionBase 類別。The HttpFileCollectionWrapper class derives from the HttpFileCollectionBase class. 類別可做為類別的包裝函式 HttpFileCollectionWrapper HttpFileCollectionThe HttpFileCollectionWrapper class serves as a wrapper for the HttpFileCollection class. 在執行時間,您通常會使用類別的實例 HttpFileCollectionWrapper 來呼叫物件的成員 HttpFileCollectionAt run time, you typically use an instance of the HttpFileCollectionWrapper class to call members of the HttpFileCollection object.

建構函式

HttpFileCollectionBase()

初始化這個類別,以供繼承的類別執行個體使用。Initializes the class for use by an inherited class instance. 這個建構函式只能由繼承的類別呼叫。This constructor can only be called by an inherited class.

屬性

AllKeys

在衍生類別中覆寫時,取得包含集合中所有張貼檔案物件之索引鍵 (名稱) 的陣列。When overridden in a derived class, gets an array that contains the keys (names) of all posted file objects in the collection.

Count

在衍生類別中覆寫時,取得集合中張貼的檔案物件數目。When overridden in a derived class, gets the number of posted file objects in the collection.

IsReadOnly

取得或設定值,表示 NameObjectCollectionBase 執行個體是否為唯讀。Gets or sets a value indicating whether the NameObjectCollectionBase instance is read-only.

(繼承來源 NameObjectCollectionBase)
IsSynchronized

在衍生類別中覆寫時取得值,指出對集合的存取是否為安全執行緒。When overridden in a derived class, gets a value that indicates whether access to the collection is thread-safe.

Item[Int32]

在衍生類別中覆寫時,取得指定索引處的張貼檔案物件。When overridden in a derived class, gets the posted file object at the specified index.

Item[String]

在衍生類別中遭覆寫時,可從集合中取得其名稱為指定名稱的張貼檔案物件。When overridden in a derived class, gets the posted file object that has the specified name from the collection.

Keys

取得 NameObjectCollectionBase.KeysCollection 執行個體,其中包含 NameObjectCollectionBase 執行個體內的所有索引鍵。Gets a NameObjectCollectionBase.KeysCollection instance that contains all the keys in the NameObjectCollectionBase instance.

(繼承來源 NameObjectCollectionBase)
SyncRoot

在衍生類別中覆寫時,取得可用來同步存取集合的物件。When overridden in a derived class, 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)

在衍生類別中覆寫時,從陣列中指定的索引處開始,將集合的項目複製到陣列。When overridden in a derived class, 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)

在衍生類別中覆寫時,傳回指定索引處的張貼檔案物件。When overridden in a derived class, returns the posted file object at the specified index.

Get(String)

在衍生類別中遭覆寫時,傳回集合中具有所指定名稱的張貼檔案物件。When overridden in a derived class, returns the posted file object that has the specified name from the collection.

GetEnumerator()

在衍生類別中覆寫時,傳回可用來逐一查看集合的列舉程式。When overridden in a derived class, returns an enumerator that can be used to iterate through the collection.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetKey(Int32)

在衍生類別中受到覆寫時,傳回指定索引處的張貼檔案物件名稱。When overridden in a derived class, returns the name of the posted file object at the specified index.

GetMultiple(String)

在衍生類別中實作時,傳回符合指定的名稱的所有檔案。When implemented in a derived class, returns all files that match the specified name.

GetObjectData(SerializationInfo, StreamingContext)

實作 ISerializable 介面,並傳回序列化 NameObjectCollectionBase 執行個體所需的資料。Implements the ISerializable interface and returns the data needed to serialize the NameObjectCollectionBase instance.

(繼承來源 NameObjectCollectionBase)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
OnDeserialization(Object)

實作 ISerializable 介面,並於還原序列化完成時引發還原序列化事件。Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.

(繼承來源 NameObjectCollectionBase)
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.

適用於