Beispiel #1
0
        private static void StartNewSession(ISmaugDbContext dbContext)
        {
            var newSession = dbContext.Sessions.Create();

            newSession.IpAddress = ConfigurationManager.AppSettings["host"];
            newSession.Port      = Convert.ToInt32(ConfigurationManager.AppSettings["port"]);
            dbContext.Sessions.Add(newSession);
            dbContext.SaveChanges();
            SessionId = newSession.Id;
        }
Beispiel #2
0
        public LogManager(ILogWrapper logWrapper, IKernel kernel, ITimer timer, ISmaugDbContext dbContext, int sessionId)
        {
            LogWrapper = logWrapper;
            _kernel    = kernel;
            _dbContext = dbContext;
            _sessionId = sessionId;

            _pendingLogs = new List <LogEntry>();

            _dbDumpTimer          = timer;
            _dbDumpTimer.Elapsed += DbDumpTimerOnElapsed;

            if (_dbDumpTimer.Interval <= 0)
            {
                _dbDumpTimer.Interval = 500;
            }

            _dbDumpTimer.Start();
        }
Beispiel #3
0
 public WeatherManager(ILogManager logManager, IKernel kernel, ISmaugDbContext dbContext)
 {
     _logManager = logManager;
     _kernel     = kernel;
     _dbContext  = dbContext;
 }
Beispiel #4
0
 public AuctionRepository(ILogManager logManager, ISmaugDbContext dbContext)
 {
     History     = new List <AuctionHistory>();
     _logManager = logManager;
     _dbContext  = dbContext;
 }
 public BanRepository(ILogManager logManager, ISmaugDbContext dbContext)
 {
     Bans        = new List <BanData>();
     _logManager = logManager;
     _dbContext  = dbContext;
 }
 public NewsRepository(ILogManager logManager, ISmaugDbContext dbContext)
 {
     News        = new List <NewsData>();
     _logManager = logManager;
     _dbContext  = dbContext;
 }
 public BoardRepository(ILogManager logManager, ISmaugDbContext dbContext)
 {
     Boards      = new List <BoardData>();
     _logManager = logManager;
     _dbContext  = dbContext;
 }
Beispiel #8
0
 public CalendarManager(ILogManager logManager, IGameManager gameManager, ISmaugDbContext dbContext)
 {
     _logManager  = logManager;
     _gameManager = gameManager;
     _dbContext   = dbContext;
 }
Beispiel #9
0
 public static void fwrite_obj(CharacterInstance ch, ObjectInstance obj,
                               ISmaugDbContext dbContext, int iNest, short os_type, bool hotboot)
 {
     throw new NotImplementedException();
 }