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

WriteCollationsElement() private method

private WriteCollationsElement ( XmlWriter writer ) : void
writer System.Xml.XmlWriter
return void
		private void WriteCollationsElement(XmlWriter writer)
		{
			if (SortUsing == WritingSystemDefinition.SortRulesType.DefaultOrdering)
			{
				return;
			}
			writer.WriteStartElement("collations");
			writer.WriteStartElement("collation");
			switch (SortUsing)
			{
				case WritingSystemDefinition.SortRulesType.OtherLanguage:
					WriteCollationRulesFromOtherLanguage(writer);
					break;
				case WritingSystemDefinition.SortRulesType.CustomSimple:
					WriteCollationRulesFromCustomSimple(writer);
					break;
				case WritingSystemDefinition.SortRulesType.CustomICU:
					WriteCollationRulesFromCustomICU(writer);
					break;
				default:
					string message = string.Format("Unhandled SortRulesType '{0}' while writing LDML definition file.", SortUsing);
					throw new ApplicationException(message);
			}
			WriteBeginSpecialElement(writer);
			WriteSpecialValue(writer, "sortRulesType", SortUsing.ToString());
			writer.WriteEndElement();

			writer.WriteEndElement();
			writer.WriteEndElement();
		}