Commit c1529a6
refactor: make CLI transforms shim-first preserve Web Forms API calls (#536)
WebFormsPageBase provides Request, Response, Server, Session, Cache,
ClientScript, IsPostBack, and ViewState as properties. Code inheriting
from it compiles AS-IS with no transforms needed for these APIs.
Changes:
- ResponseRedirectTransform: stop rewriting Response.Redirect() to
NavigationManager.NavigateTo(). Leave calls intact ResponseShim
handles ~/ and .aspx automatically. Only strip Page./this. prefix.
- SessionDetectTransform: remove redundant [Inject] SessionShim and
CacheShim injection already on WebFormsPageBase.
- ClientScriptTransform: fix guidance to say 'works via WebFormsPageBase'
instead of suggesting @Inject (wrong syntax in .cs file).
- RequestFormTransform: lead guidance with 'works automatically via
RequestShim on WebFormsPageBase'.
- ServerShimTransform: lead guidance with 'works automatically via
ServerShim on WebFormsPageBase'.
All 353 CLI tests pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 5088de9 commit c1529a6
File tree
5 files changed
+32
-66
lines changed- src/BlazorWebFormsComponents.Cli/Transforms/CodeBehind
5 files changed
+32
-66
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 95 | + | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
Lines changed: 25 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 55 | + | |
65 | 56 | | |
66 | | - | |
67 | | - | |
| 57 | + | |
| 58 | + | |
68 | 59 | | |
69 | | - | |
70 | | - | |
| 60 | + | |
71 | 61 | | |
72 | 62 | | |
73 | | - | |
74 | | - | |
| 63 | + | |
| 64 | + | |
75 | 65 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
79 | 69 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 70 | + | |
85 | 71 | | |
86 | 72 | | |
87 | 73 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
Lines changed: 3 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
| 125 | + | |
146 | 126 | | |
147 | 127 | | |
148 | 128 | | |
| |||
0 commit comments