Ejemplo n.º 1
0
 public virtual void resultAdded(Result result)
 {
     Networking.ResultDTO resultDto = DTOUtils.getDTO(result);
     Console.WriteLine("Result added  " + result);
     try
     {
         sendResponse(ProtoUtils.createNewResultResponse(resultDto));
     }
     catch (Exception e)
     {
         throw new TriatlonException("Sending error: " + e);
     }
 }
Ejemplo n.º 2
0
        public static Response createNewResultResponse(Networking.ResultDTO result)
        {
            Protobuff.ResultDTO resultDto = new ResultDTO
            {
                ParticipantId = result.IdParticipant,
                StageId       = result.IdStage,
                Score         = result.Score
            };

            Response response = new Response {
                Type = Response.Types.ResponseType.NewResult, Result = resultDto
            };

            return(response);
        }
Ejemplo n.º 3
0
        public static Request createAddResultRequest(Networking.ResultDTO result)
        {
            Protobuff.ResultDTO resultDto = new ResultDTO
            {
                ParticipantId = result.IdParticipant,
                StageId       = result.IdStage,
                Score         = result.Score
            };

            Request request = new Request {
                Type = Request.Types.RequestType.AddResult, Result = resultDto
            };

            return(request);
        }
 public AddResultRequest(ResultDTO result)
 {
     this.result = result;
 }