public PropertyAttribute(string idShort, DataObjectTypes propertyType) { Property = new Property(new DataType(DataObjectType.Parse(propertyType))) { IdShort = idShort }; }
public PropertyAttribute(string idShort, DataObjectTypes propertyType, string semanticId, KeyElements semanticKeyElement, KeyType semanticKeyType, bool semanticIdLocal) { Property = new Property(new DataType(DataObjectType.Parse(propertyType))) { IdShort = idShort, SemanticId = new Reference(new Key(semanticKeyElement, semanticKeyType, semanticId, semanticIdLocal)) }; }
public static DataObjectType Parse(DataObjectTypes dataObjectTypeEnum) { if (DataObjectTypes.TryGetValue(Enum.GetName(typeof(DataObjectTypes), dataObjectTypeEnum), out DataObjectType dataObjectType)) { return(dataObjectType); } else { throw new InvalidOperationException("Cannot parse " + dataObjectType); } }