23 using System.Collections.Generic;
28 namespace Ntp.Analyzer.Import
30 public abstract class Importer<T> : IEnumerable<T>
37 private readonly
object locker =
new object();
40 protected StreamReader Reader {
get;
private set; }
42 protected IList<T> Entries => entries;
46 protected abstract string Command {
get; }
48 protected abstract string Arguments {
get; }
50 protected abstract string ErrorMessage {
get; }
55 return entries.GetEnumerator();
58 IEnumerator IEnumerable.GetEnumerator()
60 return GetEnumerator();
72 var command =
new ShellCommand(Command, Arguments, Log, ErrorMessage);
73 Reader = command.Execute();
83 entries =
new List<T>();
86 protected abstract void ReadFromStream();
IEnumerator< T > GetEnumerator()
virtual void Initialize()