/// <summary> /// Validates if an <see cref="ObjectIdentifier"/> is a table. /// </summary> /// <param name="identifier">The object identifier.</param> /// <returns></returns> public bool ValidateTable(ObjectIdentifier identifier) { if (identifier == null) { throw new ArgumentNullException("identifier"); } return(IsTableId(identifier.ToNumerical())); }
public static string GetTextual(ObjectIdentifier id, IObjectRegistry registry) { if (id == null) { throw new ArgumentNullException("id"); } IObjectRegistry objects = registry ?? ObjectRegistry.Default; return(objects.Translate(id.ToNumerical())); }
public static string GetStringOf(ObjectIdentifier id, IObjectRegistry objects) { if (objects == null) { return(id.ToString()); } string result = objects.Tree.Search(id.ToNumerical()).AlternativeText; return(string.IsNullOrEmpty(result) ? id.ToString() : result); }
/// <summary> /// Validates if an <see cref="ObjectIdentifier"/> is a table. /// </summary> /// <param name="identifier">The object identifier.</param> /// <returns></returns> public bool ValidateTable(ObjectIdentifier identifier) { if (identifier == null) { throw new ArgumentNullException("identifier"); } try { return(IsTableId(identifier.ToNumerical())); } catch (ArgumentOutOfRangeException) { // if no matching definition found, refuse to continue. return(false); } }