Exemplo n.º 1
0
        public void SubmitAndWait()
        {
            MessageFlagRequest mfr = new MessageFlagRequest(_msg, delegate
            {
                if (_msg.HeaderLoaded)
                {
                    GetMessageStructure();
                }
                else
                {
                    MessageHeaderRequest mhr = new MessageHeaderRequest(_msg, delegate
                    {
                        GetMessageStructure();
                    });
                    _client.RequestManager.SubmitAndWait(mhr, true);
                }
            });
            bool msgComplete = false;

            // IMessage msg, TimeSpan totalTime
            MessageComplete += delegate(IMessage msg, TimeSpan totalTime) { msgComplete = true; };
            _client.RequestManager.SubmitAndWait(mfr, false);

            while (!msgComplete)
            {
                System.Threading.Thread.Sleep(10);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Begin retrieving the message
        /// </summary>
        public void Start()
        {
            MessageFlagRequest mfr = new MessageFlagRequest(_msg, delegate
            {
                if (_msg.HeaderLoaded)
                {
                    GetMessageStructure();
                }
                else
                {
                    MessageHeaderRequest mhr = new MessageHeaderRequest(_msg, delegate
                    {
                        GetMessageStructure();
                    });
                    _client.RequestManager.SubmitRequest(mhr, true);
                }
            });

            _client.RequestManager.SubmitRequest(mfr, false);
        }
 /// <summary>
 /// Begin retreiving the message
 /// </summary>
 public void Start()
 {
     MessageFlagRequest mfr = new MessageFlagRequest(_msg, delegate
                                                               {
                                                                   MessageHeaderRequest mhr = new MessageHeaderRequest(_msg, delegate
                                                                   {
                                                                       GetMessageStructure();
                                                                   });
                                                                   _client.RequestManager.SubmitRequest(mhr, true);
                                                               });
     _client.RequestManager.SubmitRequest(mfr, false);
 }
Exemplo n.º 4
0
        public void SubmitAndWait()
        {
            MessageFlagRequest mfr = new MessageFlagRequest(_msg, delegate
            {
                if (_msg.HeaderLoaded)
                {
                    GetMessageStructure();
                }
                else
                {
                    MessageHeaderRequest mhr = new MessageHeaderRequest(_msg, delegate
                    {
                        GetMessageStructure();
                    });
                    _client.RequestManager.SubmitAndWait(mhr, true);
                }
            });
            bool msgComplete = false;
            // IMessage msg, TimeSpan totalTime
            MessageComplete += delegate(IMessage msg, TimeSpan totalTime) { msgComplete = true; };
            _client.RequestManager.SubmitAndWait(mfr, false);

            while (!msgComplete) { System.Threading.Thread.Sleep(10); }
        }