Ejemplo n.º 1
0
        public IDataWebScraperStepStrategy GetDataWebScraperStepStrategy(DataWebScraperStepType dataWebScraperStepType)
        {
            Type type = null;

            if (_dataWebScraperSteps.TryGetValue(dataWebScraperStepType, out type))
            {
                return((IDataWebScraperStepStrategy)Activator.CreateInstance(type));
            }

            throw new NotImplementedException($"The factory didn't find a type {dataWebScraperStepType} registered to be created.");
        }
Ejemplo n.º 2
0
 public GenericDataWebScraperStep(DataWebScraperStepType dataWebScraperStepType, int stepSequence, IEnumerable <IDataWebScraperStepProperty> dataWebScraperStepProperties)
 {
     StepSequence = stepSequence;
     StepType     = dataWebScraperStepType;
     if (dataWebScraperStepProperties == null)
     {
         _dataWebScraperStepProperties = new List <IDataWebScraperStepProperty>();
     }
     else
     {
         _dataWebScraperStepProperties = dataWebScraperStepProperties.ToList();
     }
 }
Ejemplo n.º 3
0
 public GenericDataWebScraperStep(DataWebScraperStepType dataWebScraperStepType, int stepSequence)
 {
     StepSequence = stepSequence;
     StepType     = dataWebScraperStepType;
     _dataWebScraperStepProperties = new List <IDataWebScraperStepProperty>();
 }