@@ -140,12 +140,25 @@ private struct MatchContext
140140 private int myLastAsteriskItem ;
141141 private int myNextPositionForAsterisk ;
142142
143- private readonly StringComparison ComparisonType =>
144- this . myOptions . IgnoreCase
145- ? StringComparison . OrdinalIgnoreCase
146- : StringComparison . Ordinal ;
147- private readonly char [ ] PathSeparatorChars =>
148- this . myOptions . AllowWindowsPaths ? ourWinPathSeparators : ourUnixPathSeparators ;
143+ private readonly StringComparison ComparisonType
144+ {
145+ get
146+ {
147+ return this . myOptions . IgnoreCase
148+ ? StringComparison . OrdinalIgnoreCase
149+ : StringComparison . Ordinal ;
150+ }
151+ }
152+
153+ private readonly char [ ] PathSeparatorChars
154+ {
155+ get
156+ {
157+ return this . myOptions . AllowWindowsPaths
158+ ? ourWinPathSeparators
159+ : ourUnixPathSeparators ;
160+ }
161+ }
149162
150163 public MatchContext ( GlobMatcherOptions options , string str , PatternCase patternCase )
151164 {
@@ -634,11 +647,12 @@ private readonly bool CheckDot(int dotPos)
634647 }
635648 }
636649
637- private static bool IsPathSeparator ( GlobMatcherOptions options , char c ) =>
650+ private static bool IsPathSeparator ( GlobMatcherOptions options , char c )
651+ {
638652 // windows: need to use /, not \
639653 // On other platforms, \ is a valid (albeit bad) filename char.
640- c == '/'
641- || options . AllowWindowsPaths && c == ' \\ ' ;
654+ return c == '/' || options . AllowWindowsPaths && c == ' \\ ' ;
655+ }
642656
643657 private class PatternCase : List < IPatternElement >
644658 {
0 commit comments