/// <summary> /// Checks that the proposed new value for the unified structure used this and, in that case, /// sets the Unified structure to the proposed value /// </summary> /// <param name="newValue">The proposed new value for the unified structure</param> public void ResetUnifiedStructure(UnifiedStructure newValue) { if (newValue.MergedStructures.Contains(this)) { UnifiedStructure = newValue; } }
/// <summary> /// Checks that the unified structure includes the structure and, in that case, /// indicates that the types match /// </summary> /// <param name="structureType"></param> /// <param name="unifiedStructureType"></param> /// <returns></returns> private bool MatchStructures(Structure structureType, UnifiedStructure unifiedStructureType) { bool retVal = false; if (structureType != null && unifiedStructureType != null) { retVal = unifiedStructureType.MergedStructures.Contains(structureType); } return(retVal); }
/// <summary> /// Computes the unified structure according to the update information /// </summary> public void ComputeUnifiedStructure() { if (Updates != null || UpdatedBy.Count > 0) { UnifiedStructure structure = UnifiedStructure as UnifiedStructure; if (structure == null) { // This is the first time the unified structure is built for this element UnifiedStructure = new UnifiedStructure(this); } else { structure.Rebuild(this); } } else { UnifiedStructure = this; } }