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

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

adding project files

File size: 2.3 KB
Line 
1/*
2XML-RPC.NET library
3Copyright (c) 2001-2006, 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
26using System;
27using System.Collections;
28using System.Runtime.Remoting.Channels;
29
30namespace CookComputing.XmlRpc
31{
32  public class XmlRpcClientFormatterSinkProvider : IClientFormatterSinkProvider
33  {
34    // constructors
35    //
36    public XmlRpcClientFormatterSinkProvider(
37      IDictionary properties, 
38      ICollection providerData) 
39    {
40      // this constructor required when registering via a config file
41    }
42
43    public XmlRpcClientFormatterSinkProvider()
44    {
45      // this constructor used when registering provider programmatically
46    }
47
48    // public methods
49    //
50    public IClientChannelSink CreateSink(
51      IChannelSender channel,
52      string url,
53      object remoteChannelData)
54    {
55      IClientChannelSink ccs = null;
56      if (m_next != null) 
57      {
58        ccs = m_next.CreateSink(channel, url, remoteChannelData);
59        if (ccs == null)
60          return null;
61      }
62      return new XmlRpcClientFormatterSink(ccs);
63    }
64
65    public IClientChannelSinkProvider Next
66    {
67      get { return m_next; }
68      set { m_next = value; }
69    } 
70
71    // data
72    //
73    IClientChannelSinkProvider m_next; 
74  }
75}
76
Note: See TracBrowser for help on using the repository browser.