/// <inheritdoc /> public override void SetPropertyValue(ElementId element, TypeId typeId, IComparable value) { if (object.ReferenceEquals(value, null)) { throw new NullObjectException("A property value may not be null"); } if (MyGraph.VertexIdSetPerType && IsVertexProperty) { if (typeId != TypeId) { throw new NotSupportedException("SetPropertyValue with a different VertexType/EdgeType than used by property is not supported when using VertexIdSetPerType, create Graph with option bool vertexIdSetPerVertexType set to false"); } } else if (typeId != TypeId) { if (IsVertexProperty) { VertexType vertexTypeIn = MyGraph.GetVertexType(typeId); VertexType vertexType = MyGraph.GetVertexType(TypeId); if (vertexType.SubTypes.Contains(vertexTypeIn) == false) { throw new UnexpectedException("Invalid VertexType used for setting property"); } } else { EdgeType edgeTypeIn = MyGraph.GetEdgeType(typeId); EdgeType edgeType = MyGraph.GetEdgeType(TypeId); if (edgeType.SubTypes.Contains(edgeTypeIn) == false) { throw new UnexpectedException("Invalid EdgeType used for setting property"); } } } SetPropertyValueX(element, (T)value); }