public RenamerConfig(AbstractProcessorConfig input, string ActualColumnName) { if (input.Renamer == null) { input.Renamer = new Queue <_Renamer>(); } input.Renamer.Enqueue(new _Renamer(ActualColumnName)); input.Queue.Enqueue(DataTableOperations.Renamer); }
public ManipulatorWithParamsConfig(AbstractProcessorConfig input, Func <ParameterType, string, string, ResultType> Manipulator, ParameterType MasterData, string additionalColumn, string ColumnToStoreResult) { if (input.ManipulatorWithParams == null) { input.ManipulatorWithParams = new Queue <_ManipulatorWithParams <object, object> >(); } var temp = new Func <object, string, string, object>((y, z, a) => Manipulator((ParameterType)y, z, a)); var ins = new _ManipulatorWithParams <object, object>(temp, MasterData, additionalColumn, ColumnToStoreResult); input.ManipulatorWithParams.Enqueue(ins); input.Queue.Enqueue(DataTableOperations.ManipulatorWithParams); }
public ManipulatorConfig(AbstractProcessorConfig input, Func <string, string, ManipulatorResultType> Manipulator, string additionalColumn, string ColumnToStoreResult = null) { if (input.Manipulators == null) { input.Manipulators = new Queue <_Manipulator <object> >(); } var temp = new Func <string, string, object>((y, z) => Manipulator(y, z)); var ins = new _Manipulator <object>(temp, additionalColumn, ColumnToStoreResult); input.Manipulators.Enqueue(ins); input.Queue.Enqueue(DataTableOperations.Manipulator); }
public ValidatorConfig(AbstractProcessorConfig input, Func <string, string, bool> validator, string additionalColumn, string errorMessage = null, bool continueWhenValidationFails = false) { if (errorMessage == null) { errorMessage = string.Format(ErrorMessages.DefaultInvalidColumn, input.ColumnNameToRefer); } if (input.Validator == null) { input.Validator = new Queue <_Validator>(); } input.Validator.Enqueue(new _Validator(validator, additionalColumn, errorMessage, continueWhenValidationFails)); input.Queue.Enqueue(DataTableOperations.Validator); }
public ValidatorWithParamsConfig(AbstractProcessorConfig input, Func <T, string, string, bool> validator, T masterData, string additionalColumn, string errorMessage = null, bool continueWhenValidationFails = false) { if (errorMessage == null) { errorMessage = string.Format(ErrorMessages.DefaultInvalidColumn, input.ColumnNameToRefer); } if (input.ValidatorWithParams == null) { input.ValidatorWithParams = new Queue <_ValidatorWithParams <object> >(); } var temp = new Func <object, string, string, bool>((y, z, a) => validator((T)y, z, a)); input.ValidatorWithParams.Enqueue(new _ValidatorWithParams <object>(temp, additionalColumn, errorMessage, masterData, continueWhenValidationFails)); input.Queue.Enqueue(DataTableOperations.ValidatorWithParams); }
public static ConfigurationBuilder CopyConfig(AbstractProcessorConfig abstractProcessorConfig, string ExcelColumnName) { return(new ConfigurationBuilder(new DataTableProcessorConfiguration(), ExcelColumnName)); }
public ManipulatorWithParamsConfig(AbstractProcessorConfig input, Func <ParameterType, string, ResultType> Manipulator, ParameterType MasterData, string ColumnToStoreResult) { new ManipulatorWithParamsConfig <ResultType, ParameterType>(input, new Func <ParameterType, string, string, ResultType>((x, y, z) => Manipulator(x, y)), MasterData, null, ColumnToStoreResult); }
public ManipulatorConfig(AbstractProcessorConfig input, Func <string, ManipulatorResultType> Manipulator, string ColumnToStoreResult = null) { new ManipulatorConfig <ManipulatorResultType>(input, new Func <string, string, ManipulatorResultType>((x, y) => Manipulator(x)), null, ColumnToStoreResult); }
public ValidatorWithParamsConfig(AbstractProcessorConfig input, Func <T, string, bool> validator, T masterData, string errorMessage = null, bool continueWhenValidationFails = false) { new ValidatorWithParamsConfig <T>(input, new Func <T, string, string, bool> ((x, y, z) => validator(x, y)), masterData, null, errorMessage, continueWhenValidationFails); }
public ValidatorConfig(AbstractProcessorConfig input, Func <string, bool> validator, string errorMessage = null, bool continueWhenValidationFails = false) { new ValidatorConfig(input, new Func <string, string, bool>((x, y) => validator(x)), null, errorMessage, continueWhenValidationFails); }