SIL.FieldWorks.Common.Controls.LayoutMerger.CopyAttributes C# (CSharp) Method

CopyAttributes() private method

private CopyAttributes ( XmlNode source, XmlNode dest ) : void
source System.Xml.XmlNode
dest System.Xml.XmlNode
return void
		private void CopyAttributes(XmlNode source, XmlNode dest)
		{
			// Copy all layout attributes from the standard pattern to the output
			foreach (XmlAttribute attr in source.Attributes)
			{
				var xa = m_dest.CreateAttribute(attr.Name);
				dest.Attributes.Append(xa);
				xa.Value = attr.Value;
				if (attr.Name == NameAttr && !string.IsNullOrEmpty(m_layoutParamAttrSuffix))
				{
					// This suffix also attaches to the 'name' attribute of the layout itself
					xa.Value = attr.Value + m_layoutParamAttrSuffix;
				}
			}
		}