// public static IList <T> GetCallbacks <T>(ExecutionProperties executionProperties) where T : class { List <T> list = null; if (!executionProperties.IsEmpty) { T temp; foreach (KeyValuePair <string, object> item in executionProperties) { temp = item.Value as T; if (temp != null) { if (list == null) { list = new List <T>(); } list.Add(temp); } } } return(list); }
public static ICompiler NewCompiler(Language language, string sourceCode, Editor caller, string langVersion = null) { IExecutionProperties exProps = new ExecutionProperties(App.Preferences.ExecuteTimeout); ICompilerProperties comProps = new CompilerProperties(App.Preferences.ExecuteTimeout, langVersion); var properties = new Compilers.Properties(language, sourceCode, App.Preferences.NetImports, App.Preferences.JdkPath, App.Preferences.PyPath, exProps, comProps, new FiddleGlobals(caller)); return(Host.NewCompiler(properties)); }
public static void Update(this ExecutionProperties properties, string name, object value) { properties.Remove(name); properties.Add(name, value); }