Exemple #1
0
 public PropertyAttribute(string idShort, DataObjectTypes propertyType)
 {
     Property = new Property(new DataType(DataObjectType.Parse(propertyType)))
     {
         IdShort = idShort
     };
 }
Exemple #2
0
 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))
     };
 }
Exemple #3
0
 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);
     }
 }