当前位置: 首页>>代码示例>>C#>>正文


C# ExchangeService.ConvertIds方法代码示例

本文整理汇总了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);
 }
开发者ID:haiyangIt,项目名称:Haiyang,代码行数:54,代码来源:EwsProxyFactory.cs


注:本文中的ExchangeService.ConvertIds方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。