crashanalysercmd/Libraries/File Formats/Plugins/CrashXmlPlugin/PluginImplementations/Sink/CIXmlSink.cs
equal
deleted
inserted
replaced
|
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.Collections.Generic; |
|
19 using System.Text; |
|
20 using CrashItemLib.Sink; |
|
21 using CrashXmlPlugin.FileFormat.Document; |
|
22 |
|
23 namespace CrashXmlPlugin.PluginImplementations.Sink |
|
24 { |
|
25 public class CrashXmlSink : CISink |
|
26 { |
|
27 #region Constants |
|
28 public const string KXmlSinkName = "Crash XML"; |
|
29 #endregion |
|
30 |
|
31 #region Constructors |
|
32 public CrashXmlSink( CISinkManager aManager ) |
|
33 : base( KXmlSinkName, aManager ) |
|
34 { |
|
35 } |
|
36 #endregion |
|
37 |
|
38 #region From CISink |
|
39 public override object Serialize( CISinkSerializationParameters aParams ) |
|
40 { |
|
41 CXmlDocumentRoot document = new CXmlDocumentRoot(); |
|
42 // |
|
43 string fileName = string.Empty; |
|
44 using ( CXmlDocumentSerializationParameters parameters = new CXmlDocumentSerializationParameters( aParams, document ) ) |
|
45 { |
|
46 fileName = parameters.FileName; |
|
47 document.XmlSerialize( parameters ); |
|
48 } |
|
49 // |
|
50 return fileName; |
|
51 } |
|
52 #endregion |
|
53 } |
|
54 } |