diff --git a/src/WireMock.Net/RegularExpressions/RegexExtended.cs b/src/WireMock.Net/RegularExpressions/RegexExtended.cs index 887a4a7c..505d9bbb 100644 --- a/src/WireMock.Net/RegularExpressions/RegexExtended.cs +++ b/src/WireMock.Net/RegularExpressions/RegexExtended.cs @@ -8,7 +8,10 @@ namespace WireMock.RegularExpressions /// /// Extension to the object, adding support for GUID tokens for matching on. /// - public class RegexExtended : Regex +#if !NETSTANDARD1_3 + [Serializable] +#endif + internal class RegexExtended : Regex { /// public RegexExtended(string pattern) : this(pattern, RegexOptions.None) @@ -16,17 +19,24 @@ namespace WireMock.RegularExpressions } /// - public RegexExtended(string pattern, RegexOptions options) - : this(pattern, options, Regex.InfiniteMatchTimeout) + public RegexExtended(string pattern, RegexOptions options) : + this(pattern, options, Regex.InfiniteMatchTimeout) { } /// - public RegexExtended(string pattern, RegexOptions options, TimeSpan matchTimeout) - : base(ReplaceGuidPattern(pattern), options, matchTimeout) + public RegexExtended(string pattern, RegexOptions options, TimeSpan matchTimeout) : + base(ReplaceGuidPattern(pattern), options, matchTimeout) { } +#if !NETSTANDARD1_3 + /// + protected RegexExtended(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : + base(info, context) + { + } +#endif // Dictionary of various Guid tokens with a corresponding regular expression pattern to use instead. private static readonly Dictionary GuidTokenPatterns = new Dictionary {