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