Ejemplo n.º 1
0
        public StartMatchBackfillOutcome BackfillMatchmaking(Aws.GameLift.Server.Model.StartMatchBackfillRequest request)
        {
            var translation = BackfillDataMapper.CreateBufferedBackfillMatchmakingRequest(request);

            var future = new TaskCompletionSource <StartMatchBackfillOutcome>();

            var ackFunction = CreateAckFunction(future);

            return(EmitEvent(translation, ackFunction, future, START_MATCH_BACKFILL_ERROR));
        }
Ejemplo n.º 2
0
        CreateBufferedBackfillMatchmakingRequest(StartMatchBackfillRequest request)
        {
            Com.Amazon.Whitewater.Auxproxy.Pbuffer.BackfillMatchmakingRequest translated =
                new Com.Amazon.Whitewater.Auxproxy.Pbuffer.BackfillMatchmakingRequest();

            translated.TicketId       = request.TicketId;
            translated.GameSessionArn = request.GameSessionArn;
            translated.MatchmakingConfigurationArn = request.MatchmakingConfigurationArn;
            for (int i = 0; i < request.Players.Length; i++)
            {
                translated.Players.Add(BackfillDataMapper.CreateBufferedPlayer(request.Players[i]));
            }

            return(translated);
        }
        public static Protobuf.BackfillMatchmakingRequest CreateBufferedBackfillMatchmakingRequest(
            StartMatchBackfillRequest request)
        {
            Protobuf.BackfillMatchmakingRequest translated = new Protobuf.BackfillMatchmakingRequest();

            translated.TicketId       = request.TicketId;
            translated.GameSessionArn = request.GameSessionArn;
            translated.MatchmakingConfigurationArn = request.MatchmakingConfigurationArn;

            if (request.Players != null)
            {
                translated.Players = new Protobuf.Player[request.Players.Length];
                for (int i = 0; i < request.Players.Length; i++)
                {
                    translated.Players[i] = BackfillDataMapper.CreateBufferedPlayer(request.Players[i]);
                }
            }

            return(translated);
        }