diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-12-11 15:39:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-11 15:39:38 +0300 |
commit | 8ae9708e8789e69f988b3a488116c960201bc787 (patch) | |
tree | 9b50d5963ed8dcd9688bbe694be9d1c84052a714 /mcs | |
parent | 97dd6cf04c2dd62b7cdce2a96c8824b5f3e7280a (diff) |
[corlib] Rename internal LogLevel enum to avoid conflict with Android LogLevel (#18124)
After https://github.com/mono/mono/pull/18040 we now have InternalsVisibleTo for the Mono.Android assembly.
This exposed the internal LogLevel enum in BCLDebug which causes an issue when consumed in XA:
```
Java.Lang/Object.cs(119,18): error CS0104: 'LogLevel' is an ambiguous reference between 'Android.Runtime.LogLevel' and 'System.LogLevel'
```
To fix this we rename the internal enum in corlib since it's not really used.
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/ReferenceSources/BCLDebug.cs | 4 | ||||
-rw-r--r-- | mcs/class/referencesource/mscorlib/system/resources/resourcereader.cs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/mcs/class/corlib/ReferenceSources/BCLDebug.cs b/mcs/class/corlib/ReferenceSources/BCLDebug.cs index 62c8ea6d21b..73444ac0827 100644 --- a/mcs/class/corlib/ReferenceSources/BCLDebug.cs +++ b/mcs/class/corlib/ReferenceSources/BCLDebug.cs @@ -2,7 +2,7 @@ using System.Diagnostics; namespace System { - internal enum LogLevel { + internal enum BCLDebugLogLevel { Trace = 0, Status = 20, Warning= 40, @@ -33,7 +33,7 @@ namespace System } [Conditional("_DEBUG")] - public static void Log (string switchName, LogLevel level, params object[] messages) + public static void Log (string switchName, BCLDebugLogLevel level, params object[] messages) { } diff --git a/mcs/class/referencesource/mscorlib/system/resources/resourcereader.cs b/mcs/class/referencesource/mscorlib/system/resources/resourcereader.cs index 50846cdb023..7bdcbb0739a 100644 --- a/mcs/class/referencesource/mscorlib/system/resources/resourcereader.cs +++ b/mcs/class/referencesource/mscorlib/system/resources/resourcereader.cs @@ -358,7 +358,7 @@ namespace System.Resources { _store.BaseStream.Seek(_nameSectionOffset + GetNamePosition(index), SeekOrigin.Begin); lastReadString = _store.ReadString(); } - BCLDebug.Log("RESMGRFILEFORMAT", LogLevel.Status, "FindPosForResource for ", name, " failed. i: ", index, " lo: ", lo, " hi: ", hi, " last read string: \"", lastReadString, '\''); + BCLDebug.Log("RESMGRFILEFORMAT", BCLDebugLogLevel.Status, "FindPosForResource for ", name, " failed. i: ", index, " lo: ", lo, " hi: ", hi, " last read string: \"", lastReadString, '\''); #endif return -1; } @@ -909,7 +909,7 @@ namespace System.Resources { throw new BadImageFormatException(Environment.GetResourceString("BadImageFormat_ResourcesHeaderCorrupted")); } if (resMgrHeaderVersion > 1) { - BCLDebug.Log("RESMGRFILEFORMAT", LogLevel.Status, "ReadResources: Unexpected ResMgr header version: {0} Skipping ahead {1} bytes.", resMgrHeaderVersion, numBytesToSkip); + BCLDebug.Log("RESMGRFILEFORMAT", BCLDebugLogLevel.Status, "ReadResources: Unexpected ResMgr header version: {0} Skipping ahead {1} bytes.", resMgrHeaderVersion, numBytesToSkip); _store.BaseStream.Seek(numBytesToSkip, SeekOrigin.Current); } else { |