示例#1
0
        async public void DomainLeaveReactively(PlayReadyDomainLeaveServiceRequest domainLeaveRequest)
        {
            TestLogger.LogImportantMessage("Enter DomainLeave.DomainLeaveReactively()");
            Exception exception = null;

            try
            {
                _serviceRequest = domainLeaveRequest;
                domainLeaveRequest.DomainServiceId = RequestConfigData.DomainServiceId;
                domainLeaveRequest.DomainAccountId = RequestConfigData.DomainAccountId;
                domainLeaveRequest.Uri             = RequestConfigData.DomainUri;

                if (RequestConfigData.ManualEnabling)
                {
                    TestLogger.LogMessage("Manually posting the request...");

                    HttpHelper httpHelper = new HttpHelper(domainLeaveRequest);
                    await httpHelper.GenerateChallengeAndProcessResponse();
                }
                else
                {
                    TestLogger.LogImportantMessage("Begin domain leave service request...");
                    await domainLeaveRequest.BeginServiceRequest();
                }
            }
            catch (Exception ex)
            {
                TestLogger.LogImportantMessage("Saving exception..");
                exception = ex;
            }
            finally
            {
                DomainLeaveServiceRequestCompleted(domainLeaveRequest, exception);
            }

            TestLogger.LogImportantMessage("Leave DomainLeave.DomainLeaveReactively()");
        }