public UPnPConfigPackage(IIpConfig ip, IUPnPConfig upnp, IXMLWriter xw, List<string>servicepath) { IpConf = ip; UpnpConf = upnp; XmlWr = xw; ServiceConfPaths = servicepath; }
public XMLServicesConfig(List<string> paths, IXMLWriter writer) { foreach (string path in paths) { LoadConfig(path); writer.GenServiceDescription(deviceType, _functions); _functions.Clear(); } }
public UPnP(IUPnPConfigPackage config) { IpConf = config.IpConf; UpnpConf = config.UpnpConf; XmlWriter = config.XmlWr; XmlWriter.GenDeviceDescription(UpnpConf); XMLServicesConfig ServiceConf = new XMLServicesConfig(config.ServiceConfPaths); TCPServer = new TcpServer(IpConf.IP, IpConf.TCPPort); UDPServer = new UDPHandler(IpConf, UpnpConf); UDPServer.Start(); SubscribeToUpnpEvents(); }
private void InitializeWriter(Type type) { if (typeof(Book) == type) { writer = new BookXMLWriter(); return; } if (typeof(Newspaper) == type) { writer = new NewspaperXMLWriter(); return; } if (typeof(Patent) == type) { writer = new PatentXMLWriter(); return; } writer = null; }
public CartRepository(IXMLReader xMLReader, IXMLWriter xMLWriter) { _xMLReader = xMLReader; _xMLWriter = xMLWriter; }