-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
764a617
commit 1f15e22
Showing
9 changed files
with
209 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ abcdef | |
alt | ||
App | ||
Blazor | ||
Center | ||
Clickable | ||
Css | ||
dd | ||
|
22 changes: 22 additions & 0 deletions
22
PanoramicData.Blazor/Arguments/DropZoneAllProgressEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace PanoramicData.Blazor.Arguments; | ||
|
||
/// <summary> | ||
/// The DropZoneAllProgressEventArgs class provides information for PDDropZone batch progress events. | ||
/// </summary> | ||
public class DropZoneAllProgressEventArgs | ||
{ | ||
/// <summary> | ||
/// Gets or sets the progress (0-100). | ||
/// </summary> | ||
public double UploadProgress { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the total number of bytes to be sent. | ||
/// </summary> | ||
public long TotalBytes { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the total number of bytes sent. | ||
/// </summary> | ||
public long TotalBytesSent { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
PanoramicData.Blazor/Arguments/DropZoneUploadCompletedEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
namespace PanoramicData.Blazor.Arguments; | ||
|
||
/// <summary> | ||
/// The DropZoneUploadCompletedEventArgs class provides information for PDDropZone upload completed events. | ||
/// </summary> | ||
public class DropZoneUploadCompletedEventArgs : DropZoneUploadEventArgs | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the DropZoneUploadCompletedEventArgs class. | ||
/// </summary> | ||
/// <param name="path">The path where the file is being uploaded.</param> | ||
/// <param name="name">The name of the file being uploaded.</param> | ||
/// <param name="size">The size of the file being uploaded.</param> | ||
public DropZoneUploadCompletedEventArgs(string path, string name, long size, string key, string sessionId) | ||
: base(path, name, size, key, sessionId) | ||
{ | ||
Success = true; | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the DropZoneUploadCompletedEventArgs class. | ||
/// </summary> | ||
/// <param name="path">The path where the file is being uploaded.</param> | ||
/// <param name="name">The name of the file being uploaded.</param> | ||
/// <param name="size">The size of the file being uploaded.</param> | ||
/// <param name="reason">Reason for the upload failure.</param> | ||
public DropZoneUploadCompletedEventArgs(string path, string name, long size, string key, string sessionId, string reason) | ||
: base(path, name, size, key, sessionId) | ||
{ | ||
Reason = reason; | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets whether the upload was completed successfully or not. | ||
/// </summary> | ||
public bool Success { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets an optional short message as to why the upload failed. | ||
/// </summary> | ||
public string Reason { get; set; } = string.Empty; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
namespace PanoramicData.Blazor.Arguments; | ||
|
||
/// <summary> | ||
/// The DropZoneUploadEventArgs class provides information for PDDropZone upload events. | ||
/// </summary> | ||
/// <remarks> | ||
/// Initializes a new instance of the DropZoneUploadEventArgs class. | ||
/// </remarks> | ||
/// <param name="path">The path where the file is being uploaded.</param> | ||
/// <param name="name">The name of the file being uploaded.</param> | ||
/// <param name="size">The size of the file being uploaded.</param> | ||
/// <param name="key">Unique key for upload.</param> | ||
/// <param name="sessionId">Unique identifier for the session.</param> | ||
public class DropZoneUploadEventArgs(string path, string name, long size, string key, string sessionId) | ||
{ | ||
|
||
/// <summary> | ||
/// Gets or sets the path where the file is being uploaded to. | ||
/// </summary> | ||
public string Path { get; set; } = path; | ||
|
||
/// <summary> | ||
/// Gets or sets the name of the file being uploaded. | ||
/// </summary> | ||
public string Name { get; set; } = name; | ||
|
||
/// <summary> | ||
/// Gets or sets the size of the file being uploaded. | ||
/// </summary> | ||
public long Size { get; set; } = size; | ||
|
||
/// <summary> | ||
/// Gets or sets the unique identifier of the file being uploaded. | ||
/// </summary> | ||
public string Key { get; set; } = key; | ||
|
||
/// <summary> | ||
/// Gets or sets the unique identifier of the session. | ||
/// </summary> | ||
public string SessionId { get; set; } = sessionId; | ||
|
||
/// <summary> | ||
/// Gets or sets additional form fields to be sent with the upload request. | ||
/// </summary> | ||
public Dictionary<string, string> FormFields { get; set; } = []; | ||
|
||
/// <summary> | ||
/// Gets or sets the total number of files in the batch. | ||
/// </summary> | ||
public int BatchCount { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the current file within the batch being uploaded. | ||
/// </summary> | ||
public int BatchProgress { get; set; } | ||
|
||
public string FullPath | ||
{ | ||
get | ||
{ | ||
return $"{Path.TrimEnd('/')}/{Name.TrimStart('/')}"; | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
PanoramicData.Blazor/Arguments/DropZoneUploadProgressEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace PanoramicData.Blazor.Arguments; | ||
|
||
/// <summary> | ||
/// The DropZoneUploadProgressEventArgs class provides information for PDDropZone upload events. | ||
/// </summary> | ||
/// <remarks> | ||
/// Initializes a new instance of the DropZoneUploadEventArgs class. | ||
/// </remarks> | ||
/// <param name="path">The path where the file is being uploaded.</param> | ||
/// <param name="name">The name of the file being uploaded.</param> | ||
/// <param name="size">The size of the file being uploaded.</param> | ||
public class DropZoneUploadProgressEventArgs(string path, string name, long size, string key, string sessionId, double progress) : DropZoneUploadEventArgs(path, name, size, key, sessionId) | ||
{ | ||
|
||
/// <summary> | ||
/// Gets or sets the | ||
/// </summary> | ||
public double Progress { get; set; } = progress; | ||
|
||
/// <summary> | ||
/// Gets or sets whether the operation should be cancelled. | ||
/// </summary> | ||
public bool Cancel { get; set; } | ||
|
||
/// <summary> | ||
/// Optional string detailing why the operation is to be cancelled. | ||
/// </summary> | ||
public string CancelReason { get; set; } = string.Empty; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// This file is used by Code Analysis to maintain SuppressMessage | ||
// attributes that are applied to this project. | ||
// Project-level suppressions either have no target or are given | ||
// a specific target and scoped to a namespace, type, member, etc. | ||
|
||
using System.Diagnostics.CodeAnalysis; | ||
|
||
[assembly: SuppressMessage( | ||
"Naming", | ||
"CA1711:Identifiers should not have incorrect suffix", | ||
Justification = "Project policy", | ||
Scope = "namespaceanddescendants", | ||
Target = "~N:PanoramicData.Blazor" | ||
)] | ||
[assembly: SuppressMessage( | ||
"Performance", | ||
"CA1848:Use the LoggerMessage delegates", | ||
Justification = "Performance gain not worth the effort", | ||
Scope = "namespaceanddescendants", | ||
Target = "~N:PanoramicData.Blazor" | ||
)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.