public abstract class InputComponentBase<T> : ComponentBase,
IHasLocalization, IDisposable
where T : class
| InputComponentBaseT | Initializes a new instance of the InputComponentBaseT class |
| EditContext |
EditContext of the Form the input component is a part of. The EditForm cascades the EditContext downwards. |
| Id | ID to render for HTML/JS interop |
| Loc |
Dependency injection for the localization tool. It derives texts established in CosmosDB's "LocalizedStrings" container.
It can be used by invoking it as an array, with the key of the text you want to get. Parameters for the string can be added in the array as well,
similar to Format(String, Object). If the text is not found, it will return the key itself as fallback. The language the key will be localized based on is based on the CurrentCulture and the CurrentUICulture. If you want to localize something in a different language, you will have to apply the culture on the CultureInfo properties, get the text, and revert back to the original culture. |
| Model |
Model to get the data from, which is derived from the EditContext. This property will be null if the Model isn't set, or if T isn't the type of the Model. The property assumes that the EditContext is set properly, and a Assert(Boolean) is placed in the OnParametersSet method as a safeguard. |
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
| GetInputStatusCssClass | Get input status |
| GetPropertyNameTSource, TProperty | Returns name of the property. (class -> property) must be the input. |
| SetParametersAsync |
Sets parameters supplied by the component's parent in the render tree.
(Overrides ComponentBaseSetParametersAsync(ParameterView)) |
| NullReferenceException |
This is thrown if we're trying to access the EditContext, cascaded down from the EditForm, if T isn't the type used in the EditContext's Model |