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; }
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>(); }); }