コード例 #1
0
 /// <summary>
 /// Can upload files
 /// </summary>
 /// <param name="services"></param>
 /// <param name="httpClient"></param>
 /// <param name="jSRuntime"></param>
 /// <param name="maxFiles">Maximum files allowed to upload</param>
 /// <param name="maxSize">Maximum file size to upload</param>
 public UploadFilesHandler(IDefaultServices services = null, HttpClient httpClient = null, IJSRuntime jSRuntime = null, int maxFiles = 5, long maxSize = 512000) :
     base(httpClient, maxFiles, maxSize)
 {
     if (services is not null)
     {
         HttpClient = services.Client ?? httpClient;
         JSRuntime  = services.JsRuntime ?? jSRuntime;
     }
     if (jSRuntime is not null)
     {
         JSRuntime = jSRuntime;
     }
 }
コード例 #2
0
 /// <summary>
 /// Get IDefaultServices to set HttpClient and JSRuntime
 /// </summary>
 /// <param name="services"></param>
 public void SetService(IDefaultServices services)
 {
     HttpClient = services.Client;
     JSRuntime  = services.JsRuntime;
 }