public void Update(IResolvableService service, BonjourEventArgs args) { if (service != null && service.HostEntry != null) { string host = DetectedService.GetHostname(service); int port = (int)service.Port; this.Description = service.Name; this.IPAddress = host; this.Port = port; this.Platform = args.Platform; this.Available = true; this.resolved = true; } }
protected void OnServiceFound(IResolvableService service, BonjourEventArgs args) { if (!servicesFound.ContainsKey(service.Name)) { DetectedService ds = new DetectedService(service, args.Platform); servicesFound.Add(service.Name, ds); } if (this.ServiceFound != null) { this.ServiceFound(this, service, args); } }
public BonjourListItem(DetectedService ds, IForwardDestinationHandler ifdh) : base(ds.Service.Name, ds.Platform.GetIcon(), ifdh) { this.ds = ds; }