public EditTransformationPipelineWindow(TransformationPipline transform)
        {
            InitializeComponent();
            // We need to take a copy so that we can cancel out without making any changes...
            Pipeline = TransformationPipline.BuildFromState(transform.GetState());

            RedrawPipeline();
        }
        public EditTransformationPipelineWindow(TransformationPipline transform)
        {
            InitializeComponent();
            // We need to take a copy so that we can cancel out without making any changes...
            Pipeline = TransformationPipline.BuildFromState(transform.GetState());

            RedrawPipeline();
        }
Beispiel #3
0
        public static TransformationPipline BuildFromState(String base64)
        {
            var pipeline = new TransformationPipline();

            var json = StringUtils.FromBase64String(base64);
            var settings = new JsonSerializerSettings { TypeNameHandling = Newtonsoft.Json.TypeNameHandling.Auto };
            var state = JsonConvert.DeserializeObject<List<Dictionary<String, Object>>>(json,settings);
            state.ForEach((entry) => {
                var key = entry["key"] as String;
                var config = entry["config"];
                var transform = TransformFactory.CreateTransform(key, config);
                pipeline.AddTransformer(transform);
            });

            return pipeline;
        }
        public static TransformationPipline BuildFromState(String base64)
        {
            var pipeline = new TransformationPipline();

            var json     = StringUtils.FromBase64String(base64);
            var settings = new JsonSerializerSettings {
                TypeNameHandling = Newtonsoft.Json.TypeNameHandling.Auto
            };
            var state = JsonConvert.DeserializeObject <List <Dictionary <String, Object> > >(json, settings);

            state.ForEach((entry) => {
                var key       = entry["key"] as String;
                var config    = entry["config"];
                var transform = TransformFactory.CreateTransform(key, config);
                pipeline.AddTransformer(transform);
            });

            return(pipeline);
        }