protected HttpLogShipperBase(
            ILogShipperOptions options,
            ILogReaderFactory logReaderFactory,
            IPersistedBookmarkFactory persistedBookmarkFactory,
            ILogShipperFileManager fileManager
            )
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }
            if (logReaderFactory == null)
            {
                throw new ArgumentNullException(nameof(logReaderFactory));
            }
            if (persistedBookmarkFactory == null)
            {
                throw new ArgumentNullException(nameof(persistedBookmarkFactory));
            }
            if (fileManager == null)
            {
                throw new ArgumentNullException(nameof(fileManager));
            }

            _logReaderFactory         = logReaderFactory;
            _persistedBookmarkFactory = persistedBookmarkFactory;
            _fileManager = fileManager;

            _batchPostingLimit   = options.BatchPostingLimit;
            _streamName          = options.StreamName;
            _bookmarkFilename    = Path.GetFullPath(options.BufferBaseFilename + ".bookmark");
            _logFolder           = Path.GetDirectoryName(_bookmarkFilename);
            _candidateSearchPath = Path.GetFileName(options.BufferBaseFilename) + "*.json";
        }
 public IDisposable RegisterReaderFactory(ILogReaderFactory logReaderFactory)
 {
     m_logReaderFactories.TryAdd(logReaderFactory.Id, logReaderFactory);
     return new DisposeRegistration(() =>
                                    {
                                        ILogReaderFactory temp;
                                        m_logReaderFactories.TryRemove(logReaderFactory.Id, out temp);
                                    });
 }
 public LogShipperSUT(
     ILogShipperProtectedDelegator delegator,
     ILogShipperOptions options,
     ILogReaderFactory logReaderFactory,
     IPersistedBookmarkFactory persistedBookmarkFactory,
     ILogShipperFileManager fileManager
     ) : base(options, logReaderFactory, persistedBookmarkFactory, fileManager)
 {
     _delegator = delegator;
 }
Example #4
0
 private MainWindowViewModel(ILogReaderFactory logReaderFactory)
 {
     _logReaderFactory = logReaderFactory;
     DisplayName       = "Logazmic";
     LoadReciversFromSettings();
 }
Example #5
0
 public OfflineDataProvider()
 {
     _logReaderFactory = new LogReaderFactory();
 }