static void AddVehicle(IDatabase db, Utilities.BuildInfo info, string os, string name, string localPath, string sensors, string suffix = null, string bridge = null) { var url = $"https://{info.DownloadHost}/{info.GitCommit}/{os}/vehicle_{name.ToLowerInvariant()}"; var vehicle = new VehicleModel() { Name = name + (suffix == null ? string.Empty : suffix), Status = "Downloading", Url = url, LocalPath = localPath, BridgeType = bridge, Sensors = sensors, }; db.Insert(vehicle); }
static long AddVehicle(IDatabase db, Utilities.BuildInfo info, Utilities.BuildItem item, string localPath, string sensors, string suffix = null, string bridge = null) { var url = $"https://{info.DownloadHost}/{item.Id}/vehicle_{item.Name}"; var vehicle = new VehicleModel() { Name = item.Name + (suffix == null ? string.Empty : suffix), Status = "Downloading", Url = url, LocalPath = localPath, BridgeType = bridge, Sensors = sensors, }; db.Insert(vehicle); return(vehicle.Id); }