static Environment() { CommandBuilders = new Dictionary <string, ICommandBuilder>(); SystemCommands = new Dictionary <string, ISystemCommand>(); ConsoleViews = new Dictionary <string, IConsoleView>(); ScriptRecorder = new ScriptRecorder(); RegsiterSystemCommands(); RegsiterCommandBuilders(); RegisterViews(); ContextFactory = new ContextFactory <AsbaContext>("AsbaBank"); currentUserSession = new CurrentUserSession(new GenericIdentity(System.Environment.UserDomainName)); }
static Environment() { CommandBuilders = new Dictionary<string, ICommandBuilder>(); SystemCommands = new Dictionary<string, ISystemCommand>(); ConsoleViews = new Dictionary<string, IConsoleView>(); ScriptRecorder = new ScriptRecorder(); RegsiterSystemCommands(); RegsiterCommandBuilders(); RegisterViews(); ContextFactory = new ContextFactory<AsbaContext>("AsbaBank"); currentUserSession = new CurrentUserSession(new GenericIdentity(System.Environment.UserDomainName)); }
public static void SetCurrentUserRole(params UserRole[] role) { var roles = role.Select(userRole => userRole.ToString()).ToArray(); currentUserSession = new CurrentUserSession(new GenericIdentity(System.Environment.UserDomainName), roles); }
public static void SetCurrentUserRole(params UserRole[] role) { var roles = role; currentUserSession = new CurrentUserSession(new GenericIdentity(System.Environment.UserDomainName), roles); }