public FileTailActor(DataTable resultsDataTable, LogFileSignature logFileSignature) { _dataUpdateActor = Context.ActorOf(Props.Create(() => new DataUpdateActor(resultsDataTable))); _fileTailConversionActor = Context.ActorOf(Props.Create(() => new FileTailConversionActor(_dataUpdateActor, logFileSignature))); _fileWatcher = new FileWatcher.FileWatcher(Self, Path.GetFullPath(logFileSignature.FileLocation)); _fileWatcher.Start(); string fullPath = Path.GetFullPath(logFileSignature.FileLocation); Stream fileStream = new FileStream(fullPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); _fileStreamReader = new StreamReader(fileStream, Encoding.UTF8); Self.Tell(new StartRead()); }
public FileTailConversionActor(IActorRef dataUpdateActor, LogFileSignature logFileSignature) { _dataUpdateActorRef = dataUpdateActor; _logFileSignature = logFileSignature; }