Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/SimpleEllipse.Serialization.cs @ 4068

Last change on this file since 4068 was 4068, checked in by swagner, 14 years ago

Sorted usings and removed unused usings in entire solution (#1094)

File size: 4.9 KB
Line 
1using System;
2using System.Diagnostics;
3using System.Runtime.Serialization;
4using System.Xml.Schema;
5using System.Xml.Serialization;
6namespace Netron.Diagramming.Core {
7  /// <summary>
8  /// Complementary partial class related to (de)serialization.
9  /// </summary>
10  [Serializable]
11  public partial class SimpleEllipse : ISerializable, IXmlSerializable, IDeserializationCallback {
12    #region Deserialization constructor
13    /// <summary>
14    /// Deserialization constructor
15    /// </summary>
16    /// <param name="info">The info.</param>
17    /// <param name="context">The context.</param>
18    protected SimpleEllipse(SerializationInfo info, StreamingContext context)
19      : base(info, context) {
20      if (Tracing.BinaryDeserializationSwitch.Enabled)
21        Trace.WriteLine("Deserializing the fields of 'SimpleEllipse'.");
22
23      double version = info.GetDouble("SimpleEllipseVersion");
24    }
25    #endregion
26
27    #region Serialization events
28    /*
29        [OnSerializing]
30        void OnSerializing(StreamingContext context)
31        {
32            Trace.Indent();
33            Trace.WriteLine("Starting to serializing the 'SimpleEllipse' class...");
34        }
35        [OnSerialized]
36        void OnSerialized(StreamingContext context)
37        {
38            Trace.WriteLine("...serialization of 'SimpleEllipse' finished");
39            Trace.Unindent();
40        }
41        */
42    #endregion
43
44    #region Deserialization events
45    /*
46        [OnDeserializing]     
47        void OnDeserializing(StreamingContext context)
48        {
49            Trace.Indent();
50            Trace.WriteLine("IDeserializationCallback of 'SimpleEllipse' called.");
51        }
52        [OnDeserialized]
53        void OnDeserialized(StreamingContext context)
54         {
55             Trace.WriteLine("...deserialization of 'SimpleEllipse' finished");
56             Trace.Unindent();
57         }
58       */
59    #endregion
60
61    #region Serialization
62    /// <summary>
63    /// Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> with the data needed to serialize the target object.
64    /// </summary>
65    /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"></see> to populate with data.</param>
66    /// <param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext"></see>) for this serialization.</param>
67    /// <exception cref="T:System.Security.SecurityException">The caller does not have the required permission. </exception>
68    public override void GetObjectData(SerializationInfo info, StreamingContext context) {
69      if (Tracing.BinarySerializationSwitch.Enabled)
70        Trace.WriteLine("Serializing the fields of 'SimpleEllipse'.");
71      base.GetObjectData(info, context);
72
73      info.AddValue("SimpleEllipseVersion", simpleEllipseVersion);
74    }
75    #endregion
76
77    #region Xml serialization
78    /// <summary>
79    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
80    /// </summary>
81    /// <returns>
82    /// An <see cref="T:System.Xml.Schema.XmlSchema"></see> that describes the XML representation of the object that is produced by the <see cref="M:System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter)"></see> method and consumed by the <see cref="M:System.Xml.Serialization.IXmlSerializable.ReadXml(System.Xml.XmlReader)"></see> method.
83    /// </returns>
84    public override XmlSchema GetSchema() {
85      throw new NotImplementedException("The method or operation is not implemented.");
86    }
87
88    /// <summary>
89    /// Generates an object from its XML representation.
90    /// </summary>
91    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
92    public override void ReadXml(System.Xml.XmlReader reader) {
93      throw new NotImplementedException("The method or operation is not implemented.");
94    }
95
96    /// <summary>
97    /// Converts an object into its XML representation.
98    /// </summary>
99    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
100    public override void WriteXml(System.Xml.XmlWriter writer) {
101      throw new NotImplementedException("The method or operation is not implemented.");
102    }
103    #endregion
104
105
106
107    /// <summary>
108    /// Runs when the entire object graph has been deserialized.
109    /// </summary>
110    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
111    public override void OnDeserialization(object sender) {
112      base.OnDeserialization(sender);
113      if (Tracing.BinaryDeserializationSwitch.Enabled)
114        Trace.WriteLine("IDeserializationCallback of 'SimpleEllipse' called.");
115
116
117    }
118  }
119}
Note: See TracBrowser for help on using the repository browser.