Exemplo n.º 1
0
 protected override string GenerateMessage() =>
 _template.Replace("{{command}}", Map[CommandType])
 .Replace("{{missionId}}", _missionId.ToString())
 .Replace("{{adminId}}", AdminId.ToString())
 .Replace("{{description}}", _description)
 .Replace("{{remainingTime}}", _remainingType.ToString())
 .Replace("{{radius}}", _zone.Radius.ToString(CultureInfo.InvariantCulture))
 .Replace("{{latitude}}", _zone.Latitude.ToString(CultureInfo.InvariantCulture))
 .Replace("{{longitude}}", _zone.Longitude.ToString(CultureInfo.InvariantCulture));
Exemplo n.º 2
0
        /// <summary>
        /// 获取需要通知的设备
        /// </summary>
        /// <param name="AdminIds"></param>
        /// <returns></returns>
        private static List <HubInfo> GetCurAdminDeviceIds(params int[] AdminIds)
        {
            List <HubInfo> list = new List <HubInfo>();

            foreach (var AdminId in AdminIds)
            {
                var curDeviceIds = _hubInfo.Where(w => w.AdminId == AdminId.ToString()).ToList();
                list.AddRange(curDeviceIds);
            }
            return(list);
        }