【问题标题】:Add groups with Lync 2010 UCMA 3.0 c#使用 Lync 2010 UCMA 3.0 c# 添加组
【发布时间】:2012-06-21 11:52:11
【问题描述】:

我正在尝试为 Lync 2010 UCMA 创建一个简单的联系人管理器。

我正在使用NotificationReceived 事件,并测试是否设置了IsFullNotification 标志。我希望随着组的添加,不会有“IsFullNotification”。

但是这样的事件永远不会发生,它总是设置为true

在添加新创建的数量之前,我怎样才能获得已添加组的完整联系人列表(因为它们已成功添加)以重新映射联系人。

附:使用 translate.google.com 翻译

_contactGroupServices.NotificationReceived += OnNotificationReceived;
_contactGroupServices.BeginSubscribe(ar =>
{
   try
   {
      _contactGroupServices.EndSubscribe(ar);
   }
   catch (RealTimeException rtex)
   {
       Console.WriteLine(rtex);
   }
}
, null);

处理程序:

void OnNotificationReceived(object sender, ContactGroupNotificationEventArgs e)
{
    Console.WriteLine("Received a contact update.");

    if (e.IsFullNotification) //always this value :(
    {
        ExtractContactGroupInfo(e);
        AddGroups();
    }
    else
    {
        HandleAddedGroupNotification(e); // The LINE
    }
}                

我已经标记了添加所有组时需要执行的行。而且我还需要ContactGroupNotificationEventArgs e的当前值。

【问题讨论】:

  • 我什至尝试在添加 fll 组后调用 BeginSubscribe,但出现错误:“数据会话处于无效状态以建立”。
  • 我已经尝试更正一下翻译,请检查它是否“听起来不错”。如果我理解错了,我可能会不小心改变了一些东西。另外,我无法理解最后一句“我怎么还能得到(..)”的意思,所以我原样留下。您可以尝试以两种语言发布文本,一种是翻译的,一种是原文的 - 这样,有人可以准确地修复翻译错误:) BTW。如果“Roman”是波兰人的名字,我下次可以帮忙:)

标签: c# lync ucma


【解决方案1】:

我也遇到了同样的问题,这是因为您调用了 BeginSubscribe,但订阅未完成。确保在添加组之前订阅 _contactGroupService.State。如果不等到它被订阅。这有望解决您的问题。

编码愉快:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多