crashanalysercmd/Libraries/File Formats/Plugins/CrashXmlPlugin/FileFormat/CrashAnalyser/CXmlNodeCrashAnalyserRuntime.cs
changeset 0 818e61de6cd1
equal deleted inserted replaced
-1:000000000000 0:818e61de6cd1
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 using System;
       
    18 using System.Text;
       
    19 using System.IO;
       
    20 using System.Xml;
       
    21 using System.Collections.Generic;
       
    22 using CrashItemLib.Sink;
       
    23 using CrashXmlPlugin.FileFormat.Node;
       
    24 using CrashXmlPlugin.FileFormat.Versions;
       
    25 using SymbianUtils.Enum;
       
    26 
       
    27 namespace CrashXmlPlugin.FileFormat.CrashAnalyser
       
    28 {
       
    29     internal class CXmlNodeCrashAnalyserRuntime : CXmlNode
       
    30 	{
       
    31 		#region Constructors
       
    32         public CXmlNodeCrashAnalyserRuntime()
       
    33             : base( Constants.CrashAnalyser_Runtime )
       
    34         {
       
    35 		}
       
    36 		#endregion
       
    37 
       
    38         #region From CXmlNode
       
    39         protected override void XmlSerializeContent( CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters )
       
    40         {
       
    41             // UI Version
       
    42             CXmlVersionExtended version = new CXmlVersionExtended( aParameters.UIVersion );
       
    43             version.XmlSerialize( aParameters );
       
    44 
       
    45             // Analysis type
       
    46             string analysisType = EnumUtils.ToString( aParameters.DetailLevel );
       
    47             aParameters.Writer.WriteElementString( Constants.CrashAnalyser_Runtime_AnalysisType, analysisType );
       
    48 
       
    49             // Command line
       
    50             string commandLine = aParameters.UICommandLineArguments;
       
    51             aParameters.Writer.WriteElementString( Constants.CrashAnalyser_Runtime_CommandLine, commandLine );
       
    52         }
       
    53 
       
    54         protected override void XmlSerializeChildren( CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters )
       
    55         {
       
    56             aParameters.Writer.WriteStartElement( Constants.CrashAnalyser_Runtime_InputFiles );
       
    57             
       
    58             // Get the file names & sort them
       
    59             List<string> files = new List<string>();
       
    60             files.AddRange( aParameters.Container.FileNames );
       
    61             files.Sort();
       
    62 
       
    63             // Output them
       
    64             foreach ( string file in files )
       
    65             {
       
    66                 aParameters.Writer.WriteElementString( Constants.CrashAnalyser_Runtime_InputFiles_File, file );
       
    67             }
       
    68             //
       
    69             aParameters.Writer.WriteEndElement();
       
    70         }
       
    71         #endregion
       
    72             
       
    73         #region Properties
       
    74         #endregion
       
    75 
       
    76         #region Data members
       
    77 		#endregion
       
    78 	}
       
    79 }