Exemplo n.º 1
0
        public async Task UpdateShutdownMode(RequestContext <IScenePeerClient> ctx)
        {
            ShutdownModeParameters shutdown = ctx.ReadObject <ShutdownModeParameters>();

            if (_service.IsHost(ctx.RemotePeer.SessionId))
            {
                await _service.UpdateShutdownMode(shutdown);
            }
            else
            {
                throw new ClientException("forbidden");
            }
        }
        public Task UpdateShutdownMode(RequestContext <IScenePeerClient> ctx)
        {
            ShutdownModeParameters shutdown = ctx.ReadObject <ShutdownModeParameters>();

            return(_service.UpdateShutdownMode(shutdown, ctx.RemotePeer));
        }