Ejemplo n.º 1
0
 /// <summary>Returns whether given symbol is already used for a device or node.</summary>
 /// <param name="symbol"></param>
 /// <returns></returns>
 private bool IsDefined(string symbol)
 {
     return(DefinedDevices.Contains(symbol) || NodeIndices.ContainsKey(symbol));
 }
Ejemplo n.º 2
0
 /// <summary>Adds given symbol to the set of device names, returns true if it not already used.</summary>
 /// <param name="name"></param>
 /// <returns></returns>
 public bool TryDefineDevice(string name)
 {
     return(!IsDefined(name) && DefinedDevices.Add(name));
 }