public PickerReadOnlyObject(string name, string title, string stringFormat, DropDownTemplateDescriptor dropDownTemplate, IContextProvider contextProvider) : base(name, dropDownTemplate.TemplateName, contextProvider.UiNotificationService) { this._dropDownTemplate = dropDownTemplate; this.httpService = contextProvider.HttpService; _defaultTitle = title; _stringFormat = stringFormat; this.Title = _defaultTitle; this.mapper = contextProvider.Mapper; GetItemSource(); }
public PickerValidatableObject(string name, T defaultValue, DropDownTemplateDescriptor dropDownTemplate, IEnumerable <IValidationRule> validations, IContextProvider contextProvider) : base(name, dropDownTemplate.TemplateName, validations, contextProvider.UiNotificationService) { this.defaultValue = defaultValue; this._dropDownTemplate = dropDownTemplate; this.httpService = contextProvider.HttpService; this.Title = this._dropDownTemplate.LoadingIndicatorText; this.mapper = contextProvider.Mapper; GetItemSource(); }
private IValidatable CreatePickerValidatableObject(FormControlSettingsDescriptor setting, DropDownTemplateDescriptor dropDownTemplate) => ValidatableObjectFactory.GetValidatable ( Activator.CreateInstance ( typeof(PickerValidatableObject <>).MakeGenericType(Type.GetType(setting.Type)), GetFieldName(setting.Field), ValidatableObjectFactory.GetValue(setting), dropDownTemplate, GetValidationRules(setting), this.contextProvider ), setting );