/////////////////////////////////////////////////////////////////////////////////////////////////// ////////////BUILD FROM MUTABLE OBJECTS ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////// #region Constructors and Destructors /// <summary> /// Initializes a new instance of the <see cref="ComponentMapCore"/> class. /// </summary> /// <param name="compMap"> /// The comp map. /// </param> /// <param name="parent"> /// The parent. /// </param> /// <exception cref="SdmxSemmanticException"> /// Throws Validate exception. /// </exception> protected internal ComponentMapCore(IComponentMapMutableObject compMap, ISdmxStructure parent) : base(compMap, parent) { if (compMap.MapConceptRef != null) { this.mapConceptRef = compMap.MapConceptRef; } if (compMap.MapTargetConceptRef != null) { this.mapTargetConceptRef = compMap.MapTargetConceptRef; } if (compMap.RepMapRef != null) { this.repMapRef = new RepresentationMapRefCore(compMap.RepMapRef, this); } try { this.Validate(); } catch (SdmxSemmanticException e) { throw new SdmxSemmanticException(e, ExceptionCode.FailValidation, this); } }
/// <summary> /// The add component. /// </summary> /// <param name="component"> /// The component. /// </param> public void AddComponent(IComponentMapMutableObject component) { this._components.Add(component); }