本文整理汇总了C#中ISchedulerProvider.CreateEventLoopScheduler方法的典型用法代码示例。如果您正苦于以下问题:C# ISchedulerProvider.CreateEventLoopScheduler方法的具体用法?C# ISchedulerProvider.CreateEventLoopScheduler怎么用?C# ISchedulerProvider.CreateEventLoopScheduler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISchedulerProvider
的用法示例。
在下文中一共展示了ISchedulerProvider.CreateEventLoopScheduler方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BluetoothProfileActivator
public BluetoothProfileActivator(IBluetoothService bluetoothService,
IPersonalizationSettings personalizationSettings,
ISchedulerProvider schedulerProvider,
ILoggerFactory loggerFactory)
{
_bluetoothService = bluetoothService;
_personalizationSettings = personalizationSettings;
_schedulerProvider = schedulerProvider;
_logger = loggerFactory.CreateLogger(GetType());
_bluetoothEventLoop = _schedulerProvider.CreateEventLoopScheduler("BluetoothActivator");
_logger.Verbose("BluetoothProfileActivator.ctor();");
_profileActivated = _bluetoothService.IdentitiesActivated(_bluetoothEventLoop)
.Retry()
.Repeat()
.Log(_logger, "IdentitiesActivated")
.Select(Translate)
.Publish();
//HACK: Avoid work in the ctor. Can be smart here using SelectMany on the IsEnabled + Connecting when ProfileActivated is subscribed to. -LC
if (_bluetoothService.IsSupported && IsEnabled)
_connection.Disposable = _profileActivated.Connect();
}