IAsyncResult IConnectionDuplicator.BeginDuplicate(DuplicateContext duplicateContext, AsyncCallback callback, object state)
            {
                IAsyncResult result2;

                try
                {
                    if (!this.HandleOnVia(duplicateContext))
                    {
                        return(new SharedConnectionListener.DuplicateConnectionAsyncResult(callback, state));
                    }
                    SharedConnectionListener.DuplicateConnectionAsyncResult result = new SharedConnectionListener.DuplicateConnectionAsyncResult(this.BuildConnectionFromData(duplicateContext, this.connectionBufferSize), callback, state);
                    this.parent.OnConnectionAvailable(result);
                    result2 = result;
                }
                catch (Exception exception)
                {
                    if (DiagnosticUtility.ShouldTraceError)
                    {
                        DiagnosticUtility.ExceptionUtility.TraceHandledException(exception, TraceEventType.Error);
                    }
                    throw;
                }
                return(result2);
            }
 IAsyncResult IConnectionDuplicator.BeginDuplicate(DuplicateContext duplicateContext, AsyncCallback callback, object state)
 {
     IAsyncResult result2;
     try
     {
         if (!this.HandleOnVia(duplicateContext))
         {
             return new SharedConnectionListener.DuplicateConnectionAsyncResult(callback, state);
         }
         SharedConnectionListener.DuplicateConnectionAsyncResult result = new SharedConnectionListener.DuplicateConnectionAsyncResult(this.BuildConnectionFromData(duplicateContext, this.connectionBufferSize), callback, state);
         this.parent.OnConnectionAvailable(result);
         result2 = result;
     }
     catch (Exception exception)
     {
         if (DiagnosticUtility.ShouldTraceError)
         {
             DiagnosticUtility.ExceptionUtility.TraceHandledException(exception, TraceEventType.Error);
         }
         throw;
     }
     return result2;
 }