Class Slug
Inherited Members
Namespace: DataWeb.Data.Controls
Assembly: DataWeb.Core.dll
Syntax
public class Slug : Control
Constructors
Slug(Form, IServiceProvider)
Declaration
public Slug(Form form, IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
Form | form | |
IServiceProvider | serviceProvider |
Methods
ProcessOnTranslateAsync(object, Dictionary<string, string>, Dictionary<string, object>, string, string, IUser, string, NavigationContext, CancellationToken)
Processes the control value on translation.
Declaration
public override Task<object> ProcessOnTranslateAsync(object value, Dictionary<string, string> translatedValues, Dictionary<string, object> sectionData, string culture, string sourceCulture, IUser user, string itemId = null, NavigationContext navigationContext = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
object | value | The value to process. |
Dictionary<string, string> | translatedValues | The translated values. |
Dictionary<string, object> | sectionData | The section data. |
string | culture | The culture to process. |
string | sourceCulture | The source culture. |
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
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. |