CookieContainer.PerDomainCapacity Propriedade

Definição

Obtém ou define o número de instâncias Cookie que um CookieContainer pode conter por domínio.Gets or sets the number of Cookie instances that a CookieContainer can hold per domain.

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

Valor da propriedade

Int32

O número de Cookie instâncias permitidas por domínio.The number of Cookie instances that are allowed per domain.

Exceções

PerDomainCapacity é menor que ou igual a zero.PerDomainCapacity is less than or equal to zero.

- ou --or- (PerDomainCapacity é maior que o número máximo permitido de instâncias de cookies, 300, e não é igual a MaxValue).(PerDomainCapacity is greater than the maximum allowable number of cookies instances, 300, and is not equal to MaxValue).

Comentários

Se o novo PerDomainCapacity valor for menor que o valor atual e se qualquer uma das coleções de domínio contiver mais Cookie instâncias do que o novo valor, as coleções serão removidas para caber.If the new PerDomainCapacity value is less than the current value, and if any of the domain collections contain more Cookie instances than the new value, the collections are pruned to fit. Isso usa as mesmas regras básicas, conforme descrito na Capacity propriedade.This uses the same basic rules as described in the Capacity property. No entanto, isso faz a limpeza somente na coleção para esse domínio.However, this does the clean-up only on the collection for this domain.

Aplica-se a

Confira também