Example #1
0
        public static Category RegisterCategory(string name)
        {
            Category category;
            if (m_mapCategories.TryGetValue(name, out category))
                return category;

            category = new Category(name);
            m_hshCategories.Add(category);
            m_mapCategories.Add(name, category);

            if (CategoryAdded != null)
            {
                var args = new CategoryManagerEventArgs(category);
                CategoryAdded(null, args);
            }

            return category;
        }
Example #2
0
 public Asset(dynamic json)
 {
     m_strName = json.name;
     m_strType = json.type;
     m_Category = CategoryManager.RegisterCategory(json.category);
 }
Example #3
0
 public static IList<Asset> GetAssetsForCategory(Category category)
 {
     return m_mapAssets.Select(x => x.Value).Where(x => x.Category == category).ToList();
 }
Example #4
0
 public CategoryManagerEventArgs(Category category)
 {
     Category = category;
 }