public EnumSelector() { if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) { PythonEvaluator pe = new PythonEvaluator(); } InitializeComponent(); }
static ScriptConverter() { PythonEvaluator = new PythonEvaluator(); DefaultValues = new Dictionary<Type, object> { {typeof (int), 0}, {typeof (string), null}, {typeof (double), 0.0D}, {typeof (decimal), 0.0M}, {typeof (bool), false}, {typeof (float), 0.0F}, {typeof (long), 0L}, {typeof (short), 0} }; }
static public Task LoadAsync(ThreadProperties tp = null) { if (_Loader != null) return _Loader; _Loader = Task.Factory.StartNew( () => { using (tp.GetChanger()) { PythonEvaluator = new PythonEvaluator(); } }, CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default); return _Loader; }
public static void PyBinding() { // All assemblies used by PyBinding should be added here Assembly.LoadFrom(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "Inbox2.Platform.Channels.dll")); // Loads the IronPython runtime PythonEvaluator evaluator = new PythonEvaluator(); }