예제 #1
0
        /// <summary>
        /// Print the object's XML to the XmlWriter.
        /// </summary>
        /// <param name="objWriter">XmlTextWriter to write with.</param>
        /// <param name="objCulture">Culture in which to print</param>
        public async ValueTask Print(XmlWriter objWriter, CultureInfo objCulture)
        {
            if (objWriter == null)
            {
                return;
            }
            // <initiationgrade>
            XmlElementWriteHelper objBaseElement = await objWriter.StartElementAsync("initiationgrade");

            try
            {
                await objWriter.WriteElementStringAsync("guid", InternalId);

                await objWriter.WriteElementStringAsync("grade", Grade.ToString(objCulture));

                await objWriter.WriteElementStringAsync("group", Group.ToString(GlobalSettings.InvariantCultureInfo));

                await objWriter.WriteElementStringAsync("ordeal", Ordeal.ToString(GlobalSettings.InvariantCultureInfo));

                await objWriter.WriteElementStringAsync("schooling", Schooling.ToString(GlobalSettings.InvariantCultureInfo));

                await objWriter.WriteElementStringAsync("technomancer", Technomancer.ToString(GlobalSettings.InvariantCultureInfo));

                if (GlobalSettings.PrintNotes)
                {
                    await objWriter.WriteElementStringAsync("notes", Notes);
                }
            }
            finally
            {
                // </initiationgrade>
                await objBaseElement.DisposeAsync();
            }
        }
예제 #2
0
 /// <summary>
 /// Print the object's XML to the XmlWriter.
 /// </summary>
 /// <param name="objWriter">XmlTextWriter to write with.</param>
 /// <param name="strLanguageToPrint">Language in which to print</param>
 public void Print(XmlTextWriter objWriter, string strLanguageToPrint)
 {
     objWriter.WriteStartElement("initiationgrade");
     objWriter.WriteElementString("grade", Grade.ToString());
     objWriter.WriteElementString("group", Group.ToString());
     objWriter.WriteElementString("ordeal", Ordeal.ToString());
     objWriter.WriteElementString("schooling", Schooling.ToString());
     objWriter.WriteElementString("technomancer", Technomancer.ToString());
     if (_objOptions.PrintNotes)
     {
         objWriter.WriteElementString("notes", Notes);
     }
     objWriter.WriteEndElement();
 }
예제 #3
0
 /// <summary>
 /// Print the object's XML to the XmlWriter.
 /// </summary>
 /// <param name="objWriter">XmlTextWriter to write with.</param>
 /// <param name="objCulture">Culture in which to print</param>
 public void Print(XmlTextWriter objWriter, CultureInfo objCulture)
 {
     if (objWriter == null)
     {
         return;
     }
     objWriter.WriteStartElement("initiationgrade");
     objWriter.WriteElementString("grade", Grade.ToString(objCulture));
     objWriter.WriteElementString("group", Group.ToString(GlobalOptions.InvariantCultureInfo));
     objWriter.WriteElementString("ordeal", Ordeal.ToString(GlobalOptions.InvariantCultureInfo));
     objWriter.WriteElementString("schooling", Schooling.ToString(GlobalOptions.InvariantCultureInfo));
     objWriter.WriteElementString("technomancer", Technomancer.ToString(GlobalOptions.InvariantCultureInfo));
     if (_objCharacter.Options.PrintNotes)
     {
         objWriter.WriteElementString("notes", Notes);
     }
     objWriter.WriteEndElement();
 }