public override void Dispose() { var ser = RootInjector.GetService <IPreviewService>(); ser.StopPreview(); base.Dispose(); }
protected void StartJobs() { var jobs = RootInjector.GetService <JobConfig>().Jobs; foreach (var job in jobs) { IJobRunner runner = RootInjector.GetService <IJobRunner>(); runner.Job = job; runner.Timer.Start(); } }
protected override void OnReady() { base.OnReady(); RootInjector.GetService <ICollectionConfigService>().RegisterCollection <User>("MaleUsers", u => { var rols = u.UserAs <UserDTO>().Roles.Select(e => long.Parse(e)).ToList(); return(d => d.UserRoles.Any(e => rols.Any(f => e.RoleId == f))); }); var tok = Utils.CreateClientToken(new AppClient { ClientId = "Test.App" }); Console.WriteLine(tok); }