Skip to content

Commit

Permalink
Merge pull request #9 from skbkontur/d.kop/remove-string-interning
Browse files Browse the repository at this point in the history
Remove string interning when forming custom field name
  • Loading branch information
Dm17r1y authored Dec 21, 2023
2 parents 4fcc352 + a2d1bf7 commit 5a64ef8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
dotnet-version: |
3.1.x
6.0.x
- name: Install dependencies
run: dotnet restore ${{ env.SOLUTION_FILE }} --verbosity minimal && dotnet tool restore
Expand Down
4 changes: 2 additions & 2 deletions Mutators/InternalExpressionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public static string CustomFieldName(this Expression node)
{
var result = new StringBuilder();
BuildCustomFieldName(node, result);
return string.Intern(result.ToString());
return result.ToString();
}

public static Expression ExtendSelectMany(this Expression expression)
Expand Down Expand Up @@ -308,7 +308,7 @@ private static void BuildCustomFieldName(Expression node, StringBuilder result)
BuildCustomFieldName(memberExpression.Expression, result);
if (result.Length > 0)
result.Append("ё");
result.Append(string.Intern(memberExpression.Member.Name));
result.Append(memberExpression.Member.Name);
break;
case ExpressionType.Call:
var methodCallExpression = (MethodCallExpression)node;
Expand Down

0 comments on commit 5a64ef8

Please sign in to comment.