Skip to content

Commit a97a0dc

Browse files
Code Cleanup
1 parent ad5561a commit a97a0dc

3 files changed

Lines changed: 8 additions & 9 deletions

File tree

src/KristofferStrube.Blazor.FileAPI/Blob.InProcess.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using KristofferStrube.Blazor.Streams;
2-
using Microsoft.JSInterop;
1+
using Microsoft.JSInterop;
32

43
namespace KristofferStrube.Blazor.FileAPI;
54

src/KristofferStrube.Blazor.FileAPI/FileReader.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ public async Task AbortAsync(Blob blob)
6262
await JSReference.InvokeVoidAsync("abort", blob.JSReference);
6363
}
6464

65-
const ushort EMPTY = 0;
66-
const ushort LOADING = 1;
67-
const ushort DONE = 2;
65+
public const ushort EMPTY = 0;
66+
public const ushort LOADING = 1;
67+
public const ushort DONE = 2;
6868

6969
public async Task<ushort> GetReadyStateAsync()
7070
{
71-
var helper = await helperTask.Value;
71+
IJSObjectReference helper = await helperTask.Value;
7272
return await helper.InvokeAsync<ushort>("readyState");
7373
}
7474
}

src/KristofferStrube.Blazor.FileAPI/ProgressEvent.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ internal ProgressEvent(IJSRuntime jSRuntime, IJSObjectReference jSReference) : b
1616

1717
public async Task<bool> GetLengthComputableAsync()
1818
{
19-
var helper = await helperTask.Value;
19+
IJSObjectReference helper = await helperTask.Value;
2020
return await helper.InvokeAsync<bool>("getAttribute", JSReference, "lengthComputable");
2121
}
2222

2323
public async Task<ulong> GetLoadedAsync()
2424
{
25-
var helper = await helperTask.Value;
25+
IJSObjectReference helper = await helperTask.Value;
2626
return await helper.InvokeAsync<ulong>("getAttribute", JSReference, "loaded");
2727
}
2828

2929
public async Task<ulong> GetTotalAsync()
3030
{
31-
var helper = await helperTask.Value;
31+
IJSObjectReference helper = await helperTask.Value;
3232
return await helper.InvokeAsync<ulong>("getAttribute", JSReference, "total");
3333
}
3434
}

0 commit comments

Comments
 (0)