Fix calls to nullable events
This commit is contained in:
parent
b67f9953de
commit
af51421b63
1 changed files with 5 additions and 5 deletions
|
@ -88,16 +88,16 @@ namespace DT2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetUrlSync(string url) {
|
public int GetUrlSync(string url) {
|
||||||
PageStart(url);
|
PageStart?.Invoke(url);
|
||||||
int size = GetPageSize(url);
|
int size = GetPageSize(url);
|
||||||
PageLoaded(url, size);
|
PageLoaded?.Invoke(url, size);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<int> GetUrlAsync(string url) {
|
public async Task<int> GetUrlAsync(string url) {
|
||||||
PageStart(url);
|
PageStart?.Invoke(url);
|
||||||
int size = await Task.Run(() => GetPageSize(url));
|
int size = await Task.Run(() => GetPageSize(url));
|
||||||
PageLoaded(url, size);
|
PageLoaded?.Invoke(url, size);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ namespace DT2 {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
size = await task.WaitAsync(TimeSpan.FromMilliseconds(millis));
|
size = await task.WaitAsync(TimeSpan.FromMilliseconds(millis));
|
||||||
PageLoaded(url, size);
|
PageLoaded?.Invoke(url, size);
|
||||||
}
|
}
|
||||||
catch (TimeoutException)
|
catch (TimeoutException)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue