using Process.Interface;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace Process.Abstract;

public abstract class Processor<TInput, TOutput> : IProcessor<TInput, TOutput>
{
  #region Implementation of IProcessor<in TValue,out TValue>

  /// <inheritdoc />
  public abstract IEnumerable<TOutput> Process(IEnumerable<TInput> inputs);

  #endregion

  #region Implementation of IProcessor

  /// <inheritdoc cref="IProcessor.Process" />
  public IEnumerable Process(IEnumerable inputs)
  {
    return Process(inputs.Cast<TInput>());
  }

  #endregion
}
