using HighWayIot.Repository.domain;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace RFIDSocket
{
    public class LogControl
    {
        public static List<RFIDContent> LogContentSelect(List<RFIDContent> lists, string content)
        {
            return lists.Where(x => x.Content.Contains(content)).ToList();
        }

        public static List<RFIDContent> LogReadKindSelect(List<RFIDContent> lists, string readKind)
        {
            return lists.Where(x => x.ReadKind == readKind).ToList();
        }

        public static List<RFIDContent> LogDeviceNoSelect(List<RFIDContent> lists, int deviceNo)
        {
            return lists.Where(x => x.DeviceNo == deviceNo).ToList();
        }

        public static List<RFIDContent> LogTimeSelect(List<RFIDContent> lists, DateTime start, DateTime end)
        {
            return lists.Where(x => x.LogTime >= start && x.LogTime <= end).ToList();
        }
    }
}
