Beispiel #1
0
        /// <summary>
        /// Sends a one-way DPWS request to the remote endpoint.
        /// </summary>
        /// <param name="request">One-way request message</param>
        public void RequestOneWay(WsMessage request)
        {
            // Clone binding context so that properties added by the send/receive
            // do not persist beyond this request
            BindingContext ctx = m_context.Clone();

            SendMessage(request, ctx);
        }
Beispiel #2
0
        /// <summary>
        /// Extracts the request from the channel
        /// </summary>
        /// <returns>The Context of the request.</returns>
        public RequestContext ReceiveRequest()
        {
            // Clone binding context so that properties added by the send/receive
            // do not persist beyond this request
            BindingContext ctx = m_context.Clone();

            WsMessage msg = ReceiveMessage(ctx);

            if (msg != null)
            {
                return(new RequestContext(msg, this, ctx));
            }

            return(null);
        }