Beispiel #1
0
 private SessionMessageQueue GetMessageQueue()
 {
     if (this.messageQueue == null)
     {
         this.messageQueue = new SessionMessageQueue(this);
     }
     return(this.messageQueue);
 }
Beispiel #2
0
 public MTSession(ILogger <MTSession> logger, ServerOptions options, IMTServiceProvider serviceProvider)
 {
     this.logger        = logger;
     this.options       = options;
     this.serverKey     = options.ServerKey;
     this.Services      = serviceProvider;
     this.messageQueue  = new SessionMessageQueue(this);
     this.userManager   = serviceProvider.GetService <IUserManager>();
     this.ChatManager   = serviceProvider.GetService <IChatManager>();
     this.UpdateManager = serviceProvider.GetService <IUpdateManager>();
 }