コード例 #1
0
        public async Task DefineMaturtyModelAsync(MaturityModelDomain mm, int level)
        {
            if (CampLevel == null)
            {
                CampLevel = new List <KeyValuePair <Guid, float> >();
            }

            CampLevel.Add(new KeyValuePair <Guid, float>(mm.MaturityModelId, level));

            var mmRepo = UtilDomain.GetService <IMaturityModelRepository>();
            await mmRepo.SaveCampAsync(this);
        }
コード例 #2
0
 public float LevelOfMaturity(Guid maturityModelId)
 {
     return(CampLevel.Where(c => c.Key == maturityModelId).Select(c => c.Value).FirstOrDefault());
 }
コード例 #3
0
 public bool ContainsMaturity(Guid maturityModelId)
 {
     return(CampLevel.Any(c => c.Key == maturityModelId));
 }