コード例 #1
0
 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);
        }
コード例 #3
0
 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);
 }