Esempio n. 1
0
        private void BuildAdvertisementForService(UpnpService service)
        {
            var ad = CreateAdvertisement(service.Type.ToString(), string.Format("{0}::{1}", service.Device.UDN, service.Type));

            EventHandler <EventArgs <UpnpService> > onRemoved = null;

            onRemoved = (sender, args) =>
            {
                ad.Shutdown();

                this.Announcers.Remove(ad);

                service.Removed -= onRemoved;
            };

            service.Removed += onRemoved;
        }
Esempio n. 2
0
 protected virtual UpnpService FindMatchFor(UpnpService service, IEnumerable <UpnpService> services)
 {
     return(services.FirstOrDefault(child => service.Id == child.Id));
 }
Esempio n. 3
0
 protected virtual void CompareService(UpnpService to, UpnpService from)
 {
 }
Esempio n. 4
0
 protected virtual void ServiceRemoved(UpnpDevice device, UpnpService service)
 {
 }