예제 #1
0
    /// <summary>
    /// 技能数据;
    /// </summary>
    /// <param name="key"></param>
    /// <returns></returns>
    public CapitalData GetData(CapitalType key)
    {
        if (m_CapitalDataDic == null)
        {
            LoadCapitalData();
        }

        return(m_CapitalDataDic.ContainsKey(key) ? m_CapitalDataDic[key] : null);
    }
예제 #2
0
 public Capital(long id, string title, string description, long value, AssetType asset, CapitalType type)
 {
     Id           = id;
     Title        = title;
     Description  = description;
     Value        = value;
     Asset        = asset;
     Type         = type;
     CreationDate = DateTime.Today;
 }
        public List <CapitalDataViewModel> GetCapitalsByType(CapitalType type)
        {
            List <Capital> capitals = capitalRepo.Get(x => x.Type == type);

            if (capitals is null)
            {
                return(null);
            }
            List <CapitalDataViewModel> result = mapper.Map <List <Capital>, List <CapitalDataViewModel> >(capitals);

            return(result);
        }