public void Delete(Variable context) { if (!this.variables.Remove(context.Name)) { throw new InvalidOperationException(); } }
public VariableHandler(Variable variable, VariableCollection collection) { this.variable = variable; this.collection = collection; this.collection.Add(variable); }
public void Add(Variable context) { if (this.variables.ContainsKey(context.Name)) { throw new InvalidOperationException(); } this.variables.Add(context.Name, context); }