public ColoringMsx AddNew(string displayName) { ColoringMsx newColoring = new ColoringMsx(); newColoring.DisplayName = displayName; GuidToColoringDict.Add(newColoring.MsxId, newColoring); orderedItems.Add(newColoring.MsxId); return(newColoring); }
public List <CategoryKeyMsx> GetCategoriesForColoring(ColoringMsx coloring) { List <CategoryKeyMsx> list = new List <CategoryKeyMsx>(); foreach (KeyValuePair <string, ColoringMsx> current in this.GuidToColoringDict) { if (object.ReferenceEquals(coloring, current.Value)) { foreach (KeyValuePair <CategoryKeyMsx, string> current2 in this.CategoryToGuidDict) { if (current2.Value == current.Key) { list.Add(current2.Key); } } } } return(list); }
public void AddMapping(CategoryKeyMsx category, ColoringMsx coloring) { CategoryToGuidDict[category] = coloring.MsxId; }