Ejemplo n.º 1
0
 private IDeviceGroup Get(DeviceGroupConfig deviceGroupConfig)
 {
     return(TraverseEx.TraverseMap(deviceGroupConfig,
                                   x => DeviceGroupFactory.Create(x),
                                   x => x.GroupConfigCollection,
                                   (s, t) => s.DeviceGroups.Add(t)));
 }
Ejemplo n.º 2
0
        private IDeviceGroup Traverse(DeviceGroupConfig deviceGroupConfig)
        {
            return(TraverseEx.TraverseMap(deviceGroupConfig,
                                          x =>
            {
                var dt = ServiceLocator.GetInstance <IDeviceGroup>();

                //TODO
                //dt.Init(deviceTreeConfig)
                return dt;
            },
                                          x => x.GroupConfigCollection,
                                          (s, t) => s.DeviceGroups.Add(t)));
        }