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); }
public bool Equals(AssociationSettingsModel other) { return(Equals(_element, other?._element)); }