public IConnection EndAccept(IAsyncResult result)
 {
     using (ServiceModelActivity.BoundOperation(this.activity))
     {
         ServiceModelActivity activity = ServiceModelActivity.CreateActivity();
         if (activity != null)
         {
             if (null != FxTrace.Trace)
             {
                 FxTrace.Trace.TraceTransfer(activity.Id);
             }
         }
         using (ServiceModelActivity.BoundOperation(activity))
         {
             ServiceModelActivity.Start(activity, SR.GetString(SR.ActivityReceiveBytes, this.activity.Name), ActivityType.ReceiveBytes);
             IConnection innerConnection = this.listener.EndAccept(result);
             if (innerConnection == null)
             {
                 return(null);
             }
             TracingConnection retval = new TracingConnection(innerConnection, activity);
             return(retval);
         }
     }
 }
        public IConnection EndAccept(IAsyncResult result)
        {
            IConnection connection3;

            using (ServiceModelActivity.BoundOperation(this.activity))
            {
                ServiceModelActivity activity = ServiceModelActivity.CreateActivity();
                if ((activity != null) && (FxTrace.Trace != null))
                {
                    FxTrace.Trace.TraceTransfer(activity.Id);
                }
                using (ServiceModelActivity.BoundOperation(activity))
                {
                    ServiceModelActivity.Start(activity, System.ServiceModel.SR.GetString("ActivityReceiveBytes", new object[] { this.activity.Name }), ActivityType.ReceiveBytes);
                    IConnection connection = this.listener.EndAccept(result);
                    if (connection == null)
                    {
                        return(null);
                    }
                    TracingConnection connection2 = new TracingConnection(connection, activity);
                    connection3 = connection2;
                }
            }
            return(connection3);
        }
 public IConnection EndConnect(IAsyncResult result)
 {
     using (ServiceModelActivity.BoundOperation(this.activity))
     {
         TracingConnection connection = new TracingConnection(this.connectionInitiator.EndConnect(result), false);
         connection.ActivityStart(this.connectedUri);
         return connection;
     }
 }
Beispiel #4
0
 public IConnection EndConnect(IAsyncResult result)
 {
     using (ServiceModelActivity.BoundOperation(this.activity))
     {
         TracingConnection connection = new TracingConnection(this.connectionInitiator.EndConnect(result), false);
         connection.ActivityStart(this.connectedUri);
         return(connection);
     }
 }
 public IConnection Connect(Uri uri, TimeSpan timeout)
 {
     using (ServiceModelActivity.BoundOperation(this.activity))
     {
         IConnection retval = this.connectionInitiator.Connect(uri, timeout);
         if (!this.isClient)
         {
             TracingConnection tracingConnection = new TracingConnection(retval, false);
             tracingConnection.ActivityStart(uri);
             retval = tracingConnection;
         }
         return retval;
     }
 }
 public IConnection Connect(Uri uri, TimeSpan timeout)
 {
     using (ServiceModelActivity.BoundOperation(this.activity))
     {
         IConnection connection = this.connectionInitiator.Connect(uri, timeout);
         if (!this.isClient)
         {
             TracingConnection connection2 = new TracingConnection(connection, false);
             connection2.ActivityStart(uri);
             connection = connection2;
         }
         return connection;
     }
 }
Beispiel #7
0
 public IConnection Connect(Uri uri, TimeSpan timeout)
 {
     using (ServiceModelActivity.BoundOperation(this.activity))
     {
         IConnection connection = this.connectionInitiator.Connect(uri, timeout);
         if (!this.isClient)
         {
             TracingConnection connection2 = new TracingConnection(connection, false);
             connection2.ActivityStart(uri);
             connection = connection2;
         }
         return(connection);
     }
 }
Beispiel #8
0
 public IConnection Connect(Uri uri, TimeSpan timeout)
 {
     using (ServiceModelActivity.BoundOperation(this.activity))
     {
         IConnection retval = this.connectionInitiator.Connect(uri, timeout);
         if (!this.isClient)
         {
             TracingConnection tracingConnection = new TracingConnection(retval, false);
             tracingConnection.ActivityStart(uri);
             retval = tracingConnection;
         }
         return(retval);
     }
 }
 public IConnection EndAccept(IAsyncResult result)
 {
     IConnection connection3;
     using (ServiceModelActivity.BoundOperation(this.activity))
     {
         ServiceModelActivity activity = ServiceModelActivity.CreateActivity();
         if ((activity != null) && (FxTrace.Trace != null))
         {
             FxTrace.Trace.TraceTransfer(activity.Id);
         }
         using (ServiceModelActivity.BoundOperation(activity))
         {
             ServiceModelActivity.Start(activity, System.ServiceModel.SR.GetString("ActivityReceiveBytes", new object[] { this.activity.Name }), ActivityType.ReceiveBytes);
             IConnection connection = this.listener.EndAccept(result);
             if (connection == null)
             {
                 return null;
             }
             TracingConnection connection2 = new TracingConnection(connection, activity);
             connection3 = connection2;
         }
     }
     return connection3;
 }
 public IConnection EndAccept(IAsyncResult result)
 {
     using (ServiceModelActivity.BoundOperation(this.activity))
     {
         ServiceModelActivity activity = ServiceModelActivity.CreateActivity();
         if (activity != null)
         {
             if (null != FxTrace.Trace)
             {
                 FxTrace.Trace.TraceTransfer(activity.Id);
             }
         }
         using (ServiceModelActivity.BoundOperation(activity))
         {
             ServiceModelActivity.Start(activity, SR.GetString(SR.ActivityReceiveBytes, this.activity.Name), ActivityType.ReceiveBytes);
             IConnection innerConnection = this.listener.EndAccept(result);
             if (innerConnection == null)
             {
                 return null;
             }
             TracingConnection retval = new TracingConnection(innerConnection, activity);
             return retval;
         }
     }
 }