private void RegenerateClientIfNeeded() { var commObject = _client as ICommunicationObject; if (commObject == null || commObject.State == CommunicationState.Faulted) { commObject.Abort(); _client = _clientGenerator(); } }
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); }
public ManualRemoteMathOperationsClient(ClientGenerator clientGenerator) { _clientGenerator = clientGenerator; _client = clientGenerator(); }
public MathOperationsServiceTests() { _mathOperationsService = new MathOperationsService(); }