spelling check

This commit is contained in:
Tsanie Lily 2023-09-12 16:29:43 +08:00
parent b501dc5e76
commit 7f01954fc5
4 changed files with 5 additions and 5 deletions

View File

@ -184,7 +184,7 @@ partial class Connectivity
async void OnChange(NetworkReachabilityFlags flags) async void OnChange(NetworkReachabilityFlags flags)
{ {
// Add in artifical delay so the connection status has time to change // Add in artificial delay so the connection status has time to change
// else it will return true no matter what. // else it will return true no matter what.
await Task.Delay(100); await Task.Delay(100);

View File

@ -198,14 +198,14 @@ partial class NetworkHelper : NSObject, INSUrlSessionDataDelegate
{ {
if (IsResponseSuccess(httpResponse)) if (IsResponseSuccess(httpResponse))
{ {
if (networkTask.OnResponsed(httpResponse)) if (networkTask.OnResponded(httpResponse))
{ {
completionHandler(NSUrlSessionResponseDisposition.Allow); completionHandler(NSUrlSessionResponseDisposition.Allow);
} }
else else
{ {
completionHandler(NSUrlSessionResponseDisposition.Cancel); completionHandler(NSUrlSessionResponseDisposition.Cancel);
networkTask.SetException(new TaskCanceledException($"Cancelled on task responsed: {dataTask.CurrentRequest?.Url}", null, networkTask.Token)); networkTask.SetException(new TaskCanceledException($"Cancelled on task responded: {dataTask.CurrentRequest?.Url}", null, networkTask.Token));
} }
} }
else else

View File

@ -22,7 +22,7 @@ partial class NetworkTask
Dispose(); Dispose();
} }
public virtual bool OnResponsed(NSHttpUrlResponse response) public virtual bool OnResponded(NSHttpUrlResponse response)
{ {
return true; return true;
} }

View File

@ -27,7 +27,7 @@ abstract class ContentTask<T, TResult> : NetworkTask
taskSource?.TrySetResult(ex); taskSource?.TrySetResult(ex);
} }
public override bool OnResponsed(NSHttpUrlResponse response) public override bool OnResponded(NSHttpUrlResponse response)
{ {
expectedContentLength = response.ExpectedContentLength; expectedContentLength = response.ExpectedContentLength;
return true; return true;