コード例 #1
0
 private void WriteExceptionResponse(PipeConnection pipe, string exceptionMessage)
 {
     try
     {
         MemoryStream stream = new MemoryStream(System.Text.Encoding.ASCII.GetBytes(exceptionMessage));
         pipe.BeginWriteMessage();
         pipe.Write(stream);
         pipe.EndWriteMessage();
     }
     catch { }
 }
コード例 #2
0
        private void WriteClientResponse(PipeConnection pipe,
                                         ITransportHeaders headers,
                                         Stream responseStream)
        {
            String uri;
            Object oUri = headers[CommonTransportKeys.RequestUri];

            if (oUri != null)
            {
                uri = oUri.ToString();
            }
            else
            {
                uri = "";
            }

            pipe.BeginWriteMessage();
            pipe.WriteHeaders(
                uri,
                headers);

            pipe.Write(responseStream);
            pipe.EndWriteMessage();
        }
コード例 #3
0
 private void WriteExceptionResponse(PipeConnection pipe, string exceptionMessage)
 {
     try
     {
         MemoryStream stream = new MemoryStream(System.Text.Encoding.ASCII.GetBytes(exceptionMessage));
         pipe.BeginWriteMessage();
         pipe.Write(stream);
         pipe.EndWriteMessage();
     }
     catch { }
 }
コード例 #4
0
        private void WriteClientResponse(PipeConnection pipe,
                                         ITransportHeaders headers,
                                         Stream responseStream)
        {
            String uri;
            Object oUri = headers[CommonTransportKeys.RequestUri];
            if (oUri != null)
            {
                uri = oUri.ToString();
            }
            else
            {
                uri = "";
            }

            pipe.BeginWriteMessage();
            pipe.WriteHeaders(
                                uri,
                                headers);

            pipe.Write(responseStream);
            pipe.EndWriteMessage();
        }