/// /// Base implementation of the sockets /// public async void OnRegister() { this.Session = await new AdminSessionDM(this.Context.Database) { adminid = this.Admin.ID.Value, guid = this.Key }.InsertAsync <AdminSessionDM>(); // init DashboardSocketsServer.Send(this, new InitDashboardModel() { Privileges = this.Admin.privileges, AdminStatus = this.Admin.GetStatus().ToString(), Actions = ApiSocketServer.ActiveActions, DashboardSessions = DashboardSocketsServer.ActiveSessions, Countries = CountryCache.Instance.GetModel(), Landers = LandersCache.Instance.GetLandersModel(), LanderTypes = LandersCache.Instance.GetLanderTypesModel(), Prelanders = PrelandersCache.Instance.GetPrelandersModel(), PrelanderTypes = PrelandersCache.Instance.GetPrelanderTypesModel(), Providers = ProvidersCache.Instance.GetAll() } .Pack(DashboardEvents.INIT)); }
public void Send(DashboardSocketDistributionModel data) => DashboardSocketsServer.Send(this, data);