예제 #1
0
        public void FailCallback(CoapClient.FailReason failReason)
        {
            switch (failReason)
            {
            case CoapClient.FailReason.Rejected:
                _taskCompletionSource.SetException(new TradfriException("The gateway rejected the request."));
                break;

            case CoapClient.FailReason.TimedOut:
                _taskCompletionSource.SetException(new TradfriException("Timed-out waiting for the gateway."));
                break;

            default:
                _taskCompletionSource.SetException(new TradfriException("Gateway communication error: " + (int)failReason));
                break;
            }
        }
예제 #2
0
 private void Fail(CoapClient.FailReason reason)
 {
     _failed = true;
     Assert.Fail();
 }