本文整理汇总了C#中ExchangeService.ConvertIds方法的典型用法代码示例。如果您正苦于以下问题:C# ExchangeService.ConvertIds方法的具体用法?C# ExchangeService.ConvertIds怎么用?C# ExchangeService.ConvertIds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ExchangeService
的用法示例。
在下文中一共展示了ExchangeService.ConvertIds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestExchangeService
//private void InitializeWithDefaults()
//{
// InitializeWithDefaults(null, null, null);
//}
///// <summary>
///// Create a service binding based off of default credentials,
///// the assumed root folder, and an assumed autodiscover email address
///// </summary>
///// <param name="version">EWS schema version to use. Passing NULL uses the
///// EWS Managed API default value.</param>
///// <param name="ewsUrl">URL to EWS endpoint. Passing NULL or an empty string
///// results in a call to Autodiscover</param>
///// <param name="autodiscoverAddress">Email address to use for Autodiscover.
///// Passing NULL or an empty string results in a ActiveDirectory querying.</param>
///// <returns>A new instance of an ExchangeService</returns>
//private void InitializeWithDefaults(ExchangeVersion? version, Uri ewsUrl, string autodiscoverAddress)
//{
// RequestedExchangeVersion = version;
// UseDefaultCredentials = true;
// // If the EWS URL is not specified, use Autodiscover to find it
// if (ewsUrl == null)
// {
// // If no email address was given to use with Autodiscover, attempt
// // to look it up in Active Directory
// if (String.IsNullOrEmpty(autodiscoverAddress))
// {
// autodiscoverAddress = ActiveDirectoryHelper.GetPrimarySmtp(
// System.Security.Principal.WindowsIdentity.GetCurrent().Name);
// }
// DoAutodiscover(autodiscoverAddress);
// }
// else
// {
// EwsUrl = ewsUrl;
// }
// try
// {
// CreateExchangeService().TestExchangeService();
// }
// catch (ServiceVersionException ex)
// {
// LogFactory.LogInstance().WriteLog(LogLevel.ERR, ex.Message, "Initial requested version of {0} didn't work,detail:{1}", Enum.GetName(typeof(ExchangeVersion), version), ex.StackTrace);
// // Pass the autodiscover email address and URL if we've already looked those up
// //InitializeWithDefaults(ExchangeVersion.Exchange2007_SP1, EwsUrl, autodiscoverAddress);
// }
//}
public static void TestExchangeService(ExchangeService service)
{
// mstehle - 11/15/2011 - The validation override is now handled by GlobalSettings, no need
// to do all this stuff anymore. Just try ConvertIds and let the exceptions bubble up.
service.ConvertIds(
new AlternateId[] { new AlternateId(IdFormat.HexEntryId, "00", "[email protected]") },
IdFormat.HexEntryId);
}