Exemplo 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;
        }
Exemplo n.º 2
0
 protected virtual UpnpService FindMatchFor(UpnpService service, IEnumerable <UpnpService> services)
 {
     return(services.FirstOrDefault(child => service.Id == child.Id));
 }
Exemplo n.º 3
0
 protected virtual void CompareService(UpnpService to, UpnpService from)
 {
 }
Exemplo n.º 4
0
 protected virtual void ServiceRemoved(UpnpDevice device, UpnpService service)
 {
 }