예제 #1
0
 public FileEntryStreamReader(IJSFileModule jsModule, ElementReference elementRef, FileEntry fileEntry, IFileEntryNotifier fileEntryNotifier)
 {
     this.jsModule          = jsModule;
     this.elementRef        = elementRef;
     this.fileEntry         = fileEntry;
     this.fileEntryNotifier = fileEntryNotifier;
 }
예제 #2
0
        public RemoteFileEntryStream(IJSFileModule jsModule, ElementReference elementRef, IFileEntry fileEntry, IFileEntryNotifier fileEntryNotifier, int maxMessageSize, TimeSpan segmentFetchTimeout, CancellationToken cancellationToken)
        {
            this.jsModule            = jsModule;
            this.elementRef          = elementRef;
            this.fileEntry           = fileEntry;
            this.fileEntryNotifier   = fileEntryNotifier;
            this.maxMessageSize      = maxMessageSize;
            this.segmentFetchTimeout = segmentFetchTimeout;
            fillBufferCts            = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
            var pipe = new Pipe(new(pauseWriterThreshold: this.maxMessageSize, resumeWriterThreshold: this.maxMessageSize) );

            pipeReader = pipe.Reader;

            _ = FillBuffer(pipe.Writer, fillBufferCts.Token);
        }
 public RemoteFileEntryStreamReader(IJSFileModule jsModule, ElementReference elementRef, FileEntry fileEntry, IFileEntryNotifier fileEntryNotifier, int maxMessageSize, long maxFileSize)
     : base(jsModule, elementRef, fileEntry, fileEntryNotifier)
 {
     this.maxMessageSize = maxMessageSize;
     this.maxFileSize    = maxFileSize;
 }