From: Stephen Toub Date: Thu, 19 Sep 2019 02:42:17 +0000 (-0400) Subject: Fix trimming of System.Net.NetworkInformation (dotnet/corefx#41191) X-Git-Tag: submit/tizen/20210909.063632~11031^2~436 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ab15491a6277aba82f0c74874fbdaf447a5222f4;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix trimming of System.Net.NetworkInformation (dotnet/corefx#41191) Commit migrated from https://github.com/dotnet/corefx/commit/2f1d199cf19572dc319be344ea0905edbf318ea3 --- diff --git a/src/libraries/System.Net.NetworkInformation/src/ILLinkTrim.xml b/src/libraries/System.Net.NetworkInformation/src/ILLinkTrim.xml deleted file mode 100644 index 8d52a51..0000000 --- a/src/libraries/System.Net.NetworkInformation/src/ILLinkTrim.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs b/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs index fb95d4b..63b65f3 100644 --- a/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs +++ b/src/libraries/System.Net.NetworkInformation/tests/FunctionalTests/LoggingTest.cs @@ -12,13 +12,14 @@ namespace System.Net.NetworkInformation.Tests [Fact] public void EventSource_ExistsWithCorrectId() { - Type esType = typeof(NetworkChange).Assembly.GetType("System.Net.NetEventSource", throwOnError: true, ignoreCase: false); - Assert.NotNull(esType); + Type esType = typeof(NetworkChange).Assembly.GetType("System.Net.NetEventSource", throwOnError: false, ignoreCase: false); + if (esType != null) + { + Assert.Equal("Microsoft-System-Net-NetworkInformation", EventSource.GetName(esType)); + Assert.Equal(Guid.Parse("b8e42167-0eb2-5e39-97b5-acaca593d3a2"), EventSource.GetGuid(esType)); - Assert.Equal("Microsoft-System-Net-NetworkInformation", EventSource.GetName(esType)); - Assert.Equal(Guid.Parse("b8e42167-0eb2-5e39-97b5-acaca593d3a2"), EventSource.GetGuid(esType)); - - Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location)); + Assert.NotEmpty(EventSource.GenerateManifest(esType, esType.Assembly.Location)); + } } } }