public MainWindow()
 {
     InitializeComponent();
     var configurer = new HostingContextConfigurer(canvas);
     var hostingContexts = HostingContextFactory.CreateHostingContexts(configurer);
     DataContext = new MainPageViewModel(hostingContexts);
 }
        public static IEnumerable<IHostingContext> CreateHostingContexts(HostingContextConfigurer configurer)
        {
            var python = new DlrHostingContext(Python.CreateEngine(), "Samples.script.py");
            configurer.Configure(python);
            var ruby = new DlrHostingContext(Ruby.CreateEngine(), "Samples.script.rb");
            configurer.Configure(ruby);
            var js = new JSHostingContext("Samples.script.js");
            configurer.Configure(js);

            return new IHostingContext[] { python, ruby, js };
        }
Exemple #3
0
        public static IEnumerable <IHostingContext> CreateHostingContexts(HostingContextConfigurer configurer)
        {
            var python = new DlrHostingContext(Python.CreateEngine(), "Samples.script.py");

            configurer.Configure(python);
            var ruby = new DlrHostingContext(Ruby.CreateEngine(), "Samples.script.rb");

            configurer.Configure(ruby);
            var js = new JSHostingContext("Samples.script.js");

            configurer.Configure(js);

            return(new IHostingContext[] { python, ruby, js });
        }
Exemple #4
0
 public Wrapper(HostingContextConfigurer configurer)
 {
     this.configurer = configurer;
 }
 public Wrapper(HostingContextConfigurer configurer)
 {
     this.configurer = configurer;
 }