You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
36 lines
1.2 KiB
using AIK.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Media.Imaging;
|
|
|
|
namespace AIK.Service.IService
|
|
{
|
|
public interface IVehDataService
|
|
{
|
|
Task<List<CarfactoryClass>> GetVehDataAsync(string vhetype, bool forceRefresh = false);
|
|
Task<List<CarfactoryClass>> GetVehDataFromApiAsync(string vhetype);
|
|
Task<bool> IsCacheValidAsync();
|
|
Task ClearCacheAsync();
|
|
Task<CacheInfo> GetCacheInfoAsync();
|
|
|
|
Task<List<VehModelClass>> GetVehKeyDataAsync(int id, bool forceRefresh = false);
|
|
Task<List<VehModelClass>> GetVehKeyDataFromApiAsync(int id);
|
|
|
|
Task<BitmapImage> GetVehKeyImgAsync(string url, bool forceRefresh = false);
|
|
Task<BitmapImage> GetVehKeyImgDataFromApiAsync(string url);
|
|
|
|
Task<List<VehModelClass>> GetVehKeyDataByIdAsync(int id);
|
|
|
|
}
|
|
public class CacheInfo
|
|
{
|
|
public bool IsValid { get; set; }
|
|
public DateTime? LastUpdateTime { get; set; }
|
|
public int DataCount { get; set; }
|
|
public long CacheSize { get; set; }
|
|
public TimeSpan? TimeToExpire { get; set; }
|
|
}
|
|
}
|
|
|