protected override IEnumerator <IteratorAsyncResult <SendAvailabilityPairedNamespaceOptions.PingAsyncResult> .AsyncStep> GetAsyncSteps()
            {
                Exception     exception;
                MessageSender messageSender = null;

                SendAvailabilityPairedNamespaceOptions.PingAsyncResult pingAsyncResult = this;
                yield return(pingAsyncResult.CallAsync((SendAvailabilityPairedNamespaceOptions.PingAsyncResult thisPtr, TimeSpan t, AsyncCallback c, object s) => thisPtr.options.PrimaryMessagingFactory.BeginCreateMessageSender(null, thisPtr.path, false, t, c, s), (SendAvailabilityPairedNamespaceOptions.PingAsyncResult thisPtr, IAsyncResult r) => messageSender = thisPtr.options.PrimaryMessagingFactory.EndCreateMessageSender(r), IteratorAsyncResult <TIteratorAsyncResult> .ExceptionPolicy.Continue));

                if (base.LastAsyncStepException == null)
                {
                    List <BrokeredMessage> brokeredMessages  = new List <BrokeredMessage>();
                    List <BrokeredMessage> brokeredMessages1 = brokeredMessages;
                    BrokeredMessage        brokeredMessage   = new BrokeredMessage((object)base.GetType().Name)
                    {
                        ContentType = "application/vnd.ms-servicebus-ping",
                        TimeToLive  = SendAvailabilityPairedNamespaceOptions.PingAsyncResult.PingMessageTimeToLive,
                        SessionId   = Guid.NewGuid().ToString("N")
                    };
                    brokeredMessages1.Add(brokeredMessage);
                    List <BrokeredMessage> brokeredMessages2 = brokeredMessages;
                    yield return(base.CallAsync((SendAvailabilityPairedNamespaceOptions.PingAsyncResult thisPtr, TimeSpan t, AsyncCallback c, object s) => messageSender.BeginSend(brokeredMessages2, t, c, s), (SendAvailabilityPairedNamespaceOptions.PingAsyncResult thisPtr, IAsyncResult r) => messageSender.EndSend(r), IteratorAsyncResult <TIteratorAsyncResult> .ExceptionPolicy.Continue));

                    if (base.LastAsyncStepException != null)
                    {
                        MessagingClientEtwProvider.TraceClient(() => MessagingClientEtwProvider.Provider.EventWritePairedNamespacePingException(base.LastAsyncStepException));
                        MessagingException lastAsyncStepException = base.LastAsyncStepException as MessagingException;
                        if (lastAsyncStepException != null && !lastAsyncStepException.IsTransient)
                        {
                            base.Complete(base.LastAsyncStepException);
                            this.options.unavailableEntities.TryAdd(messageSender.Path, base.LastAsyncStepException);
                        }
                    }
                    else
                    {
                        this.options.unavailableEntities.TryRemove(this.path, out exception);
                        this.options.MarkPathHealthy(this.path);
                    }
                }
                else
                {
                    MessagingClientEtwProvider.TraceClient(() => MessagingClientEtwProvider.Provider.EventWritePairedNamespaceCouldNotCreateMessageSender(this.options.PrimaryMessagingFactory.Address.ToString(), this.path, base.LastAsyncStepException));
                }
            }