Commit 051d4b8
fix(http-client-csharp): use name comparison in HasSettingsParameter (#10269)
CSharpType.Equals fails when comparing generated types against
Roslyn-based types from CustomCodeView. Use name comparison since
HasSettingsParameter is only called for custom code constructors.
Update tests to use async compilations with a custom constructor that
takes the settings type, so CustomCodeView is exercised.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 7aa1f34 commit 051d4b8
4 files changed
Lines changed: 41 additions & 20 deletions
File tree
- packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel
- src/Providers
- test/Providers
- TestData/ClientSettingsProviderTests
- TestBindCoreMethod_DoesNotBindSettingsParameter
- TestSettingsType_DoesNotContainSelfReferentialSettingsProperty
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
558 | | - | |
| 558 | + | |
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
Lines changed: 16 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | 1012 | | |
1017 | 1013 | | |
1018 | 1014 | | |
| |||
1034 | 1030 | | |
1035 | 1031 | | |
1036 | 1032 | | |
1037 | | - | |
1038 | | - | |
1039 | | - | |
1040 | | - | |
1041 | 1033 | | |
1042 | 1034 | | |
1043 | 1035 | | |
| |||
1058 | 1050 | | |
1059 | 1051 | | |
1060 | 1052 | | |
1061 | | - | |
| 1053 | + | |
1062 | 1054 | | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
1066 | 1061 | | |
| 1062 | + | |
1067 | 1063 | | |
1068 | 1064 | | |
1069 | | - | |
1070 | | - | |
1071 | | - | |
1072 | 1065 | | |
1073 | 1066 | | |
1074 | 1067 | | |
1075 | 1068 | | |
1076 | 1069 | | |
1077 | 1070 | | |
1078 | | - | |
| 1071 | + | |
1079 | 1072 | | |
1080 | | - | |
1081 | | - | |
1082 | | - | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
1083 | 1079 | | |
| 1080 | + | |
1084 | 1081 | | |
1085 | 1082 | | |
1086 | 1083 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments