/// <summary> /// Initializes new instance of ClassPropertyLocation for derived property /// </summary> public ClassPropertyLocation(Class dataClass, Property p, ClassPropertyLocation derivedFrom, string deriveType) : this(dataClass, p, PropertyValueLocationType.Derived) { if (derivedFrom.Class != dataClass) { throw new NotSupportedException("Property can be derived from property of the same class"); } DerivedFrom = derivedFrom; DeriveType = deriveType; }
public void AddClassProperty(ClassPropertyLocation classProp) { if (!PropertiesByClassId.ContainsKey(classProp.Class.ID)) { PropertiesByClassId[classProp.Class.ID] = new List <Property>(); } PropertiesByClassId[classProp.Class.ID].Add(classProp.Property); if (!ClassesByPropertyId.ContainsKey(classProp.Property.ID)) { ClassesByPropertyId[classProp.Property.ID] = new List <Class>(); } ClassesByPropertyId[classProp.Property.ID].Add(classProp.Class); if (!ValueLocationByPropertyClass.ContainsKey(classProp.Property.ID)) { ValueLocationByPropertyClass[classProp.Property.ID] = new Dictionary <string, ClassPropertyLocation>(); } ValueLocationByPropertyClass[classProp.Property.ID][classProp.Class.ID] = classProp; }