Esempio n. 1
0
      /// <summary>
      /// Create a capture client with the specific binding and url
      /// </summary>
      /// <param name="binding">The binding for this client</param>
      /// <param name="url">The url of the server</param>
      public CaptureClient(System.ServiceModel.Channels.Binding binding, string url)
      {
         _captureFactory = new DuplexChannelFactory<IDuplexCapture>(
              typeof(DuplexCaptureCallback),
              binding);

         _capture = _captureFactory.CreateChannel(
             new InstanceContext(this),
             new EndpointAddress(url));

         onFrameReceived +=
            delegate
            {
               if (!_disposed)
                  ThreadPool.QueueUserWorkItem(CaptureImage, _capture);
            }; //signal that data has been received

         ThreadPool.QueueUserWorkItem(CaptureImage, _capture);
      }
Esempio n. 2
0
        /// <summary>
        /// Create a capture client with the specific binding and url
        /// </summary>
        /// <param name="binding">The binding for this client</param>
        /// <param name="url">The url of the server</param>
        public CaptureClient(System.ServiceModel.Channels.Binding binding, string url)
        {
            _captureFactory = new DuplexChannelFactory <IDuplexCapture>(
                typeof(DuplexCaptureCallback),
                binding);

            _capture = _captureFactory.CreateChannel(
                new InstanceContext(this),
                new EndpointAddress(url));

            onFrameReceived +=
                delegate
            {
                if (!_disposed)
                {
                    ThreadPool.QueueUserWorkItem(CaptureImage, _capture);
                }
            }; //signal that data has been received

            ThreadPool.QueueUserWorkItem(CaptureImage, _capture);
        }