StartGameCommand.Execute C# (CSharp) Method

Execute() public method

public Execute ( ) : void
return void
    public override void Execute()
    {
        Retain();
        PlayFabMatchmakerAPI.StartGame(Request, (result) =>
        {
            Release();
            ResponseSignal.Dispatch(result);
        }, PlayFabErrorHandler.HandlePlayFabError);
    }
}

Usage Example

        public void StartNewGame_ValidGameSettings_GameCreated()
        {
            // arrange
            StartGameCommand testStartCommand = new StartGameCommand(_gameCreatorMock.Object, _manipulatorMock.Object, _defaultSettings);

            // act
            testStartCommand.Execute();

            // assert
            _gameCreatorMock.Verify(c => c.CreateGame(_defaultSettings, _manipulatorMock.Object), Times.Once());
        }
All Usage Examples Of StartGameCommand::Execute
StartGameCommand