Esempio n. 1
0
 protected SafeNetworkOperationBase(IBackgroundReceiveActions backgroundReceiveActions,
                                    INetworkConnectionActions networkConnectionActions,
                                    Action <NoDataSentException> sendErrorAction             = null,
                                    Action <EmptyPacketReceivedException> receiveErrorAction = null)
 {
     _backgroundReceiveActions = backgroundReceiveActions;
     _networkConnectionActions = networkConnectionActions;
     _sendErrorAction          = sendErrorAction ?? (_ => { });
     _receiveErrorAction       = receiveErrorAction ?? (_ => { });
 }
 public SafeAsyncNetworkOperation(IBackgroundReceiveActions backgroundReceiveActions,
                                  INetworkConnectionActions networkConnectionActions,
                                  Func <Task> networkOperation,
                                  Action <NoDataSentException> sendErrorAction)
     : base(backgroundReceiveActions,
            networkConnectionActions,
            sendErrorAction,
            delegate { })
 {
     _networkOperation = networkOperation;
 }
Esempio n. 3
0
 public SafeBlockingNetworkOperation(IBackgroundReceiveActions backgroundReceiveActions,
                                     INetworkConnectionActions networkConnectionActions,
                                     Func <Task> operation,
                                     Action <NoDataSentException> sendErrorAction             = null,
                                     Action <EmptyPacketReceivedException> receiveErrorAction = null)
     : base(backgroundReceiveActions,
            networkConnectionActions,
            sendErrorAction,
            receiveErrorAction)
 {
     _operation = operation;
 }
Esempio n. 4
0
 public CharacterManagementController(ICharacterManagementActions characterManagementActions,
                                      IErrorDialogDisplayAction errorDialogDisplayAction,
                                      ICharacterDialogActions characterDialogActions,
                                      IBackgroundReceiveActions backgroundReceiveActions,
                                      INetworkConnectionActions networkConnectionActions,
                                      IGameStateActions gameStateActions,
                                      ICharacterSelectorRepository characterSelectorRepository)
 {
     _characterManagementActions  = characterManagementActions;
     _errorDialogDisplayAction    = errorDialogDisplayAction;
     _characterDialogActions      = characterDialogActions;
     _backgroundReceiveActions    = backgroundReceiveActions;
     _networkConnectionActions    = networkConnectionActions;
     _gameStateActions            = gameStateActions;
     _characterSelectorRepository = characterSelectorRepository;
 }
 public MainButtonController(INetworkConnectionActions networkConnectionActions,
                             IErrorDialogDisplayAction errorDialogDisplayAction,
                             IPacketProcessActions packetProcessActions,
                             IBackgroundReceiveActions backgroundReceiveActions,
                             IGameStateActions gameStateActions,
                             IAccountDialogDisplayActions accountDialogDisplayActions,
                             IResetStateAction resetStateAction,
                             IConnectionStateProvider connectionStateProvider,
                             ISafeNetworkOperationFactory networkOperationFactory)
 {
     _networkConnectionActions    = networkConnectionActions;
     _errorDialogDisplayAction    = errorDialogDisplayAction;
     _packetProcessActions        = packetProcessActions;
     _backgroundReceiveActions    = backgroundReceiveActions;
     _gameStateActions            = gameStateActions;
     _accountDialogDisplayActions = accountDialogDisplayActions;
     _resetStateAction            = resetStateAction;
     _connectionStateProvider     = connectionStateProvider;
     _networkOperationFactory     = networkOperationFactory;
 }
Esempio n. 6
0
 public SafeNetworkOperationFactory(IBackgroundReceiveActions backgroundReceiveActions,
                                    INetworkConnectionActions networkConnectionActions)
 {
     _backgroundReceiveActions = backgroundReceiveActions;
     _networkConnectionActions = networkConnectionActions;
 }