protected virtual BeaconRegionStatus SetRegion(BeaconRegion region) { var key = region.ToString(); BeaconRegionStatus status = null; if (this.regionStates.ContainsKey(key)) { status = this.regionStates[key]; } else { status = new BeaconRegionStatus(region); this.regionStates.Add(key, status); } return(status); }
protected virtual BeaconRegionStatus SetRegion(BeaconRegion region) { var key = region.ToString(); BeaconRegionStatus status = null; lock (this.regionStates) { if (this.regionStates.ContainsKey(key)) { status = this.regionStates[key]; } else { status = new BeaconRegionStatus(region); this.regionStates.Add(key, status); } } this.TryStartMonitorScanner(); return(status); }