diff --git a/src/Rules.Framework/Evaluation/Compiled/RuleConditionsExpressionBuilder.cs b/src/Rules.Framework/Evaluation/Compiled/RuleConditionsExpressionBuilder.cs index e753a9fa..8544e02f 100644 --- a/src/Rules.Framework/Evaluation/Compiled/RuleConditionsExpressionBuilder.cs +++ b/src/Rules.Framework/Evaluation/Compiled/RuleConditionsExpressionBuilder.cs @@ -167,7 +167,11 @@ private void BuildFetchAndSwitchOverMultiplicity( foreach (var multiplicity in operatorMetadata.SupportedMultiplicities) { +#if NETSTANDARD2_0 + string multiplicityTransformed = Regex.Replace(multiplicity, "\\b\\p{Ll}", match => match.Value.ToUpperInvariant(), RegexOptions.None, TimeSpan.FromSeconds(1)).Replace("-", string.Empty); +#else string multiplicityTransformed = Regex.Replace(multiplicity, "\\b\\p{Ll}", match => match.Value.ToUpperInvariant(), RegexOptions.None, TimeSpan.FromSeconds(1)).Replace("-", string.Empty, StringComparison.Ordinal); +#endif var scopeName = new StringBuilder(builder.ScopeName) .Append(valueConditionNode.ConditionType) .Append(multiplicityTransformed) diff --git a/src/Rules.Framework/Evaluation/OperatorMetadata.cs b/src/Rules.Framework/Evaluation/OperatorMetadata.cs index a035f00e..b9614e70 100644 --- a/src/Rules.Framework/Evaluation/OperatorMetadata.cs +++ b/src/Rules.Framework/Evaluation/OperatorMetadata.cs @@ -15,7 +15,11 @@ public bool HasSupportForOneMultiplicityAtLeft { if (this.leftSupportForOneMultiplicity is null) { +#if NETSTANDARD2_0 + this.leftSupportForOneMultiplicity = this.SupportedMultiplicities?.Any(m => m.Contains("one-to")) ?? false; +#else this.leftSupportForOneMultiplicity = this.SupportedMultiplicities?.Any(m => m.Contains("one-to", StringComparison.Ordinal)) ?? false; +#endif } return this.leftSupportForOneMultiplicity.GetValueOrDefault(); diff --git a/src/Rules.Framework/Rules.Framework.csproj b/src/Rules.Framework/Rules.Framework.csproj index be565656..e9026319 100644 --- a/src/Rules.Framework/Rules.Framework.csproj +++ b/src/Rules.Framework/Rules.Framework.csproj @@ -1,7 +1,7 @@ - netstandard2.1 + netstandard2.0;netstandard2.1 10.0 true @@ -33,6 +33,15 @@ + + + + + + + + + @@ -45,6 +54,5 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - \ No newline at end of file