Example #1
0
        public Match Get(IParams param)
        {
            MatchParameters matchParameters = param as MatchParameters;

            string   endpoint  = matchParameters.EndPoint;
            DateTime timestamp = matchParameters.Timestamp;

            serverService.Get(endpoint);
            return(matchRepository.Get(endpoint, timestamp));
        }
Example #2
0
 public MatchInfo Get(string endpoint, DateTime timestamp)
 {
     try
     {
         var param = new MatchParameters(endpoint, timestamp);
         return(matchService.Get(param).Results);
     }
     catch (NullReferenceException ex)
     {
         var response = new HttpResponseMessage(HttpStatusCode.NotFound);
         if (Request != null)
         {
             response.RequestMessage = Request;
         }
         response.Content = new StringContent(ex.Message);
         throw new HttpResponseException(response);
     }
 }