Example #1
0
        public static GuardRecord CreateFromInputString(string str)
        {
            GuardRecord record = new GuardRecord();

            record.Initialize(str);
            return(record);
        }
        private void CreateRecord(string str)
        {
            GuardRecord record = GuardRecord.CreateFromInputString(str);

            if (record != null)
            {
                GuardRecordList.Add(record);
            }
        }
        private Guard GetCreateGuard(GuardRecord rec)
        {
            Guard guard = GuardList.FirstOrDefault(x => x.Id == rec.GuardId);

            if (guard == null)
            {
                guard      = new Guard();
                guard.Id   = rec.GuardId;
                guard.Name = rec.GuardName;
                GuardList.Add(guard);
            }
            return(guard);
        }