public void AddObjectGroup(ScriptingContextBlock group) { if (_objectGroups.ContainsKey(group.Name)) { throw new InvalidOperationException($"The context collection has multiple definitions for the object group {group.Name}."); } else { _objectGroups.Add(group.Name, group); } }
public void AddChildBlock(ScriptingContextBlock child) { if (_children.ContainsKey(child.Name)) { throw new InvalidOperationException($"The context object {Name} has multiple definitions for the child {child.Name}."); } else { _children.Add(child.Name, child); } }
public bool TryGetBlock(string name, out ScriptingContextBlock group) { return(_objectGroups.TryGetValue(name, out group)); }
public bool TryGetChildBlock(string name, out ScriptingContextBlock child) { return(_children.TryGetValue(name, out child)); }