public async Task <RunResult> Run(CodePad pad)
        {
            var request = CreateCompileRequest(pad);
            var result  = await _codeCompiler.RunCode(request);

            return(_mapper.Map <RunResult>(result));
        }
 private static CompileRequest CreateCompileRequest(CodePad pad)
 {
     return(new CompileRequest
     {
         Code = pad.Code,
         Language = (Language)(int)pad.Language
     });
 }
        public async Task <RunResult> Run(CodePad pad)
        {
            await _hubContext.Clients.Group(pad.Id).SendAsync("Running", true);

            var result = await _sharedPadService.Run(pad);

            await _hubContext.Clients.Group(pad.Id).SendAsync("Running", false);

            await _hubContext.Clients.Group(pad.Id).SendAsync("Run", result);

            return(result);
        }
        public bool UpdatePad(CodePad pad)
        {
            _memoryCache.Set($"{PadEntry}{pad.Id}", pad, PadEntryOptions);

            return(true);
        }
 public bool Update(CodePad codePad)
 {
     return(_sharedPadService.UpdatePad(codePad));
 }