internal static List <Client> GetAllClients() { List <Client> list = Firebird.GetAllClients(); clientCache.UpdateMany(list.ToArray()); return(list); }
public static List <Device> GetAllDevices() { List <Device> list = Firebird.GetAllDevices(); deviceCache.UpdateMany(list.ToArray()); return(list); }
public static List <Device> GetDevices(int clientId, bool useCache = false) { if (useCache) { return(deviceCache.GetByClientID(clientId)); } else { return(Firebird.GetDevices(clientId)); } }
internal static Client GetClient(int clientID, bool useCache = false) { if (useCache) { if (clientCache.Contains(clientID)) { return((Client)clientCache.Get(clientID)); } } Client c = Firebird.GetClient(clientID); clientCache.Set(c.id, c); return(c); }
public static Device GetDevice(string serial_number, bool useCache = false) { if (useCache) { Device dev = deviceCache.GetBySerialNumber(serial_number); if (dev == null) { return(Firebird.GetDevice(serial_number)); } else { return(dev); } } return(Firebird.GetDevice(serial_number)); }
public static Address GetAddress(int id) { return(Firebird.GetAddress(id)); }
internal static List <ServiceReport> GetServiceReport(int deviceId) { return(Firebird.GetServiceReports(deviceId)); }
internal static Client GetClient(string clientNIP) { return(Firebird.GetClient(clientNIP)); }