Example #1
0
 public static void MapTo(this ContenderList list, CandidateListEntity entity)
 {
     entity.name         = list.Name;
     entity.ownerId      = list.OwnerId;
     entity.sharedWithId = list.SharedWithId;
     entity.createdTime  = list.CreatedTime;
     entity.isDeleted    = list.IsDeleted;
     entity.listType     = list.ListType;
 }
Example #2
0
        public static CandidateListEntity Map(this ContenderList list)
        {
            var entity = new CandidateListEntity {
                id = list.Id
            };

            list.MapTo(entity);
            return(entity);
        }
Example #3
0
        private static bool CanAccessFolder(IEmployer employer, ContenderList folder, bool allowDeleted)
        {
            if (employer == null)
            {
                return(false);
            }
            if (folder == null)
            {
                return(false);
            }
            if (!allowDeleted && folder.IsDeleted)
            {
                return(false);
            }

            return(true);
        }
Example #4
0
        private static bool CanAccessFlagList(IEmployer employer, ContenderList list, bool allowDeleted)
        {
            if (employer == null)
            {
                return(false);
            }
            if (list == null)
            {
                return(false);
            }
            if (!allowDeleted && list.IsDeleted)
            {
                return(false);
            }

            return(true);
        }
Example #5
0
 void IContenderListsCommand.UpdateList(ContenderList contenderList)
 {
     contenderList.Validate();
     _repository.UpdateList(contenderList);
 }
Example #6
0
 void IContenderListsCommand.CreateList(ContenderList contenderList)
 {
     contenderList.Prepare();
     contenderList.Validate();
     _repository.CreateList(contenderList);
 }