示例#1
0
 public FileEntryStreamReader(IJSRunner jsRunner, ElementReference elementRef, FileEntry fileEntry, FileEdit fileEdit)
 {
     this.jsRunner   = jsRunner;
     this.elementRef = elementRef;
     this.fileEntry  = fileEntry;
     this.fileEdit   = fileEdit;
 }
        public RemoteFileEntryStream(IJSRunner jsRunner, ElementReference elementRef, FileEntry fileEntry, FileEdit fileEdit, int maxMessageSize, TimeSpan segmentFetchTimeout, CancellationToken cancellationToken)
        {
            this.jsRunner            = jsRunner;
            this.elementRef          = elementRef;
            this.fileEntry           = fileEntry;
            this.fileEdit            = fileEdit;
            this.maxMessageSize      = maxMessageSize;
            this.segmentFetchTimeout = segmentFetchTimeout;
            fillBufferCts            = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
            var pipe = new Pipe(new PipeOptions(pauseWriterThreshold: this.maxMessageSize, resumeWriterThreshold: this.maxMessageSize));

            pipeReader = pipe.Reader;

            _ = FillBuffer(pipe.Writer, fillBufferCts.Token);
        }
示例#3
0
 public void Init(FileEdit fileEdit)
 {
     Owner = fileEdit;
 }
示例#4
0
 public RemoteFileEntryStreamReader(IJSRunner jsRunner, ElementReference elementRef, FileEntry fileEntry, FileEdit fileEdit, int maxMessageSize)
     : base(jsRunner, elementRef, fileEntry, fileEdit)
 {
     this.maxMessageSize = maxMessageSize;
 }