예제 #1
0
 public SharedMemoryFileListEntryStream(IJSRuntime jsRuntime, ElementReference inputFileElement,
                                        MatFileEntry matFile)
     : base(jsRuntime, inputFileElement, matFile)
 {
 }
예제 #2
0
 internal Stream OpenFileStream(MatFileEntry matFile)
 {
     return(SharedMemoryFileListEntryStream.IsSupported(Js)
         ? (Stream) new SharedMemoryFileListEntryStream(Js, InputRef, matFile)
         : new RemoteFileListEntryStream(Js, InputRef, matFile, MaxMessageSize, MaxBufferSize));
 }
예제 #3
0
 public RemoteFileListEntryStream(IJSRuntime jsRuntime, ElementReference inputFileElement, MatFileEntry matFile, int maxMessageSize, int maxBufferSize)
     : base(jsRuntime, inputFileElement, matFile)
 {
     _maxMessageSize = maxMessageSize;
     _blockSequence  = new PreFetchingSequence <Block>(
         FetchBase64Block,
         (matFile.Size + _maxMessageSize - 1) / _maxMessageSize,
         Math.Max(1, maxBufferSize / _maxMessageSize)); // Degree of parallelism on fetch
     _currentBlockDecodingBuffer = new byte[_maxMessageSize];
 }
예제 #4
0
 public FileListEntryStream(IJSRuntime jsRuntime, ElementReference inputFileElement, MatFileEntry matFile)
 {
     _jsRuntime        = jsRuntime;
     _inputFileElement = inputFileElement;
     MatFile           = matFile;
 }