Esempio n. 1
0
        private void RegenerateClientIfNeeded()
        {
            var commObject = _client as ICommunicationObject;

            if (commObject == null || commObject.State == CommunicationState.Faulted)
            {
                commObject.Abort();
                _client = _clientGenerator();
            }
        }
Esempio n. 2
0
 public MainPageViewModel(
     IMathOperationsService mathOperationsService,
     IWindowsApiService windowsApiService)
 {
     _mathOperationsService = mathOperationsService;
     _windowsApiService     = windowsApiService;
     SumCommand             = DelegateCommand.FromAsyncHandler(Sum);
     SubtractCommand        = DelegateCommand.FromAsyncHandler(Subtract);
     MultiplyCommand        = DelegateCommand.FromAsyncHandler(Multiply);
     DivideCommand          = DelegateCommand.FromAsyncHandler(Divide);
 }
Esempio n. 3
0
 public ManualRemoteMathOperationsClient(ClientGenerator clientGenerator)
 {
     _clientGenerator = clientGenerator;
     _client          = clientGenerator();
 }
 public MathOperationsServiceTests()
 {
     _mathOperationsService = new MathOperationsService();
 }