public AssociationCreationOptionModel(IElement element, string requiredType = SpecializationType)
 {
     if (!requiredType.Equals(element.SpecializationType, StringComparison.InvariantCultureIgnoreCase))
     {
         throw new Exception($"Cannot create a '{GetType().Name}' from element with specialization type '{element.SpecializationType}'. Must be of type '{SpecializationType}'");
     }
     _element = element;
     Type     = new AssociationSettingsModel((IElement)TypeReference.Element);
 }
Esempio n. 2
0
 public bool Equals(AssociationSettingsModel other)
 {
     return(Equals(_element, other?._element));
 }