示例#1
0
 public bool OpenExistingSession(int definitionId)
 {
     try
     {
         _service.Open(definitionId);
         return(true);
     }
     catch (ArgumentException)
     {
         return(false);
     }
 }
示例#2
0
        public IHttpActionResult OpenExistingSession(int definitionId)
        {
            try
            {
                _service.Open(definitionId);

                return(Ok(_service.GetCurrentRecording()));
            }
            catch (ArgumentException)
            {
                return(NotFound());
            }
        }