/// <summary> /// Fine element definition with same path (except for first part) /// </summary> /// <param name="e"></param> /// <returns></returns> public bool TryFindMatch(ElementDefinition e, out ElementDefinition match) { if (e is null) { throw new ArgumentNullException(nameof(e)); } String uniquePath = ElementDictionary.UniquePath(e); return(this.elementDictionary.TryGetValue(uniquePath, out match)); }
/// <summary> /// Fine element definition with same path (except for first part) /// </summary> /// <param name="e"></param> /// <returns></returns> public void Add(ElementDefinition e) { if (e is null) { throw new ArgumentNullException(nameof(e)); } String path = ElementDictionary.UniquePath(e); if (path == null) { throw new Exception($"Invalid path for elemend {e.ElementId}"); } elementDictionary.Add(path, e); }