Beispiel #1
0
 private void Add(CodeblockItem item)
 {
     if (!Codeblocks.ContainsKey(item.Identity.ID))
     {
         Codeblocks.Add(item.Identity.ID, item);
     }
 }
Beispiel #2
0
 /// <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;