Make RegexParseException and RegexParseError public, rename enum fields (#40902)
authorAbel Braaksma <abel.online@xs4all.nl>
Mon, 17 Aug 2020 22:25:22 +0000 (00:25 +0200)
committerGitHub <noreply@github.com>
Mon, 17 Aug 2020 22:25:22 +0000 (15:25 -0700)
commite26d0131b23519732f05ec39729bfc3bfe119be7
tree8f7e4675f5df8c40e8e6893fbef8aabbca9acdde
parent1fb34e7445f98aa2e27fb7c3a43777be2669137b
Make RegexParseException and RegexParseError public, rename enum fields (#40902)

* RegexParseException, RegexParseError public, rename enum fields

* Add Unknown field to RegexParseError

* Add definitions to ref file

* Satisfy NET48 tests

* Some nits to resolve review comments

* Add default message and Unknown message

* Added doc comments

* Fix nit in auto-layout change of csproj file

* Simplify message for RegexParseException ctor overload

* Remove PlatformDetection.IsNetFramework in RegexParserTests.cs

* Rename resource names to match the enum names

* Use partial class and methods to separate netfx and core

* Add offset tests

* Apply suggestions from code review

Nits

* Add remaining test offsets. Verify all offsets.

* Nit and TFM

* Update src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netcoreapp.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netfx.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Update src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netfx.cs

Co-authored-by: Stephen Toub <stoub@microsoft.com>
* Code review: properly test for deserialized type of exn

* Code review: fix doc comments

* Code review: fix doc comments

* Code review: offset gt zero

* Code review: add some tests, remove redundant whiteline

* Code review: add doc comment as suggested

* Code review: fix doc comments

* ref edits with tool

* Code review: some nits

* Remove using

* Rename unknown

* Incorrect edit in AssertExtensions

* Cherry-pick #d4090296

* Fix naming, ref file, resource strings

Co-authored-by: Dan Moseley <danmose@microsoft.com>
Co-authored-by: Prashanth Govindarajan <prgovi@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
src/libraries/Common/tests/TestUtilities/System/AssertExtensions.cs
src/libraries/System.Text.RegularExpressions/ref/System.Text.RegularExpressions.cs
src/libraries/System.Text.RegularExpressions/src/Resources/Strings.resx
src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexCharClass.cs
src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParseError.cs
src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParseException.cs
src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexParser.cs
src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.cs
src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netcoreapp.cs [new file with mode: 0644]
src/libraries/System.Text.RegularExpressions/tests/RegexParserTests.netfx.cs [new file with mode: 0644]
src/libraries/System.Text.RegularExpressions/tests/System.Text.RegularExpressions.Tests.csproj