Пример #1
0
        public async Task HandleFileUploaded(int fileIndex, string fileName, long fileSize, string fileType, long fileLastModified, int responseStatus, string responseText)
        {
            var fileUploaded = new FileUploadedEventArgs()
            {
                FileIndex        = fileIndex,
                OriginalFileName = fileName,
                ContentType      = fileType,
                Size             = fileSize,
                LastModified     = DateTimeOffset.FromUnixTimeMilliseconds(fileLastModified),
                ResponseStatus   = (HttpStatusCode)responseStatus,
                ResponseText     = responseText,
            };

            filesUploaded?.Add(fileUploaded);
            await InvokeOnFileUploadedAsync(fileUploaded);
        }
Пример #2
0
 /// <summary>
 /// Triggers the <see cref="OnFileUploaded"/> event. Allows interception of the event in derived components.
 /// </summary>
 protected virtual Task InvokeOnFileUploadedAsync(FileUploadedEventArgs args) => OnFileUploaded.InvokeAsync(args);