Example #1
0
            public DataValue(string dataId, double minValue, double maxValue, ActionDataType dataType)
            {
                if (string.IsNullOrWhiteSpace(dataId))
                {
                    throw new ArgumentNullException(nameof(dataId));
                }

                Id       = dataId;
                MinValue = minValue;
                MaxValue = maxValue;
                Type     = dataType;
            }
Example #2
0
        public UpdateActionDataCommand(string dataId, double minValue, double maxValue, ActionDataType dataType, string instanceId = null)
        {
            if (string.IsNullOrWhiteSpace(dataId))
            {
                throw new ArgumentNullException(nameof(dataId));
            }

            Data = new DataValue(dataId, minValue, maxValue, dataType);

            if (!string.IsNullOrWhiteSpace(instanceId))
            {
                InstanceId = instanceId;
            }
        }
Example #3
0
        /// <inheritdoc cref="ICommandHandler" />
        bool ICommandHandler.UpdateActionData(string dataId, double minValue, double maxValue, ActionDataType dataType, string instanceId)
        {
            if (string.IsNullOrWhiteSpace(dataId))
            {
                return(false);
            }

            var command = new UpdateActionDataCommand(dataId, minValue, maxValue, dataType, instanceId);

            return(SendCommand(command));
        }