예제 #1
0
 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));
 }
예제 #3
0
        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.Select(userRole => userRole.ToString()).ToArray();
     currentUserSession = new CurrentUserSession(new GenericIdentity(System.Environment.UserDomainName), roles);
 }
예제 #5
0
 public static void SetCurrentUserRole(params UserRole[] role)
 {
     var roles = role;
     currentUserSession = new CurrentUserSession(new GenericIdentity(System.Environment.UserDomainName), roles);
 }