Class CultureEditor
Inherited Members
Namespace: DataWeb.Data.Controls
Assembly: DataWeb.Core.dll
Syntax
public class CultureEditor : Control
Constructors
CultureEditor(Form, IServiceProvider)
Declaration
public CultureEditor(Form form, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
Form | form | |
IServiceProvider | serviceProvider |
Methods
InitAsync(CancellationToken)
Initializes the control asynchronously.
Declaration
public override Task InitAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous initialization operation. |
Overrides
ProcessActionAsync(ContextAction, IUser, string, object, NavigationContext, CancellationToken)
Processes action on this control.
Declaration
public override Task<ContextAction.Result> ProcessActionAsync(ContextAction action, IUser user, string itemId = null, object value = null, NavigationContext navigationContext = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
ContextAction | action | The action to perform. |
IUser | user | The IUser performing the action. |
string | itemId | The Id of the item being edited (null if adding new). |
object | value | |
NavigationContext | navigationContext | The NavigationContext of the form. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ContextAction.Result> | The result of the action. |
Overrides
ProcessOnGetValueAsync(object, Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)
Processes the control value asynchronously.
Declaration
public override Task<object> ProcessOnGetValueAsync(object value, Dictionary<string, object> sectionData, IUser user, string itemId = null, NavigationContext navigationContext = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
object | value | The value to process. |
Dictionary<string, object> | sectionData | The section data. |
IUser | user | The IUser for whom to process the value. |
string | itemId | The Id of the item to which the value is associated, if applicable. |
NavigationContext | navigationContext | The NavigationContext, if applicable. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<object> | A task that represents the asynchronous operation and returns the processed value. |
Overrides
ProcessOnSaveDataAsync(object, List<ProvidedValue>, Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)
Sanitizes the control value before saving it.
Declaration
public override Task<object> ProcessOnSaveDataAsync(object value, List<Form.ProvidedValue> providedValues, Dictionary<string, object> sectionData, IUser user, string itemId = null, NavigationContext navigationContext = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
object | value | The value of the control to sanitize. |
List<Form.ProvidedValue> | providedValues | A list of values provided for other controls on the form. |
Dictionary<string, object> | sectionData | The section data of the form. |
IUser | user | The IUser saving the form. |
string | itemId | The Id of the item being edited (null if adding new). |
NavigationContext | navigationContext | The NavigationContext of the form. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<object> | The sanitized value of the control. |
Overrides
TranslateAsync(object)
Declaration
public Task<ContextAction.Result> TranslateAsync(object value)
Parameters
Type | Name | Description |
---|---|---|
object | value |
Returns
Type | Description |
---|---|
Task<ContextAction.Result> |
ValidateAsync(object, List<ProvidedValue>, Dictionary<string, object>, IUser, string, NavigationContext, CancellationToken)
Validates the control asynchronously.
Declaration
public override Task<List<ValidationError>> ValidateAsync(object value, List<Form.ProvidedValue> providedValues, Dictionary<string, object> sectionData, IUser user, string itemId = null, NavigationContext navigationContext = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
object | value | The value of the control to validate. |
List<Form.ProvidedValue> | providedValues | The provided Form.ProvidedValue values. |
Dictionary<string, object> | sectionData | The section data. |
IUser | user | The IUser that is requesting the validation. |
string | itemId | The Id of the item that the control is associated with. |
NavigationContext | navigationContext | The NavigationContext of the form. |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<ValidationError>> | The validation errors, if any. |