本文整理汇总了C#中Service.RefreshPhoneBookContacts方法的典型用法代码示例。如果您正苦于以下问题:C# Service.RefreshPhoneBookContacts方法的具体用法?C# Service.RefreshPhoneBookContacts怎么用?C# Service.RefreshPhoneBookContacts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Service
的用法示例。
在下文中一共展示了Service.RefreshPhoneBookContacts方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ForceUpdate
public static Task ForceUpdate(Service service)
{
return Task.Factory.StartNew(() =>
{
Utils.DebugPrint("Querying phone contacts...");
_phoneBookContacts = Platform.GetPhoneBookContacts();
if (service != null)
{
if (ServiceManager.IsRunning(service))
{
Utils.DebugPrint("Refreshing service contacts...");
service.RefreshPhoneBookContacts();
}
else
{
Utils.DebugPrint("Force refreshing service " + service.Information.ServiceName +
" isn't possible. Why? It isn't running!");
}
Utils.DebugPrint("Finished refreshing service contacts. Calling contacts update and bubble group update.");
BubbleGroupUpdater.Update(service);
}
});
}
示例2: SyncService
internal static void SyncService(Service service)
{
if (ServiceManager.IsRunning(service))
{
Utils.DebugPrint("Refreshing service contacts...");
service.RefreshPhoneBookContacts();
}
else
{
Utils.DebugPrint("Force refreshing service " + service.Information.ServiceName +
" isn't possible. Why? It isn't running!");
}
Utils.DebugPrint("Finished refreshing service contacts. Calling contacts update and bubble group update.");
BubbleGroupUpdater.Update(service);
}