public async Task StartAsync(string channelName)
        {
            var dg = Container.Resolve <IDeviceGroupProvider>();
            var am = Container.Resolve <IAccessChannelManager>();

            var devices = dg.RootDeviceGroup.GetAllDevices().Where(d => !d.Registration.Config.IsSimulated);

            _channel = am.GetChannel(channelName);

            await _channel.StartAsync();

            await _channel.AddToUpdateListAsync(devices);
        }
Esempio n. 2
0
 public static Task AddToUpdateListAsync(this IAccessChannel channel,
                                         IEnumerable <IDevice> devices)
 {
     return(channel.AddToUpdateListAsync(devices.Select(d => d.Registration.ClientAlias)));
 }
Esempio n. 3
0
 private static Task AddToUpdateListAsync(this IAccessChannel channel,
                                          IEnumerable <IAccessItemRegistration> registrations)
 {
     return(channel.AddToUpdateListAsync(registrations.Select(x => x.ClientAlias)));
 }