diff options
author | Jan Kotas <jkotas@microsoft.com> | 2019-07-03 00:34:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-03 00:34:50 -0700 |
commit | 87f4eff9188456c26ffab6efbcc725110630a3dd (patch) | |
tree | d8cbc7613a4f28b23b72017958f3cb109e33f83e | |
parent | 19c6c5d05c666ed6a15f8149a5de6d75085bb1aa (diff) | |
download | coreclr-87f4eff9188456c26ffab6efbcc725110630a3dd.tar.gz coreclr-87f4eff9188456c26ffab6efbcc725110630a3dd.tar.bz2 coreclr-87f4eff9188456c26ffab6efbcc725110630a3dd.zip |
Delete some dead code (#25546)
4 files changed, 6 insertions, 47 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Globalization/JapaneseCalendar.Win32.cs b/src/System.Private.CoreLib/shared/System/Globalization/JapaneseCalendar.Win32.cs index f717adbfe3..cf70ce2fb6 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/JapaneseCalendar.Win32.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/JapaneseCalendar.Win32.cs @@ -196,15 +196,5 @@ namespace System.Globalization return new EraInfo(0, year, month, day, year - 1, 1, 0, names[0], names[1], names[3]); } - - // PAL Layer ends here - - private static readonly string[] s_japaneseErasEnglishNames = new string[] { "M", "T", "S", "H", "R" }; - - private static string GetJapaneseEnglishEraName(int era) - { - Debug.Assert(era > 0); - return era <= s_japaneseErasEnglishNames.Length ? s_japaneseErasEnglishNames[era - 1] : " "; - } } } diff --git a/src/System.Private.CoreLib/shared/System/IO/StreamReader.cs b/src/System.Private.CoreLib/shared/System/IO/StreamReader.cs index cbfc7290d9..e6196f4cee 100644 --- a/src/System.Private.CoreLib/shared/System/IO/StreamReader.cs +++ b/src/System.Private.CoreLib/shared/System/IO/StreamReader.cs @@ -230,7 +230,7 @@ namespace System.IO _disposed = true; // Dispose of our resources if this StreamReader is closable. - if (!LeaveOpen) + if (_closable) { try { @@ -260,11 +260,6 @@ namespace System.IO get { return _stream; } } - internal bool LeaveOpen - { - get { return !_closable; } - } - // DiscardBufferedData tells StreamReader to throw away its internal // buffer contents. This is useful if the user needs to seek on the // underlying stream to a known location then wants the StreamReader diff --git a/src/System.Private.CoreLib/shared/System/IO/StreamWriter.cs b/src/System.Private.CoreLib/shared/System/IO/StreamWriter.cs index 9d143ed178..3cd83b0ef9 100644 --- a/src/System.Private.CoreLib/shared/System/IO/StreamWriter.cs +++ b/src/System.Private.CoreLib/shared/System/IO/StreamWriter.cs @@ -200,7 +200,7 @@ namespace System.IO private void CloseStreamFromDispose(bool disposing) { // Dispose of our resources if this StreamWriter is closable. - if (!LeaveOpen && !_disposed) + if (_closable && !_disposed) { try { @@ -312,16 +312,6 @@ namespace System.IO get { return _stream; } } - internal bool LeaveOpen - { - get { return !_closable; } - } - - internal bool HaveWrittenPreamble - { - set { _haveWrittenPreamble = value; } - } - public override Encoding Encoding { get { return _encoding; } @@ -676,7 +666,7 @@ namespace System.IO charPos = 0; } - _this.CharPos_Prop = charPos; + _this._charPos = charPos; } public override Task WriteAsync(string? value) @@ -765,7 +755,7 @@ namespace System.IO charPos = 0; } - _this.CharPos_Prop = charPos; + _this._charPos = charPos; } public override Task WriteAsync(char[] buffer, int index, int count) @@ -874,7 +864,7 @@ namespace System.IO charPos = 0; } - _this.CharPos_Prop = charPos; + _this._charPos = charPos; } public override Task WriteLineAsync() @@ -1028,16 +1018,6 @@ namespace System.IO return task; } - private int CharPos_Prop - { - set { _charPos = value; } - } - - private bool HaveWrittenPreamble_Prop - { - set { _haveWrittenPreamble = value; } - } - private Task FlushAsyncInternal(bool flushStream, bool flushEncoder, char[] sCharBuffer, int sCharPos, CancellationToken cancellationToken = default) { @@ -1068,7 +1048,7 @@ namespace System.IO { if (!haveWrittenPreamble) { - _this.HaveWrittenPreamble_Prop = true; + _this._haveWrittenPreamble = true; byte[] preamble = encoding.GetPreamble(); if (preamble.Length > 0) { diff --git a/src/System.Private.CoreLib/shared/System/SByte.cs b/src/System.Private.CoreLib/shared/System/SByte.cs index 9b12439e73..ee0d8af75c 100644 --- a/src/System.Private.CoreLib/shared/System/SByte.cs +++ b/src/System.Private.CoreLib/shared/System/SByte.cs @@ -147,12 +147,6 @@ namespace System return Parse(s, style, NumberFormatInfo.GetInstance(provider)); } - private static sbyte Parse(string s, NumberStyles style, NumberFormatInfo info) - { - if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s); - return Parse((ReadOnlySpan<char>)s, style, info); - } - private static sbyte Parse(ReadOnlySpan<char> s, NumberStyles style, NumberFormatInfo info) { Number.ParsingStatus status = Number.TryParseInt32(s, style, info, out int i); |