/// <summary> /// Creates a copy of <c>this</c> including copies of any <see cref="XmlAttribute"/>s /// </summary> /// <returns>The copy</returns> protected override Property CopyProtected() { XmlProperty xmlProp = (XmlProperty)base.CopyProtected(); string nsUri = GetNamespaceUri(); xmlProp.SetQName(LocalName, nsUri == null ? "" : nsUri); foreach (XmlAttribute attr in Attributes.ContentsAs_Enumerable) { xmlProp.SetAttribute(attr.Copy()); } return(xmlProp); }
/// <summary> /// Creates an export of <c>this</c> for a given destination <see cref="Presentation"/> /// </summary> /// <param name="destPres">The given destination presentaton</param> /// <returns>The exported xml property</returns> protected override Property ExportProtected(Presentation destPres) { XmlProperty xmlProp = base.ExportProtected(destPres) as XmlProperty; if (xmlProp == null) { throw new exception.FactoryCannotCreateTypeException(String.Format( "The property factory can not create an XmlProperty matching QName {0}:{1}", GetXukNamespace(), GetXukName())); } string nsUri = GetNamespaceUri(); xmlProp.SetQName(LocalName, nsUri == null ? "" : nsUri); foreach (XmlAttribute attr in Attributes.ContentsAs_Enumerable) { xmlProp.SetAttribute(attr.Copy()); } return(xmlProp); }