Пример #1
0
        public void Init( MvcContext ctx )
        {
            if (ctx.utils.isEnd()) return;

            initPrivate( ctx );

            if (ctx.app.obj != null) {

                // ���app�Ƿ�ͣ��
                Type appType = ctx.app.obj.GetType();
                AppInstaller installer = new AppInstallerService().GetByType( appType );
                if (installer == null || installer.IsInstanceClose( ctx.owner.obj.GetType() )) {
                    ctx.utils.endMsg( "�Բ��𣬱�app�Ѿ�ͣ��", HttpStatus.NotFound_404 );
                    return;
                }

                InitHelperFactory.GetHelper( ctx ).IsAppRunning( ctx ); // ���app�Ƿ�������ͣ״̬
            }
        }
Пример #2
0
        public void Init( MvcContext ctx )
        {
            if (ctx.utils.isEnd()) return;

            initPrivate( ctx );

            if (ctx.app.obj != null) {

                // 检查app是否停用
                Type appType = ctx.app.obj.GetType();
                AppInstaller installer = new AppInstallerService().GetByType( appType );
                if (installer == null || installer.IsInstanceClose( ctx.owner.obj.GetType() )) {
                    ctx.utils.endMsg( "对不起,本app已经停用", HttpStatus.NotFound_404 );
                    return;
                }

                if (InitHelperFactory.GetHelper( ctx ).IsAppRunning( ctx ) == false) { // 检查app是否属于暂停状态
                    ctx.utils.endMsg( lang.get( "exAppNotFound" ) + ": appType=" + appType+", appId=" + ctx.app.Id, HttpStatus.NotFound_404 );
                }

            }
        }