Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove string interning when forming custom field name #9

Merged
merged 3 commits into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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