CookieContainer.PerDomainCapacity プロパティ

定義

CookieContainer でドメインごとに格納できる Cookie インスタンスの数を取得または設定します。

public:
 property int PerDomainCapacity { int get(); void set(int value); };
public:
 property int PerDomainCapacity { int get(); };
public int PerDomainCapacity { get; set; }
public int PerDomainCapacity { get; }
member this.PerDomainCapacity : int with get, set
member this.PerDomainCapacity : int
Public Property PerDomainCapacity As Integer
Public ReadOnly Property PerDomainCapacity As Integer

プロパティ値

ドメインごとに許可されている Cookie インスタンス数。

例外

PerDomainCapacity が 0 以下です。

- または -

(PerDomainCapacity は、許容される Cookie インスタンスの最大数である 300 を超え、 Int32.MaxValue と等しくありません)。

注釈

新しい PerDomainCapacity 値が現在の値より小さく、いずれかのドメイン コレクションに新しい値よりも多くの Cookie インスタンスが含まれている場合、コレクションは収まるように排除されます。 これは、 プロパティで説明されているのと同じ基本規則を Capacity 使用します。 ただし、このドメインのコレクションに対してのみクリーンが実行されます。

適用対象

こちらもご覧ください