public FleetModelsController(IFleetService fleetService, IAlertTextProvider alertTextProvider, IMySession mySession, IPermissionChecker permssionChecker)
 {
     _fleetService      = fleetService;
     _alertTextProvider = alertTextProvider;
     _mySession         = mySession;
     _permissionChecker = permssionChecker;
 }
Exemplo n.º 2
0
 public CompanyService(IClsCompany company, IClsRole role, IMySession mySession, IClsUser user)
 {
     _company   = company;
     _role      = role;
     _mySession = mySession;
     _user      = user;
 }
 public RoleController(IUserService useService, IAlertTextProvider alertTextProvider, IPermissionChecker permissionChecker, IMySession mySession)
 {
     _userService       = useService;
     _alertTextProvider = alertTextProvider;
     _permissionChecker = permissionChecker;
     _mySession         = mySession;
 }
 public TrackerController(ITrackerService trackerService, IAlertTextProvider alertTextProvider, IMySession mySession, IPermissionChecker permissionChecker)
 {
     _trackerService    = trackerService;
     _alertTextProvider = alertTextProvider;
     _mySession         = mySession;
     _permissionChecker = permissionChecker;
 }
 public CommonController(IFleetService fleetService, IUserService userService, ITrackerService trackerService, IMySession mySession)
 {
     _trackerService = trackerService;
     _mySession      = mySession;
     _fleetService   = fleetService;
     _userService    = userService;
 }
Exemplo n.º 6
0
 public TripReasonController(ITrackerService objIClsTripReason, IAlertTextProvider alertTextProvider, IPermissionChecker permissionChecker, IMySession mySession)
 {
     _trackerService    = objIClsTripReason;
     _alertTextProvider = alertTextProvider;
     _permissionChecker = permissionChecker;
     _mySession         = mySession;
 }
Exemplo n.º 7
0
 public HomeController(IPermissionChecker permissionChecker, IMySession mySession, ICookieHandler cookieHandler, IAuthentication authentication)
     : base()
 {
     _permissionChecker = permissionChecker;
     _mySession         = mySession;
     _cookieHandler     = cookieHandler;
     _authentication    = authentication;
 }
        private static bool IsPlayer(IMySession session)
        {
            if (session?.Player != null || session?.OnlineMode == MyOnlineModeEnum.PRIVATE || session?.OnlineMode == MyOnlineModeEnum.OFFLINE)
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 9
0
 public Teacher(
     IConnectionManager connectionManager,
     IMySession session,
     ITeacherRepository teacherRepository,
     IShoolRepository shoolRepository)
 {
     this.connectionManager = connectionManager;
     this.session           = session;
     this.teacherRepository = teacherRepository;
     this.shoolRepository   = shoolRepository;
 }
Exemplo n.º 10
0
        public static SessionType SessionType(this IMySession session)
        {
            var flags = 0;

            if (session.IsController())
            {
                flags |= (int)Utils.SessionType.PlayerController;
            }
            if (session.IsDecider())
            {
                flags |= (int)Utils.SessionType.ServerDecider;
            }
            return((SessionType)flags);
        }
        public static T GetComponent <T>(this IMySession session) where T : RegisteredSessionComponent
        {
            lock (_storage)
            {
//                return _storage.GetValueOrDefault(session)?.GetValueOrDefault(typeof(T)) as T;
                var tmp = _storage.GetValueOrDefault(session);
                if (tmp == null)
                {
                    return(null);
                }
                lock (tmp)
                {
                    var tmp2 = tmp.GetValueOrDefault(typeof(T));
                    if (tmp2 == null)
                    {
                        return(null);
                    }
                    lock (tmp2)
                    {
                        return(tmp2 as T);
                    }
                }
            }
        }
Exemplo n.º 12
0
 public BANKSDAL(IMySession session)
     : base(session)
 {
     this.TableName = "BANKS";
 }
Exemplo n.º 13
0
 public PermissionChecker(CommonDataContext objDataContext, ILogger logger, IMySession mySession)
 {
     _objDataContext = objDataContext;
     _logger         = logger;
     _mySession      = mySession;
 }
Exemplo n.º 14
0
 public AccountDAL(IMySession session)
     : base(session)
 {
     this.TableName = "Account";
 }
Exemplo n.º 15
0
 public MetricsDAL(IMySession session)
     : base(session)
 {
     this.TableName = "Metrics";
 }
Exemplo n.º 16
0
 public SystemTaskDAL(IMySession session)
     : base(session)
 {
     this.TableName = "SystemTask";
 }
Exemplo n.º 17
0
 public TimeLimitedSessionProxy(IMySession baseSession, TimeSpan timeout)
 {
     _baseSession = baseSession;
     _timeout     = timeout;
 }
Exemplo n.º 18
0
 public MyBLL(IMySession session)
 {
     _session = session;
 }
Exemplo n.º 19
0
 public HomeController( SystemModuleService SystemModuleService,SolutionService solutionService,IMySession session)
 {
     MySession = session;
     _SystemModuleService = SystemModuleService;
     _solutionService = solutionService;
 }
Exemplo n.º 20
0
 public DAOFactory()
 {
     this.userDAO = new UserDAO();
     this.session = new NHibernateSession();
 }
Exemplo n.º 21
0
 public static bool IsDecider(this IMySession session)
 {
     return(MyAPIGateway.Utilities.IsDedicated || (MyAPIGateway.Multiplayer != null && MyAPIGateway.Multiplayer.IsServer) ||
            session.OnlineMode == MyOnlineModeEnum.OFFLINE);
 }
Exemplo n.º 22
0
 public static bool IsController(this IMySession session)
 {
     return(session.Player != null);
 }
Exemplo n.º 23
0
 public static bool IsServerDecider(this IMySession session)
 {
     return(MyMultiplayerModApi.Static.IsServer);
 }
Exemplo n.º 24
0
 public static bool IsPlayerController(this IMySession session)
 {
     return(!MyAPIGateway.Utilities.IsDedicated);
 }
Exemplo n.º 25
0
 /// <summary>
 /// Time elapsed since the start of the game.
 /// This is saved in checkpoint, instead of GameDateTime.
 /// </summary>
 /// <remarks>Copied from Sandbox.Game.World.MySession</remarks>
 public static TimeSpan ElapsedGameTime(this IMySession session)
 {
     return(MyAPIGateway.Session.GameDateTime - new DateTime(2081, 1, 1, 0, 0, 0, DateTimeKind.Utc));
 }
Exemplo n.º 26
0
 public ValuesController(Teacher teacher, IMySession session)
 {
     this.teacher = teacher;
     this.session = session;
 }
Exemplo n.º 27
0
 public TestDAL(IMySession session)
     : base(session)
 {
     this.TableName = "Test";
 }
 public CompanyController(ICompanyService companyService, IMySession mySession)
     : base()
 {
     _companyService = companyService;
     _mySession      = mySession;
 }
Exemplo n.º 29
0
 /// <summary>
 /// This is an overly complex check to avoid issues that Torch develolpers have caused by utilizing the OnlineMode for other purposes.
 /// </summary>
 /// <returns></returns>
 public static bool IsSinglePlayerOffline(this IMySession session)
 {
     return(session.OnlineMode == MyOnlineModeEnum.OFFLINE &&
            session.IsServer && // it calls MyAPIGateway.Multiplayer.IsServer.
            !MyAPIGateway.Utilities.IsDedicated);
 }
Exemplo n.º 30
0
 public UserTaskDAL(IMySession session)
     : base(session)
 {
     this.TableName = "UserTask";
 }
Exemplo n.º 31
0
 public CookieHandler(ILogger logger, IMySession mySession, IConfiguration configuration)
 {
     _logger        = logger;
     _mySession     = mySession;
     _configuration = configuration;
 }
Exemplo n.º 32
0
 public MyMessageHandler2(IMySession session)
 {
     this.session = session;
 }