/// <summary> /// Initializes a new instance of <see cref="XmlRpcServiceDispatcher"/> class. /// </summary> /// <param name="serviceType"></param> public XmlRpcServiceDispatcher(Type serviceType) { this.serviceType = serviceType; xmlRpcSerializer = new XmlRpcSerializer(); xmlRpcServiceInfo = XmlRpcServiceInfo.CreateXmlRpcServiceInfo(serviceType); }
private static XmlDocument BuildXmlRpcServiceDefinition(XmlRpcServiceInfo xmlRpcServiceInfo) { using (MemoryStream memoryStream = new MemoryStream()) { using (XmlWriter xmlWriter = new XmlTextWriter(memoryStream, Encoding.UTF8)) { xmlWriter.WriteStartDocument(); xmlWriter.WriteStartElement("xmlrpc-service"); xmlWriter.WriteAttributeString("name", xmlRpcServiceInfo.Name); xmlWriter.WriteAttributeString("description", xmlRpcServiceInfo.Description); xmlWriter.WriteStartElement("methods"); foreach (XmlRpcServiceMethodInfo methodInfo in xmlRpcServiceInfo.Methods) { xmlWriter.WriteStartElement("method"); xmlWriter.WriteAttributeString("name", methodInfo.Name); xmlWriter.WriteAttributeString("description", methodInfo.Description); xmlWriter.WriteEndElement(); } // foreach xmlWriter.WriteEndElement(); xmlWriter.WriteEndElement(); xmlWriter.WriteEndDocument(); xmlWriter.Flush(); memoryStream.Position = 0; XmlDocument xmlRpcServiceDefinitionDocument = new XmlDocument(); xmlRpcServiceDefinitionDocument.Load(memoryStream); return(xmlRpcServiceDefinitionDocument); } // using } // using }
/// <summary> /// Initializes a new instance of <see cref="XmlRpcServiceIntrospector"/> class. /// </summary> /// <param name="serviceType"></param> public XmlRpcServiceIntrospector(Type serviceType) { xmlRpcServiceInfo = XmlRpcServiceInfo.CreateXmlRpcServiceInfo(serviceType); }
/// <summary> /// Initializes a new instance of <see cref="XmlRpcServiceProxy"/> class. /// </summary> /// <param name="xmlRpcServiceType"></param> internal XmlRpcServiceProxy(Type xmlRpcServiceType) { xmlRpcServiceInfo = XmlRpcServiceInfo.CreateXmlRpcServiceInfo(xmlRpcServiceType); }