Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/22/10 00:44:01 (14 years ago)
Author:
swagner
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.Netron/3.0.2672.12446/Netron.Diagramming.Core-3.0.2672.12446/Serialization/PenStyle.Serialization.cs

    r2768 r4068  
    11using System;
    2 using System.Collections.Generic;
    3 using System.Text;
     2using System.Diagnostics;
    43using System.Drawing;
    5 using System.ComponentModel;
    64using System.Runtime.Serialization;
     5using System.Xml.Schema;
    76using System.Xml.Serialization;
    8 using System.Diagnostics;
    9 using System.Xml.Schema;
    10 using System.Drawing.Drawing2D;
    11 namespace Netron.Diagramming.Core
    12 {
     7namespace Netron.Diagramming.Core {
     8  /// <summary>
     9  /// Complementary partial class related to (de)serialization.
     10  /// </summary>
     11  [Serializable]
     12  public partial class PenStyle :
     13     ISerializable,
     14     IXmlSerializable,
     15     IDeserializationCallback {
     16    #region Deserialization constructor
     17
     18    // -------------------------------------------------------------------
    1319    /// <summary>
    14     /// Complementary partial class related to (de)serialization.
     20    /// Deserialization constructor
    1521    /// </summary>
    16     [Serializable]
    17     public partial class PenStyle :
    18        ISerializable,
    19        IXmlSerializable,
    20        IDeserializationCallback
    21     {
    22         #region Deserialization constructor
     22    /// <param name="info">The info.</param>
     23    /// <param name="context">The context.</param>
     24    // -------------------------------------------------------------------
     25    protected PenStyle(SerializationInfo info, StreamingContext context) {
     26      if (Tracing.BinaryDeserializationSwitch.Enabled) {
     27        Trace.WriteLine("Deserializing the fields of 'PenStyle'.");
     28      }
    2329
    24         // -------------------------------------------------------------------
    25         /// <summary>
    26         /// Deserialization constructor
    27         /// </summary>
    28         /// <param name="info">The info.</param>
    29         /// <param name="context">The context.</param>
    30         // -------------------------------------------------------------------
    31         protected PenStyle(SerializationInfo info, StreamingContext context)
    32         {
    33             if (Tracing.BinaryDeserializationSwitch.Enabled)
    34             {
    35                 Trace.WriteLine("Deserializing the fields of 'PenStyle'.");
    36             }
     30      double version = info.GetDouble("PenStyleVersion");
    3731
    38             double version = info.GetDouble("PenStyleVersion");
     32      mWidth = info.GetSingle("Width");
    3933
    40             mWidth = info.GetSingle("Width");
     34      mColor = (Color)info.GetValue("Color", typeof(Color));
    4135
    42             mColor = (Color)info.GetValue("Color", typeof(Color));
     36      mDashStyle = (System.Drawing.Drawing2D.DashStyle)Enum.Parse(
     37          typeof(System.Drawing.Drawing2D.DashStyle),
     38          info.GetString("DashStyle"));
     39    }
     40    #endregion
    4341
    44             mDashStyle = (System.Drawing.Drawing2D.DashStyle)Enum.Parse(
    45                 typeof(System.Drawing.Drawing2D.DashStyle),
    46                 info.GetString("DashStyle"));
    47         }
    48         #endregion
    49 
    50         #region Serialization events
    51         /*
     42    #region Serialization events
     43    /*
    5244        [OnSerializing]
    5345        void OnSerializing(StreamingContext context)
     
    6153        }
    6254        */
    63         #endregion
     55    #endregion
    6456
    65         #region Deserialization events
    66         /*
     57    #region Deserialization events
     58    /*
    6759        [OnDeserializing]
    6860        void OnDeserializing(StreamingContext context)
     
    7870        }
    7971       */
    80         #endregion
     72    #endregion
    8173
    82         #region Serialization
     74    #region Serialization
    8375
    84         // -------------------------------------------------------------------
    85         /// <summary>
    86         /// Populates a <see cref=
    87         /// "T:System.Runtime.Serialization.SerializationInfo"></see> with
    88         /// the data needed to serialize the target object.
    89         /// </summary>
    90         /// <param name="info">The <see cref=
    91         /// "T:System.Runtime.Serialization.SerializationInfo"></see> to
    92         /// populate with data.</param>
    93         /// <param name="context">The destination (see <see cref=
    94         /// "T:System.Runtime.Serialization.StreamingContext"></see>) for
    95         /// this serialization.</param>
    96         /// <exception cref="T:System.Security.SecurityException">The caller
    97         /// does not have the required permission. </exception>
    98         // -------------------------------------------------------------------
    99         public virtual void GetObjectData(
    100             SerializationInfo info,
    101             StreamingContext context)
    102         {
    103             if (Tracing.BinarySerializationSwitch.Enabled)
    104                 Trace.WriteLine("Serializing the fields of 'PenStyle'.");
     76    // -------------------------------------------------------------------
     77    /// <summary>
     78    /// Populates a <see cref=
     79    /// "T:System.Runtime.Serialization.SerializationInfo"></see> with
     80    /// the data needed to serialize the target object.
     81    /// </summary>
     82    /// <param name="info">The <see cref=
     83    /// "T:System.Runtime.Serialization.SerializationInfo"></see> to
     84    /// populate with data.</param>
     85    /// <param name="context">The destination (see <see cref=
     86    /// "T:System.Runtime.Serialization.StreamingContext"></see>) for
     87    /// this serialization.</param>
     88    /// <exception cref="T:System.Security.SecurityException">The caller
     89    /// does not have the required permission. </exception>
     90    // -------------------------------------------------------------------
     91    public virtual void GetObjectData(
     92        SerializationInfo info,
     93        StreamingContext context) {
     94      if (Tracing.BinarySerializationSwitch.Enabled)
     95        Trace.WriteLine("Serializing the fields of 'PenStyle'.");
    10596
    106             info.AddValue("PenStyleVersion", penStyleVersion);
    107             info.AddValue("Color", this.mColor, typeof(Color));
    108             info.AddValue("Width", this.mWidth);
    109             info.AddValue("DashStyle", this.mDashStyle.ToString());
    110         }
    111         #endregion
     97      info.AddValue("PenStyleVersion", penStyleVersion);
     98      info.AddValue("Color", this.mColor, typeof(Color));
     99      info.AddValue("Width", this.mWidth);
     100      info.AddValue("DashStyle", this.mDashStyle.ToString());
     101    }
     102    #endregion
    112103
    113         #region Xml serialization
    114         /// <summary>
    115         /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
    116         /// </summary>
    117         /// <returns>
    118         /// 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.
    119         /// </returns>
    120         public virtual XmlSchema GetSchema()
    121         {
    122             throw new NotImplementedException("The method or operation is not implemented.");
    123         }
     104    #region Xml serialization
     105    /// <summary>
     106    /// This property is reserved, apply the <see cref="T:System.Xml.Serialization.XmlSchemaProviderAttribute"></see> to the class instead.
     107    /// </summary>
     108    /// <returns>
     109    /// 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.
     110    /// </returns>
     111    public virtual XmlSchema GetSchema() {
     112      throw new NotImplementedException("The method or operation is not implemented.");
     113    }
    124114
    125         /// <summary>
    126         /// Generates an object from its XML representation.
    127         /// </summary>
    128         /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
    129         public virtual void ReadXml(System.Xml.XmlReader reader)
    130         {
    131             throw new NotImplementedException("The method or operation is not implemented.");
    132         }
     115    /// <summary>
     116    /// Generates an object from its XML representation.
     117    /// </summary>
     118    /// <param name="reader">The <see cref="T:System.Xml.XmlReader"></see> stream from which the object is deserialized.</param>
     119    public virtual void ReadXml(System.Xml.XmlReader reader) {
     120      throw new NotImplementedException("The method or operation is not implemented.");
     121    }
    133122
    134         /// <summary>
    135         /// Converts an object into its XML representation.
    136         /// </summary>
    137         /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
    138         public virtual void WriteXml(System.Xml.XmlWriter writer)
    139         {
    140             throw new NotImplementedException("The method or operation is not implemented.");
    141         }
    142         #endregion
     123    /// <summary>
     124    /// Converts an object into its XML representation.
     125    /// </summary>
     126    /// <param name="writer">The <see cref="T:System.Xml.XmlWriter"></see> stream to which the object is serialized.</param>
     127    public virtual void WriteXml(System.Xml.XmlWriter writer) {
     128      throw new NotImplementedException("The method or operation is not implemented.");
     129    }
     130    #endregion
    143131
    144         /// <summary>
    145         /// Runs when the entire object graph has been deserialized.
    146         /// </summary>
    147         /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
    148         public virtual void OnDeserialization(object sender)
    149         {
    150             if (Tracing.BinaryDeserializationSwitch.Enabled)
    151                 Trace.WriteLine("IDeserializationCallback of 'PenStyle' called.");
    152         }
     132    /// <summary>
     133    /// Runs when the entire object graph has been deserialized.
     134    /// </summary>
     135    /// <param name="sender">The object that initiated the callback. The functionality for this parameter is not currently implemented.</param>
     136    public virtual void OnDeserialization(object sender) {
     137      if (Tracing.BinaryDeserializationSwitch.Enabled)
     138        Trace.WriteLine("IDeserializationCallback of 'PenStyle' called.");
    153139    }
     140  }
    154141}
Note: See TracChangeset for help on using the changeset viewer.