public override void Initialize() { base.Initialize(); UserConnection = Context.UserConnection; TemplateRepository = new DCTemplateRepository <DCTemplateModel>(UserConnection); TemplateFactory = new CESMailingTemplateFactory(); ServiceApi = Context.ServiceApi; Validator = new BulkEmailValidator(UserConnection, ServiceApi); BulkEmailEventLogger = new BulkEmailEventLogger(UserConnection); AudienceDataSourceFactory = new BulkEmailAudienceDataSourceFactory(); BulkEmailMacroParser = GetMacroParser(); InitializeAudienceDataSource(Context.BulkEmailEntity.PrimaryColumnValue); var validationBuilder = new BulkEmailRecipientValidatorBuilder(ServiceApi); RecipientsValidator = new BulkEmailRecipientValidator(validationBuilder); }
/// <summary> /// Initializes a new instance of the <see cref="BulkEmailRecipientValidator"/> class. /// </summary> /// <param name="builder">Class for building validation rules.</param> public BulkEmailRecipientValidator(BulkEmailRecipientValidatorBuilder builder) { _validationRules = new List <BaseValidationRule>(); _builder = builder; InitRules(); }