Exemple #1
0
        public void SetValue(Guid nodeInstance, JsonElement value)
        {
            object convertedValue = null;

            switch (value.ValueKind)
            {
            case JsonValueKind.Undefined:
                break;

            case JsonValueKind.Object:
                throw new NotImplementedException();

            case JsonValueKind.Array:
                throw new NotImplementedException();

            case JsonValueKind.String:
                convertedValue = value.GetString();
                break;

            case JsonValueKind.Number:
                convertedValue = value.GetDouble();
                break;

            case JsonValueKind.True:
                convertedValue = true;
                break;

            case JsonValueKind.False:
                convertedValue = false;
                break;

            case JsonValueKind.Null:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }


            var dispatchable = new DispatchableInstance(DispatchableType.Visualization, $"Web", nodeInstance, DispatchableSource.Visualization);

            _dispatcher.DispatchValue(dispatchable, convertedValue);
        }
Exemple #2
0
        public void SetValue(Guid nodeInstance, object value)
        {
            var dispatchable = new DispatchableInstance(DispatchableType.NodeInstance, $"Web", nodeInstance, DispatchableSource.Visualisation);

            _dispatcher.DispatchValue(dispatchable, value);
        }