From 039c84bd25cb25a474fe20ea448757fa6c630455 Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Tue, 28 Jun 2016 20:03:28 +0200 Subject: [PATCH] change dotnet core dependencies from rc2 to 1.0.0 --- samples/ServiceFinder/project.json | 4 ++-- src/Tmds.MDns/ServiceBrowser.cs | 24 +++--------------------- src/Tmds.MDns/project.json | 18 +++++++++--------- 3 files changed, 14 insertions(+), 32 deletions(-) diff --git a/samples/ServiceFinder/project.json b/samples/ServiceFinder/project.json index 2dab641..5f0f7ab 100755 --- a/samples/ServiceFinder/project.json +++ b/samples/ServiceFinder/project.json @@ -4,10 +4,10 @@ "emitEntryPoint": true }, "dependencies": { - "Tmds.MDns": "0.4.0", + "Tmds.MDns": "0.5.0", "Microsoft.NETCore.App": { "type": "platform", - "version": "1.0.0-rc2-3002702" + "version": "1.0.0" } }, "frameworks": { diff --git a/src/Tmds.MDns/ServiceBrowser.cs b/src/Tmds.MDns/ServiceBrowser.cs index 988de60..b6df0db 100644 --- a/src/Tmds.MDns/ServiceBrowser.cs +++ b/src/Tmds.MDns/ServiceBrowser.cs @@ -110,7 +110,7 @@ internal void OnServiceAdded(ServiceInfo service) }; lock (_serviceAnnouncements) { - _serviceAnnouncements.Add(Tuple.Create(GetId(service.NetworkInterface), service.Name), announcement); + _serviceAnnouncements.Add(Tuple.Create(service.NetworkInterface.Id, service.Name), announcement); } SynchronizationContextPost(o => { @@ -127,7 +127,7 @@ internal void OnServiceAdded(ServiceInfo service) internal void OnServiceRemoved(ServiceInfo service) { - var key = Tuple.Create(GetId(service.NetworkInterface), service.Name); + var key = Tuple.Create(service.NetworkInterface.Id, service.Name); ServiceAnnouncement announcement; lock (_serviceAnnouncements) { @@ -175,7 +175,7 @@ internal void OnServiceChanged(ServiceInfo service) ServiceAnnouncement announcement; lock (_serviceAnnouncements) { - announcement = _serviceAnnouncements[Tuple.Create(GetId(service.NetworkInterface), service.Name)]; + announcement = _serviceAnnouncements[Tuple.Create(service.NetworkInterface.Id, service.Name)]; } var tmpAnnouncement = new ServiceAnnouncement() { @@ -287,24 +287,6 @@ private void SynchronizationContextPost(SendOrPostCallback cb) cb(null); } } - - // https://github.com/dotnet/corefx/issues/8297 - private static bool _idSupported = true; - private string GetId(NetworkInterface interf) - { - if (_idSupported) - { - try - { - return interf.Id; - } - catch (PlatformNotSupportedException) - { - _idSupported = false; - } - } - return interf.Name; - } private readonly HashSet _services = new HashSet(); private readonly Dictionary, ServiceAnnouncement> _serviceAnnouncements = new Dictionary, ServiceAnnouncement>(); diff --git a/src/Tmds.MDns/project.json b/src/Tmds.MDns/project.json index 37ad565..05d0382 100644 --- a/src/Tmds.MDns/project.json +++ b/src/Tmds.MDns/project.json @@ -1,5 +1,5 @@ { - "version": "0.4.0", + "version": "0.5.0", "packOptions": { "tags": [ "mdns", "avahi", "zeroconf", "rfc6762", "rfc6763" ], "repository": { @@ -15,14 +15,14 @@ "frameworks": { "netstandard1.5": { "dependencies": { - "System.Net.NetworkInformation": "4.1.0-rc2-24027", - "System.Net.Sockets" : "4.1.0-rc2-24027", - "System.Linq": "4.1.0-rc2-24027", - "System.Threading": "4.0.11-rc2-24027", - "System.Threading.Timer": "4.0.1-rc2-24027", - "System.Text.Encoding": "4.0.11-rc2-24027", - "System.Runtime.Extensions": "4.1.0-rc2-24027", - "System.Diagnostics.Debug": "4.0.11-rc2-24027" + "System.Net.NetworkInformation": "4.1.0", + "System.Net.Sockets" : "4.1.0", + "System.Linq": "4.1.0", + "System.Threading": "4.0.11", + "System.Threading.Timer": "4.0.1", + "System.Text.Encoding": "4.0.11", + "System.Runtime.Extensions": "4.1.0", + "System.Diagnostics.Debug": "4.0.11" } }, "net45": { },