|
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.Collections.Generic; |
|
20 using CrashItemLib.Crash.Base; |
|
21 using CrashItemLib.Crash.BinaryData; |
|
22 |
|
23 namespace CrashXmlPlugin.FileFormat.Segment.Entries.BinaryData |
|
24 { |
|
25 internal class CXmlSegBinaryData : CXmlSegBase |
|
26 { |
|
27 #region Constructors |
|
28 public CXmlSegBinaryData() |
|
29 : base( SegConstants.BinaryData ) |
|
30 { |
|
31 } |
|
32 #endregion |
|
33 |
|
34 #region From CXmlSegBase |
|
35 public override int SegmentPriority |
|
36 { |
|
37 get { return 120; } |
|
38 } |
|
39 #endregion |
|
40 |
|
41 #region From CXmlNode |
|
42 public override void XmlSerialize( CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters ) |
|
43 { |
|
44 iList = aParameters.Container.ChildrenByType<CIBinaryData>( CIElement.TChildSearchType.EEntireHierarchy ); |
|
45 // |
|
46 if ( iList != null && iList.Count > 0 ) |
|
47 { |
|
48 base.XmlSerialize( aParameters ); |
|
49 } |
|
50 // |
|
51 iList = null; |
|
52 } |
|
53 |
|
54 protected override void XmlSerializeChildren( CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters ) |
|
55 { |
|
56 System.Diagnostics.Debug.Assert( iList != null ); |
|
57 // |
|
58 foreach ( CIBinaryData blob in iList ) |
|
59 { |
|
60 CXmlBlob xmlBlob = new CXmlBlob( blob ); |
|
61 xmlBlob.XmlSerialize( aParameters ); |
|
62 } |
|
63 } |
|
64 #endregion |
|
65 |
|
66 #region Properties |
|
67 #endregion |
|
68 |
|
69 #region Data members |
|
70 private CIElementList<CIBinaryData> iList = null; |
|
71 #endregion |
|
72 } |
|
73 } |