public MainPageViewModel( [Import(typeof(IClientModel))] IClientModel clientModel, [Import(typeof(ISystemModel))] ISystemModel systemModel, [Import(typeof(IGlobals))] IGlobals globals) { _clientModel = clientModel; _systemModel = systemModel; _globals = globals; this.LoginBoxVisibility = true; this.UserDetailsBoxVisibility = false; this.ErrorMessageVisibility = false; LoginCommand = new RelayCommand(LoginCommandAction); this.UserName = "******"; this.MenuItemCommand = new RelayCommand <SYStblMenu>((menuItemClicked) => { switch (menuItemClicked.Action) { case "VIEW": this.NavigateView(menuItemClicked.ActionObject, menuItemClicked.Name); break; case "DIALOG": break; default: throw new Exception(string.Format("Don't know what to do with the navigation action {0} ", menuItemClicked.Action)); } }); }
public MainPageViewModel( [Import(typeof(IClientModel))] IClientModel clientModel, [Import(typeof(ISystemModel))] ISystemModel systemModel, [Import(typeof(IGlobals))] IGlobals globals) { _clientModel = clientModel; _systemModel = systemModel; _globals = globals; this.LoginBoxVisibility = true; this.UserDetailsBoxVisibility = false; this.ErrorMessageVisibility = false; LoginCommand = new RelayCommand(LoginCommandAction); this.UserName = "******"; this.MenuItemCommand = new RelayCommand<SYStblMenu>((menuItemClicked) => { switch (menuItemClicked.Action) { case "VIEW": this.NavigateView(menuItemClicked.ActionObject, menuItemClicked.Name); break; case "DIALOG": break; default: throw new Exception(string.Format("Don't know what to do with the navigation action {0} ", menuItemClicked.Action)); } }); }
public LuaCompiler(string code, IExecutionProperties execProps, ICompilerProperties compProps, IGlobals globals = null) { SourceCode = code; ExecuteProperties = execProps; CompilerProperties = compProps; Globals = globals; }
public PyCompiler(string code, IExecutionProperties eProps, ICompilerProperties cProps, string libSearchPath = null, IGlobals globals = null) { SourceCode = code; CompilerProperties = cProps; ExecuteProperties = eProps; LibSearchPath = libSearchPath; Globals = globals; }
public Properties(Language language, string code, string[] imports = null, string jdkPath = null, string pyPath = null, IExecutionProperties exProps = null, ICompilerProperties comProps = null, IGlobals globals = null) { Language = language; Code = code; Imports = imports; JdkPath = jdkPath; PySearchPath = pyPath; ExecuteProperties = exProps; CompilerProperties = comProps; Globals = globals; }
public static async ValueTask <object> RunQueryAsync <T>(string linQuery, IGlobals <T> globals) { ScriptOptions scriptOptions = ScriptOptions.Default; scriptOptions = scriptOptions.AddReferences("System"); scriptOptions = scriptOptions.AddReferences("System.Linq"); scriptOptions = scriptOptions.AddReferences("System.Collections.Generic"); var state = await CSharpScript.RunAsync($@" using System; using System.Linq; using System.Collections.Generic; return DataSource.{linQuery ?? "ToList()"};", scriptOptions, globals); return(state.ReturnValue); }
public CSharpCompiler(string code, IExecutionProperties execProps, ICompilerProperties compProps, string[] imports = null, IGlobals globals = null) { SourceCode = code; ExecuteProperties = execProps; CompilerProperties = compProps; if (imports == null || !imports.Any()) { LoadReferences(); } else { Imports = imports; } Globals = globals ?? new Globals(new StringBuilder()); Create(); }
public SystemModel([Import(typeof(IGlobals))] IGlobals globals) { _globals = globals; }
public PyCompiler(string code, string libSearchPath = null, IGlobals globals = null) : this(code, new ExecutionProperties(), new CompilerProperties(), libSearchPath, globals) { }
public ClientModel([Import(typeof(IGlobals))] IGlobals globals) { _globals = globals; }
/// <summary> /// Sets the current globals provider. /// </summary> /// <param name="globals"></param> public static void SetGlobals(IGlobals globals) { current = globals; }