/// <summary> /// Creates an entire Client Device from the provided metadata tree. Useful when access to all of the properties are needed. /// </summary> public static ClientDevice CreateClientDevice(ClientDeviceMetadata deviceMetadata) { if (ValidateTopicLevel(deviceMetadata.Id, out var validationMessage) == false) { throw new ArgumentException(validationMessage, nameof(deviceMetadata.Id)); } var returnDevice = new ClientDevice(BaseTopic, deviceMetadata); return(returnDevice); }
internal void Initialize(ClientDevice parentDevice) { _parentDevice = parentDevice; if ((Type == PropertyType.State) || (Type == PropertyType.Parameter)) { _parentDevice.InternalPropertySubscribe($"{_propertyId}", (payload) => { if (ValidatePayload(payload) == true) { _rawValue = payload; RaisePropertyChanged(this, new PropertyChangedEventArgs("Value")); } }); } }