Microsoft.Protocols.TestSuites.MS_OXORULE.TestSuiteBase.GetNotifyResponse C# (CSharp) Method

GetNotifyResponse() protected method

Get the Notify response after retry preconfigured times.
protected GetNotifyResponse ( ) : RopNotifyResponse
return RopNotifyResponse
        protected RopNotifyResponse GetNotifyResponse()
        {
            // Get notification detail from server.
            RopNotifyResponse ropNotifyResponse;
            uint repeatTime = 0;
            do
            {
                ropNotifyResponse = this.OxoruleAdapter.NotificationProcess();
                repeatTime++;
                if (ropNotifyResponse.NotificationData == null)
                {
                    Thread.Sleep(this.WaitForTheRuleToTakeEffect);
                }
                else
                {
                    break;
                }
            }
            while (ropNotifyResponse.NotificationData == null && repeatTime < this.getMessageRepeatTime);
            Site.Assert.IsNotNull(ropNotifyResponse.NotificationData, "The notification data should not be null!");
            return ropNotifyResponse;
        }