ExchangeCredentials   - преобразование (CredentialCache to ExchangeCredentials)

Performs an implicit conversion from CredentialCache to ExchangeCredentials. This allows a CredentialCache object to be implictly converted to an ExchangeCredential which is useful when setting credentials on an ExchangeService.

Definition

Пространство имён: Tessa.Exchange.WebServices.Data
Сборка: Tessa.Server (в Tessa.Server.dll) Версия: 4.0.4
C#
public static implicit operator ExchangeCredentials (
	CredentialCache credentials
)

Параметры

credentials  CredentialCache
The credentials.

Возвращаемое значение

ExchangeCredentials
The result of the conversion.

Пример

Using these credentials:
C#
CredentialCache credentials = new CredentialCache();
C#
credentials.Add(new Uri("http://www.contoso.com/"),"Basic",new NetworkCredential(user,pwd));
C#
credentials.Add(new Uri("http://www.contoso.com/"),"Digest", new NetworkCredential(user,pwd,domain));
This operator allows you to type:
C#
service.Credentials = credentials;
instead of:
C#
service.Credentials = new WebCredentials(credentials);

См. также