Пример #1
0
 protected void OnDeviceDiscovered(SSDPDiscoveredDeviceEventArgs e)
 {
     if (DeviceDiscovered != null)
     {
         DeviceDiscovered(this, e);
     }
 }
Пример #2
0
        private void SsdpDiscovery_DeviceDiscovered(object sender, SSDPDiscoveredDeviceEventArgs e)
        {
            var response = e.Response;
            var uri = new Uri(response.Url);

            var report = new ChromecastV1DeviceDiscoveryReportItem()
            {
                Endpoint = response.EndPoint,
                Interface = response.Interface,
                Name = response.Name,
                Id = response.Hash,
                BaseUri = new Uri(String.Format("{0}://{1}", uri.Scheme, uri.Authority)),
                DeviceType = response.DeviceType
            };
            if (response.Information != null)
            {
                report.Manufacturer = response.Information.Manufacturer;
                report.Model = response.Information.Model;
            }

            OnDeviceDiscovered(new DeviceDiscoveryEventArgs(report));
        }
Пример #3
0
        private void SsdpDiscovery_DeviceDiscovered(object sender, SSDPDiscoveredDeviceEventArgs e)
        {
            var response = e.Response;
            var uri      = new Uri(response.Url);

            var report = new ChromecastV1DeviceDiscoveryReportItem()
            {
                EndPoint   = response.EndPoint,
                Interface  = response.Interface,
                Name       = response.Name,
                Id         = response.Hash,
                BaseUri    = new Uri(String.Format("{0}://{1}", uri.Scheme, uri.Authority)),
                DeviceType = response.DeviceType
            };

            if (response.Information != null)
            {
                report.Manufacturer = response.Information.Manufacturer;
                report.Model        = response.Information.Model;
            }

            OnDeviceDiscovered(new DeviceDiscoveryEventArgs(report));
        }
Пример #4
0
 private void OnDeviceDiscovered(object sender, SSDPDiscoveredDeviceEventArgs args)
 {
 }
Пример #5
0
 protected void OnDeviceDiscovered(SSDPDiscoveredDeviceEventArgs e)
 {
     if (DeviceDiscovered != null)
         DeviceDiscovered(this, e);
 }