コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }