source: xmlrpcnet/trunk/fuentes/src/XmlRpcListenerResponse.cs @ 379

Last change on this file since 379 was 379, checked in by hectorgh, 5 years ago

adding project files

File size: 2.4 KB
Line 
1/*
2XML-RPC.NET library
3Copyright (c) 2001-2007, Charles Cook <charlescook@cookcomputing.com>
4
5Permission is hereby granted, free of charge, to any person
6obtaining a copy of this software and associated documentation
7files (the "Software"), to deal in the Software without restriction,
8including without limitation the rights to use, copy, modify, merge,
9publish, distribute, sublicense, and/or sell copies of the Software,
10and to permit persons to whom the Software is furnished to do so,
11subject to the following conditions:
12
13The above copyright notice and this permission notice shall be
14included in all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23DEALINGS IN THE SOFTWARE.
24*/
25
26#if !FX1_0
27
28namespace CookComputing.XmlRpc
29{
30  using System;
31  using System.IO;
32  using System.Net;
33
34  public class XmlRpcListenerResponse : CookComputing.XmlRpc.IHttpResponse
35  {
36    public XmlRpcListenerResponse(HttpListenerResponse response)
37    {
38      this.response = response;
39      response.SendChunked = false;
40    }
41
42    Int64 IHttpResponse.ContentLength
43    {
44      set { response.ContentLength64 = value; }
45    }
46
47    string IHttpResponse.ContentType
48    {
49      get { return response.ContentType; }
50      set { response.ContentType = value; }
51    }
52
53    TextWriter IHttpResponse.Output
54    {
55      get { return new StreamWriter(response.OutputStream); }
56    }
57
58    Stream IHttpResponse.OutputStream
59    {
60      get { return response.OutputStream; }
61    }
62
63    bool IHttpResponse.SendChunked
64    {
65      get { return response.SendChunked; }
66      set { response.SendChunked = value; }
67    }
68
69    int IHttpResponse.StatusCode
70    {
71      get { return response.StatusCode; }
72      set { response.StatusCode = value; }
73    }
74
75    string IHttpResponse.StatusDescription
76    {
77      get { return response.StatusDescription; }
78      set { response.StatusDescription = value; }
79    }
80
81    private HttpListenerResponse response;
82  }
83}
84
85#endif
Note: See TracBrowser for help on using the repository browser.