private void Add(CodeblockItem item) { if (!Codeblocks.ContainsKey(item.Identity.ID)) { Codeblocks.Add(item.Identity.ID, item); } }
/// <summary> /// Returns the codeblock in this collection by its id. Returns null if the ID isn't found. /// </summary> public CodeblockItem this[string id] => Codeblocks.ContainsKey(id) ? Codeblocks[id] : null;