Ejemplo n.º 1
0
        /// <summary>
        /// Dispose
        /// </summary>
        public void Dispose(bool disposing)
        {
            if (!_disposed)
              {
            if (disposing)
            {
              lock (_locker)
              {
            if (null != _channel)
            {
              ((IClientChannel)_channel).Abort();
              _channel = null;
            }

            if (null != _factory)
            {
              _factory.Abort();
              _factory = null;
            }

            _endpoint = null;
            _binding = null;
              }

              _disposed = true;
            }
              }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Dispose
        /// </summary>
        public void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (disposing)
                {
                    lock (_locker)
                    {
                        if (null != _channel)
                        {
                            ((IClientChannel)_channel).Abort();
                            _channel = null;
                        }

                        if (null != _factory)
                        {
                            _factory.Abort();
                            _factory = null;
                        }

                        _endpoint = null;
                        _binding  = null;
                    }

                    _disposed = true;
                }
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Public creator
 /// </summary>
 public bool Create()
 {
     bool rc = false;
       try
       {
     _binding = new NetNamedPipeBinding();
     _endpoint = new EndpointAddress("net.pipe://localhost/mcneel/sockeyeserver/1/server/pipe");
     _factory = new ChannelFactory<ISockeyeService>(_binding, _endpoint);
     _channel = _factory.CreateChannel();
     rc = true;
       }
       catch (Exception ex)
       {
     ThrowCreationException(ex);
     Dispose();
       }
       return rc;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Public creator
        /// </summary>
        public bool Create()
        {
            bool rc = false;

            try
            {
                _binding  = new NetNamedPipeBinding();
                _endpoint = new EndpointAddress("net.pipe://localhost/mcneel/sockeyeserver/1/server/pipe");
                _factory  = new ChannelFactory <ISockeyeService>(_binding, _endpoint);
                _channel  = _factory.CreateChannel();
                rc        = true;
            }
            catch (Exception ex)
            {
                ThrowCreationException(ex);
                Dispose();
            }
            return(rc);
        }