static void Main(string[] args) { MyImApp imApp = new MyImApp(); if (imApp == null) { return; } UCOfficeIntegration officeIntegration = (UCOfficeIntegration)imApp; if (officeIntegration == null) { return; } officeIntegration.OnShuttingDown += officeIntegration_OnShuttingDown; string officeVersion = "15.0.0.0"; string authInfo = officeIntegration.GetAuthenticationInfo(officeVersion); OIFeature supportedFeatures = officeIntegration.GetSupportedFeatures(officeVersion); //skype reports: -122 LyncClient lyncClient = (LyncClient)officeIntegration.GetInterface(officeVersion, OIInterface.oiInterfaceILyncClient); if (lyncClient == null) { return; } string uri = lyncClient.Uri; IAutomation automation = (IAutomation)officeIntegration.GetInterface(officeVersion, OIInterface.oiInterfaceIAutomation); //LyncClientCapabilityTypes capabilities = lyncClient.Capabilities; //skype: Not implemented lyncClient.OnStateChanged += lyncClient_OnStateChanged; ContactManager contactManager = lyncClient.ContactManager; if (contactManager == null) { return; } AsynchronousOperation async = contactManager.Lookup("*****@*****.**", myContactsAndGroupsCallback, Type.Missing); Contact contact = contactManager.GetContactByUri("*****@*****.**"); if (contact != null) { dynamic result = contact.GetContactInformation(ContactInformationType.ucPresenceInstantMessageAddresses); ContactSettingDictionary settings = contact.Settings; ContactSetting[] keys = settings.Keys; if (keys != null) { foreach (ContactSetting key in keys) { object value = null; settings.TryGetValue(key, out value); } } } Console.CancelKeyPress += Console_CancelKeyPress; Console.WriteLine("Press Ctrl-C for exit"); do { System.Threading.Thread.Sleep(1000); } while (!cancelPressed); }
public void OnAddCustomGroup(ContactManager _source, AsynchronousOperation _asyncOperation) { }
public void OnSearch(ContactManager _source, SearchResults _searchResults, AsynchronousOperation _asyncOperation) { }
public void OnRemoveGroup(ContactManager _source, AsynchronousOperation _asyncOperation) { }
public void OnRemoveContactFromAllGroups(ContactManager _source, AsynchronousOperation _asyncOperation) { }
public void OnLookup(ContactManager _source, object _lookupResult, AsynchronousOperation _asyncOperation) { }
public void OnAddDistributionGroup(ContactManager _source, AsynchronousOperation _asyncOperation) { }