public void setName(VarI1 var, Name.Asserted name) { if (this.vars.Contain(var)) { if ( this.namings .Where(x => x.Key != var) .Select(x => x.Value) .Contain_eqDefault <Name.Asserted, nilnul.name.Eq>(name) ) { throw new Exception("there are conflicting names."); } else { _namings[var] = name; } } else { if ( this.namings .Select(x => x.Value) .Contain_eqDefault <Name.Asserted, nilnul.name.Eq>(name) ) { throw new Exception("there are conflicting names."); } else { _namings[var] = name; // If the specified key is not found, a get operation throws a KeyNotFoundException, and a set operation creates a new element with the specified key. } } }
public Name.Asserted getEnsuredName(VarI1 var) { if (!_namings.ContainsKey(var)) { var _previousAutoName1 = getNextAutoName(); setName(var, _previousAutoName1); return(_previousAutoName1); } else { return(_namings[var]); } }
public Name.Asserted getEnsuredName(VarI1 var) { if (!_namings.ContainsKey(var)) { setName(var, _previousAutoName1 = getNextAutoName()); return(_previousAutoName1); } else { return(_namings[var]); } //return _names[var]; //throw new NotImplementedException(); }
public void setName(VarI1 var, string name) { setName(var, new Name.Asserted(name)); }
static public bool NotContain(this IEnumerable <VarI1> str, VarI1 x) { return(!str.Contain(x)); }
static public bool Contain(this IEnumerable <VarI1> str, VarI1 x) { return(str.Contains(x, var.Eq_ofVarI.Instance)); }