public InteropFileStream(int fileReference, IFileInfo fileInfo, FileReaderJsInterop fileReaderJsInterop)
 {
     this.fileRef             = fileReference;
     this.FileInfo            = fileInfo;
     this.length              = fileInfo.Size;
     this.fileReaderJsInterop = fileReaderJsInterop;
 }
예제 #2
0
        public FileReaderService(IJSRuntime jsRuntime, FileReaderServiceOptions options, IServiceProvider serviceProvider)
        {
            this.Options = options;

            if (!PlatformConfig.IsWasm)
            {
                if (MaximumReceiveMessageSize == null)
                {
                    if (!PlatformConfig.TryReadMaximumReceiveMessageSize(serviceProvider, out var maximumRecieveMessageSize))
                    {
                        System.Diagnostics.Trace.TraceWarning($"{typeof(FileReaderService).FullName}: Unable to read SignalR MaximumReceiveMessageSize, defaulting to {DefaultMaximumReceiveMessageSize}");
                        MaximumReceiveMessageSize = DefaultMaximumReceiveMessageSize;
                    }
                    else
                    {
                        MaximumReceiveMessageSize = maximumRecieveMessageSize;
                    }
                }

                options.UseBufferChunking         = true;
                options.MaximumRecieveMessageSize = MaximumReceiveMessageSize.Value;
            }

            this._fileReaderJsInterop = new FileReaderJsInterop(jsRuntime, options);
        }
 internal FileReaderRef(ElementReference elementRef, FileReaderJsInterop fileReaderJsInterop)
 {
     this.ElementRef          = elementRef;
     this.FileReaderJsInterop = fileReaderJsInterop;
 }
예제 #4
0
 public FileReaderService(IJSRuntime jsRuntime, IFileReaderServiceOptions options)
 {
     this.Options = options;
     this._fileReaderJsInterop = new FileReaderJsInterop(jsRuntime, options);
 }