private DesignViewWindow(ViewDeserializer serializer,
                                 FileInfo fileDesigning,
                                 IStyleContext styleContext,
                                 IVisualBootstrapper templateResolver)
            : base(new GdiHostedElement(new Das.Views.Panels.View(templateResolver), styleContext))
        {
            trackBar1            = new TrackBar();
            _viewBuilderProvider = new ViewBuilderProvider(serializer);

            RenderMargin = new Thickness(0, 0, 300, 0);

            _serializer    = serializer;
            _fileDesigning = fileDesigning ?? throw new ArgumentException();
            var dir = _fileDesigning.DirectoryName ?? throw new ArgumentException();

            _fileWatcher = new FileSystemWatcher(dir)
            {
                Filter = fileDesigning.Name
            };
            _fileWatcher.Changed            += OnWatchedFileChanged;
            _fileWatcher.EnableRaisingEvents = true;

            Load += OnFormLoaded;

            InitializeComponent();

            trackBar1.BringToFront();
        }
        public ViewProvider()
        {
            var serializer = GetViewDeserializer();

            _builder = new ViewBuilderProvider(serializer);

            TypeInferrer     = serializer.TypeInferrer;
            ViewDeserializer = serializer;
        }
        private static async Task Compile(IEnumerable <FileInfo> files)
        {
            //throw new NotImplementedException();

            var serializer          = new ViewDeserializer();
            var viewBuilderProvider = new ViewBuilderProvider(serializer);
            //var typeMani = serializer.TypeManipulator;//  new TypeManipulator(settings, new NodePool(settings, new NodeTypeProvider()));

            var typeBuilder = new ViewTypeBuilder(serializer, serializer.ObjectManipulator,//  maniPedi,
                                                  serializer.Settings);

            foreach (var file in files)
            {
                var bldr = await viewBuilderProvider.GetViewBuilder(file);

                var viewNameEnd = file.Name.LastIndexOf(file.Extension, StringComparison.OrdinalIgnoreCase);
                var name        = file.Name.Substring(0, viewNameEnd);

                var dType = typeBuilder.BuildViewType(bldr, name);
                // ReSharper disable once UnusedVariable
                var lol = Activator.CreateInstance(dType);
            }
        }