public async Task <IFileInfo> ReadFileInfoAsync()
        {
            if (fileInfo == null)
            {
                fileInfo = await FileReaderJsInterop.GetFileInfoFromElement(fileLoaderRef.ElementRef, index);;
            }

            return(fileInfo);
        }
 public async Task <IEnumerable <IFileReference> > EnumerateFilesAsync() =>
 Enumerable.Range(0, await FileReaderJsInterop.GetFileCount(ElementRef))
 .Select(index => (IFileReference) new FileReference(this, index));
 public Task <Stream> OpenReadAsync()
 {
     return(FileReaderJsInterop.OpenFileStream(fileLoaderRef.ElementRef, index));
 }
示例#4
0
 internal FileReaderRef(ElementReference elementRef, FileReaderJsInterop fileReaderJsInterop)
 {
     this.ElementRef          = elementRef;
     this.FileReaderJsInterop = fileReaderJsInterop;
 }
示例#5
0
 public InteropFileStream(int fileReference, long length, FileReaderJsInterop fileReaderJsInterop)
 {
     this.fileRef             = fileReference;
     this.length              = length;
     this.fileReaderJsInterop = fileReaderJsInterop;
 }
示例#6
0
 public FileReaderService(IJSRuntime jsRuntime, IFileReaderServiceOptions options)
 {
     this.Options = options;
     this._fileReaderJsInterop = new FileReaderJsInterop(jsRuntime, options);
 }
示例#7
0
 public FileReaderService(IJSRuntime jsRuntime, IFileReaderServiceOptions options)
 {
     this.Options = options;
     this._fileReaderJsInterop = new FileReaderJsInterop(jsRuntime, options.InitializeOnFirstCall);
 }
示例#8
0
 public FileReaderService(IJSRuntime jsRuntime, IInvokeUnmarshalled invokeUnmarshalled)
 {
     this._fileReaderJsInterop = new FileReaderJsInterop(jsRuntime, invokeUnmarshalled);
 }