private ICcuDevice CreateDevice(ICcuDeviceInfo deviceInfo, IEnumerable <ICcuDeviceInfo> deviceInfos) { var device = new CcuDevice(deviceInfo, XmlRpcApi); device.AddChannels( deviceInfos .Where(x => x.IsChannel && x.Parent == deviceInfo.Address) .Select(x => new CcuDeviceChannel(device, x, XmlRpcApi))); return(device); }
public CcuDevice(ICcuDeviceInfo deviceInfo, IHomeMaticXmlRpcApi xmlRpcApi) : base(deviceInfo, xmlRpcApi) { _channels = new List <ICcuDeviceChannel>(); }
protected CcuDeviceBase(ICcuDeviceInfo deviceInfo, IHomeMaticXmlRpcApi xmlRpcApi) { DeviceInfo = deviceInfo; XmlRpcApi = xmlRpcApi; }
public CcuDeviceChannel(ICcuDevice parent, ICcuDeviceInfo channelInfo, IHomeMaticXmlRpcApi xmlRpcApi) : base(channelInfo, xmlRpcApi) { Parent = parent; }