/// <summary> /// Determines whether the specified object is equal to the current <see cref="SchemaSemantics"/>. /// </summary> /// <returns> /// <c>true</c> if the specified object is equal to the current one. /// </returns> /// <param name="obj">The object to compare with the current object. </param> public override bool Equals(object obj) { SchemaSemantics other = obj as SchemaSemantics; if (other == null) { return(false); } if (Vocab == null) { return(Prefix == other.Prefix && Entity == other.Entity); } return(Vocab == other.Vocab && Entity == other.Entity); }
public bool HasSemanticType(SemanticType semanticType) { SchemaSemantics semantics = new SchemaSemantics(semanticType.Vocab, semanticType.EntityName, null); return(Semantics.Any(s => s.Equals(semantics))); }