コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 public bool TryGetBlock(string name, out ScriptingContextBlock group)
 {
     return(_objectGroups.TryGetValue(name, out group));
 }
コード例 #4
0
 public bool TryGetChildBlock(string name, out ScriptingContextBlock child)
 {
     return(_children.TryGetValue(name, out child));
 }