Skip to content

Commit 7975082

Browse files
authored
Merge pull request #2435 from microsoft/fix/expression-getter
fix: switches to a getter for API consistency
2 parents de3531b + 0091f1c commit 7975082

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Microsoft.OpenApi/Expressions/CompositeExpression.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ namespace Microsoft.OpenApi
1313
public class CompositeExpression : RuntimeExpression
1414
{
1515
private readonly string template;
16-
private Regex expressionPattern = new(@"{(?<exp>\$[^}]*)");
16+
private readonly Regex expressionPattern = new(@"{(?<exp>\$[^}]*)");
1717

1818
/// <summary>
1919
/// Expressions embedded into string literal
2020
/// </summary>
21-
public List<RuntimeExpression> ContainedExpressions = new();
21+
public List<RuntimeExpression> ContainedExpressions { get; } = new();
2222

2323
/// <summary>
2424
/// Create a composite expression from a string literal with an embedded expression

test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ namespace Microsoft.OpenApi
5454
}
5555
public class CompositeExpression : Microsoft.OpenApi.RuntimeExpression
5656
{
57-
public System.Collections.Generic.List<Microsoft.OpenApi.RuntimeExpression> ContainedExpressions;
5857
public CompositeExpression(string expression) { }
58+
public System.Collections.Generic.List<Microsoft.OpenApi.RuntimeExpression> ContainedExpressions { get; }
5959
public override string Expression { get; }
6060
}
6161
public class CurrentKeys

0 commit comments

Comments
 (0)