CookieCollection CookieCollection CookieCollection CookieCollection Class

定義

提供 Cookie 類別的執行個體 (Instance) 其集合容器 (Container)。Provides a collection container for instances of the Cookie class.

public ref class CookieCollection : System::Collections::ICollection
[System.Serializable]
public class CookieCollection : System.Collections.ICollection
type CookieCollection = class
    interface ICollection
    interface IEnumerable
Public Class CookieCollection
Implements ICollection
繼承
CookieCollectionCookieCollectionCookieCollectionCookieCollection
屬性
實作

備註

類別會執行ICollection介面,以提供處理 cookie 集合的一般機制。 CookieCollectionThe CookieCollection class implements an ICollection interface to provide a general mechanism for handling collections of cookies. 例如,如果應用程式是設計用來儲存多部伺服器的 cookie,這就很有用。For example, this is useful in the case where an application is designed to store cookies for multiple servers.

建構函式

CookieCollection() CookieCollection() CookieCollection() CookieCollection()

初始化 CookieCollection 類別的新執行個體。Initializes a new instance of the CookieCollection class.

屬性

Count Count Count Count

取得在 CookieCollection 中所包含的 Cookie 數。Gets the number of cookies contained in a CookieCollection.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,這個值表示 CookieCollection 是否為唯讀。Gets a value that indicates whether a CookieCollection is read-only.

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

取得值,指出對 CookieCollection 的存取是否為安全執行緒。Gets a value that indicates whether access to a CookieCollection is thread safe.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Cookie 中特定的索引處取得 CookieCollectionGets the Cookie with a specific index from a CookieCollection.

Item[String] Item[String] Item[String] Item[String]

Cookie 中以特定的名稱取得 CookieCollectionGets the Cookie with a specific name from a CookieCollection.

SyncRoot SyncRoot SyncRoot SyncRoot

取得用於同步存取 CookieCollection 的物件。Gets an object to synchronize access to the CookieCollection.

方法

Add(Cookie) Add(Cookie) Add(Cookie) Add(Cookie)

Cookie 加入至 CookieCollectionAdds a Cookie to a CookieCollection.

Add(CookieCollection) Add(CookieCollection) Add(CookieCollection) Add(CookieCollection)

CookieCollection 的內容加入至目前的執行個體。Adds the contents of a CookieCollection to the current instance.

Clear() Clear() Clear() Clear()

將所有項目從 CookieCollection 物件移除。Removes all elements from the CookieCollection object.

Contains(Cookie) Contains(Cookie) Contains(Cookie) Contains(Cookie)

判斷指定的 Cookie 是否在 CookieCollection 中。Determines whether the specified cookie is in the CookieCollection.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

從特定索引開始,將 CookieCollection 的元素複製到指定的陣列。Copies the elements of a CookieCollection to the specified array, starting at a particular index.

CopyTo(Cookie[], Int32) CopyTo(Cookie[], Int32) CopyTo(Cookie[], Int32) CopyTo(Cookie[], Int32)

複製這個 CookieCollection 的元素至 Cookie 陣列,貼上位置從目標陣列的指定索引開始。Copies the elements of this CookieCollection to a Cookie array starting at the specified index of the target array.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

取得可以逐一查看 CookieCollection 的列舉程式。Gets an enumerator that can iterate through a CookieCollection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(Cookie) Remove(Cookie) Remove(Cookie) Remove(Cookie)

CookieCollection 中移除指定的 Cookie。Removes the specified cookie from the CookieCollection.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

明確介面實作

ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32) ICollection.CopyTo(Array, Int32)
ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized ICollection.IsSynchronized
ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot ICollection.SyncRoot
IEnumerable<Cookie>.GetEnumerator() IEnumerable<Cookie>.GetEnumerator() IEnumerable<Cookie>.GetEnumerator() IEnumerable<Cookie>.GetEnumerator()

取得可以逐一查看 CookieCollection 的列舉值。Gets an enumerator that can iterate through the CookieCollection.

擴充方法

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

適用於

另請參閱