Skip to content

Commit f025ae0

Browse files
committed
Address feedback
1 parent fe7a183 commit f025ae0

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

src/Components/Components/src/Binding/CascadingModelBinder.cs

+3-13
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,15 @@ bool ICascadingValueComponent.CanSupplyValue(Type valueType, string? valueName)
154154
if (FormValueSupplier.CanBind(formName!, valueType))
155155
{
156156
var bindingSucceeded = FormValueSupplier.TryBind(formName!, valueType, out var boundValue);
157-
_bindingInfo = new BindingInfo(formName, valueType)
158-
{
159-
BindingResult = bindingSucceeded,
160-
BoundValue = boundValue,
161-
};
162-
157+
_bindingInfo = new BindingInfo(formName, valueType, bindingSucceeded, boundValue);
163158
if (!bindingSucceeded)
164159
{
165160
// Report errors
166161
}
167162

168163
return true;
169164
}
170-
165+
171166
return false;
172167
}
173168

@@ -187,10 +182,5 @@ void ICascadingValueComponent.Unsubscribe(ComponentState subscriber)
187182

188183
bool ICascadingValueComponent.CurrentValueIsFixed => true;
189184

190-
private record BindingInfo(string? FormName, Type ValueType)
191-
{
192-
public required bool BindingResult { get; set; }
193-
194-
public required object? BoundValue { get; set; }
195-
}
185+
private record BindingInfo(string? FormName, Type ValueType, bool BindingResult, object? BoundValue);
196186
}

0 commit comments

Comments
 (0)