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.
Пространство имён:
Tessa.Exchange.WebServices.Data
Сборка:
Tessa.Server (в Tessa.Server.dll) Версия: 3.5.0.19
Синтаксис public static implicit operator ExchangeCredentials (
CredentialCache credentials
)
Public Shared Widening Operator CType (
credentials As CredentialCache
) As ExchangeCredentials
static implicit operator ExchangeCredentials^ (
CredentialCache^ credentials
)
F# не поддерживает объявление новых операторов приведения.
Параметры
- credentials
- Тип: System.NetCredentialCache
The credentials.
Возвращаемое значение
Тип:
ExchangeCredentialsThe result of the conversion.
Примеры
Using these credentials:
CredentialCache credentials = new CredentialCache();
credentials.Add(new Uri("http://www.contoso.com/"),"Basic",new NetworkCredential(user,pwd));
credentials.Add(new Uri("http://www.contoso.com/"),"Digest", new NetworkCredential(user,pwd,domain));
This operator allows you to type:
service.Credentials = credentials;
instead of:
service.Credentials = new WebCredentials(credentials);
См. также