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 @ 2768

Last change on this file since 2768 was 2768, checked in by mkommend, 14 years ago

added solution folders and sources for the netron library (ticket #867)

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