Start a Lync Conversation

Start a Lync 2010 Conversation

The example appearing in this topic shows how to use the BeginStartConversation method to start a conversation in a Microsoft Lync 2010 SDK application. For more information, see Lync Extensibility API Conversation Walkthroughs (Lync 2010 SDK).


// Create string array of conversation invitees.
string[] invitees = {"elise@contoso.com"};

// Create a generic Dictionary object to contain conversation setting objects.
Dictionary<AutomationModalitySettings, object> _settings = new Dictionary<AutomationModalitySettings, object>();
_settings.Add(AutomationModalitySettings.FirstInstantMessage, ″Hello″);
_settings.Add(AutomationModalitySettings.SendFirstInstantMessageImmediately, true);

// Start the conversation.
IAsyncResult ar =  LyncClient.GetAutomation().BeginStartConversation(
    AutomationModalities.InstantMessage, 
    invitees, 
    _settings,
    null,
    null);

// Block UI thread until conversation is started and Conversation Window is displayed.
LyncClient.GetAutomation().EndStartConversation(ar);



Show:
© 2016 Microsoft