SIL.FieldWorks.FDO.DomainServices.DataMigration.Version19WritingSystemDefn.WriteIdentityElement C# (CSharp) Method

WriteIdentityElement() private method

private WriteIdentityElement ( XmlWriter writer ) : void
writer System.Xml.XmlWriter
return void
		private void WriteIdentityElement(XmlWriter writer)
		{
			writer.WriteStartElement("identity");
			writer.WriteStartElement("version");
			// Original writes the version number and description, but nothing was trying to load these.
			writer.WriteAttributeString("number", "");
			writer.WriteEndElement();
			WriteElementWithAttribute(writer, "generation", "date", String.Format("{0:s}", DateTime.Now));

			bool copyFlexFormat = false;
			string language = String.Empty;
			string script = String.Empty;
			string territory = String.Empty;
			string variant = String.Empty;
			WriteElementWithAttribute(writer, "language", "type", ISO);
			if (!String.IsNullOrEmpty(Script))
			{
				WriteElementWithAttribute(writer, "script", "type", Script);
			}
			if (!String.IsNullOrEmpty(Region))
			{
				WriteElementWithAttribute(writer, "territory", "type", Region);
			}
			if (!String.IsNullOrEmpty(Variant))
			{
				WriteElementWithAttribute(writer, "variant", "type", Variant);
			}
			writer.WriteEndElement();
		}
	}