public bool PathExists(string path) { OpenEhr.AssumedTypes.IList items = FindMatches(path); if (items.Count > 0) { return(true); } else { return(false); } }
public bool PathUnique(string path) { OpenEhr.AssumedTypes.IList items = FindMatches(path); if (items.Count > 0) { return(items.Count == 1); } else { throw new ApplicationException("Path not exists: " + path); } }
public object ItemAtPath(string path) { OpenEhr.AssumedTypes.IList items = FindMatches(path); if (items.Count > 0) { if (items.Count == 1) { return(items[0]); } else { throw new ApplicationException("Path is not unique: " + path); } } else { throw new ApplicationException("Path not exists: " + path); } }