static public bool RegisterNewBeacon(string id, double mulltiplier, double incomePerMinute, Beacon.BeaconType beaconType) { Console.WriteLine("In Register New Beacon"); var result = Beacons_db.TryAdd(id, new Beacon(id, mulltiplier, incomePerMinute, beaconType)); SaveDB(); return(result); }
public Beacon(string id, Beacon.BeaconType beacon_type) { Id = id; beaconType = beacon_type; }
static public bool RegisterNewBeacon(MyDeviceView device, double mulltiplier, double incomePerMinute, Beacon.BeaconType beaconType) { var result = Beacons_db.TryAdd(device.id.ToString(), new Beacon(device.id.ToString(), mulltiplier, incomePerMinute, beaconType)); SaveDB(); return(result); }