コード例 #1
0
        public override void Dispose()
        {
            var ser = RootInjector.GetService <IPreviewService>();

            ser.StopPreview();
            base.Dispose();
        }
コード例 #2
0
ファイル: Shell.cs プロジェクト: asbarkouky85/CodeShellCore
        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();
            }
        }
コード例 #3
0
        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);
        }