상속: StreamReaderSettings
예제 #1
0
        public StreamReader([NotNull] StreamReaderSettings settings, [CanBeNull] ILog log)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }
            log = (log ?? LogProvider.Get()).ForContext <StreamReader>();

            reader = new StreamReader <HerculesEvent>(settings, log);
        }
        public StreamSegmentReader([NotNull] StreamSegmentReaderSettings <T> settings, [CanBeNull] ILog log)
        {
            this.settings = settings ?? throw new ArgumentNullException(nameof(settings));
            this.log      = log = (log ?? LogProvider.Get()).ForContext <StreamSegmentReader <T> >();

            var streamReaderSettings = new StreamReaderSettings <T>(
                settings.StreamName,
                settings.StreamClient)
            {
                EventsReadBatchSize = settings.EventsReadBatchSize,
                EventsReadTimeout   = settings.EventsReadTimeout,
                EventsReadAttempts  = settings.EventsReadAttempts,
                DelayOnError        = settings.DelayOnError
            };

            streamReader = new StreamReader <T>(streamReaderSettings, log);
        }
예제 #3
0
 public StreamReader([NotNull] StreamReaderSettings <T> settings, [CanBeNull] ILog log)
 {
     this.settings = settings ?? throw new ArgumentNullException(nameof(settings));
     this.log      = (log ?? LogProvider.Get()).ForContext <StreamReader <T> >();
 }