/// <summary> /// Method for creating an instance of <see cref="AddressSeparationProcessor{TOutputFormat}"/>. /// </summary> /// <param name="genericType">Generic type to create instance with.</param> /// <param name="options">Options to create instance with.</param> /// <param name="inputManipulationQueue">Queue with manipulation options to create instance with.</param> /// <returns>Instance of class <see cref="AddressSeparationProcessor{TOutputFormat}"/>.</returns> public static object CreateInstance(Type genericType, IProcessingOptions options, Queue <IInputManipulation> inputManipulationQueue) { // get and create processor instance Type processorType = typeof(AddressSeparationProcessor <>); Type genericProcessorType = processorType .MakeGenericType(genericType); var processorInstance = Activator .CreateInstance(genericProcessorType, options, inputManipulationQueue); // return instance return(processorInstance); }
/// <summary> /// Creates a new instance of <see cref="AddressSeparationProcessor{TOutputFormat}" /> with options and user defined input manipulation functions. /// </summary> /// <param name="options">Options the processor can work with. <see cref="DefaultProcessingOptions"/> if none provided.</param> /// <param name="inputManipulationQueue">Queue with delegates that are called prior to RegEx matching.</param> public AddressSeparationProcessor(IProcessingOptions options, Queue <IInputManipulation> inputManipulationQueue) { Options = options; InputManipulationQueue = inputManipulationQueue; }
/// <summary> /// Creates a new instance of <see cref="AddressSeparationProcessor{TOutputFormat}"/> with options. /// </summary> /// <param name="options">Options the processor should consider. <see cref="DefaultProcessingOptions"/> if none provided.</param> public AddressSeparationProcessor(IProcessingOptions options) : this(options, null) { }
/// <summary> /// Method for creating an instance of <see cref="AddressSeparationProcessor{TOutputFormat}"/>. /// </summary> /// <param name="genericType">Generic type to create instance with.</param> /// <param name="options">Options to create instance with.</param> /// <returns>Instance of class <see cref="AddressSeparationProcessor{TOutputFormat}"/>.</returns> public static object CreateInstance(Type genericType, IProcessingOptions options) { return(CreateInstance(genericType, options, null)); }