Ejemplo n.º 1
0
 /// <summary>
 /// Writes the null argument io exception to the stream, then shuts down the game.
 /// </summary>
 /// <param name="ane">The ane.</param>
 /// <param name="elementType">Type of the element.</param>
 /// <param name="elementNumber">The element number.</param>
 public static void WriteNullArgumentIoException(ArgumentNullException ane, IoType elementType, int elementNumber)
 {
     DefaultLogger.WriteExceptionThenQuit(
         MessageType.FileIOError,
         ane,
         string.Format("file IO argument null exception: io type {0}, elementNumber {1}, xml-line number: {2}",
                       elementType.ToString(),
                       elementNumber));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Write fatal IO exception, then close down the game.
 /// </summary>
 /// <param name="exception"></param>
 /// <param name="xElement"></param>
 public static void WriteFatalIOException(Exception exception, XElement xElement, IoType elementType, int elementNumber)
 {
     DefaultLogger.WriteExceptionThenQuit(
         MessageType.FileIOError,
         exception,
         string.Format("file IO exception: io type {0}, elementNumber {1}, xElementData: {2}, xml line number: {3}",
         elementType.ToString(),
         elementNumber,
         xElement.Value,
         xElement.LineNumber()));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Write fatal IO exception, then close down the game.
 /// </summary>
 /// <param name="exception"></param>
 /// <param name="xElement"></param>
 public static void WriteFatalIOException(Exception exception, XElement xElement, IoType elementType, int elementNumber)
 {
     DefaultLogger.WriteExceptionThenQuit(
         MessageType.FileIOError,
         exception,
         string.Format("file IO exception: io type {0}, elementNumber {1}, xElementData: {2}, xml line number: {3}",
                       elementType.ToString(),
                       elementNumber,
                       xElement.Value,
                       xElement.LineNumber()));
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Writes an IO message.
        /// </summary>
        /// <param name="xElement">The x element.</param>
        /// <param name="entityNumber">The entity number.</param>
        public static void WriteIoInformation(XElement xElement, IoType elementType, int elementTypeCount)
        {
            // can't write an IO message if the xElement is null
            if (xElement == null)
            {
                WriteFatalIOException(new ArgumentNullException(xElement.ToString()), xElement, elementType, elementTypeCount);
            }

            DefaultLogger.DoWrite(
                _entityIoStream,
                MessageType.FileIOInfo,
                true,
                string.Format("Parsing element, iotype: {0}, element name {1}, xml-line number {2}",
                    elementType.ToString(), xElement.Name, xElement.LineNumber())
            );
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Writes an IO message.
        /// </summary>
        /// <param name="xElement">The x element.</param>
        /// <param name="entityNumber">The entity number.</param>
        public static void WriteIoInformation(XElement xElement, IoType elementType, int elementTypeCount)
        {
            // can't write an IO message if the xElement is null
            if (xElement == null)
            {
                WriteFatalIOException(new ArgumentNullException(xElement.ToString()), xElement, elementType, elementTypeCount);
            }

            DefaultLogger.DoWrite(
                _entityIoStream,
                MessageType.FileIOInfo,
                true,
                string.Format("Parsing element, iotype: {0}, element name {1}, xml-line number {2}",
                              elementType.ToString(), xElement.Name, xElement.LineNumber())
                );
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Writes the null argument io exception to the stream, then shuts down the game.
 /// </summary>
 /// <param name="ane">The ane.</param>
 /// <param name="elementType">Type of the element.</param>
 /// <param name="elementNumber">The element number.</param>
 public static void WriteNullArgumentIoException(ArgumentNullException ane, IoType elementType, int elementNumber)
 {
     DefaultLogger.WriteExceptionThenQuit(
         MessageType.FileIOError,
         ane,
         string.Format("file IO argument null exception: io type {0}, elementNumber {1}, xml-line number: {2}",
         elementType.ToString(),
         elementNumber));
 }