fixes recent commit
This commit is contained in:
parent
6cd833739e
commit
26f0079087
1 changed files with 5 additions and 6 deletions
|
|
@ -6,7 +6,7 @@ using Newtonsoft.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
namespace BookAStar
|
namespace BookAStar.Helpers
|
||||||
{
|
{
|
||||||
|
|
||||||
public class RemoteEntity<V,K> : LocalEntity<V, K>, ICommand where K : IEquatable<K>
|
public class RemoteEntity<V,K> : LocalEntity<V, K>, ICommand where K : IEquatable<K>
|
||||||
|
|
@ -34,8 +34,7 @@ namespace BookAStar
|
||||||
if (IsExecuting)
|
if (IsExecuting)
|
||||||
throw new InvalidOperationException("Already executing");
|
throw new InvalidOperationException("Already executing");
|
||||||
IsExecuting = true;
|
IsExecuting = true;
|
||||||
if (CanExecuteChanged != null)
|
CanExecuteChanged.Invoke(this, new EventArgs());
|
||||||
CanExecuteChanged.Invoke(this, new EventArgs());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -45,7 +44,7 @@ namespace BookAStar
|
||||||
public async void Execute(object parameter)
|
public async void Execute(object parameter)
|
||||||
{
|
{
|
||||||
BeforeExecute();
|
BeforeExecute();
|
||||||
using (HttpClient client = CreateClient())
|
using (HttpClient client = UserHelpers.CreateClient())
|
||||||
{
|
{
|
||||||
// Get the whole data
|
// Get the whole data
|
||||||
try
|
try
|
||||||
|
|
@ -61,6 +60,7 @@ namespace BookAStar
|
||||||
{
|
{
|
||||||
Merge(item);
|
Merge(item);
|
||||||
}
|
}
|
||||||
|
this.SaveCollection();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -75,8 +75,7 @@ namespace BookAStar
|
||||||
private void AfterExecuting()
|
private void AfterExecuting()
|
||||||
{
|
{
|
||||||
IsExecuting = false;
|
IsExecuting = false;
|
||||||
if (CanExecuteChanged != null)
|
CanExecuteChanged.Invoke(this, new EventArgs());
|
||||||
CanExecuteChanged.Invoke(this, new EventArgs());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<V> Get(K key)
|
public async Task<V> Get(K key)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue