예제 #1
0
 public Server (Root root, Uri url)
 {
     if (root == null) {
         throw new ArgumentNullException ("root");
     }
     
     this.root = root;
     
     if (url == null) {
         url = MakeUrl ();
     }
     
     var serializer = Helper.Get<XmlSerializer> (static_serializer);
     root.Initialize (serializer, url);
     // FIXME this is a test
     description_server = new DataServer (serializer.GetBytes (root), @"text/xml", url);
     ssdp_server = new SsdpServer (url.ToString ());
     ssdp_server.Announce ("upnp:rootdevice", root.RootDevice.Udn + "::upnp:rootdevice", false);
     AnnounceDevice (root.RootDevice);
 }
예제 #2
0
파일: Icon.cs 프로젝트: pacificIT/mono-upnp
 protected internal virtual void Initialize (Root root, string iconUrlFragment)
 {
     if (iconUrlFragment == null) {
         throw new ArgumentNullException ("iconUrlFragment");
     }
     
     Initialize (root);
     UrlFragment = iconUrlFragment;
     server = new DataServer (Data, MimeType, Url);
 }