Наследование: CookComputing.XmlRpc.XmlRpcLogger
Пример #1
0
        /**
         * Creates an XmlRpcManager instance with the specified ip, port.
         * Logs Request and Response messages in XML if logReqresp is set to true
         */
        public static IXmlRpcManager GetXmlRpcManager(string ip, int port,
                                                      string relativeUri, bool logReqresp)
        {
            IXmlRpcManager proxy = XmlRpcProxyGen.Create <IXmlRpcManager>();

            proxy.Url = string.Format("http://{0}:{1}/{2}", ip, port, relativeUri);
            if (logReqresp)
            {
                XmlRpcManagerClientLogger logger = new XmlRpcManagerClientLogger();
                logger.Attach(proxy);
            }
            return(proxy);
        }
Пример #2
0
 /**
  * Creates an XmlRpcManager instance with the specified ip, port.
  * Logs Request and Response messages in XML if logReqresp is set to true
  */
 public static IXmlRpcManager GetXmlRpcManager(string ip, int port, 
   string relativeUri, bool logReqresp) {
   IXmlRpcManager proxy = XmlRpcProxyGen.Create<IXmlRpcManager>();
   proxy.Url = string.Format("http://{0}:{1}/{2}", ip, port, relativeUri);
   if (logReqresp) {
     XmlRpcManagerClientLogger logger = new XmlRpcManagerClientLogger();
     logger.Attach(proxy);
   }
   return proxy;
 }