Exemple #1
0
        public void SetupInstance(ApiAbstract api)
        {
            api.OnBroadcastMessage      += (s, t, m) => { OnBroadcastMessage?.Invoke(s, t, m); };
            api.OnRequestShutdown       += (t, st) => { OnRequestShutdown?.Invoke(t, st); };
            api.OnRequestUserDisconnect += (i) => { OnRequestUserDisconnect?.Invoke(i); };
            api.OnRequestMailNotify     += (i, s, b, t) => { OnRequestMailNotify?.Invoke(i, s, b, t); };

            var config = Config;
        }
Exemple #2
0
 public override void Start()
 {
     // Start OWIN host
     App = WebApp.Start(Config.Services.UserApi.Bindings[0], x =>
     {
         new UserApiStartup().Configuration(x, Config);
         var api = INSTANCE;
         api.OnBroadcastMessage      += (s, t, m) => { OnBroadcastMessage?.Invoke(s, t, m); };
         api.OnRequestShutdown       += (t, st) => { OnRequestShutdown?.Invoke(t, st); };
         api.OnRequestUserDisconnect += (i) => { OnRequestUserDisconnect?.Invoke(i); };
         api.OnRequestMailNotify     += (i, s, b, t) => { OnRequestMailNotify?.Invoke(i, s, b, t); };
         api.HostPool = Kernel.Get <IGluonHostPool>();
     });
 }
Exemple #3
0
        public override void Start()
        {
            string baseAddress = "http://localhost:9000/";

            // Start OWIN host
            App = WebApp.Start(Config.Services.UserApi.Bindings[0], x =>
            {
                new UserApiStartup().Configuration(x, Config);
                var api = INSTANCE;
                api.OnBroadcastMessage += (s, t, m) => { OnBroadcastMessage?.Invoke(s, t, m); };
                api.OnRequestShutdown  += (t, st) => { OnRequestShutdown?.Invoke(t, st); };
                api.HostPool            = Kernel.Get <IGluonHostPool>();
            });

            //Console.ReadLine();
        }
Exemple #4
0
 public void RequestShutdown(uint time, ShutdownType type)
 {
     OnRequestShutdown?.Invoke(time, type);
 }