From: Anirudh Agnihotry Date: Fri, 10 Jul 2020 06:45:40 +0000 (-0700) Subject: addressing some missing feedback Relating to Browser (#38968) X-Git-Tag: submit/tizen/20210909.063632~6820 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b62b16acf506f4e5c0d8b4ebaf18875ac9ad3477;p=platform%2Fupstream%2Fdotnet%2Fruntime.git addressing some missing feedback Relating to Browser (#38968) * addressing some missing feedback * Apply suggestions from code review Co-authored-by: Santiago Fernandez Madero * remove odbc32 from ref * fix stuff Co-authored-by: Santiago Fernandez Madero --- diff --git a/eng/targetframeworksuffix.props b/eng/targetframeworksuffix.props index 3c9b220..96cd8db 100644 --- a/eng/targetframeworksuffix.props +++ b/eng/targetframeworksuffix.props @@ -88,8 +88,4 @@ - - - false - diff --git a/src/libraries/Microsoft.Win32.Primitives/src/Microsoft.Win32.Primitives.csproj b/src/libraries/Microsoft.Win32.Primitives/src/Microsoft.Win32.Primitives.csproj index 15502d6..e266af6 100644 --- a/src/libraries/Microsoft.Win32.Primitives/src/Microsoft.Win32.Primitives.csproj +++ b/src/libraries/Microsoft.Win32.Primitives/src/Microsoft.Win32.Primitives.csproj @@ -1,7 +1,7 @@ true - $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent) + $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser enable @@ -14,16 +14,13 @@ Link="Common\Interop\Windows\Interop.FormatMessage.cs" /> - + - - - diff --git a/src/libraries/Microsoft.Win32.Primitives/src/System/ComponentModel/Win32Exception.Default.cs b/src/libraries/Microsoft.Win32.Primitives/src/System/ComponentModel/Win32Exception.Default.cs deleted file mode 100644 index 9fa1967..0000000 --- a/src/libraries/Microsoft.Win32.Primitives/src/System/ComponentModel/Win32Exception.Default.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. - -namespace System.ComponentModel -{ - public partial class Win32Exception - { - private static string GetErrorMessage(int error) => $"The process failed with error code {error}"; - } -} diff --git a/src/libraries/Microsoft.Win32.Primitives/tests/Microsoft.Win32.Primitives.Tests.csproj b/src/libraries/Microsoft.Win32.Primitives/tests/Microsoft.Win32.Primitives.Tests.csproj index 897f82d..fd58739 100644 --- a/src/libraries/Microsoft.Win32.Primitives/tests/Microsoft.Win32.Primitives.Tests.csproj +++ b/src/libraries/Microsoft.Win32.Primitives/tests/Microsoft.Win32.Primitives.Tests.csproj @@ -1,6 +1,6 @@ - $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent) + $(NetCoreAppCurrent)-Windows_NT;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser diff --git a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ClientConfigPaths.cs b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ClientConfigPaths.cs index 7906b68..abb9737 100644 --- a/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ClientConfigPaths.cs +++ b/src/libraries/System.Configuration.ConfigurationManager/src/System/Configuration/ClientConfigPaths.cs @@ -65,11 +65,18 @@ namespace System.Configuration } else { - // An EntryAssembly may not be found when running from a custom host. - // Try to find the native entry point. - using (Process currentProcess = Process.GetCurrentProcess()) + try { - ApplicationUri = currentProcess.MainModule?.FileName; + // An EntryAssembly may not be found when running from a custom host. + // Try to find the native entry point. + using (Process currentProcess = Process.GetCurrentProcess()) + { + ApplicationUri = currentProcess.MainModule?.FileName; + } + } + catch (PlatformNotSupportedException) + { + ApplicationUri = string.Empty; } } } diff --git a/src/libraries/System.Console/src/System.Console.csproj b/src/libraries/System.Console/src/System.Console.csproj index b64dcf1..1552dbf 100644 --- a/src/libraries/System.Console/src/System.Console.csproj +++ b/src/libraries/System.Console/src/System.Console.csproj @@ -149,7 +149,7 @@ Link="Common\System\Text\ValueStringBuilder.cs" /> - + diff --git a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.csproj b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.csproj index 248a81d..1aa56e7 100644 --- a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.csproj +++ b/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.csproj @@ -8,7 +8,6 @@ - diff --git a/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj b/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj index c2c4890..0592f1d 100644 --- a/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj +++ b/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj @@ -13,6 +13,9 @@ $(NoWarn);SA1121 SR.Odbc_PlatformNotSupported + + + diff --git a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.ODBC32.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/ODBC32.Common.cs similarity index 70% rename from src/libraries/System.Data.Odbc/ref/System.Data.Odbc.ODBC32.cs rename to src/libraries/System.Data.Odbc/src/System/Data/Odbc/ODBC32.Common.cs index 5218c92..3468157 100644 --- a/src/libraries/System.Data.Odbc/ref/System.Data.Odbc.ODBC32.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/ODBC32.Common.cs @@ -3,9 +3,12 @@ namespace System.Data.Odbc { + // Class needs to be public to support serialization with type forwarding from Desktop to Core. [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public static class ODBC32 + public static partial class ODBC32 { + // from .\public\sdk\inc\sqlext.h: and .\public\sdk\inc\sql.h + // must be public because it is serialized by OdbcException [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] public enum RETCODE : int { diff --git a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/Odbc32.cs b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/Odbc32.cs index df71cb1..1fed607 100644 --- a/src/libraries/System.Data.Odbc/src/System/Data/Odbc/Odbc32.cs +++ b/src/libraries/System.Data.Odbc/src/System/Data/Odbc/Odbc32.cs @@ -122,9 +122,7 @@ namespace System.Data.Odbc } } - // Class needs to be public to support serialization with type forwarding from Desktop to Core. - [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public static class ODBC32 + public static partial class ODBC32 { internal enum SQL_HANDLE : short { @@ -134,18 +132,6 @@ namespace System.Data.Odbc DESC = 4, } - // from .\public\sdk\inc\sqlext.h: and .\public\sdk\inc\sql.h - // must be public because it is serialized by OdbcException - [System.Runtime.CompilerServices.TypeForwardedFrom("System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")] - public enum RETCODE : int - { // must be int instead of short for Everett OdbcException Serializablity. - SUCCESS = 0, - SUCCESS_WITH_INFO = 1, - ERROR = -1, - INVALID_HANDLE = -2, - NO_DATA = 100, - } - // must be public because it is serialized by OdbcException internal enum RetCode : short { diff --git a/src/libraries/System.Net.Http/src/System.Net.Http.csproj b/src/libraries/System.Net.Http/src/System.Net.Http.csproj index 9a33b22..6c03ef3 100644 --- a/src/libraries/System.Net.Http/src/System.Net.Http.csproj +++ b/src/libraries/System.Net.Http/src/System.Net.Http.csproj @@ -11,7 +11,7 @@ $(DefineConstants);SYSNETHTTP_NO_OPENSSL - + $(DefineConstants);TARGETS_BROWSER @@ -127,7 +127,7 @@ Link="Common\System\Net\ArrayBuffer.cs"/> - + @@ -358,7 +358,7 @@ Link="Common\Interop\FreeBSD\Interop.Libraries.cs" /> - + @@ -387,7 +387,7 @@ - + @@ -554,7 +554,7 @@ - + - + - + diff --git a/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj b/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj index d80006f..6df2437f 100644 --- a/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj +++ b/src/libraries/System.Net.Mail/src/System.Net.Mail.csproj @@ -123,7 +123,7 @@ Link="Common\System\HexConverter.cs" /> - + - + diff --git a/src/libraries/System.Runtime.Caching/tests/AdditionalCacheTests/AdditionalCacheTests.cs b/src/libraries/System.Runtime.Caching/tests/AdditionalCacheTests/AdditionalCacheTests.cs index 3fb17d6..e488bb8 100644 --- a/src/libraries/System.Runtime.Caching/tests/AdditionalCacheTests/AdditionalCacheTests.cs +++ b/src/libraries/System.Runtime.Caching/tests/AdditionalCacheTests/AdditionalCacheTests.cs @@ -8,7 +8,6 @@ using System.Runtime.Caching; namespace System.Runtime.Caching.Tests { // These are the tests to fill in some of the coverage in ported Mono caching tests - [SkipOnMono("MemoryCache is not supported on Browser", TestPlatforms.Browser)] public class AdditionalCacheTests { [Fact] diff --git a/src/libraries/System.Runtime.Caching/tests/System.Runtime.Caching/MemoryCacheTest.cs b/src/libraries/System.Runtime.Caching/tests/System.Runtime.Caching/MemoryCacheTest.cs index f077a14..43a1c20 100644 --- a/src/libraries/System.Runtime.Caching/tests/System.Runtime.Caching/MemoryCacheTest.cs +++ b/src/libraries/System.Runtime.Caching/tests/System.Runtime.Caching/MemoryCacheTest.cs @@ -42,7 +42,6 @@ using MonoTests.Common; namespace MonoTests.System.Runtime.Caching { - [SkipOnMono("MemoryCache is not supported on Browser", TestPlatforms.Browser)] public class MemoryCacheTest { [Fact] diff --git a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj index 7b46386..1333394 100644 --- a/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj +++ b/src/libraries/System.Runtime.InteropServices.RuntimeInformation/src/System.Runtime.InteropServices.RuntimeInformation.csproj @@ -13,7 +13,7 @@ - + diff --git a/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj b/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj index 94e6b72..edad8a8 100644 --- a/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj +++ b/src/libraries/System.Security.Cryptography.Algorithms/src/System.Security.Cryptography.Algorithms.csproj @@ -418,7 +418,7 @@ - + - +