Beispiel #1
0
 public MediaServer (string udn, string friendlyName, string manufacturer, string modelName, RootDeviceOptions options, ConnectionManager connectionManager, LocalContentDirectory contentDirectory)
 {
     if (connectionManager == null) throw new ArgumentNullException ("connnectionManager");
     if (contentDirectory == null) throw new ArgumentNullException ("contentDirectory");
     
     if (options == null) {
         options = new RootDeviceOptions ();
     }
     
     this.content_directory = contentDirectory;
     
     var connectionManagerService = new Service<ConnectionManager> (ConnectionManager.ServiceType, "urn:upnp-org:serviceId:ConnectionManager", connectionManager);
     var contentDirectoryService = new Service<LocalContentDirectory> (ContentDirectory.ServiceType, "urn:upnp-org:serviceId:ContentDirectory", contentDirectory);
     options.Services = Combine (new Service[] { connectionManagerService, contentDirectoryService }, options.Services);
     server = new Server (new Root (DeviceType, udn, friendlyName, manufacturer, modelName, options));
 }
Beispiel #2
0
 public MediaServer (string udn, string friendlyName, string manufacturer, string modelName, ConnectionManager connectionManager, LocalContentDirectory contentDirectory)
     : this (udn, friendlyName, manufacturer, modelName, null, connectionManager, contentDirectory)
 {
 }